📄 admin_sever.asp
字号:
<!--#include file="function.asp"-->
<%CheckAdmin1%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="top1.asp"-->
<br><br>
<%
if Request.QueryString("cmd")="up" then
ServerName=replace(request.form("ServerName"),"'","")
ServerUrl=replace(request.form("ServerUrl"),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from DJServer where ServerID="& replace(Request.QueryString("ServerID"),"'","")&""
rs.open sql,conn,3,3
rs("ServerName")=trim(request("ServerName"))
rs("ServerUrl")=trim(request("ServerUrl"))
rs.update
rs.close
end if
if request.querystring("cmd")="add" then
ServerName=replace(request.form("ServerName"),"'","")
ServerUrl=replace(request.form("ServerUrl"),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from DJServer"
rs.open sql,conn,3,3
rs.addnew
rs("ServerName")=ServerName
rs("ServerUrl")=ServerUrl
rs.update
response.redirect "admin_sever.asp"
end if
if Request.QueryString("cmd")="del" then
ServerName=replace(request.form("ServerName"),"'","")
ServerUrl=replace(request.form("ServerUrl"),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from DJServer where ServerID="& replace(Request.QueryString("ServerID"),"'","")&""
rs.open sql,conn,3,3
rs.delete
rs.close
end if
%>
<table border="0" width="750" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="124" align="center">
<tr>
<td valign=top width=5 background="images/line_bg02.gif" height="115"><img border="0" src="补间.gif" width="7" height="7"></td>
<td valign=top width=175 height="115">
<!--#include file="admin_left.asp"-->
</td>
<td valign=top width=5 background="images/line_bg02.gif" height="115"> </td>
<td valign=top width="551" height="115">
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#999999" width="99%" id="AutoNumber1" height="20">
<tr>
<td height="20">
<p align="center"><b><font size="2"> <font color="#FFFFFF">服务器列表</font></font></b>
</td>
</tr>
<tr>
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from DJServer",conn,1,1
dim i
i=1
do while not rs.eof
%>
<form method="POST" onsubmit action="admin_sever.asp?cmd=up&ServerID=<%=rs("ServerID")%>">
<td >第<font color="#FF0000"><%=i%></font>服务器:<br>
名称:
<input type="text" name="ServerName" size="10" value="<%=rs("ServerName")%>">
地址:
<input type="text" name="ServerUrl" size="30" value="<%=rs("ServerUrl")%>">
<input type="submit" name="Submit3" value="修改">
<a href="admin_sever.asp?cmd=del&ServerID=<%=rs("ServerID")%>"><font color="#FF0000">删
除</font></a>
</td>
</form>
</tr>
<%
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<tr>
<form method="POST" onsubmit action="admin_sever.asp?cmd=add">
<td ><font size="2">新增服务器:</font><br>在线
<input type="text" name="ServerName" size="20">
<input type="text" name="ServerUrl" size="20">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重写"></td>
</form>
</tr>
<tr>
<td width="528"> </td>
</tr>
<tr>
<td width="528" height="27"> </td>
</tr>
</table>
<p align="center">
</td>
<td valign=top width="5" background="images/line_bg02.gif" height="115"> </td>
</tr>
<tr>
<td valign=top width=750 colspan="5" background="images/line_bg01.gif" height="9">
<img border="0" src="补间.gif" width="7" height="7"></td>
</tr>
</table>
<br><br>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -