📄 set.asp
字号:
<!--#include file="../Session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
<script language="javascript">
<!--//
function checksignup() {
if ( document.form.corpname.value == '' ) {
window.alert('公司名称!!');
document.form.corpname.focus();
}
else if ( document.form.add.value == '' ) {
window.alert('请输入公司地址!!');
document.form.add.focus();
}
else if ( document.form.url.value == '' ) {
window.alert('请输入公司网址!!');
document.form.url.focus();
}
else if ( document.form.Title.value == '' ) {
window.alert('请输入网页标题!!');
document.form.Title.focus();
}
else if ( document.form.pc.value == '' ) {
window.alert('邮政编码!!');
document.form.pc.focus();
}
else if ( document.form.tel1.value == '' ) {
window.alert('电话号码一');
document.form.tel1.focus();
}
else if ( document.form.logo.value == '' ) {
window.alert('请输入logo图片地址!!');
document.form.logo.focus();
}
else if ( document.form.ManageUrl.value == '' ) {
window.alert('请输入后台地址绝对路径!!');
document.form.ManageUrl.focus();
}
else if ( document.form.css.value == '' ) {
window.alert('颜色设置最少有一个!!');
document.form.css.focus();
}
else {
return true;
}
return false;
}
//-->
</script>
</head>
<body>
<form action="?action=save" method="post" name="form" id="form">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td height="30" colspan="2" class="tdstyle"><font size="3"><strong>网站配置</strong></font></td>
</tr>
<tr>
<td width="11%" align="center" class="tdstyle">公司名称</td>
<td class="tdstyle"> <input name="CorpName" type="text" class="input1" id="CorpName" value="<%=CorpName%>" size="40" maxlength="50">
显示在网页尾部</td>
</tr>
<tr>
<td align="center" class="tdstyle">公司地址</td>
<td class="tdstyle"> <input name="add" type="text" class="input1" id="add" value="<%=Add%>" size="40" maxlength="50">
显示在网页尾部</td>
</tr>
<tr>
<td align="center" class="tdstyle">网站地图</td>
<td class="tdstyle"> <input name="url" type="text" class="input1" id="url" value="<%=Url%>" size="40" maxlength="50">
加入收藏首页等时调用</td>
</tr>
<tr>
<td align="center" class="tdstyle">邮政编码</td>
<td class="tdstyle"> <input name="pc" type="text" class="input1" id="pc" value="<%=PC%>" size="40" maxlength="50">
显示在网页尾部</td>
</tr>
<tr>
<td height="25" align="center" class="tdstyle">网站标题</td>
<td class="tdstyle"> <input name="Title" type="text" class="input1" id="Title" value="<%=Title%>" size="40" maxlength="50">
显示在网页标题栏</td>
</tr>
<tr>
<td align="center" class="tdstyle">网站LOGO</td>
<td class="tdstyle"> <input name="logo" type="text" class="input1" id="logo" value="<%=Logo%>" size="40" maxlength="50">
显示在网页头部左上角,180*70像素或更小</td>
</tr>
<tr>
<td align="center" class="tdstyle">网站横幅</td>
<td class="tdstyle"> <input name="banner" type="text" class="input1" id="banner" value="<%=Banner%>" size="40" maxlength="50">
显示在网页头部的航行条下,宽为776像素,高不限(以可留空)</td>
</tr>
<tr>
<td align="center" class="tdstyle">横幅链接</td>
<td class="tdstyle"> <input name="Url2" type="text" class="input1" id="Url2" value="<%=Url2%>" size="40" maxlength="50">
网页头部横幅连接的网址(横幅留空时,链接无效)</td>
</tr>
<tr>
<td align="center" class="tdstyle">系统目录</td>
<td class="tdstyle"> <input name="Sys_Path" type="text" class="input1" id="Sys_Path" value="<%=Sys_Path%>" size="20" maxlength="50">
系统所在文件夹,在空间根目录下时请留空(请正确设置,否则系统异常)</td>
</tr>
<tr>
<td align="center" class="tdstyle">后台路径</td>
<td class="tdstyle"> <input name="ManageUrl" type="text" class="input1" id="ManageUrl" value="<%=ManageUrl%>" size="20" maxlength="50">
后台文件夹(请<font color="#FF6600">牢记</font>并及时<font color="#FF6600">修改</font>文件夹名,否则系统异常)</td>
</tr>
<tr>
<td align="center" class="tdstyle">网站颜色</td>
<td class="tdstyle">
<input <%If css = "333333.css" Then Response.Write("CHECKED") : Response.Write("")%> name="css" type="radio" value="333333.css" onFocus="this.blur()"> <font color="#999999" size="3">■</font>
<input <%If css = "669966.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="669966.css" onFocus="this.blur()"> <font color="#669966" size="3">■</font>
<input <%If css = "1478eb.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="1478eb.css" onFocus="this.blur()"> <font color="#1478db" size="3">■</font>
<input <%If css = "cc0000.css" Then Response.Write("CHECKED") : Response.Write("")%> name="css" type="radio" value="cc0000.css" onFocus="this.blur()"> <font color="#cc0000" size="3">■</font>
<input <%If css = "009ace.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="009ace.css" onFocus="this.blur()"> <font color="#009ace" size="3">■</font>
<input <%If css = "4279bd.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="4279bd.css" onFocus="this.blur()"> <font color="#4279bd" size="3">■</font>
<input <%If css = "3d9832.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="3d9832.css" onFocus="this.blur()"> <font color="#3d9832" size="3">■</font>
<input <%If css = "0097fe.css" Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="css" value="0097fe.css" onFocus="this.blur()"> <font color="#0097fe" size="3">■</font> (仅对网站前台页面有效)</td>
</tr>
<tr>
<td align="center" class="tdstyle">联系邮箱</td>
<td class="tdstyle"> <input name="mail1" type="text" class="input1" id="mail1" value="<%=mail1%>" size="20" maxlength="50">
<font color="#FF3333" size="3">@</font> <input name="mail2" type="text" class="input1" id="mail2" value="<%=mail2%>" size="15" maxlength="50">
显示在网站中(自动加密,杜绝垃圾邮件)</td>
</tr>
<tr>
<td align="center" class="tdstyle">发信邮箱</td>
<td class="tdstyle"> <input name="mailaddress" type="text" class="input1" value="<%=mailaddress%>" size="20" maxlength="50">
邮箱服务器地址<br> <input name="mailsend" type="text" class="input1" id="mailsend" value="<%=mailsend%>" size="20" maxlength="50">
邮箱名称<br> <input name="mailusername" type="text" id="mailusername" class="input1" value="<%=mailusername%>" size="20" maxlength="50">
登陆名<br>
<input name="mailpassword" type="password" class="input1" id="mailpassword" value="<%=mailpassword%>" size="21" maxlength="50">
登陆密码</td>
</tr>
<tr>
<td align="center" class="tdstyle">联系电话1</td>
<td height="25" class="tdstyle"><input name="tel1" type="text" class="input1" id="tel1" value="<%=tel1%>" size="20" maxlength="50">
显示在网页尾部</td>
</tr>
<tr>
<td align="center" class="tdstyle">联系电话2</td>
<td class="tdstyle"> <input name="tel2" type="text" class="input1" id="tel2" value="<%=tel2%>" size="20" maxlength="50">
显示在网页尾部,可留空,也可同时填写多部,可以写入文字说明</td>
</tr>
<tr>
<td align="center" class="tdstyle">公司传真1</td>
<td class="tdstyle"> <input name="fax1" type="text" class="input1" id="fax1" value="<%=fax1%>" size="20" maxlength="50">
显示在网页尾部,可留空</td>
</tr>
<tr>
<td align="center" class="tdstyle">公司传真2</td>
<td class="tdstyle"> <input name="fax2" type="text" class="input1" id="fax2" value="<%=fax2%>" size="20" maxlength="50">
显示在网页尾部,可留空</td>
</tr>
<tr>
<td align="center" class="tdstyle">其它信息1</td>
<td class="tdstyle"> <input name="other1" type="text" class="input1" id="other1" value="<%=other1%>" size="20" maxlength="50">
显示在网页尾部,可留空</td>
</tr>
<tr>
<td align="center" class="tdstyle">其它信息2</td>
<td height="25" class="tdstyle"><input name="other2" type="text" class="input1" id="other2" value="<%=other2%>" size="20" maxlength="50">
显示在网页尾部,可留空</td>
</tr>
<tr>
<td height="60" colspan="2" align="center" class="tdstyle">
<input name="Submit1" type="submit" class="button" id="Submit1" onClick="javascript:return checksignup()" value="提交">
<input name="Submit2" type="reset" class="button" id="Submit2" value="重置">
<input name="Submit3" type="button" class="button" id="Submit3" onClick="javascript:window.history.go(-1)" value="返回">
</td>
</tr>
</table>
</form>
<%
If request("action")="save" Then
Set fso = Server.CreateObject("Scripting.FileSystemObject")
set file=fso.opentextfile(server.mappath("../../Config/Config.asp"),1)
MB=file.readall
file.close
set file = nothing
Title2="Title="""&Request("Title")&""""
CorpName2="CorpName="""&Request("CorpName")&""""
Add2="Add="""&Request("Add")&""""
Url12="Url="""&Request("Url")&""""
PC2="PC="""&Request("PC")&""""
MailAddress2="MailAddress="""&Request("MailAddress")&""""
MailSend2="MailSend="""&Request("MailSend")&""""
MailUserName2="MailUserName="""&Request("MailUserName")&""""
MailPassword2="MailPassword="""&Request("MailPassword")&""""
Mail12="Mail1="""&Request("Mail1")&""""
Mail22="Mail2="""&Request("Mail2")&""""
Tel12="Tel1="""&Request("Tel1")&""""
Tel22="Tel2="""&Request("Tel2")&""""
Fax12="Fax1="""&Request("Fax1")&""""
Fax22="Fax2="""&Request("Fax2")&""""
Other12="Other1="""&Request("Other1")&""""
Other22="Other2="""&Request("Other2")&""""
Logo2="Logo="""&Request("Logo")&""""
Banner2="Banner="""&Request("Banner")&""""
Url22="Url2="""&Request("Url2")&""""
ManageUrl2="ManageUrl="""&Request("ManageUrl")&""""
Sys_Path2="Sys_Path="""&Request("Sys_Path")&""""
Css2="Css="""&Request("Css")&""""
MB=replace(MB,"Title="""&Title&"""",Title2)
MB=replace(MB,"CorpName="""&CorpName&"""",CorpName2)
MB=replace(MB,"Add="""&Add&"""",Add2)
MB=replace(MB,"Url="""&Url&"""",Url12)
MB=replace(MB,"PC="""&PC&"""",PC2)
MB=replace(MB,"MailAddress="""&MailAddress&"""",MailAddress2)
MB=replace(MB,"MailSend="""&MailSend&"""",MailSend2)
MB=replace(MB,"MailUserName="""&MailUserName&"""",MailUserName2)
MB=replace(MB,"MailPassword="""&MailPassword&"""",MailPassword2)
MB=replace(MB,"Mail1="""&Mail1&"""",Mail12)
MB=replace(MB,"Mail2="""&Mail2&"""",Mail22)
MB=replace(MB,"Tel1="""&Tel1&"""",Tel12)
MB=replace(MB,"Tel2="""&Tel2&"""",Tel22)
MB=replace(MB,"Fax1="""&Fax1&"""",Fax12)
MB=replace(MB,"Fax2="""&Fax2&"""",Fax22)
MB=replace(MB,"Other1="""&Other1&"""",Other12)
MB=replace(MB,"Other2="""&Other2&"""",Other22)
MB=replace(MB,"Logo="""&Logo&"""",Logo2)
MB=replace(MB,"Banner="""&Banner&"""",Banner2)
MB=replace(MB,"Url2="""&Url2&"""",Url22)
MB=replace(MB,"ManageUrl="""&ManageUrl&"""",ManageUrl2)
MB=replace(MB,"Sys_Path="""&Sys_Path&"""",Sys_Path2)
MB=replace(MB,"Css="""&Css&"""",Css2)
set file=fso.createtextfile(server.mappath("../../Config/Config.asp"),true)
file.write MB
file.close
set file = nothing
set fso = nothing
'生成Err404.htm文件
Dim ErrPath,Html,FolderPath,Fso,ObjFso
if Request("Sys_Path")<>"" then:ErrPath=Request("Sys_Path")&"/":else:ErrPath=""
Html=Html+"<html>"&vbcrlf&"<head>"&vbcrlf&"<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"&vbcrlf&" <title>出错啦!</title>"&vbcrlf&"<meta http-equiv='refresh' content='0; url=/"&ErrPath&"Err.asp'>"&vbcrlf&"</head>"&vbcrlf&"<body>"&vbcrlf&"</body>"&vbcrlf&"</html>"
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
FolderPath = Server.MapPath("../../")
Set ObjFso = Fso.CreateTextFile(FolderPath&"\Err404.htm")
ObjFso.WriteLine Html
Html=""
ObjFso.close
set ObjFso = nothing
Response.Write("<script>alert(""修改成功"");location.href=""Set.asp"";</script>")
end if
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -