📄 admin_config.asp
字号:
<!--#include file="inc/config.asp"-->
<!--#include file="inc/error.asp"-->
<!--#include file="inc/FORMAT.asp"-->
<LINK
href="inc/adminstyle.css" type=text/css rel=StyleSheet>
<br><center>
<p></p>
<%
dim founderr,errmsg
founderr=false
errmsg=""
if session("adminlogin")<>sessionvar then
founderr=true
errmsg=errmsg+"<br>"+"<li>你尚未登录,或者超时了!请<a href='admin.asp'>重新登录</a>!"
call diserror()
response.end
else
select case Request("menu")
case ""
config
case "config"
config
case "configok"
configok
end select
end if
sub config
%>
<form method="post" action="?menu=configok">
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#FF0000">网站基本信息</FONT></td>
</tr>
<tr class=a3>
<td width="50%">网站名称:</td>
<td><input size="30" name="webname" value="<%=webname%>"></td>
</tr>
<tr class=a4>
<td>网站URL:<br>例如: <font color="FF0000">http://<%=Request.ServerVariables("server_name")%><%=replace(Request.ServerVariables("script_name"),"admin_setup.asp","")%></font></td>
<td><input size="30" name="weburl" value="<%=weburl%>"></td>
</tr>
<tr class=a3>
<td>站长名字:</td>
<td><input size="30" name="webboss" value="<%=webboss%>"></td>
</tr>
<tr class=a4>
<td>站长Email:</td>
<td><input size="30" value="<%=webemail%>" name="webemail"></td>
</tr>
<tr class=a3>
<td>边框颜色:</td>
<td><input size="30" value="<%=border%>" name="border"></td>
</tr>
<tr class=a4>
<td>广告代码(首页显示,支持HTML):<br>注意:<font color="FF0000">请勿使用单双引号<FONT COLOR="#6600FF">'"</FONT><br>为不影响美观,请控制在548X85大小以内!<font></td>
<td>
<textarea name="add" rows="5" cols="40"><%=add%></textarea>
</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#0000CC">首页显示设置</FONT></td>
</tr>
<tr class=a3>
<td>首页显示的新闻条数:</td>
<td><input size="4" value="<%=indexnews%>" name="indexnews"> 条 [默认:7]</td>
</tr>
<tr class=a4>
<td>首页显示的公告条数:</td>
<td><input size="4" value="<%=diaryperpage%>" name="diaryperpage"> 条 [默认:1]</td>
</tr>
<tr class=a3>
<td>首页显示的影音条数:</td>
<td><input size="4" value="<%=indexdj%>" name="indexdj"> 条 [默认:5]</td>
</tr>
<tr class=a4>
<td>首页显示的文章条数:</td>
<td><input size="4" value="<%=indexarticle%>" name="indexarticle"> 条 [默认:5]</td>
</tr>
<tr class=a3>
<td>首页显示的程序条数:</td>
<td><input size="4" value="<%=indexsoft%>" name="indexsoft"> 条 [默认:5]</td>
</tr>
<tr class=a4>
<td>首页显示的图片个数:</td>
<td><input size="4" value="<%=indexpic%>" name="indexpic"> 个 [默认:4]</td>
</tr>
<tr class=a3>
<td>首页显示的链接条数:</td>
<td><input size="4" value="<%=indexfriendlink%>" name="indexfriendlink"> 条 [默认:8]</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#FF9900">新闻链接显示选项</FONT></td>
</tr>
<tr class=a3>
<td width="50%">每页显示的新闻的条数:</td>
<td>
<input size="6" value="<%=newsperpage%>" name="newsperpage"> byte [默认:15]</td>
</tr>
<tr class=a4>
<td>每页显示的链接个数:</td>
<td>
<input size="6" value="<%=adflperpage%>" name="adflperpage"> byte [默认:20]</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="##339900">影音显示选项</FONT></td>
</tr>
<tr class=a3>
<td width="50%">每页显示的影音的个数:</td>
<td>
<input size="6" value="<%=djperpage%>" name="djperpage"> byte [默认:15]</td>
</tr>
<tr class=a4>
<td>显示推荐影音的个数:</td>
<td>
<input size="6" value="<%=bestdj%>" name="bestdj"> byte [默认:5]</td>
</tr>
<tr class=a3>
<td>显示点击次数最多的X个影音:</td>
<td>
<input size="6" value="<%=topdjnum%>" name="topdjnum"> byte [默认:5]</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#FF00CC">文章显示选项</FONT></td>
</tr>
<tr class=a3>
<td width="50%">每页显示的文章的篇数:</td>
<td>
<input size="6" value="<%=articleperpage%>" name="articleperpage"> byte [默认:15]</td>
</tr>
<tr class=a4>
<td>显示阅读次数最多的X篇文章:</td>
<td>
<input size="6" value="<%=toparticlenum%>" name="toparticlenum"> byte [默认:20]</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#999900">下载显示选项</FONT></td>
</tr>
<tr class=a3>
<td width="50%">每页显示的程序个数:</td>
<td>
<input size="6" value="<%=softperpage%>" name="softperpage"> byte [默认:8]</td>
</tr>
<tr class=a4>
<td>显示最新的程序个数:</td>
<td>
<input size="6" value="<%=newsoft%>" name="newsoft"> byte [默认:5]</td>
</tr>
<tr class=a3>
<td>显示下载次数最多的X个程序:</td>
<td>
<input size="6" value="<%=topsoftnum%>" name="topsoftnum"> byte [默认:10]</td>
</tr>
</table>
<br>
<table cellspacing="1" cellpadding="2" width="760" border="0" class="a2" align="center">
<tr height=25>
<td class=a1 align=middle colspan=2><FONT COLOR="#CCFF00">图片显示选项</FONT></td>
</tr>
<tr class=a3>
<td width="50%">每页显示的图片的个数:</td>
<td>
<input size="6" value="<%=picperpage%>" name="picperpage"> byte [默认:12]</td>
</tr>
<tr class=a4>
<td>显示推荐图片的个数:</td>
<td>
<input size="6" value="<%=bestpic%>" name="bestpic"> byte [默认:2]</td>
</tr>
<tr class=a3>
<td>显示点击次数最多的X个图片:</td>
<td>
<input size="6" value="<%=toppicnum%>" name="toppicnum"> byte [默认:5]</td>
</tr>
</table>
<br><br>
<input type="submit" value=" 更 新 ">
</form>
<br><br>
<%
end sub
Sub ADODB_SaveToFile(ByVal strBody,ByVal File)
On Error Resume Next
Dim objStream,FSFlag,fs,WriteFile
FSFlag = 1
If DEF_FSOString <> "" Then
Set fs = Server.CreateObject(DEF_FSOString)
If Err Then
FSFlag = 0
Err.Clear
Set fs = Nothing
End If
Else
FSFlag = 0
End If
If FSFlag = 1 Then
Set WriteFile = fs.CreateTextFile(Server.MapPath(File),True)
WriteFile.Write strBody
WriteFile.Close
Set Fs = Nothing
Else
Set objStream = Server.CreateObject("ADODB.Stream")
If Err.Number=-2147221005 Then
GBL_CHK_TempStr = "<div align='center'>您的主机不支持ADODB.Stream,无法完成操作,请手工进行</div>"
Err.Clear
Set objStream = Noting
Exit Sub
End If
With objStream
.Type = 2
.Open
.Charset = "GB2312"
.Position = objStream.Size
.WriteText = strBody
.SaveToFile Server.MapPath(File),2
.Close
End With
Set objStream = Nothing
End If
End Sub
sub configok
webname = Trim(Request.Form("webname"))
weburl = Trim(Request.Form("weburl"))
webboss = Trim(Request.Form("webboss"))
webemail = Trim(Request.Form("webemail"))
border = Trim(Request.Form("border"))
add = Trim(Request.Form("add"))
indexnews = Trim(Request.Form("indexnews"))
diaryperpage = Trim(Request.Form("diaryperpage"))
indexdj = Trim(Request.Form("indexdj"))
indexarticle = Trim(Request.Form("indexarticle"))
indexsoft = Trim(Request.Form("indexsoft"))
indexpic = Trim(Request.Form("indexpic"))
indexfriendlink = Trim(Request.Form("indexfriendlink"))
newsperpage = Trim(Request.Form("newsperpage"))
adflperpage = Trim(Request.Form("adflperpage"))
djperpage = Trim(Request.Form("djperpage"))
bestdj = Trim(Request.Form("bestdj"))
topdjnum = Trim(Request.Form("topdjnum"))
articleperpage = Trim(Request.Form("articleperpage"))
toparticlenum = Trim(Request.Form("toparticlenum"))
softperpage = Trim(Request.Form("softperpage"))
newsoft = Trim(Request.Form("newsoft"))
topsoftnum = Trim(Request.Form("topsoftnum"))
picperpage = Trim(Request.Form("picperpage"))
bestpic = Trim(Request.Form("bestpic"))
toppicnum = Trim(Request.Form("toppicnum"))
Dim n,TempStr
TempStr = ""
TempStr = TempStr & chr(60) & "%" & VbCrLf
TempStr = TempStr & "dim sessionvar,WebName,weburl,webboss,webemail,border,add" & VbCrLf
TempStr = TempStr & "dim indexnews,diaryperpage,indexdj,indexarticle,indexsoft,indexpic,indexfriendlink" & VbCrLf
TempStr = TempStr & "dim newsperpage,adflperpage" & VbCrLf
TempStr = TempStr & "dim djperpage,bestdj" & VbCrLf
TempStr = TempStr & "dim topdjnum,articleperpage,toparticlenum" & VbCrLf
TempStr = TempStr & "dim softperpage,newsoft,topsoftnum" & VbCrLf
TempStr = TempStr & "dim picperpage,bestpic,toppicnum" & VbCrLf
TempStr = TempStr & "sessionvar="& Chr(34) &"yes"& Chr(34) &"" & VbCrLf
TempStr = TempStr & "WebName="& Chr(34) & webname & Chr(34) &"" & VbCrLf
TempStr = TempStr & "weburl="& Chr(34) & weburl & Chr(34) &"" & VbCrLf
TempStr = TempStr & "Webboss="& Chr(34) & webboss & Chr(34) &"" & VbCrLf
TempStr = TempStr & "webemail="& Chr(34) & webemail & Chr(34) &"" & VbCrLf
TempStr = TempStr & "border="& Chr(34) & border & Chr(34) &"" & VbCrLf
TempStr = TempStr & "add="& Chr(34) & add & Chr(34) &"" & VbCrLf
TempStr = TempStr & "indexnews="& indexnews & "" & VbCrLf
TempStr = TempStr & "diaryperpage="& diaryperpage &"" & VbCrLf
TempStr = TempStr & "indexdj="& indexdj & "" & VbCrLf
TempStr = TempStr & "indexarticle="& indexarticle &"" & VbCrLf
TempStr = TempStr & "indexsoft="& indexsoft & "" & VbCrLf
TempStr = TempStr & "indexpic="& indexpic &"" & VbCrLf
TempStr = TempStr & "indexfriendlink="& indexfriendlink & "" & VbCrLf
TempStr = TempStr & "newsperpage="& newsperpage &"" & VbCrLf
TempStr = TempStr & "adflperpage="& adflperpage & "" & VbCrLf
TempStr = TempStr & "djperpage="& djperpage &"" & VbCrLf
TempStr = TempStr & "bestdj="& bestdj & "" & VbCrLf
TempStr = TempStr & "topdjnum="& topdjnum &"" & VbCrLf
TempStr = TempStr & "articleperpage="& articleperpage & "" & VbCrLf
TempStr = TempStr & "toparticlenum="& toparticlenum &"" & VbCrLf
TempStr = TempStr & "softperpage="& softperpage & "" & VbCrLf
TempStr = TempStr & "newsoft="& newsoft &"" & VbCrLf
TempStr = TempStr & "topsoftnum="& topsoftnum & "" & VbCrLf
TempStr = TempStr & "picperpage="& picperpage &"" & VbCrLf
TempStr = TempStr & "bestpic="& bestpic & "" & VbCrLf
TempStr = TempStr & "toppicnum="& toppicnum &"" & VbCrLf
TempStr = TempStr & "%" & chr(62) & VbCrLf
ADODB_SaveToFile TempStr,"inc/config.asp"
If GBL_CHK_TempStr = "" Then
Response.Write "<br><font color=Green class=GreenFont>1.成功完成设置!</font>"
Response.Write "<br><br>如发现页面显示不正常,在本机调试好inc/config.asp,再使用FTP软件上传至相应目录."
Else
%><%=GBL_CHK_TempStr%><br>服务器不支持在线写入文件功能,请使用FTP等功能,将<font color=Red >inc/config.asp</font>文件替换成框中内容(注意备份)<p>
<textarea name="fileContent" cols="80" rows="30" class=fmtxtra><%=Server.htmlencode(TempStr)%></textarea><%
GBL_CHK_TempStr = ""
End If
end sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -