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

📄 cf_admin_manage_2.asp

📁 1.核心采用.Net、Mssql数据库、存储过程、缓存技术构建
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'乘风多用户计数器
'制作:乘 风
'QQ:178575
'E-Mail:yliangcf@163.com
'开发网站:http://www.qqcf.com
'详细简介:http://www.qqcf.com/?action=list&list=cfcount
'上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容
'因为这些内容可能时常更新,就没有放在程序里,请自己上网站上查看
'有完整版本的演示
%>
<%If Action="" Or Action="sysstate" Then%>
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
              <td colspan="9"><div align="center"><strong>系统状态</strong></div></td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">系统名称:</div></td>
              <td width="471"><strong><%=RsSet("Title")%> </strong></td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">系统注册状态:</div></td>
              <td> <%If RsSet("RegState")=0 Then%>
                目前已经禁止新用户申请计数器! 
                <%Else%>
                目前允许新用户申请计数器,如果只想自己用可以关闭用户注册功能! 
                <%End If%>
                [<a href="?Action=sysset">更改设置</a>]</td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">来源统计共执行次数:</div></td>
              <td><%=RsSet("Store_TotalLy")%> [<a href="?Action=lyreset" onClick="{if(confirm('确定要复原来源统计数么?')){return true;}return false;};">复原为0</a>]</td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">页面来源总数:</div></td>
              <td><%
Sql="Select Count(*) From CFCount_Ly_Day"
Set Rs=Conn.ExeCute(Sql)
Response.Write Rs(0)
%>
                [<a href="?Action=beforelydel" onClick="{if(confirm('确定要删除今天以前的来源么?')){return true;}return false;};">删除今天以前的来源</a>]</td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">今天页面来源数:</div></td>
              <td><%
Sql="Select Count(*) From CFCount_Ly_Day Where DateDiff('d',AddDate,Date())=0"
Set Rs=Conn.ExeCute(Sql)
Response.Write Rs(0)
%> &nbsp;</td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">页面统计总数:</div></td>
              <td><%
Sql="Select Count(*) From CFCount_Web_Day"
Set Rs=Conn.ExeCute(Sql)
Response.Write Rs(0)
%>
                [<a href="?Action=beforewebdel" onClick="{if(confirm('确定要删除今天以前的页面统计么?')){return true;}return false;};">删除今天以前的页面统计</a>]</td>
            </tr>
            <tr> 
              <td colspan="8"><div align="right">今天的页面统计数:</div></td>
              <td><%
Sql="Select Count(*) From CFCount_Web_Day Where DateDiff('d',AddDate,Date())=0"
Set Rs=Conn.ExeCute(Sql)
Response.Write Rs(0)
%></td>
            </tr>
          </table>
          <%end if%>
          <IMG height=1 
      src="images\spacer.gif" 
      width=1> 
          <%If Action="userlist" Or Action="searchuser" Then%>
          点击标题可以选择其相应的排序方式 
<%

Sql="Select Count(*) From CFCount_User" 
Set Rs=Conn.Execute(Sql)
Response.write "<b><font color=ff0000>目前账号总数:"&Rs(0)&"</font></b>"

UserName=ChkStr(Request("UserName"),1)
Px=ChkStr(Request("Px"),1)

If Px="" Then Px="ID"

Sql="Select Top 2000 * From CFCount_User Where 1=1" 

If Action="searchuser" Then
 If UserName<>"" Then Sql=Sql&" And UserName like '%"&UserName&"%'"
End If

Sql=Sql&" Order By "&px&" Desc"

Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.open Sql,Conn,1,1

If Not Rs.Eof Then

IF Not IsNumeric(Request("Page")) Or IsEmpty(Request("Page")) Then
 Page=1
Else
 Page=Int(Abs(Request("Page")))
End if

Rs.pagesize=10
TotalRs=Rs.RecordCount
TotalPage=Rs.PageCount
MyPageSize=Rs.PageSize
Rs.AbsolutePage=Page
End If
%>
        </div>
        
