admin_info_config.asp
来自「CityCN V2.1 是自主开发的基于ASP+Access的新型资讯信息系统。」· ASP 代码 · 共 147 行
ASP
147 行
<!--#include file="config.asp" -->
<!--#include file="info_config.asp" -->
<!--#include file="admin_admininfo.asp"-->
<!--#include file="sub_change.asp" -->
<%
if session("adminname")<>adminname or session("adminpwd")<>adminpwd then
response.Redirect("admin_login.asp")
end if
dim ok,error
ok=strchange(left(trim(request.QueryString("ok")),1))
dim gonggao1,no_tuijian1,no_suoyou1,no_pl1,no_admin1,rowcount1
if ok="y" then
gonggao1=trim(request.Form("gonggao"))
no_tuijian1=trim(request.Form("no_tuijian"))
no_suoyou1=trim(request.Form("no_suoyou"))
no_pl1=trim(request.Form("no_pl"))
no_admin1=trim(request.Form("no_admin"))
rowcount1=trim(request.Form("rowcount"))
if len(gonggao1)=0 then error="资讯公告不能为空!<br>" end if
if len(no_tuijian1)=0 then error=error&"暂无推荐不能为空!<br>" end if
if len(no_suoyou1)=0 then error=error&"暂无资讯不能为空!<br>" end if
if len(no_pl1)=0 then error=error&"暂无评论不能为空!<br>" end if
if len(no_admin1)=0 then error=error&"暂无管理不能为空!<br>" end if
if len(rowcount1)=0 or rowcount1="0" then error=error&"资讯数不能为空!<br>" end if
if len(error)=0 then
dim msg
msg="<%"&chr(13)&chr(10)
msg=msg&"Session.CodePage=936"&chr(13)&chr(10)
msg=msg&"const gonggao="""&gonggao1&""""&chr(13)&chr(10)
msg=msg&"const no_tuijian="""&no_tuijian1&""""&chr(13)&chr(10)
msg=msg&"const no_suoyou="""&no_suoyou1&""""&chr(13)&chr(10)
msg=msg&"const no_pl="""&no_pl1&""""&chr(13)&chr(10)
msg=msg&"const no_admin="""&no_admin1&""""&chr(13)&chr(10)
msg=msg&"dim rowcount"&chr(13)&chr(10)
msg=msg&"rowcount="""&rowcount1&""""&chr(13)&chr(10)
msg=msg&chr(37)&">"
dim files,fs
On Error Resume Next
set fs=Server.CreateObject("Adodb.Stream")
If Err.Number=-2147221005 Then
Response.Write "非常遗憾,您的主机不支持ADODB.Stream,不能使用本程序"
Err.Clear
Response.End
End If
fs.Mode=3
fs.Type=2
fs.charset="gb2312"
fs.Open
fs.writetext msg
fs.SaveToFile Server.MapPath("info_config.asp"),2
fs.Close
set fs=nothing
ok="yes"
else
error="注意:信息填写错误!请重新填写!<br>"&error
end if
end if
if ok="" then
gonggao1=gonggao
no_tuijian1=no_tuijian
no_suoyou1=no_suoyou
no_pl1=no_pl
no_admin1=no_admin
rowcount1=rowcount
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>【后台管理】基本信息设置 - <%=sitename%></title>
<link href="admin.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0" leftmargin="0">
<div align="center">
<!--#include file="admin_top_config.asp" -->
<br>
<% If ok="yes" Then %>
<p align="center"><font color="#FF0000">信息已成功保存!</font></p>
<% Else %>
<table width="90%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr>
<td height="40" align="center" style="line-height: 16pt"><b>资讯初始化设置</b></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td height="40" colspan="2" style="color: #FF0000; padding-left: 10px"><%=error%></td>
</tr>
<form action="admin_info_config.asp?ok=y" method="post">
<tr>
<td width="15%" height="22" align="right">资讯公告:</td>
<td width="85%"><textarea rows="2" name="gonggao" cols="70"><%=gonggao1%></textarea>资讯公告,所有资讯前!</td>
</tr>
<tr>
<td height="22" align="right">暂无推荐:</td>
<td><textarea rows="2" name="no_tuijian" cols="70"><%=no_tuijian1%></textarea>暂无推荐时显示。</td>
</tr>
<tr>
<td height="22" align="right">暂无资讯:</td>
<td><textarea rows="2" name="no_suoyou" cols="70"><%=no_suoyou1%></textarea>暂无资讯时显示。</td>
</tr>
<tr>
<td height="22" align="right">暂无评论:</td>
<td><textarea rows="2" name="no_pl" cols="70"><%=no_pl1%></textarea>暂无评论时显示。</td>
</tr>
<tr>
<td height="22" align="right">暂无管理:</td>
<td><textarea rows="2" name="no_admin" cols="70"><%=no_admin1%></textarea>暂时无管理员时显示。</td>
</tr>
<tr>
<td height="22" align="right"><span lang="zh-cn">资讯个数</span>:</td>
<td>
<select size="1" name="rowcount" style="width: 120">
<option value="<%=rowcount1%>">目前显示数:<%=rowcount1%></option>
<option value="0">----------------</option>
<option value="3">3</option>
<option value="6">6</option>
<option value="9">9</option>
<option value="12">12</option>
<option value="15">15(推荐)</option>
<option value="18">18</option>
<option value="21">21</option>
<option value="24">24</option>
<option value="27">27</option>
<option value="30">30</option>
</select> 每页显示的资讯个数。<br>
最小数值为3,并且是3的倍数,建议12、15、18。显示的越多页面速度会降低。</td>
</tr>
<tr>
<td width="700" height="22" align="center" colspan="2">
<input type="submit" name="Submit" value=" 保 存 信 息 "> <input type="reset" value="重置" name="B1"></td>
</tr>
</form>
</table>
<% End If %>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?