?? adminsql.asp
字號:
<!--#include file="MarcosCB.asp"-->
<style>
<%=skinCss%>
</style>
<%
getConn()
isIn()
isAdmin()
dim i,jpage,theAct
sql=trim(getPost("SQL"))
page=getPost("page")
theAct=getPost("theAct")
if not isNumeric(page) then
page=1
end if
if theAct="execute" and left(lcase(sql),7)="select " then
rs.open sql,conn,1,1
rs.pageSize=20
if not rs.eof then
rs.absolutePage=page
end if
if rs.fields.count>0 then
echo "<table border=""1"" align=""center"" cellpadding=""0"" cellspacing=""0"" bordercolor="""&borderColor&""">"
echo "<tr>"
echo "<td height=""22"" align=""center"" class=""tr"" colspan="""&rs.fields.count&""">SQL操作 - 執行結果</td>"
echo "</tr>"
echo "<tr>"
for j=0 to rs.fields.count-1
echo "<td height=""22"" align=""center"" class=""td""> "&rs.fields(j).name&" </td>"
next
for i=1 to 20
if rs.eof then
exit for
end if
echo "</tr>"
echo "<tr onmouseover=""javascript:this.className='trOnMOver';"" onmouseout=""javascript:this.className='';"" valign=top>"
for j=0 to rs.fields.count-1
echo "<td height=""22"" align=""center"">"&enCode(rs(j))&"</td>"
next
echo "</tr>"
rs.movenext
next
end if
echo "<tr>"
echo "<td height=""22"" align=""center"" class=""tr"" colspan="""&rs.fields.count&""">"
for i=1 to rs.pagecount
echo replace("<a href=""?theAct=execute&sql="&sql&"&page="&i&"""><font {$font"&i&"}>"&i&"</font></a> ","{$font"&page&"}","class=warningColor")
next
echo "</td></tr></table><br>"
rs.close
end if
if theAct="execute" and left(lcase(sql),7)<>"select " then
conn.execute(sql)
end if
if theAct<>"" then
echo "<br><center>所有操作完成!總用時"&(timer-sTime)*1000&"ms</center><br>"
end if
closeConn()
%>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
<form method="post" onsubmit="this.Submit.disabled=true;">
<tr>
<td height="22" colspan="2" align="center" class="tr">SQL操作(非專業人員請不要操作)</td>
</tr>
<tr>
<td width="99" height="22" align="right">SQL語句:</td>
<td width="495" height="22"><input name="SQL" type="text" id="SQL" value="<%=sql%>" size="60"></td>
</tr>
<tr>
<td height="22" colspan="2" align="center" class="tr"><input type="submit" name="Submit" value="提 交">
<input type="reset" name="Submit2" value="重 置">
<input name="theAct" type="hidden" id="theAct" value="execute"></td>
</tr>
</form>
</table>
<br>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>">
<tr>
<td height="25" align="center" class="tr"> </td>
</tr>
<tr>
<td height="60" align="center" bgcolor="#FFFFFF"><font face="Wingdings">v</font>
HigroupBBS <font face="Wingdings">v</font><br>
Powered By <a href="javascript:;" title="QQ 26696782">Marcos</a> 2004.10</td>
</tr>
</table>
<%
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -