⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.asp

📁 数据库设计2.页面的设计与开发3.小结第8章在线考试系统 161 实例分析 161 1. 系统设计2.系统功能预览知识要点 167 制作步骤 168 1 ... 利用简单的HTML代码与脚本 融合而成
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%startime=timer()%>
<!--#include file="const.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="showit.js" -->
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="draw.js"></script>
<body bgcolor="#E7EFF7">
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=0 style="TABLE-LAYOUT: fixed">
  <TBODY>
    <TR height=3 width="100%"> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR height=1> 
              <TD width=1></TD>
              <TD width=1></TD>
              <TD width=1></TD>
              <TD bgColor=#6699CC></TD>
              <TD width=1></TD>
              <TD width=1></TD>
              <TD width=1></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD bgColor=#6699CC></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC></TD>
              <TD bgColor=#6699CC colSpan=3></TD>
              <TD bgColor=#6699CC></TD>
              <TD></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0 cellPadding=0 border=0>
          <TBODY>
            <TR> 
              <TD width=1 bgColor=#6699CC></TD>
              <TD id=oINNER bgColor=#E3ECF4> 

  <table width="747" border="0" align="center" cellpadding="3" cellspacing="0">
                  <form name="frm" method="post" action="index.asp">
    <tr> 
                      <td bgcolor="#A5C2E0" style=""> <span class="hands" 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 bgcolor="#A5C2E0"> <span class="hands" 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 bgcolor="#A5C2E0"> <span class="hands" 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 bgcolor="#A5C2E0"> <span class="hands" 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> 
                      <td bgcolor="#A5C2E0"> <span class="hands" 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 bgcolor="#A5C2E0"> <span class="hands" 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="#A5C2E0"> <span class="hands" 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 bgcolor="#A5C2E0"> <span class="hands" 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> 
      <td colspan="4" style="height:1px" bgcolor="#6699cc"></td>
    </tr>
    <tr> 
                      <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>
    <TR height=3 width="100%"> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR height=1> 
              <TD width=1></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD bgColor=#6699CC></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD width=1></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD bgColor=#6699CC></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD></TD>
            </TR>
            <TR height=1> 
              <TD colSpan=3></TD>
              <TD bgColor=#6699CC></TD>
              <TD colSpan=3></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
					
					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)
					
					Response.write "<p align=center><font color=red>网站信息维护成功.<a href=index.asp?act=main>返回</a></font></p>"
			End Select
		else
			
			if Request.Cookies("Count")("login") <> "yes" then
				response.Redirect("./login.asp")
				
			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				
		end if
%>
<TABLE width="747" height=28 border=0 align="center" cellPadding=0 cellSpacing=0 style="TABLE-LAYOUT: fixed">
  <TBODY>
    <TR height=3 width="100%"> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR height=1> 
              <TD width=1></TD>
              <TD width=1></TD>
              <TD width=1></TD>
              <TD bgColor=#6699CC></TD>
              <TD width=1></TD>
              <TD width=1></TD>
              <TD width=1></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD bgColor=#6699CC></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC></TD>
              <TD bgColor=#6699CC colSpan=3></TD>
              <TD bgColor=#6699CC></TD>
              <TD></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height="100%" cellSpacing=0 cellPadding=0 border=0>
          <TBODY>
            <TR> 
              <TD width=1 bgColor=#6699CC></TD>
              <TD id=oINNER bgColor=#6699CC> 
                <table width="747" border="0" cellspacing="0" cellpadding="2">
                  <tr> 
                    <td bgcolor="#A5C2E0"> <strong><img src="images/Clear_0_sky.gif" width="15" height="14" hspace="5" vspace="5" align="absmiddle"> 
                      管理网站基本信息 <a href="out.asp">退出维护</a></strong></td>
          </tr>
                  <tr> 
                    <td bgcolor="#6699CC" style="height:1px"></td>
          </tr>
          <tr> 
                    <td bgcolor="#E3ECF4"> 
                      <table width="100%" border="0" cellspacing="0" cellpadding="2">
                        <form name="form1" method="post" action="index.asp?act=admin&exe=<%=Exe%>">
                          <tr> 
                            <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> 
                            <td nowrap>网站管理员:</td>
                            <td><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> 
                            <td valign="top" nowrap>网站介绍:</td>
                            <td colspan="3"><textarea name="WebExp" class="input" style="width:600;height:100"><%=WebExp%></textarea></td>
                          </tr>
                          <tr>
                            <td valign="top" nowrap>&nbsp;</td>
                            <td colspan="3"><input name="Submit2" type="submit" class="button" value="  提交  " align="absmiddle">
                              <font color="#FF0000">*</font> 请完整的填写以上内容,提交后网站计数器开始生效.</td>
                          </tr>
                        </form>
                      </table></td>
          </tr>
        </table> </TD>
              <TD width=1 bgColor=#6699CC></TD>
            </TR>
          </TBODY>
        </TABLE>
</TD>
    </TR>
    <TR height=3 width="100%"> 
      <TD> <TABLE style="TABLE-LAYOUT: fixed" height=3 cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR height=1> 
              <TD width=1></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD width=1 bgColor=#E3ECF4></TD>
              <TD bgColor=#E3ECF4></TD>
              <TD width=1 bgColor=#E3ECF4></TD>
              <TD width=1 bgColor=#6699CC></TD>
              <TD width=1></TD>
            </TR>
            <TR height=1> 
              <TD></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD bgColor=#E3ECF4></TD>
              <TD bgColor=#6699CC colSpan=2></TD>
              <TD></TD>
            </TR>
            <TR height=1> 
              <TD colSpan=3></TD>
              <TD bgColor=#6699CC></TD>
              <TD colSpan=3></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>
<%End Sub%>
<p>
<%
'程序开始
	Sub Sb_Main()
	
		'取得基本资料
		vSql = "select WebName,WebUrl,WebExp,WebEmail,WebMaster,WebCountTime from webinfo"
		Set vRs = GetRs(vsql)
		if Not vRs.Eof then
			WebName = vRs("WebName")
			WebUrl = vRs("WebUrl")
			WebExp = vRs("WebExp")
			WebEmail = vRs("WebEmail")
			WebMaster = vRs("WebMaster")
			WebCountTime = vRs("WebCountTime")
		else
			Response.Redirect("index.asp?act=admin")
		end if
		vRs.close
		'统计总人数
		vSql = "select Sum(cCMC) as vCount from cM"
		Set vRs = GetRs(vsql)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -