index.asp
来自「新闻发布系统」· ASP 代码 · 共 833 行 · 第 1/3 页
ASP
833 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%startime=timer()
%>
<!--#include file="const.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="showit.js" -->
<%
'---------------------
'此系统采用漫步统计系统
'漫步: http://www.manbu.net
'---------------------
db1="../Fsmanage/DataBase/#Foosun2004.asa" '数据库文件的位置
Set conn1 = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db1)
conn1.Open connstr
Name=session("Name")
PassWord=session("PassWord")
Userid=session("Userid")
set rsSession=server.CreateObject ("ADODB.RecordSet")
rsSession.Source="select * from admin where UserName='"&Name&"' and userpass='"&PassWord&"'"
rsSession.Open rsSession.Source,conn1,1,1
if not rsSession.EOF then
rsSession.Close
set rsSession=nothing
else
rsSession.Close
set rsSession=nothing
Response.redirect"admin_index.asp"
end if
function CloseDatabase
Conn1.close
Set conn1 = Nothing
End Function
%>
<title>统计系统</title>
<link href="../Fsmanage/css/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="draw.js"></script>
<meta http-equiv="refresh" content="60">
<body bgcolor="#FFFFFF">
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=1 bgcolor="#9BDBBA">
<TBODY>
<TR>
<TD><TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD id=oINNER bgColor=#FFFFFF> <table width="747" border="0" align="center" cellpadding="3" cellspacing="0">
<form name="frm" method="post" action="index.asp">
<tr bgcolor="#F7FFF4">
<td style=""> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=main'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>简要数据</span></td>
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=hour'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>24小时统计</span></td>
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=day'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>日统计</span></td>
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=month'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>月统计</span></td>
</tr>
<tr bgcolor="#F7FFF4">
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=osexp'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>系统/浏览器统计</span>
</td>
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=where'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>地区统计</span>
</td>
<td bgcolor="#F7FFF4"> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=referer'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>来源统计</span>
</td>
<td> <span style="CURSOR: hand" onClick="Javascript:location.href='index.asp?act=last20'"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"></strong>来访者信息列表</span>
</td>
</tr>
<tr bgcolor="#F7FFF4">
<td colspan="4" align="right">选中/点击需要查看的项目,即可查看需统计的信息。<a href="index.asp?act=admin"><strong>维护</strong></a></td>
</tr>
</form>
</table> </TD>
<TD width=1 bgColor=#6699CC></TD>
</TR>
</TBODY>
</TABLE> </TD>
</TR>
</TBODY>
</TABLE>
<br>
<br>
<%
act = Request("act")
if act = "" then act="main"
Select Case act
Case "admin"
Call Sb_Admin()
Case "main"
Call Sb_Main()
Case "hour"
Call Sb_Hour()
Case "day"
Call Sb_Day()
Case "month"
Call Sb_Month()
Case "osexp"
Call Sb_OsExp()
Case "where"
Call Sb_Where()
Case "referer"
Call Sb_Referer()
Case "last20"
Call Sb_Last20()
Case Else
Response.Write("走错地方了...")
Response.End
End Select
Dim vCount,endtime,startime
Dim WebCountTime
Dim vOnline
Dim vYToday,vToday,vCDate,vAveCount,vYCount,vMCount
Sub Sb_Admin()
If request.ServerVariables("REQUEST_METHOD") = "POST" then
WebName = Request("WebName")
WebUrl = Request("WebUrl")
WebEmail = Request("WebEmail")
WebMaster = Request("WebMaster")
WebExp = Fn_EnChar(Request("WebExp"))
Exe = Request("exe")
Select Case Exe
Case "insert"
vSql = "insert into WebInfo(WebName,WebUrl,WebEmail,WebMaster,WebExp,WebCountTime) values('"&WebName&"','"&WebUrl&"','"&WebEmail&"','"&WebMaster&"','"&WebExp&"',date())"
Conn.execute vSql
Num = Request("lastnum")
if Num <> "" then
if cInt(Num) <= 0 then Num = 1
Set Rs = GetRs("select * from Last20Vister")
cha = cInt(Num) - Rs.recordcount
if cha > 0 then
Set aRs = UIRs("Last20Vister")
for i = 1 to cha
aRs.addnew
next
aRs.UpdateBatch
aRs.close
elseif cha < 0 then
Set dRs = UIRs("select top "&abs(cha)&" * from Last20Vister order by cCT asc,id asc")
for i = 1 to abs(cha)
dRs.delete
dRs.MoveNext
next
dRs.UpdateBatch
dRs.close
end if
end if
Response.write "<p align=center><font color=red>网站信息录入成功.<a href=index.asp?act=main>返回</a></font></p>"
Exe = "update"
Case "update"
vSql = "update WebInfo set WebName='"&WebName&"',WebUrl='"&WebUrl&"',WebEmail='"&WebEmail&"',WebMaster='"&WebMaster&"',WebExp='"&WebExp&"'"
Conn.execute vSql
WebExp = Fn_DeChar(WebExp)
Num = Request("lastnum")
if Num <> "" then
if cInt(Num) = 0 then Num = 1
Set Rs = GetRs("select * from Last20Vister")
cha = cInt(Num) - Rs.recordcount
if cha > 0 then
Set aRs = UIRs("Last20Vister")
for i = 1 to cha
aRs.addnew
next
aRs.UpdateBatch
aRs.close
elseif cha < 0 then
Set dRs = UIRs("select top "&abs(cha)&" * from Last20Vister order by cCT asc,id asc")
for i = 1 to abs(cha)
dRs.delete
dRs.MoveNext
next
dRs.UpdateBatch
dRs.close
end if
end if
Response.write "<p align=center><font color=red>网站信息维护成功.<a href=index.asp?act=main>返回</a></font></p>"
End Select
else
Set vRs = GetRs("select WebName,WebUrl,WebEmail,WebMaster,WebExp from WebInfo")
if not vRs.eof then
WebName = vRs("WebName")
WebUrl = vRs("WebUrl")
WebEmail = vRs("WebEmail")
WebMaster = vRs("WebMaster")
WebExp = Fn_DeChar(vRs("WebExp"))
Exe = "update"
else
Exe = "insert"
end if
vRs.close:Set vRs=nothing
end if
%>
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=1 bgcolor="#9BDBBA" style="TABLE-LAYOUT: fixed">
<TBODY>
<TR>
<TD> <TABLE height="100%" cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD id=oINNER> <table width="747" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#F7FFF4"> <table width="100%" border="0" cellpadding="0" cellspacing="0" background="../Fsmanage/images/bg1.gif">
<tr>
<td height="26"> <div align="left"><strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle">管理网站基本信息
</strong></div></td>
</tr>
</table></td>
</tr>
<tr>
<td style="height:1px"></td>
</tr>
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="2">
<form name="form1" method="post" action="index.asp?act=admin&exe=<%=Exe%>">
<tr bgcolor="#F7FFF4">
<td width="10%" nowrap>网站名称:</td>
<td width="39%"> <input name="WebName" type="text" class="input" id="WebName" value="<%=WebName%>"></td>
<td width="9%" nowrap>网站地址:</td>
<td width="42%"> <input name="WebUrl" type="text" class="input" id="WebUrl" value="<%=WebUrl%>"></td>
</tr>
<tr bgcolor="#F7FFF4">
<td nowrap>网站管理员:</td>
<td bgcolor="#F7FFF4"> <input name="WebMaster" type="text" class="input" id="WebMaster" value="<%=WebMaster%>">
</td>
<td nowrap>网站信箱:</td>
<td> <input name="WebEmail" type="text" class="input" id="WebEmail" value="<%=WebEmail%>"></td>
</tr>
<tr bgcolor="#F7FFF4">
<td valign="top" nowrap>最后来访者信息条数:</td>
<td colspan="3"> <input name="lastnum" type="text" class="input" id="lastnum" size="10">
<font color="#FF0000">*</font> 如果没有需要请不要经常更改数值,默认为20条,<font color="#FF0000">如果不修改则留空</font>。</td>
</tr>
<tr bgcolor="#F7FFF4">
<td valign="top" nowrap>网站介绍:</td>
<td colspan="3"> <textarea name="WebExp" class="input" style="width:600;height:100"><%=WebExp%></textarea></td>
</tr>
<tr bgcolor="#F7FFF4">
<td height="28" valign="top" nowrap> </td>
<td colspan="3" bgcolor="#F7FFF4">
<input name="Submit2" type="submit" class=Anbut value=" 提 交 " align="absmiddle">
<font color="#FF0000">*</font> 请完整的填写以上内容,提交后网站计数器开始生效.</td>
</tr>
</form>
</table></td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?