📄 siteconfig.asp
字号:
<!--#include file="check.asp"-->
<!--#include file="../config.asp"-->
<!--#include file="function.asp"-->
<%
dim ObjInstalled
dim Action
dim FoundErr
dim ErrMsg
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
Action=trim(request("Action"))
if Action="" then
Action="ShowInfo"
end if
%>
<html>
<head>
<title><% =Title %> 网站配置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.back_southidc{BACKGROUND-IMAGE:url('image/titlebg.gif');COLOR:000000;}
.table_southidc{BACKGROUND-COLOR: A4B6D7;}
.td_southidc{BACKGROUND-COLOR: F2F8FF;}
.tr_southidc{BACKGROUND-COLOR: ECF5FF;}
.t1 {font:12px 宋体;color:#000000}
.t2 {font:12px 宋体;color:#ffffff}
.t3 {font:12px 宋体;color:#ffff00}
.t4 {font:12px 宋体;color:#800000}
.t5 {font:12px 宋体;color:#191970}
.weiqun:hover{
Font-unline:yes;
font-family: "宋体";
color: #FFFFFF;
text-decoration: underline;
background-color: #CCCCCC;
}
td {
font-size: 12px;
}
a:link {
color: #000000;
text-decoration: none;
}
a:active {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
.STYLE1 {
color: #FF0000;
font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
if Action="SaveConfig" then
call SaveConfig()
Response.Redirect "SiteConfig.asp"
else
call ShowConfig()
end if
'if FoundErr=True then
' call WriteErrMsg()
'end if
call connclose()
sub ShowConfig()
%>
<form method="POST" action="SiteConfig.asp" id="form" name="form">
<table width="600" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#ECF5FF" class="table_southidc">
<tr>
<td class="back_southidc" colspan="2"> <div align="center"><strong>系 统 配
置</strong></div></td>
</tr>
<tr>
<td colspan="2" class="topbg"> <strong>网站信息配置</strong></td>
</tr>
<tr>
<td width="224" class="tdbg"><strong>公司名称(报价单台头):</strong></td>
<td width="355" class="tdbg"> <input name="CoName" type="text" id="CoName" value="<%=CoName%>" size="40" maxlength="50"> </td>
</tr>
<tr>
<td width="224" class="tdbg"><strong>网站标题(网站标题名称):</strong></td>
<td class="tdbg"> <input name="Title" type="text" id="Title" value="<%=Title%>" size="40" maxlength="50"> </td>
</tr>
<tr>
<td width="224" class="tdbg"><strong>网站地址:</strong><br>
请添写您公司对外的WEB地址</td>
<td class="tdbg"> <input name="Web" type="text" id="Web" value="<%=Web%>" size="40" maxlength="255"> </td>
</tr>
<tr>
<td class="tdbg"><strong>电话传真:</strong></td>
<td class="tdbg"><input name="Telfax" type="text" id="Telfax" value="<%=Telfax%>" size="40" maxlength="50"> </td>
</tr>
<tr>
<td class="tdbg"><strong>公司地址:</strong></td>
<td class="tdbg"><input name="Add" type="text" id="Add" value="<%=Add%>" size="40" maxlength="50"> </td>
</tr>
<tr>
<td class="tdbg"><strong>Logo图标地址:</strong>(<span class="STYLE2">大小:58*59</span>)</td>
<td class="tdbg"><input name="Logo" type="text" id="Logo" value="<%=Logo%>" size="40" maxlength="50"> </td>
</tr>
<tr>
<td width="224" class="tdbg"><strong>报价单栏目一:</strong></td>
<td class="tdbg"><input name="Len1" type="text" id="Len1" value="<%=Len1%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目二:</strong></td>
<td class="tdbg"><input name="Len2" type="text" id="Len2" value="<%=Len2%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目三:</strong></td>
<td class="tdbg"><input name="Len3" type="text" id="Len3" value="<%=Len3%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目四:</strong></td>
<td class="tdbg"><input name="Len4" type="text" id="Len4" value="<%=Len4%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目五:</strong></td>
<td class="tdbg"><input name="Len5" type="text" id="Len5" value="<%=Len5%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目六:</strong></td>
<td class="tdbg"><input name="Len6" type="text" id="Len6" value="<%=Len6%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td class="tdbg"><strong>报价单栏目七:</strong></td>
<td class="tdbg"><input name="Len7" type="text" id="Len7" value="<%=Len7%>" size="40" maxlength="50"></td>
</tr>
<tr>
<td width="224" class="tdbg"><span class="STYLE1">注:单价和数量栏目不支持修改</span></td>
<td class="tdbg"> </td>
</tr>
<tr>
<td width="224" class="tdbg"><strong>版权信息:</strong><br>
支持HTML标记,不能使用双引号</td>
<td class="tdbg"> <textarea name="Copyright" cols="50" rows="8" id="Copyright"><%=Copyright%></textarea> </td>
</tr>
<tr>
<td width="224" class="tdbg"> </td>
<td class="tdbg"> </td>
</tr>
<tr>
<td colspan="2" align="center" class="tdbg"> <input name="Action" type="hidden" id="Action" value="SaveConfig">
<input name="cmdSave" type="submit" id="cmdSave" value=" 保存设置 " <% If ObjInstalled=false Then response.write "disabled" %>> </td>
</tr>
<%
If ObjInstalled=false Then
Response.Write "<tr class='tdbg'><td height='40' colspan='3'><b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能。<br>请直接修改“Inc/config.asp”文件中的内容。</font></b></td></tr>"
End If
%>
</table>
<%
end sub
%>
</form>
</body>
</html>
<%
sub SaveConfig()
If ObjInstalled=false Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你的服务器不支持 FSO(Scripting.FileSystemObject)! </li>"
exit sub
end if
dim fso,hf
set fso=Server.CreateObject("Scripting.FileSystemObject")
set hf=fso.CreateTextFile(Server.mappath("../config.asp"),true)
hf.write "<" & "%" & vbcrlf
hf.write "Const CoName=" & chr(34) & trim(request("CoName")) & chr(34) & " '公司名字(报价单台头)" & vbcrlf
hf.write "Const Title=" & chr(34) & trim(request("Title")) & chr(34) & " '网站标题名称" & vbcrlf
hf.write "Const Web=" & chr(34) & trim(request("Web")) & chr(34) & " '网站地址(报价单的网站地址)" & vbcrlf
hf.write "Const Telfax=" & chr(34) & trim(request("Telfax")) & chr(34) & " '电话传真" & vbcrlf
hf.write "Const Add=" & chr(34) & trim(request("Add")) & chr(34) & " '公司地址" & vbcrlf
hf.write "Const Logo=" & chr(34) & trim(request("Logo")) & chr(34) & " '报价单公司LOGO图标,请使用相对或绝对地址" & vbcrlf
hf.write "Const Copyright=" & chr(34) & trim(request("Copyright")) & chr(34) & " '版权信息" & vbcrlf
hf.write "Const Len1=" & chr(34) & trim(request("Len1")) & chr(34) & " '报价单栏目一" & vbcrlf
hf.write "Const Len2=" & chr(34) & trim(request("Len2")) & chr(34) & " '报价单栏目二" & vbcrlf
hf.write "Const Len3=" & chr(34) & trim(request("Len3")) & chr(34) & " '报价单栏目三" & vbcrlf
hf.write "Const Len4=" & chr(34) & trim(request("Len4")) & chr(34) & " '报价单栏目四" & vbcrlf
hf.write "Const Len5=" & chr(34) & trim(request("Len5")) & chr(34) & " '报价单栏目五" & vbcrlf
hf.write "Const Len6=" & chr(34) & trim(request("Len6")) & chr(34) & " '报价单栏目六" & vbcrlf
hf.write "Const Len7=" & chr(34) & trim(request("Len7")) & chr(34) & " '报价单栏目七" & vbcrlf
' hf.write "Const WebmasterName=" & chr(34) & trim(request("WebmasterName")) & chr(34) & " '站长姓名" & vbcrlf
' hf.write "Const WebmasterEmail=" & chr(34) & trim(request("WebmasterEmail")) & chr(34) & " '站长信箱" & vbcrlf
' hf.write "Const Copyright=" & chr(34) & trim(request("Copyright")) & chr(34) & " '版权信息" & vbcrlf
' hf.write "Const MaxPerPage_Default=" & trim(request("MaxPerPage_Default")) & " '首页每页产品或文章数" & vbcrlf
' hf.write "Const MaxPerPage_Search=" & trim(request("MaxPerPage_Search")) & " '文章搜索页每页文章数" & vbcrlf
' hf.write "Const ShowContentByPage=" & chr(34) & trim(request("ShowContentByPage")) & chr(34) & " '文章内容是否分页显示" & vbcrlf
' hf.write "Const MaxPerPage_Content=" & trim(request("MaxPerPage_Content")) & " '每页显示大约字符数" & vbcrlf
' hf.write "Const EnableArticleCheck=" & chr(34) & trim(request("EnableArticleCheck")) & chr(34) & " '是否启用文章审核功能" & vbcrlf
' hf.write "Const EnableUploadFile=" & chr(34) & trim(request("EnableUploadFile")) & chr(34) & " '是否开放文件上传" & vbcrlf
' hf.write "Const PopAnnounce=" & chr(34) & trim(request("PopAnnounce")) & chr(34) & " '是否弹出公告窗口" & vbcrlf
' hf.write "Const HitsOfHot=" & trim(request("HitsOfHot")) & " '热门文章点击数" & vbcrlf
' hf.write "Const MaxFileSize=" & trim(request("MaxFileSize")) & " '上传文件大小限制" & vbcrlf
' hf.write "Const SaveUpFilesPath=" & chr(34) & trim(request("SaveUpFilesPath")) & chr(34) & " '存放上传文件的目录" & vbcrlf
' hf.write "Const UpFileType=" & chr(34) & trim(request("UpFileType")) & chr(34) & " '允许的上传文件类型" & vbcrlf
' hf.write "Const DelUpFiles=" & chr(34) & trim(request("DelUpFiles")) & chr(34) & " '删除文章时是否同时删除文章中的上传文件" & vbcrlf
' hf.write "Const SessionTimeout=" & trim(request("SessionTimeout")) & " 'Session会话的保持时间" & vbcrlf
' hf.write "Const MailObject=" & chr(34) & trim(request("MailObject")) & chr(34) & " '邮件发送组件" & vbcrlf
' hf.write "Const MailServer=" & chr(34) & trim(request("MailServer")) & chr(34) & " '用来发送邮件的SMTP服务器" & vbcrlf
' hf.write "Const MailServerUserName=" & chr(34) & trim(request("MailServerUserName")) & chr(34) & " '登录用户名" & vbcrlf
' hf.write "Const MailServerPassWord=" & chr(34) & trim(request("MailServerPassWord")) & chr(34) & " '登录密码" & vbcrlf
' hf.write "Const MailDomain=" & chr(34) & trim(request("MailDomain")) & chr(34) & " '域名" & vbcrlf
hf.write "%" & ">"
hf.close
set hf=nothing
set fso=nothing
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -