📄 manage.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")<>"admin" then
Response.Redirect "../admin/index.asp"
response.end
end if
%>
<%
set rs = server.createobject("adodb.recordset")
sql = "select * from config"
rs.open sql,conn,1,1
ititle = rs("title")
ihomepage = rs("homepage")
iurl = rs("url")
imax = rs("max")
ipagesize = rs("pagesize")
itoday = rs("today")
idate = rs("date")
ibottom = rs("bottom")
iqqshow = rs("qqshow")
icolor1 = rs("color1")
icolor2 = rs("color2")
icolor3 = rs("color3")
if date <> idate then
rs("today") = 0
end if
rs("date") = date
rs.update
rs.close
iaction = request("action")
%>
<html>
<head>
<!--- The site is designed by Wind Song Studio --->
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" >
<meta name="keywords" >
<link href="style.css" rel="stylesheet" type="text/css">
<title><%=ititle%></title>
<base target="_blank">
</head>
<body background="../img/dnacebg2.jpg" topmargin="0" leftmargin="0">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="800">
<tr>
<td width="100"> </td>
<td width="600" bgcolor="#cea772">
<img border="0" src="images/main/top.jpg"></td>
<td width="100"> </td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="800" height="100%">
<tr>
<td width="100"> </td>
<td width="600" bgcolor="#e4c59a" valign="top">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="580">
<tr>
<td width="5%" align="center">
<img border="0" src="images/main/now.gif"></td>
<td width="39%">
<p style="margin-top: 2"><a href="<%=iurl%>"><%=ihomepage%></a><span style="font-size: 6pt">>></span></td>
<td width="30%" align="center">
<a href="new.asp"> </a></td>
<td width="30%" align="center">
<a href="index.asp"> </a>
<a href="manage.asp"> </a></td>
</tr>
</table>
</center>
</div>
<%
if iaction = "config" then
newtitle = request.form("title")
newhomepage = request.form("homepage")
newurl = request.form("url")
newmax = request.form("max")
newpagesize = request.form("pagesize")
newqqshow = request.form("qqshow")
newcolor1 = request.form("color1")
newcolor2 = request.form("color2")
newcolor3 = request.form("color3")
if newtitle = "" or newhomepage = "" or newurl = "" or newmax = "" or newpagesize = "" or newqqshow = "" or newcolor1 ="" or newcolor2 = "" or newcolor3 = "" then
ierror = "有未填项"
end if
if ierror = "" then
sql = "select * from config"
rs.open sql,conn,3,2
rs("title") = newtitle
rs("homepage") = newhomepage
rs("url") = newurl
rs("max") = newmax
rs("pagesize") = newpagesize
rs("qqshow") = newqqshow
rs("color1") = newcolor1
rs("color2") = newcolor2
rs("color3") = newcolor3
rs.update
rs.close
set rs = nothing
ierror = "成功修改留言本设置 请单击退出"
end if
end if
%>
<div align="center">
<center>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="590">
<tr><td>
<table border="0" cellpadding="2" cellspacing="1" style="border-collapse: collapse; border-style: solid; border-width: 1" bordercolor="#86540c" width="100%" id="AutoNumber1">
<form name="iconfig" method="post" action="manage.asp" target="_self">
<tr>
<td width="100%" colspan="2" bgcolor="#e4c59a" bordercolor="#86540c"><p align="center" style="margin-top: 2"><b><font color="#800000"><%=ierror%></font></b> </td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">
留言本标题</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="title" size="100" style="color: #86540c; height: 20; width: 200" value="<%=ititle%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">主页名称</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="homepage" size="100" style="color: #86540c; height: 20; width: 200" value="<%=ihomepage%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">主页地址</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="url" size="100" style="color: #86540c; height: 20; width: 200" value="<%=iurl%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">最长留言</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="max" size="100" style="color: #86540c; height: 20; width: 50" value="<%=imax%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">每页显示</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="pagesize" size="100" style="color: #86540c; height: 20; width: 50" value="<%=ipagesize%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">QQ
Show</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<select size="1" name="qqshow" style="height: 20">
<option selected value="1">显示</option>
<option value="0">隐藏</option>
</select></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">
自定颜色1</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="color1" size="100" style="color: #86540c; height: 20; width: 200" value="<%=icolor1%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">
自定颜色2</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="color2" size="100" style="color: #86540c; height: 20; width: 200" value="<%=icolor2%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c">
<p align="center" style="margin-top: 2"><font color="#800000">
自定颜色3</font></td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<input type="text" name="color3" size="100" style="color: #86540c; height: 20; width: 200" value="<%=icolor3%>"></td>
</tr>
<tr>
<td width="20%" bgcolor="#e4c59a" align="center" bordercolor="#86540c"> </td>
<td width="80%" bgcolor="#e4c59a" bordercolor="#86540c">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="45%" id="AutoNumber4" bgcolor="#e4c59a">
<tr><input type="hidden" name="action" value="config">
<td width="33%">
<a target="_self" href="javascript:document.iconfig.submit()"><img border="0" src="images/main/ok.gif"></a></td>
<td width="33%">
<a target="_self" href="javascript:document.iconfig.reset()"><img border="0" src="images/main/cancel.gif"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</form>
</table>
</center>
</div>
</td>
<td width="100"> </td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
conn.close
set conn = nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -