📄 qqcf_admin_manage.asp
字号:
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="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=ID">序号</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=User_Name">用户名</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=LoginTotal">登陆次数</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=RealIpTotal">实际计数</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=PageName">主页</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=AddTime">注册时间</a></strong></div></td>
<td><div align="center"><strong><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=State">帐号状态</a></strong></div></td>
<td><div align="center"><strong>操作</strong></div></td>
</tr>
<%While Not Rs.Eof And MyPageSize>0%>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs.RecordCount-Rs.Pagesize*(page)+mypagesize%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs("User_Name")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs("LoginTotal")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs("RealIpTotal")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><a href="<%=Rs("PageUrl")%>" target="_blank"><%=Rs("PageName")%></a></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=month(Rs("AddTime"))&"-"&day(Rs("AddTime"))%></div></td>
<td bgcolor="#FFFFFF"><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 bgcolor="#FFFFFF"><div align="center"><a href="?Action=goto&User_Name=<%=Rs("User_Name")%>" target="_blank">查看</a>
<a href="?Action=modifyuser&ID=<%=Rs("ID")%>">修改</a>
<a href="?Action=deluser&User_Name=<%=Rs("User_Name")%>" onClick="{if(confirm('确定要删除么?')){return true;}return false;}">删除</a></div></td>
</tr>
<%rs.movenext
mypagesize=mypagesize-1
wend%>
</table>
<div align="center"> <br>
<table border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td valign="top"><div align="right"><a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=<%=Px%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=<%=Px%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=<%=Px%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?Action=<%=Action%>&User_Name=<%=User_Name%>&Px=<%=Px%>&Page=<%=TotalPage%>">最后一页</a>
页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页 共<%=totalrs%>条记录 每页显示<%=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&"&User_Name="&User_Name&"&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="User_Name" type="text" id="User_Name" size="10">
<input type="submit" name="Submit" value="查找">
</div></td>
</tr>
</form>
</table>
<%End If%>
<%If Request("Action")="modifyuser" Then%>
<%
ID=Request("ID")
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From WWW_QQCF_COM_CfCount_RegUser Where ID="&ID
Rs.Open Sql,Conn,1,1%>
<table width="500" border="0" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<form name="form2" method="post" action="?Action=modifyusersave&ID=<%=ID%>">
<tr bgcolor="D6DFF5">
<td colspan="2"><div align="center"><strong>修改资料</strong> </div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="150"><div align="right">用户名:</div></td>
<td><font size="2"><%=Rs("User_Name")%></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<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 bgcolor="#FFFFFF">
<td valign="top"><div align="right">管理员说明:</div></td>
<td><textarea name="admindesc" cols="30" rows="6" id="notes"><%=rs("admindesc")%></textarea></td>
</tr>
<tr bgcolor="#FFFFFF">
<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 Request("Action")="daytj" Then%>
<table width="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<%
Action=Request("Action")
Sql="Select AddDate From WWW_QQCF_COM_CfCount_Day_Count 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
%>
<tr>
<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=Counter">浏览数量</a></strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>IP数量</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Px=Counter"><strong>所占此天的比例</strong></a></div></td>
</tr>
<%
While Not Rs.Eof And MyPageSize>0
Sql="Select Sum(Counter),Sum(IPCounter) From WWW_QQCF_COM_CfCount_Day_Count where Datediff('d',AddDate,'"&Rs("AddDate")&"')=0"
Set Rs1=Conn.execute(Sql)
Counter=Rs1(0)
IpCounter=Rs1(1)
Sql="Select Sum(Counter),Sum(IPCounter) From WWW_QQCF_COM_CfCount_Day_Count where Datediff('d',AddDate,'"&Rs("AddDate")&"')<10"
Set Rs1=Conn.execute(Sql)
ShowTotal=Rs1(0)
IpTotal=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=qqcf_pic/QQCf_BlueBar.gif width=<%=Counter/ShowTotal*300%> height=10><%=MyRate(Counter,ShowTotal)%>%<br> <img src=qqcf_pic/QQCf_GreenBar.gif width=<%=IpCounter/IpTotal*300%> height=10><%=MyRate(IpCounter,IpTotal)%>%</td>
</tr>
<%rs.movenext
mypagesize=mypagesize-1
wend%>
<tr bgcolor="#FFFFFF">
<td colspan="5"><div align="center">图例: <img src=qqcf_pic/QQCf_BlueBar.gif width=30 height=10>显示数,<img src=qqcf_pic/QQCf_GreenBar.gif width=30 height=10>IP数</div></td>
</tr>
<tr>
<td colspan="5" bgcolor="D6DFF5"> <%
Sql="Select Sum(Counter),Sum(IpCounter) From WWW_QQCF_COM_CfCount_Day_Count"
Set Rs1=Conn.ExeCute(Sql)
If TotalRs=0 Then
AvgVisit=0
AvgIp=0
Else
AvgVisit=Int(Rs1(0)/TotalRs)
AvgIp=Int(Rs1(1)/TotalRs)
End If
%>
共有<%=TotalRs%>天记录,共<%=Rs1(0)%>次浏览,<%=Rs1(1)%>个IP,平均每天<%=AvgVisit%>次访问,平均每天IP<%=AvgIp%>个
</td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td valign="top"><div align="right"><a href="?Action=<%=Action%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?Action=<%=Action%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?Action=<%=Action%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?Action=<%=Action%>&Page=<%=totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=page%></font>/<%=totalpage%>页 共<%=totalrs%>条记录 每页显示<%=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&"&Page="&i
if page=i then
response.write " selected"
end if
response.write ">转到第"&i&"页</option>"
next
%>
</select>
</td>
</form>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -