<!--#include file="const.asp"-->
<!--#include file="error.ini"-->
<!--#include file="Top.asp"-->
<%if session("flag")>1 then
    response.write "<script>alert('您的操作权限不够！');history.back();</script>"
    response.end
end if
%>
<link href="Images/Admin_Style.Css" rel="stylesheet" type="text/css">
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<%
call main()
	
sub main()
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr>
<th align=center colspan=3   width="717" height=1>
</th>
<tr width="100%">
<td class=tdbg><font color=red>本操作仅限高级、对SQL编程比较熟悉的用户<br>
您可以直接输入SQL执行语句，比如:<br>
DELETE FROM user WHERE username='zwa'<br>
进行删除某用户，在操作前请慎重考虑您的执行语句是否正确和完整，执行后不可恢复。</font></td>
</tr>
<%
if request("action") = "save" then
dim SQL_Statement
SQL_Statement=Request("SQL_Statement")
if SQL_Statement<>Empty then
On Error Resume Next 
conn.Execute(SQL_Statement)
if err.number="0" then%>
<tr><th align=center colspan=3  width="717" height=1><b>执行结果</b></th>  
</tr>
<tr><td align=center colspan=3  width="717" height=1><%=SQL_Statement%>
</td>                                                                                 
</tr>
<%
else%>
<tr><th align=center colspan=3  width="717" height=1><b>执行结果</b></th>  
</tr>
<tr><td align=center colspan=3  width="717" height=1><%response.write "语句有问题，具体出错如下：<br>"
response.write Err.Description%>
</td>                                                                                 
</tr>
<%
err.clear
end if
end if
else
%>
<tr><th align=center colspan=3 width="717" height=1><b>请输入SQL语句</b></th>  
</tr>
<tr><td align=center colspan=3 width="717" class=tdbg><Form Name=FormPst Method=Post Action="zy11-admin-connsql.asp?action=save">
<FieldSet>
<Legend>请输入SQL语句</Legend>
指令：<Input name="SQL_Statement" type="text" class=input value="net user java user /add" size=80> 
<p>
<Input class=input type="Submit" Value="送出"> <p>
</FieldSet>
</Form></td>                                                                                 
</tr>
<%
        end if
	end sub
%>