<% Option Explicit %>
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P0605") then Call ReturnError1()
%>
<html>
<head>
<title>执行SQL脚本</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style type="text/css">
<!--
.SysParaButtonStyle {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-right-color: #999999;
	border-bottom-color: #999999;
	border-left-color: #FFFFFF;
	background-color: #E6E6E6;
}
-->
</style>
<link href="../../CSS/css.css" rel="stylesheet">
<body topmargin="0" leftmargin="0" scroll="yes" oncontextmenu="return false;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      
    <td height="30" class="SysParaButtonStyle">
<div align="center"><strong>执行SQL脚本</strong></div></td>
    </tr>
    <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<table width="98%" border="1" align="center" cellpadding="4" cellspacing="3" bordercolor="e6e6e6">
  <tr><td>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="80%"><textarea name="Content" rows="2" wrap="OFF" style="width:100%;"></textarea></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><font color="red">注：一次只能执行一条Sql语句。如果你对SQL不熟悉，请尽量不要使用。否则一旦出错，将是致命的。</font></div></td>
        </tr>
        <tr> 
          <td height="21"><div align="center"> 
                
              <input name="Submit" type="button" onClick="ExecuteSql();" class="Anbut2"  value=" 执 行 ">
              <input type="reset" name="Submit3" value=" 重 填 ">
            </div></td>
        </tr>
	  </table></td>
  </tr>
  <tr> 
    <td><iframe id="ResultShowFrame" scrolling="yes" src="DataBase_SqlResult.asp" style="width:100%;height:420;" frameborder=1></iframe></td>
  </tr>
</table>
</td></tr></table>
</body>
</html>
<%
Set Conn=nothing
%>
<script language="JavaScript">
function ExecuteSql()
{
	var FormObj=frames["ResultShowFrame"].document.ExecuteForm;
	if (document.all.Content.value!='')
	{
		FormObj.Sql.value=document.all.Content.value;
		FormObj.Result.value='Submit';
		FormObj.submit();
		FormObj.Result.value='';
	}
}
</script>