📄 setsite.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2008-2010 - GLGK.COM-STUDIO" />
<META NAME="Author" CONTENT="冠龙科技,www.glgk.com" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>网站信息设置</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
if Instr(session("AdminPurview"),"|112,")=0 then
response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
response.end
end if
'========判断是否具有管理权限
%>
<body>
<%
select case request.QueryString("Action")
case "Save"
SaveSiteInfo
case else
ViewSiteInfo
end select
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<tr>
<td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <strong>系统管理:添加,修改站点的相关信息</strong></font></td>
</tr>
<tr>
<td height="24" align="center" nowrap bgcolor="#EBF2F9">
<a href="PassUpdate.asp" target="mainFrame" onClick='changeAdminFlag("修改密码")'>修改密码</a> <font color="#0000FF"> | </font> <a href="SetSite.asp" target="mainFrame" onClick='changeAdminFlag("网站信息设置")'>网站信息设置</a><font color="#0000FF"> | </font><a href="NavigationList.asp" target="mainFrame" onClick='changeAdminFlag("栏目导航设置")'>栏目导航设置</a><font color="#0000FF"> | </font><a href="SetConst.asp" target="mainFrame" onClick='changeAdminFlag("常量设置")'>常量设置</a><font color="#0000FF"> | </font><a href="DataManage.asp" target="mainFrame" onClick='changeAdminFlag("数据库操作")'>数据库操作</a>
<font color="#0000FF"> | </font><a href="ADsEdit.asp?Result=Add" target="mainFrame" onClick='changeAdminFlag("弹窗广告列表")'>弹窗广告</a><font color="#0000FF"> | </font><a href="SpaceStat.asp" target="mainFrame" onClick='changeAdminFlag("空间统计")'>空间统计</a><font color="#0000FF"> | </font><a href="../Count/InfoList.asp" target="mainFrame" onClick='changeAdminFlag("访问统计")'>访问统计</a><font color="#0000FF"> | </font><a href="FriendLinkList.asp" target="mainFrame" onClick='changeAdminFlag("友情链接")'>友情链接</a><font color="#0000FF"> | </font><a href="HackSql.asp" target="mainFrame" onClick='changeAdminFlag("阻止SQL注入记录")'>阻止SQL注入记录</a> </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<form name="editForm" method="post" action="SetSite.asp?Action=Save" >
<tr>
<td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">
<tr>
<td width="160" height="20" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="20" align="right">网站标题:</td>
<td><input name="SiteTitleCh" type="text" class="textfield" id="SiteTitleCh" style="WIDTH: 400;" value="<%=SiteTitleCh%>" > * 中文</td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td><input name="SiteTitleEn" type="text" class="textfield" id="SiteTitleEn" style="WIDTH: 400;" value="<%=SiteTitleEn%>" > * 英文</td>
</tr>
<tr>
<td height="20" align="right">网 址:</td>
<td><input name="SiteUrl" type="text" class="textfield" id="SiteUrl" style="WIDTH: 400;" value="<%=SiteUrl%>"> *</td>
</tr>
<tr>
<td height="20" align="right">公司名称:</td>
<td><input name="ComNameCh" type="text" class="textfield" id="ComNameCh" style="WIDTH: 400;" value="<%=ComNameCh%>" > * 中文</td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td><input name="ComNameEn" type="text" class="textfield" id="ComNameEn" style="WIDTH: 400;" value="<%=ComNameEn%>" > * 英文</td>
</tr>
<tr>
<td height="20" align="right">地 址:</td>
<td><input name="AddressCh" type="text" class="textfield" id="AddressCh" style="WIDTH: 400;" value="<%=AddressCh%>" > * 中文</td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td><input name="AddressEn" type="text" class="textfield" id="AddressEn" style="WIDTH: 400;" value="<%=AddressEn%>" > * 英文</td>
</tr>
<tr>
<td height="20" align="right">邮 编:</td>
<td><input name="ZipCode" type="text" class="textfield" id="ZipCode" style="WIDTH: 200;" value="<%=ZipCode%>" maxlength="20"> *</td>
</tr>
<tr>
<td height="20" align="right">电 话:</td>
<td><input name="Telephone" type="text" class="textfield" id="Telephone" style="WIDTH: 200;" value="<%=Telephone%>"> *</td>
</tr>
<tr>
<td height="20" align="right">传 真:</td>
<td><input name="Fax" type="text" class="textfield" id="Fax" style="WIDTH: 200;" value="<%=Fax%>" > * </td>
</tr>
<tr>
<td height="20" align="right">电子邮箱:</td>
<td><input name="Email" type="text" class="textfield" id="Email" style="WIDTH: 200;" value="<%=Email%>"> * </td>
</tr>
<tr>
<td height="20" align="right" valign="top">关 键 字:</td>
<td><textarea name="KeywordsCh" rows="4" class="textfield" id="KeywordsCh" style="WIDTH: 400;"><%=KeywordsCh%></textarea> 中文</td>
</tr>
<tr>
<td height="20" align="right" valign="top"></td>
<td><textarea name="KeywordsEn" rows="4" class="textfield" id="KeywordsEn" style="WIDTH: 400;"><%=KeywordsEn%></textarea> 英文</td>
</tr>
<tr>
<td height="20" align="right" valign="top">网站描述:</td>
<td><textarea name="DescriptionsCh" rows="4" class="textfield" id="DescriptionsCh" style="WIDTH: 400;"><%=DescriptionsCh%></textarea> 中文</td>
</tr>
<tr>
<td height="20" align="right" valign="top"></td>
<td><textarea name="DescriptionsEn" rows="4" class="textfield" id="DescriptionsEn" style="WIDTH: 400;"><%=DescriptionsEn%></textarea> 英文</td>
</tr>
<tr>
<td height="20" align="right">ICP 备案:</td>
<td><input name="IcpNumber" type="text" class="textfield" id="IcpNumber" style="WIDTH: 200;" value="<%=IcpNumber%>"></td>
</tr>
<tr>
<td height="20" align="right"><a name="Message"></a>留 言 簿:</td>
<td><input name="MesViewFlag" type="checkbox" id="MesViewFlag" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if MesViewFlag then response.write ("checked")%>> 自动通过审核</td>
</tr>
<tr>
<td height="30" align="right"> </td>
<td valign="bottom"><input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 60;" ></td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td valign="bottom"> </td>
</tr>
</table></td>
</tr>
</form>
</table>
</body>
</html>
<%
function SaveSiteInfo()
if len(trim(request.Form("SiteTitleCh")))<1 or len(trim(request.Form("SiteTitleEn")))<1 then
response.write ("<script language=javascript> alert('""中文,英文""网站标题不能少于1个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("SiteUrl")))<10 then
response.write ("<script language=javascript> alert('网站网址不能为空,具不少于10个字符!');history.back(-1);</script>")
response.end
end if
if left(trim(request.Form("SiteUrl")),7)<>"http://" then
response.write ("<script language=javascript> alert('网站网址请加上""http://""!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("ComNameCh")))<1 or len(trim(request.Form("ComNameEn")))<1 then
response.write ("<script language=javascript> alert('""中文,英文""公司名称不能少于1个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("AddressCh")))<1 or len(trim(request.Form("AddressEn")))<1 then
response.write ("<script language=javascript> alert('""中文,英文""公司地址不能少于3个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("ZipCode")))<6 then
response.write ("<script language=javascript> alert('邮政编码必填具不能少于6个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("Telephone")))<6 then
response.write ("<script language=javascript> alert('电话号码必填具不能少于11个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("Fax")))<6 then
response.write ("<script language=javascript> alert('传真号码必填具不能少于11个字符!');history.back(-1);</script>")
response.end
end if
if len(trim(request.Form("Email")))<6 then
response.write ("<script language=javascript> alert('电子邮箱必填具不能少于6个字符!');history.back(-1);</script>")
response.end
end if
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top 1 * from Site"
rs.open sql,conn,1,3
rs("SiteTitleCh")=trim(Request.Form("SiteTitleCh"))
rs("SiteTitleEn")=trim(Request.Form("SiteTitleEn"))
rs("SiteUrl")=trim(Request.Form("SiteUrl"))
rs("ComNameCh")=trim(Request.Form("ComNameCh"))
rs("ComNameEn")=trim(Request.Form("ComNameEn"))
rs("AddressCh")=trim(Request.Form("AddressCh"))
rs("AddressEn")=trim(Request.Form("AddressEn"))
rs("ZipCode")=trim(Request.Form("ZipCode"))
rs("Telephone")=trim(Request.Form("Telephone"))
rs("Fax")=trim(Request.Form("Fax"))
rs("Email")=trim(Request.Form("Email"))
rs("KeywordsCh")=trim(Request.Form("KeywordsCh"))
rs("DescriptionsCh")=trim(Request.Form("DescriptionsCh"))
rs("KeywordsEn")=trim(Request.Form("KeywordsEn"))
rs("DescriptionsEn")=trim(Request.Form("DescriptionsEn"))
rs("IcpNumber")=trim(Request.Form("IcpNumber"))
if Request.Form("MesViewFlag")=1 then
rs("MesViewFlag")=Request.Form("MesViewFlag")
Conn.execute "alter table Message alter column ViewFlagCh bit default 1"
Conn.execute "alter table Message alter column ViewFlagEn bit default 1"
else
rs("MesViewFlag")=0
Conn.execute "alter table Message alter column ViewFlagCh bit default 0"
Conn.execute "alter table Message alter column ViewFlagEn bit default 0"
end if
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript> alert('成功编辑网站信息!');changeAdminFlag('网站信息设置');location.replace('SetSite.asp');</script>"
end function
function ViewSiteInfo()
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top 1 * from Site"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "读取数据库记录出错!"
response.end
else
SiteTitleCh=rs("SiteTitleCh")
SiteTitleEn=rs("SiteTitleEn")
SiteUrl=rs("SiteUrl")
ComNameCh=rs("ComNameCh")
ComNameEn=rs("ComNameEn")
AddressCh=rs("AddressCh")
AddressEn=rs("AddressEn")
ZipCode=rs("ZipCode")
Telephone=rs("Telephone")
Fax=rs("Fax")
Email=rs("Email")
KeywordsCh=rs("KeywordsCh")
DescriptionsCh=rs("DescriptionsCh")
KeywordsEn=rs("KeywordsEn")
DescriptionsEn=rs("DescriptionsEn")
IcpNumber=rs("IcpNumber")
MesViewFlag=rs("MesViewFlag")
rs.close
set rs=nothing
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -