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

📄 list.asp

📁 8款下载系统源代码 2003-3-11 21:37:45 433 949k · 都很常见: 猛虎山庄、燕衔泥(飞扬的软件第二版用的就是他
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%tmp = "http://" & request.servervariables("SERVER_NAME") & _            
left(request.servervariables("SCRIPT_NAME"),len(request.servervariables("SCRIPT_NAME"))-len("/list.asp"))
   	dim sql
   	dim rs
   	dim classname,classid,Nclassname,Nclassid
	dim lasthits
   	dim title
	if request("id")="" then
		response.write "您没有选择相关软件,请返回"
		response.end
	end if
	set rs=server.createobject("adodb.recordset")
  	sql="select class.class,Nclass.Nclass,download.showname,download.bb,download.classid,download.Nclassid,download.lasthits from download,class,Nclass where download.classid=class.classid and download.Nclassid=Nclass.Nclassid and download.ID="&request("id")
 	rs.open sql,conn,1,1
 	if not rs.eof then
		showname=rs("showname")
		bb=rs("bb")
		classid=rs("classid")
		Nclassid=rs("Nclassid")
		classname=rs("class")
		Nclassname=rs("Nclass")
		lasthits=rs("lasthits")
 	end if
	rs.close
'更新每周每日数据
	tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())
	if trim(lasthits)=trim(tdate) then
		sql="update download set dayhits=dayhits+1 where id="&request("id")
		conn.Execute(sql)
'		response.write "success"
	else
		sql="update download set dayhits=1 where id="&request("id")
		conn.Execute(sql)
'		response.write "error"
	end if
	sql="update download set hits=hits+1,lasthits='"&tdate&"' where ID="&request("id")
	conn.Execute(sql)

   	p_year=CInt(year(Now()))-CInt(year(lasthits))
   	p_month=CInt(month(Now()))-CInt(month(lasthits))
   	p_day=CInt(day(Now()))-CInt(day(lasthits))
   	period_time=((p_year*12+p_month)*30+p_day)
	if cint(period_time)=<cint(7) then
		sql="update download set weekhits=weekhits+1 where id="&request("id")
		conn.Execute(sql)
	else
		sql="update download set weekhits=1 where id="&request("id")
		conn.Execute(sql)
	end if
%>
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<TITLE>时尚软件:<%=classname%>:<%=Nclassname%>:<%=showname%> <%=bb%></TITLE>

<link rel="stylesheet" href="images/style.css">

<script language="JavaScript">
<!--
function Showvote(id)
{
	var filename="vote.asp?id="+id;
	window.open(filename,"显示窗口","scrollbars=yes,width=350,height=300,status=yes,resizable=yes");
}
//-->
</SCRIPT>
</HEAD>
<!--#include file="topMain.asp"-->
<table width="752" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#995f14">
  <tr> 
    <td width="24%" valign="top" bgcolor="#FFD112"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#995f14" height="40">
        <form method="post" name="myform" action="search.asp">
          <tr> 
            <td bgcolor="#FFD112" valign="middle" align="center"> 搜索: 
              <input type="text" name="keyword" class=textfield size=10  maxlength="50"  style="font-family: Arial">
              <input type="submit" name="Submit22" value="搜索" style="height='21'" class="botton">
            </td>
          </tr>
        </form>
      </table>
      <table border=0 cellpadding=0 cellspacing=0 width=100% align="center">
        <tr> 
          <td height="20" bgcolor="#AA7523"> 
            <div align="center"><font color=#ffffff>今日下载Top10</font></div>
          </td>
        </tr>
        <tr align=middle> 
          <td bgcolor=#999999 valign="top"> 
            <table border=0 cellpadding=0 cellspacing=0 width=100% height="150">
              <tr><td height="20" bgcolor="#FFD112" width="4%"></td> 
                <td bgcolor=#FFD112 valign=top width="96%"><font style=line-height:150%> 
                  <%                                                                                  
	dim tdate                                                                                  
	tdate=year(Now()) & "-" & month(Now()) & "-" & day(Now())                                                                                  
	sql="select top 10 id,showname,bb from download where "                                                                                  
	sql=sql&" lasthits=date() and  dayhits>0 "                                                                                  
	sql=sql&" order by dayhits desc"                                                                                  
	rs.open sql,conn,1,1                                                                                  
	if rs.eof and rs.bof then                                                                                  
%>
                  本日没有下载 
                  <%else%>
                  <%do while not rs.eof                                                                                     
response.write "<LI><A href=list.asp?id="&rs("id")&">"&rs("showname")&" "&rs("bb")&"</A></LI>"                                                                                     
i=i+1                                                   
if i>=10 then exit do                                                   
rs.movenext                                                 
loop                                                 
i="0"                                                 
	end if                                                 
	rs.close                                                                                         
%>
                  </font> </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table border=0 cellpadding=0 cellspacing=0 width=100% align="center">
        <tr> 
          <td  height="20" bgcolor="#AA7523"> 
            <div align="center"><font color=#5d91c0>`</font><font color=#ffffff>本周下载Top10</font></div>
          </td>
        </tr>
        <tr align=middle> 
          <td bgcolor=#999999 colspan=4 valign="top"> 
            <table border=0 cellpadding=0 cellspacing=0 width=100% height="150">
              <tr> <td height="20" bgcolor="#FFD112" width="4%"></td>
                <td bgcolor=#FFD112 valign=top width="96%"><font style=line-height:150%> 
                  <%                                                                                     
	OldWeek = WeekDay(Date())-1                                                                                     
	If OldWeek = 0 Then OldWeek = 7                                                                                     
	OldWeek = Date()-OldWeek                                                                                     
	NewWeek = Date()+(9-WeekDay(Date()))                                                                                     
	sql="select top 10 id,showname,bb from download where "                                                                                     
	sql=sql&"  (lasthits < #" & NewWeek & "#) And (lasthits > #" & OldWeek & "#) and weekhits>0 "                                                                                     
	sql=sql&" order by weekhits desc"                                                                                     
	rs.open sql,conn,1,1                                                                                     
	if rs.eof and rs.bof then                                                                                     
%>
                  本周没有下载 
                  <%else%>
                  <%do while not rs.eof                                                                                     
response.write "<LI><A href=list.asp?id="&rs("id")&">"&rs("showname")&" "&rs("bb")&"</A></LI>"                                                                                     
i=i+1                                                
if i>=10 then exit do                                                
rs.movenext                                                
loop                                                
i="0"                                                
	end if                                                 
	rs.close                                                 
%>
                  </font> </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td width="76%" valign="top" bgcolor="#FFFFFF"> 
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td height="1" background="images/bj4.gif"><img src="images/spacer.gif" width="1" height="1"></td>
        </tr>
      </table>
      <table width="98%" border="0" align="center">
        <tr>
          <td bgcolor="#efefef">您的位置:<A href="index.asp">首页</A> >> <A href='sort.asp?classid=<%=classid%>'><%=classname%></A> 
            >> <A href='sort.asp?classid=<%=classid%>&Nclassid=<%=Nclassid%>'><%=Nclassname%></A> 
            >> <%=showname%>&nbsp;<%=bb%></td>
        </tr>
      </table>
      <table border=0 cellpadding=0 cellspacing=0 width=98% align="center">
        <tr> 
          <td align=middle valign=top width=568 height="160" bgcolor="#FFFFFF"> 
            <%                                          
    sql="select * from download where id="&request("id")                                       
	rs.open sql,conn,1,1                                          
%>
            <table width="98%" border="0" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
              <tr bgcolor="#FFFFFF"> 
                <td colspan="3"><b><%=rs("showname")%></b></td>
              </tr>
              <tr> 
                <td width="80" align="right" nowrap bgcolor="#FFFFFF">软件版本:</td>
                <td width="231" bgcolor="#FFFFFF"><%=rs("bb")%></td>
                <td rowspan="8" align="center" width="215" bgcolor="#FFFFFF"> 
                  <%                                                                               
if not isnull(rs("images")) and rs("images")<> "" then                                                                               
			response.write "<a href=showpic.asp?show=big&id="&rs("id")&" target=_blank><img src=showpic.asp?id="&rs("id")&" border=0  width=133 height=100 alt=点击放大></a>"                                                                               
			else                                                                               
			response.write "无图片"                                                                               
		end if                                                                               
%>
                </td>
              </tr>

⌨️ 快捷键说明

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