📄 admin_config.asp
字号:
<%' ==================================================
'// 粑粑工作室留言本
'// 程序版本: 粑粑工作室留言本 v2.1
'// 技术支持: www.gongliyi.cn
'// 程序演示: www.gongliyi.cn/book2
'// 作 者: 龚礼仪(粑粑)
'// 文件信息: config.asp(系统配置文件)
'// 最后修改: 2008.11.23
'// 升级修改: 2009.04.05
' ==================================================
%>
<%
if session("adminname")="" then
response.redirect "admin_login.asp"
response.end
end if
%>
<!--#include file="include/conn.asp"-->
<!--#include file="include/system.asp"-->
<!--#include file="include/function.asp"-->
<%
if request.form("action")="configedit" then
bookname=CheckStr(request.Form("bookname"))
booktitle=CheckStr(request.Form("booktitle"))
bookurl=CheckStr(request.Form("bookurl"))
skin=CheckStr(request.Form("skin"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from config where id=1"
rs.open sql,conn,1,3
rs("bookname")=bookname
rs("booktitle")=booktitle
rs("bookurl")=bookurl
rs("skin")=skin
if ValidInteger(Request("num"))=False then
response.write "<script language=javascript>alert('请输入正确的数字');history.go(-1)</script>"
response.end
end if
if ValidInteger(Request("words"))=False then
response.write "<script language=javascript>alert('请输入正确的数字');history.go(-1)</script>"
response.end
end if
rs("words")=ValidInteger(Request("words"))
rs("num")=ValidInteger(Request("num"))
if request("toadmin")=1 then
rs("toadmin")=1
else
rs("toadmin")=0
end if
if request("show")=1 then
rs("show")=1
else
rs("show")=0
end if
if request("open")=1 then
rs("open")=1
else
rs("open")=0
end if
if request("face")=1 then
rs("face")=1
else
rs("face")=0
end if
if request("qq")=1 then
rs("qq")=1
else
rs("qq")=0
end if
if request("email")=1 then
rs("email")=1
else
rs("email")=0
end if
if request("web")=1 then
rs("web")=1
else
rs("web")=0
end if
if request("gonggaos")=1 then
rs("gonggaos")=1
else
rs("gonggaos")=0
end if
if request("names")=1 then
rs("names")=1
else
rs("names")=0
end if
if request("titles")=1 then
rs("titles")=1
else
rs("titles")=0
end if
if request("indexadd")=1 then
rs("indexadd")=1
else
rs("indexadd")=0
end if
rs.update
response.Write("<script>alert('修改成功!');window.location='admin_config.asp';</script>")
end if
%>
<!--#include file="head.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from config where id=1 "
rs.open sql,conn,1,3
if rs.eof then
response.write("暂无设置")
end if
do until rs.eof
%>
<div id="main">
<div id="submit">
<div class="submitleft">
<form action="admin_config.asp" method="post" name="form1" id="form1" onsubmit="return FrontPage_Form1_Validator(this)">
<p><img src="images/i3.gif" /><img src="images/sys.gif" /><br /> <br />
</p>
<label for="bookname">留言本名称:</label>
<input name="bookname" type="text" id="bookname" value="<%=rs("bookname")%>" >
<br />
<label for="booktitle">留言本标题:</label>
<input name="booktitle" type="text" id="booktitle" value="<%=rs("booktitle")%>">
<br />
<label for="bookurl">留言本地址:</label>
<input name="bookurl" type="text" id="bookurl" value="<%=rs("bookurl")%>" >
<br />
<label for="skin">留言本皮肤:</label>
<input name="skin" type="text" id="skin" value="<%=rs("skin")%>" >
<font color="gray">(请填写皮肤文件夹名称,如:"default"或"lightblue")</font><br />
<label for="words">留言最大字数:</label>
<input name="words" type="text" id="words" value="<%=rs("words")%>" >
<font color="gray">(留言本允许的留言的最大字数)</font><br />
<label for="num">每页显示条数:</label>
<input name="num" type="text" id="num" value="<%=rs("num")%>" >
<font color="gray">(留言本每页显示的的留言的条数)</font><br />
<label for="toadmin">悄悄话功能:</label>
<input name="toadmin" type="checkbox" id="toadmin" value="1" <%if rs("toadmin")=1 then%>checked<%end if%>/>
<span>当选中时,此留言只有管理员可见</span><br />
<label for="show">网站验证功能:</label>
<input name="show" type="checkbox" id="show" value="1" <%if rs("show")=1 then%>checked<%end if%>/>
<span>当选中时,网站验证功能打开</span><br />
<label for="open"><font color="#FF0000">网站打开关闭:</font></label>
<input name="open" type="checkbox" id="open" value="1" <%if rs("open")=1 then%>checked<%end if%>/>
<span><font color="#FF0000">当选中时,网站打开关闭功能打开</font></span><br />
<label for="face">头像功能:</label>
<input name="face" type="checkbox" id="face" value="1" <%if rs("face")=1 then%>checked<%end if%>/>
<span>当选中时,留言本头像功能打开</span><br />
<label for="qq">QQ功能:</label>
<input name="qq" type="checkbox" id="qq" value="1" <%if rs("qq")=1 then%>checked<%end if%>/>
<span>当选中时,留言本QQ功能功能打开</span><br />
<label for="email">email功能:</label>
<input name="email" type="checkbox" id="email" value="1" <%if rs("email")=1 then%>checked<%end if%>/>
<span>当选中时,留言本email功能功能打开</span><br />
<label for="web">个人网站功能:</label>
<input name="web" type="checkbox" id="web" value="1" <%if rs("web")=1 then%>checked<%end if%>/>
<span>当选中时,留言本个人网站功能打开</span><br />
<label for="gonggao">网站公告功能:</label>
<input name="gonggaos" type="checkbox" id="gonggaos" value="1" <%if rs("gonggaos")=1 then%>checked<%end if%>/>
<span>当选中时,留言本公告功能打开</span><br />
<label for="names">网站名称功能:</label>
<input name="names" type="checkbox" id="names" value="1" <%if rs("names")=1 then%>checked<%end if%>/>
<span>当选中时,留言本网站名称功能打开</span><br />
<label for="titles">网站标题功能:</label>
<input name="titles" type="checkbox" id="titles" value="1" <%if rs("titles")=1 then%>checked<%end if%>/>
<span>当选中时,留言本网站标题功能打开</span><br />
<label for="indexadd">首页留言功能:</label>
<input name="indexadd" type="checkbox" id="indexadd" value="1" <%if rs("indexadd")=1 then%>checked<%end if%>/>
<span>当选中时,留言本首页添加留言功能打开</span><br />
<input name="action" type="hidden" value="configedit"/>
<input type="submit" id="sbutton" value="确 定" />
<br />
</form>
</div>
</div>
</div>
<%rs.movenext
loop
%>
<%rs.close
Set rs=Nothing
Set rs1=Nothing
conn.close
Set conn=Nothing
%>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -