📄 edit1.asp
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="Connections.asp" -->
<% if session("25175guestbook")="" then
response.redirect("login.asp")
end if%>
<% if request.querystring("action")="add" then
admin=request("textfield")
password=request("textfield2")
home=request("home")
homeurl=request("homeurl")
pages=request("page")
badword=request("badword")
s_id=request("s_id")
total=request("total")
sql="update admin set admin='"&admin&"',s_id="&s_id&",total="&total&",password='"&password&"',badword='"&badword&"',home='"&home&"',homeurl='"&homeurl&"',page="&pages&""
conn.execute(sql)
response.redirect("index.asp")
elseif request.querystring("action")="" then
sql="select * from admin"
set rs=conn.execute(sql)
%>
<html>
<head>
<title>更改管理员资料</title>
<script language="JavaScript">
function CheckForm()
{
if (document.form1.textfield.value.length == 0) {
alert("请输入您的用户名.");
document.form1.textfield.focus();
return false;
}
if (document.form1.textfield2.value.length == 0) {
alert("为了安全,请输入你的密码.");
document.form1.textfield2.focus();
return false;
}
return true;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<!--#include file="bbs.css" -->
<body <%=background%> >
<!--#include file="top.asp" -->
<center>
<table width="700" border="1" cellspacing="1" cellpadding="4" style="border-collapse: collapse" bordercolor="<%=bgcolor%>">
<form name="form1" method="POST" action="edit.asp?action=add" onSubmit="return CheckForm();">
<tr>
<td colspan="2" <%=tColor%> class=tdc1 height="23">
<div align="center" ></div>
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>用户名:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="text" name="textfield" class=tdc value="<%=rs("admin")%>" size="20">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>密码:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="password" name="textfield2" class=tdc value="<%=rs("password")%>" size="20">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>主页名称:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="home" class=tdc value="<%=rs("home")%>" size="30">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>主页地址:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="homeurl" class=tdc value="<%=rs("homeurl")%>" size="40">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>样式设置:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<select size="1" name="s_id">
<option value=<%=rs("s_id")%> selected class=tdc>
<%
sql_fen = "select s_id,ttitle from stycss where s_id="&rs("s_id")&""
set rs_fen =conn.Execute (sql_fen)
if not rs_fen.eof then%>
<%=rs_fen("ttitle")%>
<% end if
rs_fen.close
set rs_fen=nothing
%>
<% sql_fen = "select s_id,ttitle from stycss"
set rs_fenlei =conn.Execute (sql_fen)
do while not rs_fenlei.Eof %>
<option value=<%=rs_fenlei("s_id")%>><%=rs_fenlei("ttitle")%></option>
<%rs_fenlei.MoveNext
Loop
rs_fenlei.Close
set rs_fenlei=nothing%>
</option>
</select>
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>最大留言数:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="total" class=tdc value="<%=rs("total")%>" size="5">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>每页显示的留言数:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="page" class=tdc value="<%=rs("page")%>" size="20">
</td>
</tr>
<tr>
<td width="30%" align="right" bgcolor=<%=tColor2%> class=tdc>过滤词语:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="badword" class=tdc value="<%=rs("badword")%>" size="50">(请用|分开)
</td>
</tr>
<tr>
<td bgcolor=<%=tColor2%> class=tdc> </td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="submit" name="Submit" value="提交" class=bdtj>
<input type="reset" name="Submit2" value="重设" class=bdtj>
<input type="button" value="取消" name="B2" class=bdtj onClick="window.location.href='index.asp'">
</td> </tr>
</form>
</table>
<%set rs=nothing%>
</center>
</body>
</html>
<%
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -