<%
Function CountMovie()'统计视频数
   Set Movie=Conn.Execute("Select Count(name_id) as TJ from jaja_name")
   Response.Write Movie("Tj")
   Movie.Close:Set Movie=Nothing
End Function

Function CountNmae(id)'分类影片统计数
   Set Namers=Conn.Execute("Select Count(name_id) as TJ from jaja_name where class_id="&id&"")
   Response.Write Namers("Tj")
   Namers.Close:Set Namers=Nothing
End Function

Function ListMovie(str,cid)'读取影片列表
Set rss = Server.CreateObject("adodb.recordset")
rss.open"Select Top 100 name_id,data_name,data_hits,data_reurl,class_id,data_cu,data_color from jaja_name Where class_id="&Str&" order by data_lastdate desc",conn,1,1
 If not(rss.eof and rss.bof) Then
 MovieStr="<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&Chr(13)&""
 Do while not rss.eof
 x=x+1
 MovieStr=MovieStr&"<tr onClick='ssm("&rss("name_id")&")'>"&Chr(13)&""
 MovieStr=MovieStr&"<td width='85%' onClick=""showsubmenuu("&rss("name_id")&")"" height='22' class='row' style='padding-left:10px; padding-top:5px;' onmouseover=""this.className='row1'"" onmouseout=""this.className='row'""><img src='images/opena.gif' align='absmiddle' id='imgMenuu"&rss("name_id")&"'> <span class='title'>"&GetColor(GetCu(rss("data_name"),rss("data_cu")),rss("data_color"))&"&nbsp;"&Replace(LzReplace(rss("data_reurl"),rss("class_id")),"第","")&"</span><span id='hits'>"&pichits(rss("data_hits"))&"</span></td>"&Chr(13)&"</tr>"&Chr(13)&""
 MovieStr=MovieStr&"<tr class='optiton' id=""submenuu"&rss("name_id")&""" style='display:none'><td colspan='2' class='row'><div id='M_list"&rss("name_id")&"'></div></td></tr>"
 Rss.movenext:loop:rss.Close:Set rss=nothing:Conn.Close:Set Conn=Nothing
 MovieStr=MovieStr&"</table>"
 End If
 ListMovie=MovieStr
End Function

Function pichits(Str)
  piclist=Clng(Str)
  if piclist>1 and piclist<500 Then
    picltxt="<img src='images/h6.gif' align='absmiddle'/>"
  elseif piclist>501 and piclist<3000 Then 
    picltxt="<img src='images/h5.gif' align='absmiddle'/>"
  elseif piclist>3001 and piclist<7000 Then 
    picltxt="<img src='images/h4.gif' align='absmiddle'/>"
  elseif piclist>7001 and piclist<10000 Then 
    picltxt="<img src='images/h3.gif' align='absmiddle'/>"
  elseif piclist>10001 and piclist<25000 Then 
    picltxt="<img src='images/h2.gif' align='absmiddle'/>"
  elseif piclist>50000  Then 
    picltxt="<img src='images/h1.gif' align='absmiddle'/>"				
  End if
  pichits=picltxt	
End Function

Function htmlpage(page,uid)
Action=Trim(request.QueryString("Action"))
uid=Trim(request.QueryString("uid"))
if page<>1 then
Listpage=Listpage&"<a href='?uid="&uid&"&Action="&Action&"&page=1'>首页</a> <a href='?uid="&uid&"&Action="&Action&"&page="&page-1&"'>上一页</a>"
else
Listpage=Listpage&"首页 上一页"
End if
if page<>countpage then
Listpage=Listpage&" <a href='?uid="&uid&"&Action="&Action&"&page="&page+1&"'>下一页</a> <a href='?uid="&uid&"&Action="&Action&"&page="&countpage&"'>末页</a> "
Else
Listpage=Listpage&" 下一页 末页"
End if
Listpage=Listpage&" 当前第"&page&"页 　共"&countpage&"页 总安装量"&incount&"台"'Response.write Listpage
htmlpage=Listpage
End Function
%>
 