<table width="98%" align="center" class="tba">
<tr class="tba_tr_1">
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=ID">ID</a></strong></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=UserName">用户名</a></strong></div></td>
    <td><div align="center"><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=ParentName"><strong>账号情况</strong></a></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=LoginTotal">登陆次数</a></strong></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=RealIpTotal">实际计数</a></strong></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=PageName">主页</a></strong></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=AddTime">注册时间</a></strong></div></td>
    <td><div align="center"><strong><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=State">帐号状态</a></strong></div></td>
    <td><div align="center"><strong>操作</strong></div></td>
  </tr>
  <%While Not Rs.Eof And MyPageSize>0%>
  <tr> 
    <td><div align="center"><%=Rs("ID")%></div></td>
    <td><div align="center"><%=Rs("UserName")%></div></td>
    <td><div align="center">
	<%
	If Rs("ParentName")="-" Then
	 Response.write "无父账号"
    Else
	 Response.write "父账号:"&Rs("ParentName")
	End If
	%></div></td>
    <td><div align="center"><%=Rs("LoginTotal")%></div></td>
    <td><div align="center"><%=Rs("RealIpTotal")%></div></td>
    <td><div align="center"><a href="<%=Rs("PageUrl")%>" target="_blank"><%=Rs("PageName")%></a></div></td>
    <td><div align="center"><%=year(Rs("AddTime"))&"-"&month(Rs("AddTime"))&"-"&day(Rs("AddTime"))%></div></td>
    <td><div align="center"> 
        <%if rs("state")=-1 then
			  response.Write "有效"
			  elseif rs("state")=0 then
			  response.Write "<font color=#ff0000>无效</font>"
			  end if%>
      </div></td>
    <td><div align="center"><a href="?Action=usergo&UserName=<%=Rs("UserName")%>" target="_blank">查看</a> 
        <a href="?Action=usermodify&ID=<%=Rs("ID")%>">修改</a> 
        <a href="?Action=userdel&UserName=<%=Rs("UserName")%>" onClick="{if(confirm('确定要删除么?')){return true;}return false;}">删除</a></div></td>
  </tr>
  <%rs.movenext
mypagesize=mypagesize-1
wend%>
</table>
        <br>
          <table border="0" align="center" cellpadding="0" cellspacing="1">
            <tr> 
              <td valign="top"><div align="right"><a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=<%=Px%>&Page=1">第一页</a> 
                  <%
if page>1 then%>
                  <a href='?Action=<%=Action%>&UserName=<%=UserName%>&Px=<%=Px%>&Page=<%=Page-1%>'>上一页</a> 
                  <%
end if
%>
                  <%
if page<rs.pagecount   then%>
                  <a href='?Action=<%=Action%>&UserName=<%=UserName%>&Px=<%=Px%>&Page=<%=Page+1%>'>下一页</a> 
                  <%
end if
%>
                  <a href="?Action=<%=Action%>&UserName=<%=UserName%>&Px=<%=Px%>&Page=<%=TotalPage%>">最后一页</a> 
                  页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页&nbsp;&nbsp;共<%=totalrs%>条记录&nbsp;&nbsp;每页显示<%=rs.pagesize%>条</div></td>
              <form name="form1" method="post" action="jczx.asp">
                <td> <Select  name="page" size="1" id="page" onChange="window.location=form.page.options[form.page.selectedIndex].value">
                    <%For I=1 To TotalPage    
   Response.Write "<option value="&filename&"?Action="&Action&"&UserName="&UserName&"&Px="&Px&"&Page="&I    
   If Page=I Then     
     Response.Write " Selected"    
   End If    
   Response.write ">转到第"& i &"页</option>"    
Next    
%>
                  </select> </td>
              </form>
            </tr>
          </table>
          <table border="0" align="center" cellpadding="3" cellspacing="0">
            <tr> 
              <td><div align="center"><strong>搜索</strong><br>
                </div></td>
            </tr>
            <form name="form2" method="post" action="?action=searchuser">
              <tr> 
                <td><div align="center">用户名 
                    <input name="UserName" type="text" id="UserName" size="10">
                    <input type="submit" name="Submit" value="查找">
                  </div></td>
              </tr>
            </form>
          </table>
          <%End If%>
          <%If Action="usermodify" Then%>
          <%
