📄 admin_set.asp
字号:
<!--#include file = admin_chk.asp -->
<!--#include file = Include/NIncHeads.asp -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../images/admin/style.css">
<script src="Include/Common.js" type="text/javascript"></script>
<%
If Not ChkAdmin("Setting") Then
Call ArtErr("","")
End If
Dim Action
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "save"
Call savesetting()
Case "saveset"
Call saveconfig()
Case Else
Call Heads_Site()
Call settingmain()
Call AdminPageEnd()
End Select
call CloseConn()
sub savesetting()
if request("sitename")="" then
Call Alert("请输入网站名称!","")
end if
if request("siteurl")="" then
Call Alert("请输入网站网址!","")
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from setting ",conn,1,3
dim i,MailSetting1
For I=0 To 3
MailSetting1=MailSetting1& Replace(request.Form("MailSetting" & I &""),"^@$@^","") & "^@$@^"
Next
MailSetting=Split(MailSetting1,"^@$@^")
IF Ubound(Split(MailSetting1,"^@$@^"))<>4 then
Call ArtErr("<li>数据获取错误.请不要外部提交!</li>","1")
End If
Rs("MailSetting")=MailSetting1
rs("sitename")=trim(request("sitename"))
rs("sitekey")=trim(request("sitekey"))
rs("sitedes")=trim(request("sitedes"))
rs("siteurl")=trim(request("siteurl"))
rs("sitecr")=trim(request("sitecr"))
rs("siteopen")=trim(request("siteopen"))
rs("sitedir")=trim(request("sitedir"))
rs("IFvalidate")=trim(request("IFvalidate"))
rs("validatecode")=trim(request("validatecode"))
rs.update
rs.close:set rs=nothing
call ArtErr("<li>您已修改成功网站基本设置!</li>","2")
end sub
sub saveconfig()
newsx1=trim(request("newsx"))
top_pic_url=Request("top_pic_url")
top_pic_url=replace(top_pic_url,"../","")
file_html=request("file_html")
if file_html=1 then
file_type=trim(request("file_type"))
file_rule=trim(request("file_rule"))
end if
nextpage=trim(request("nextpage"))
if nextpage="" then nextpage="$$分页$$"
page_css=trim(request("page_css"))
if page_css="" then page_css="2"
WebEmail=trim(request("WebEmail"))
NewsWordKey=trim(request("NewsWordKey"))
NewsWordKeyon=trim(request("NewsWordKeyon"))
if NewsWordKey<>"" then
NewsWordKey=replace(NewsWordKey,",",",")
end if
if instr(WebEmail,"@")=0 or instr(WebEmail,".")=0 then
Call Alert("请正确填写EMAIL!","")
end if
if newsx1<>"" then
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [config] order by id desc",conn,1,3
rs("newsx")=newsx1
rs("zuziip")=trim(Request("ZuZiIP"))
rs("plsh")=trim(Request("plsh"))
rs("showzt")=trim(Request("showzt"))
rs("top_pic")=trim(Request("top_pic"))
rs("top_pic_url")=top_pic_url
rs("nextpage")=nextpage
rs("page_css")=page_css
rs("WebEmail")=WebEmail
rs("website")=trim(request("website"))
rs("NewsWordKey")=NewsWordKey
rs("NewsWordKeyon")=NewsWordKeyon
rs("ArtCMS_Digg")=trim(Request("ArtCMS_Digg"))
rs("IsUse")=trim(Request("IsUse"))
rs("FsoIndexFile")=S("FsoIndexFile")
rs("listHtml")=S("listHtml")
rs("file_type")=file_type
rs.update
rs.close:set rs=nothing
if file_html=1 then
conn.Execute "update [config] set [file_html]="&file_html&",[file_rule]='"&file_rule&"'"
else
conn.Execute "update [config] set [file_html]="&file_html
end if
end if
call ArtErr("<li>您已修改成功网站基本设置!。</li>","2")
end sub
sub settingmain()
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from setting ",conn,1,1
MailSetting=Split(Rs("MailSetting"),"^@$@^")
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<form name="form1" method="post" action="?action=save">
<tr>
<td bgcolor="#F8F8F8" align="center" class="bg_tr" height="25" colspan="2"><b>网站基本选项</b></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>网站名称</u></b></td>
<td height="25"><input name="sitename" type="text" class="form" id="sitename" value="<%= rs("sitename")%>" size="50"></td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>网站网址</u></b><br>网站的域名,需填写完整,如:<font color="#FF0000">http://www.sohu.com/</font></td>
<td height="25"><input name="siteurl" type="text" class="form" id="siteurl" value="<%= rs("siteurl")%>" size="50"></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>网站描述</u></b><br><META content=<font color="#FF0000">网站描述</font>name=description></td>
<td height="25"><textarea name="sitedes" cols="60" class="Input_1" rows="3"><%= rs("sitedes")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>关 键 字</u></b><br><META content=<font color="#FF0000">关键字</font> name=keywords></td>
<td height="25"><textarea name="sitekey" cols="60" class="Input_1" rows="3"><%= rs("sitekey")%></textarea></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>版权信息</u></b><br><font color="#FF0000">支持html语法</font></td>
<td height="25"><textarea name="sitecr" cols="60" class="Input_1" rows="5" id=TdCopyright><%=rs("sitecr")%></textarea><a href="javascript:admin_Size(-5,'TdCopyright')"><img src="../images/admin/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'TdCopyright')"><img src="../images/admin/plus.gif" width="20" height="20" border='0' unselectable="on"></a></td>
</tr>
<tr>
<td bgcolor="#F8F8F8" align="center" class="bg_tr" height="25" colspan="2"><b>邮件选项</b></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>站长信箱</u></b></td>
<td height="25"><input name="MailSetting0" type="text" id="WebmasterName" value="<%= MailSetting(0) %>" size="30"> </td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>SMTP服务器地址</u></b><br><font color="#FF0000">用来发送邮件的SMTP服务器如果你不清楚此参数含义,请联系你的空间商</font></td>
<td height="25"><input name="MailSetting1" type="text" value="<%=MailSetting(1)%>" size="30"></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>SMTP登录用户名</u></b><br><font color="#FF0000">当你的服务器需要SMTP身份验证时还需设置此参数</font></td>
<td height="25"><input name="MailSetting2" type="text" value="<%= MailSetting(2) %>" size="30"> </td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>SMTP登录密码</u></b><br><font color="#FF0000">当你的服务器需要SMTP身份验证时还需设置此参数</font></td>
<td height="25"><input name="MailSetting3" type="PassWord" value="<%=MailSetting(3)%>" size="30"></td>
</tr>
<tr>
<td bgcolor="#F8F8F8" align="center" class="bg_tr" height="25" colspan="2"><b>系统设置</b></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>系统当前状态</u></b><br><font color="#FF0000">维护期间可设置关闭系统使用</font></td>
<td height="25">
<input type=radio name="siteopen" value=0 <%if rs("siteopen")=0 then%>checked<%end if%>>开启
<input type=radio name="siteopen" value=1 <%if rs("siteopen")=1 then%>checked<%end if%>>关闭</td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>维护说明</u></b><br>在系统关闭情况下显示,<font color="#FF0000">支持html语法</font></td>
<td height="25"><textarea name="sitedir" cols="60" rows="3" id=TdStopReadme><%=rs("sitedir")%></textarea>
<a href="javascript:admin_Size(-5,'TdStopReadme')"><img src="../images/admin/minus.gif" width="20" height="20" border='0' unselectable="on"></a> <a href="javascript:admin_Size(5,'TdStopReadme')"><img src="../images/admin/plus.gif" width="20" height="20" border='0' unselectable="on"></a></td>
</tr>
<tr bgcolor="#F7F7F7" onMouseOut="this.style.backgroundColor='#F7F7F7'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>管理员登录认证功能:</u></b><br><font color="#FF0000">为了系统安全建议开启</font></td>
<td height="25">
<input type=radio name="IFvalidate" value=0 <%if rs("IFvalidate")=0 then%>checked<%end if%>>开启
<input type=radio name="IFvalidate" value=1 <%if rs("IFvalidate")=1 then%>checked<%end if%>>关闭</td>
</tr>
<tr bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td width=32% align=left><b><u>设置管理登陆认证码:</u></b><br>管理员登陆使用的认证码。</td>
<td height="25"><input type="text" name="validatecode" size="35" value="<%=rs("validatecode")%>"> </td>
</tr>
<tr>
<td align="center" colspan="2" height="40" class="tableBorder">
<input name="B5" type="submit" value=" 提 交 "> <input type="reset" value=" 重 置 " name="B6">
</td>
</tr>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form2_Validator(theForm)
{
if (theForm.Newsx.value == "")
{
alert("请在 New时效 域中输入值。");
theForm.Newsx.focus();
return (false);
}
if (theForm.Newsx.value.length < 1)
{
alert("在 New时效 域中,请至少输入 1 个字符。");
theForm.Newsx.focus();
return (false);
}
if (theForm.Newsx.value.length > 3)
{
alert("在 New时效 域中,请最多输入 3 个字符。");
theForm.Newsx.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.Newsx.value;
var allValid = true;
var validGroups = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -