config_admin.asp
来自「使用Asp+Access+FSO+Jmail+Servu开发」· ASP 代码 · 共 204 行
ASP
204 行
<!--#include file="admin.asp"-->
<%chk_admin_login(3)%>
<%
on error resume next
url=replace(Request.ServerVariables("script_name"),"config_admin.asp","")
if request("action")="save" then
if not IsObjInstalled("jmail.message") and request.form("mailtype")="1" Then
Response.Write "<script>alert('您的服务器不支持Jmail,请安装或改用其它邮件服务器!');location.href='javascript:history.back()'</script>"
Response.End
end if
if not IsObjInstalled("CDONTS.NewMail") and request.form("mailtype")="2" Then
Response.Write "<script>alert('您的服务器不支持CDONTS,请安装或改用其它邮件服务器!');location.href='javascript:history.back()'</script>"
Response.End
end if
if not IsObjInstalled("Persits.MailSender") and request.form("mailtype")="3" Then
Response.Write "<script>alert('您的服务器不支持AspEmail,请安装或改用其它邮件服务器!');location.href='javascript:history.back()'</script>"
Response.End
end if
set rs1=server.createobject("adodb.recordset")
sql1="select * from config"
rs1.open sql1,conn,1,3
rs1("vesion")="<a href=http://www.9cool.net title=九酷网络个人主页空间管理系统V5.2SQL服务器版 target=_blank>Powered By 9Cool</a>"
rs1("site")=trim(request.form("site"))
rs1("siteurl")=trim(request.form("siteurl"))
rs1("SiteTitle")=trim(request.form("sitetitle"))
rs1("logourl")=trim(request.form("logourl"))
rs1("bannerurl")=trim(request.form("bannerurl"))
rs1("siteemail")=trim(request.form("siteemail"))
rs1("ftphost")=trim(request.form("ftphost"))
rs1("servuini")=trim(request.form("servuini"))
rs1("article")=trim(request.form("article"))
rs1("filters")=trim(request.form("filters"))
rs1("badip")=trim(request.form("badip"))
rs1("regtime")=trim(request.form("regtime"))
rs1("state")=trim(request.form("state"))
rs1("point")=trim(request.form("point"))
rs1("mailtype")=trim(request.form("mailtype"))
rs1("smtpserver")=trim(request.form("smtpserver"))
rs1("smtpname")=trim(request.form("smtpname"))
rs1("smtppass")=trim(request.form("smtppass"))
rs1("subject")=trim(request.form("subject"))
rs1.update
rs1.close
set rs1=nothing
response.write"<script>alert('系统配置修改成功!');location.href='config_admin.asp'</script>"
end if
sql="select * from config"
rs.open sql,conn,1,1
%>
<html>
<head>
<title>系统设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="95%" border="1" align="center" cellpadding="4" cellspacing="0" class="table-line">
<form name="form1" action="config_admin.asp?action=save" method="post">
<tr align="center" >
<td colspan="2" class="td-title-color"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="shadow">系统设置</td>
</tr>
</table> </td>
</tr>
<tr >
<td colspan="2"><strong>网站信息基本设置</strong></td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>网站名称:</td>
<td width="485" height="23">
<input name="site" type="text" value="<%=rs("site")%>" size="40"></td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>网站网址:</td>
<td height="23">
<input name="siteurl" type="text" value="<%=rs("siteurl")%>" size="40">
<script>
autositeurl="http://<%=Request.ServerVariables("server_name")%><%=left(url,instrRev(url,"/",len(url)-1))%>"
if (autositeurl != '<%=rs("siteurl")%>'){
document.write("系统自动检测到的URL:<font color=FF0000>"+autositeurl+"</font>");
}
</script></td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>网站Title显示:</td>
<td height="23">
<input name="sitetitle" type="text" value="<%=rs("SiteTitle")%>" size="40">
</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>Logo地址:</td>
<td height="23">
<input name="logourl" type="text" value="<%=rs("logourl")%>" size="40">
88×31像素 LOGO</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>网站左上角标志地址:</td>
<td height="23">
<input name="bannerurl" type="text" value="<%=rs("bannerurl")%>" size="40">
推荐使用200×65像素,Gif或Jpg等格式</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>管理员Email:</td>
<td height="23"><input name="siteemail" type="text" value="<%=rs("siteemail")%>" size="40">
用于网站底部显示</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>FTP主机IP:</td>
<td height="23"><input name="ftphost" type="text" value="<%=rs("ftphost")%>" size="40">
<script>
autoip="<%=Request.ServerVariables("LOCAL_ADDR")%>"
if (autoip != '<%=rs("ftphost")%>'){
document.write("系统自动检测到的IP:<font color=FF0000>"+autoip+"</font>");
}
</script>
</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>ServUDaemon.ini文件路径</td>
<td height="23"><input name="servuini" type="text" value="<%=rs("servuini")%>" size="40">
此文件位于ServU安装目录下 </td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>禁用或保留的用户名:</td>
<td height="23"><input name="filters" type="text" id="filters" value="<%=rs("filters")%>" size="40">
多个用户名请使用"|"分隔 </td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>禁止访问的IP:</td>
<td height="23"><input name="badip" type="text" value="<%=rs("badip")%>" size="40">
多个IP请使用"|"分隔</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>注册服务条款:</td>
<td height="23"><textarea name="article" cols="50" rows="4" id="article"><%=rs("article")%></textarea>
支持html语法</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>服务条款显示时间:</td>
<td height="23"><input name="regtime" type="text" value="<%=rs("regtime")%>" size="6">
秒 </td>
</tr>
<tr>
<td>网站状态:</td>
<td><input type="radio" name="state" value="True" <%if rs("state")=True then response.write "checked"%>>
打开
<input type="radio" name="state" value="False" <%if rs("state")=False then response.write "checked"%>>
关闭 </td>
</tr>
<tr>
<td>推荐一个用户增加积分:</td>
<td><input name="point" type="text" value=<%=rs("point")%>>
填数字 </td>
</tr>
<tr>
<td colspan="2"><strong>发送邮件参数设置</strong></td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>发送邮件组件</td>
<td height="23">
<select name="mailtype">
<option value="0" <%if rs("mailtype")=0 then%>selected<%end if%>>不支持</option>
<option value="1" <%if rs("mailtype")=1 then%>selected<%end if%>>JMAIL</option>
<option value="2" <%if rs("mailtype")=2 then%>selected<%end if%>>CDONTS</option>
<option value="3">ASPEMAIL</option>
</select>
如选择不支持,系统邮件发送功能将失效(邮件群发除外) </td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>SMTP Server地址:</td>
<td height="23">
<input name="smtpserver" type="text" value="<%=rs("smtpserver")%>" size="40">
填写邮件服务器的IP或域名如: smtp.163.com</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td> Smtp邮件帐号: </td>
<td height="23">
<input name="smtpname" type="text" value="<%=rs("smtpname")%>" size="40">
系统邮箱登陆帐号</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td> Smtp帐号密码: </td>
<td height="23">
<input name="smtppass" type="password" value="<%=rs("smtppass")%>" size="40">
系统邮箱登陆密码</td>
</tr>
<tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td>发送邮件标题:</td>
<td height="23">
<input name="subject" type="text" value="<%=rs("subject")%>" size="40"></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#FFFFFF">
<input name="Submit" type="submit" class="button" value=" 确定保存 ">
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?