ID=ChkStr(Request("ID"),2)
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_User Where ID="&ID
Rs.Open Sql,Conn,1,1%>
<table width="98%" align="center" class="tba">
  <form name="form2" method="post" action="?Action=usermodifysave&ID=<%=ID%>">
    <tr class="tba_tr_1"> 
      <td colspan="2"><div align="center"><strong>修改资料</strong> </div></td>
    </tr>
    <tr> 
      <td width="150"><div align="right">用户名:</div></td>
      <td><font size="2"><%=Rs("UserName")%></font></td>
    </tr>
    <tr> 
      <td><div align="right">修改为新密码:</div></td>
      <td><input name="Pwd_New" type="text" id="Password_New">
        (留空则原密码不会被修改)</td>
    </tr>
    <tr> 
      <td><div align="right">修改为新密码找回答案:</div></td>
      <td><input name="PasswordAnswer_New" type="text" id="PasswordAnswer_New">
        (留空则原密码找回答案不会被修改)</td>
    </tr>
    <tr> 
      <td><div align="right">帐号状态:</div></td>
      <td><select name="State" id="State">
          <option value="-1"<%If Rs("State")=-1 Then response.write" selected"%>>有效</option>
          <option value="0"<%If Rs("State")=0 Then response.write" selected"%>>无效</option>
        </select></td>
    </tr>
    <tr> 
      <td valign="top"><div align="right">管理员说明:</div></td>
      <td><textarea name="admindesc" cols="30" rows="6" id="notes"><%=rs("admindesc")%></textarea></td>
    </tr>
    <tr> 
      <td colspan="2"> <div align="center"> 
          <input type="submit" name="Submit3" value="修改">
             
          <input type="reset" name="Submit523" value="取消" onClick="javascript:history.go(-1)">
        </div></td>
    </tr>
  </form>
</table>
          <%end if%>
          <%If Action="daytj" Then%>
<table width="98%" align="center" class="tba">

            <%

Sql="Select AddDate From CFCount_Count_Day Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not rs.eof then
 IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
  page=1
 Else
  Page=Int(Abs(Request("page")))
 End if
 rs.pagesize=15
 totalrs=rs.RecordCount
 totalpage=rs.pageCount
 mypagesize=rs.pagesize
 rs.absolutepage=page
End If

Sql="Select Sum(MyCounter),Sum(IPCounter) From CFCount_Count_Day"
Set Rs1=Conn.execute(Sql)
ShowTotal=Rs1(0)
IpTotal=Rs1(1)
%>
<tr class="tba_tr_1">
              <td colspan="5"><div align="center"><strong>每日统计</strong></div></td>
            </tr>
            <tr> 
              <td bgcolor="#FFFFFF"><div align="center"><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=ID"><strong>序号</strong></a></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=WebUrl"><strong>日期</strong></a></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><strong><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=MyCounter">浏览数量</a></strong></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><strong><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=IpCounter">IP数量</a></strong></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=MyCounter"><strong>所占此天的比例</strong></a></div></td>
            </tr>
            <%
While Not Rs.Eof And MyPageSize>0
Sql="Select Sum(MyCounter),Sum(IPCounter) From CFCount_Count_Day where Datediff('d',AddDate,'"&Rs("AddDate")&"')=0"
Set Rs1=Conn.execute(Sql)
Counter=Rs1(0)
IpCounter=Rs1(1)


%>
            <tr
<%If MyPageSize Mod 2=0 Then
 Response.Write " bgcolor='#ffffff'"
Else
 Response.Write " bgcolor='#e8e8e8'"
End If
%>> 
              <td class="td_1"><div align="center"><%=Rs.RecordCount-Rs.Pagesize*(page)+mypagesize%></div></td>
              <td class="td_1"><div align="center"> <%=Rs("AddDate")%> </div></td>
              <td class="td_1"><div align="center"><%=Counter%></div></td>
              <td class="td_1"><div align="center"><%=IpCounter%></div></td>
              <td class="td_1"><img src=images/BlueBar.gif width=<%=Counter/ShowTotal*300%> height=10><%=MyRate(Counter,ShowTotal)%>%<br> <img src=images/GreenBar.gif width=<%=IpCounter/IpTotal*300%> height=10><%=MyRate(IpCounter,IpTotal)%>%</td>
            </tr>
            <%rs.movenext
mypagesize=mypagesize-1
wend%>
            <tr> 
              <td colspan="5" bgcolor="#FFFFFF"><div align="center">图例: <img src=images/BlueBar.gif width=30 height=10>显示数,<img src=images/GreenBar.gif width=30 height=10>IP数</div></td>
            </tr>
            <tr> 
              <td colspan="5"> <%
Sql="Select Sum(MyCounter),Sum(IpCounter) From CFCount_Count_Day"
Set Rs1=Conn.ExeCute(Sql)

If TotalRs=0 Then
 AvgVisit=0
 AvgIp=0

⌨️ 快捷键说明

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