<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<head>
<!--#include file = language.asp -->
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>
<body bgcolor="#ffffff">
<%



Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select id,hit from [news]",conn,1,1
wzsl=rs.recordcount
hit=0
while not rs.eof
  hit=hit+rs("hit")
rs.movenext
wend
rs.close
set rs=nothing
%>
<BR>
<div align="center">
	<table border="1" cellpadding="3" width="700" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0" cellspacing="0">
		<tr>
			<td background="../images/topBar_bg.gif" colspan="2">目前文章总数：<%=wzsl%>，总共阅读<%=hit%>次。其中包括如下：</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
<table border="1" width="500" id="table2" cellpadding="3" style="border-collapse: collapse" cellspacing="0" bordercolor="#CCCCCC">
<%
lll="<img src=../images/001.gif border=0 height=20 width=17>"

sql = "select * from lm where lm<>'' order by id asc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1

if rs.recordcount<>0 then
 for i=0 to rs.recordcount
%>
	<tr>
		<td width="241" bgcolor="#F3F3F3">
		<%
		  response.write "<B><font color="&rs("fontcolor")&">"&rs("lm")&"</font></b>"

		%></td>
		<td width="118" bgcolor="#F3F3F3">
		<%
           sql2 = "select id,lm,lm2,lm3,hit from news where lm='"&rs("id")&"'"
           Set rs2 = Server.CreateObject("ADODB.RecordSet")
           rs2.Open sql2,conn,1,1
           response.write "文章："&rs2.recordcount
           hit=0
           while not rs2.eof
             hit=hit+rs2("hit")
           rs2.movenext
           wend
		%>
		</td>
		<td width="119" bgcolor="#F3F3F3">
		总阅读：<%=hit%></td>
	</tr>
  <%
    sql3 = "select * from lm where lmid='"&rs("ID")&"' order by id asc"
    Set rs3 = Server.CreateObject("ADODB.RecordSet")
    rs3.Open sql3,conn,1,1
    while not rs3.eof
  %>	
	<tr>
		<td width="241">　　├ <a href=admin_news_list.asp?lm=<%=rs3("id")%>><font color=<%=rs3("fontcolor")%>><%=rs3("lm2")%></font></a></td>
		<td width="118">
		  <%
		    sql4 = "select id,lm,lm2,lm3,hit from news where lm2='"&rs3("id")&"' order by id desc"
		    Set rs4 = Server.CreateObject("ADODB.RecordSet")
		    rs4.Open sql4,conn,1,1
		    response.write "文章："&rs4.recordcount
		    hit4=0
           while not rs4.eof
             hit4=hit4+rs4("hit")
           rs4.movenext
           wend
		  
		  %>
		</td>
		<td width="119">
		阅读：<%=hit4%></td>
	</tr>
<%
Set rs33 = Server.CreateObject("ADODB.RecordSet")
rs33.Open "select * from [lm] where lmid='"&rs3("id")&"' and lm3<>'' order by id asc",conn,1,1
while not rs33.eof
%>
	<tr>
		<td width="241">　　　　├ <%=rs33("lm3")%></td>
		<td width="118">
		   <%
		     Set rs331 = Server.CreateObject("ADODB.RecordSet")
		     rs331.Open "select id,lm3,hit from [news] where lm3='"&rs33("id")&"' order by id desc",conn,1,1
		     Response.Write "　文章："&rs331.recordcount
		   %>
		</td>
		<td width="119">　阅读：
		<%
		hit=0
		while not rs331.eof
		  hit=rs331("hit")+hit
		rs331.movenext
		wend
		rs331.close
		set rs331=nothing
		Response.Write hit
		%>
		</td>
	</tr>	
<%
rs33.movenext
wend

rs3.movenext
wend


  rs.movenext
  if rs.eof then exit for
 next
end if
%>	

</table>
			</td>
		</tr>
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [admin]",conn,1,1
%>
		<tr>
			<td background="../images/topBar_bg.gif" colspan="2">目前系统用户有<%=rs.recordcount%>个，其中包括如下：
			　　　　　(<a href="admin_stat_user.asp">查看用户文章排名</a>)</td>
		</tr>
		<tr>
			<td colspan="2">
			<div align="center">
				<table border="1" cellpadding="3" cellspacing="0" width="500" id="table3" style="border-collapse: collapse" bordercolor="#C0C0C0">
				<%
				while not rs.eof
				%>
					<tr>
						<td width="249"><%=rs("user")%></td>
						<td width="249">
						<%
						Set rs2 = Server.CreateObject("ADODB.RecordSet")
						rs2.Open "select adduser,id from [news] where adduser='"&rs("user")&"' order by id desc",conn,1,1
						Response.Write "共有"&rs2.recordcount&"篇文章，"
						rs2.close:set rs2=nothing
						
						set rs2 = Server.CreateObject("ADODB.RecordSet")
						rs2.Open "select adduser,id,sh from [News] where adduser='"&rs("user")&"' and sh=2 order by id desc",conn,1,1
						Response.Write "有"&rs2.recordcount&"篇未审核"
						rs2.close:set rs2=nothing
						%>
						</td>
					</tr>
				<%
				rs.movenext
				wend
				rs.close
				set rs=nothing
				%>
				</table>
			</div>
			</td>
		</tr>
		<tr>
			<td background="../images/topBar_bg.gif" colspan="2">
			文章来源统计：</td>
		</tr>
		<tr>
			<td colspan="2">
			统计调用代码：<font color="#FF0000">&lt;script TYPE=&quot;text/javascript&quot;  language=&quot;javascript&quot; src=&quot;<%=finddir(request.servervariables("URL"))%>js01.asp&quot;&gt;&lt;/script&gt;</font></td>
		</tr>
		<tr>
			<td colspan="2">
			<div align="center">
				<table border="1" cellpadding="3" width="500" id="table4" style="border-collapse: collapse" bordercolor="#C0C0C0">
				<%

sql = "select distinct adduser from news"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
				%>
					<tr>
						<td width="249"><%=rs("adduser")%></td>
						<td width="249">
						<%
						Set rs2 = Server.CreateObject("ADODB.RecordSet")
						rs2.Open "select adduser,id from [news] where adduser='"&rs("adduser")&"' order by id desc",conn,1,1
						Response.Write "共有"&rs2.recordcount&"篇文章"
						%>
						</td>
					</tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>
				</table>
			</div>
			</td>
		</tr>
		<tr>
			<td background="../images/topBar_bg.gif" width="349" align="center">
			文章阅读前十名</td>
			<td background="../images/topBar_bg.gif" width="349" align="center">
			文章阅读后十名</td>
		</tr>
		<tr>
			<td width="349">
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select top 10 * from [news]  order by hit desc , id desc",conn,1,1
while not rs.eof
  Response.Write "　·<a href=../news_view.asp?newsid="&rs("id")&" target=_blank><font color=999999>"&titleb(rs("title"),30)&"</font></a><font color=999999>("&rs("hit")&"次)</font><BR>"
rs.movenext
wend
%>
			</td>
			<td width="349">
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select top 10 * from [news] order by hit asc , id desc",conn,1,1
while not rs.eof
  Response.Write "　·<a href=../news_view.asp?newsid="&rs("id")&" target=_blank><font color=999999>"&titleb(rs("title"),30)&"</font></a><font color=999999>("&rs("hit")&"次)</font><BR>"
rs.movenext
wend
%></td>
		</tr>
		<tr>
			<td colspan="2">
			调用前十名：<font color="#ff0000">&lt;script TYPE=&quot;text/javascript&quot; 
			language=&quot;javascript&quot; src=&quot;<%=finddir(request.servervariables("URL"))%>newscodejs.asp?lm2=0&amp;list=10&amp;icon=1&amp;tj=0&amp;font=9&amp;hot=1&amp;new=1&amp;line=2&amp;open=1&amp;n=20&amp;more=1&amp;t=0&amp;week=0&quot;&gt;&lt;/script&gt;</font></td>
		</tr>
		<tr>
			<td colspan="2" background="../images/topBar_bg.gif">
			评论情况：</td>
		</tr>
		<tr>
			<td colspan="2"><font color="#999999">共评论数量：
			<%
			Set rs = Server.CreateObject("ADODB.RecordSet")
			rs.Open "select id from [newspl] order by id desc",conn,1,1
			Response.Write rs.recordcount
			%>
			</font>
			</td>
		</tr>
		</table>
</div>

<%
conn.close
set conn=nothing
%>