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

📄 list-------.jsp

📁 一些用JSP做的网站及管理系统
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ include file="conn.jsp"%>
<%@  page  import="java.util.*,  java.text.*"  %>
<%! 
String replacenull(String a){ 
	if(a==null){
return "&nbsp;"; 
	}else{
return a; 
	}
} 
%> 
<% int i;
request.setCharacterEncoding("GB2312");
String id=request.getParameter("id");
if((id==null)|(id.equals(""))){
	out.print("<SCRIPT language=JavaScript>alert('您没有选择相关影片,请返回');");
out.print("javascript:history.go(-1);</SCRIPT>");
	}
	String sqlname="select class.class,Nclass.Nclass,download.showname,download.bb,download.classid,download.Nclassid,download.lasthits from scott.download,scott.class,scott.Nclass where download.classid=class.classid and download.Nclassid=Nclass.Nclassid and download.ID='"+id+"'";
   rs=stmt.executeQuery(sqlname); 
		if(!rs.next()){
		out.print("<SCRIPT language=JavaScript>alert('您没有选择相关影片,请返回');");
out.print("javascript:history.go(-1);</SCRIPT>");
            }else{
		String  showname=rs.getString("showname");
		String  bb=rs.getString("bb");
		String  classid=rs.getString("classid");
		String  Nclassid=rs.getString("Nclassid");
		String  classname=rs.getString("class.class");
		String  Nclassname=rs.getString("Nclass");
		String  lasthits=rs.getString("lasthits");
          }
	rs.close();
//更新每周每日数据
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("dd-M月- yyyy"); 
java.util.Date currentTime_1 = new java.util.Date(); 

	if(lasthits>=currentTime_1){
	stmt.executeUpdate("update scott.download set  dayhits=dayhits+1 where lasthits>='"+formatter.format(currentTime_1)+"' and id='"+id+"'");
		}else{
			stmt.executeUpdate("update scott.download set  dayhits=1 where id='"+id+"'");
	   }
	   stmt.executeUpdate("update scott.download set  hits=hits+1,lasthits=sysdate where id='"+id+"'");
   
	//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.jsp?id="+id;
	window.open(filename,"显示窗口","scrollbars=yes,width=350,height=300,status=yes,resizable=yes");
}
//-->
</SCRIPT>
</HEAD>
<%@ include file="topMain.jsp"%>
<table width="752" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#004C90">
  <tr> 
    <td width="24%" valign="top" bgcolor="#E8F0F8"> 
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#004C90" height="40">
        <form method="post" name="myform" action="search.jsp">
          <tr> 
            <td bgcolor="#E8F0F8" 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="#004C90"> 
            <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="#E8F0F8" width="4%"></td> 
                <td bgcolor=#E8F0F8 valign=top width="96%"><font style=line-height:150%> 
                  <%                                    
	sqlname="select  id,showname,bb from scott.download where lasthits>='"+formatter.format(currentTime_1)+"' and  dayhits>0 order by dayhits desc";
   rs=stmt.executeQuery(sqlname); 
    i=0;
		while(i<10 && rs.next()){                                                                                  
out.print("<LI><A href=list.jsp?id="+rs("id")+">"+rs("showname")+" "+rs("bb")+"</A></LI>");                                                                                     
i++;
}                                              
	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="#004C90"> 
            <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="#E8F0F8" width="4%"></td>
                <td bgcolor=#E8F0F8 valign=top width="96%"><font style=line-height:150%> 
                <%       currentTime_1=currentTime_1-7;                             
	sqlname="select  id,showname,bb from scott.download where lasthits>='"+formatter.format(currentTime_1)+"' and  dayhits>0 order by dayhits desc";
   rs=stmt.executeQuery(sqlname); 
    i=0;
		while(i<10 && rs.next()){                                                                                  
out.print("<LI><A href=list.jsp?id="+rs("id")+">"+rs("showname")+" "+rs("bb")+"</A></LI>");                                                                                     
i++;
}                                              
	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.jsp">首页</A> >> <A href='sort.jsp?classid=<%=classid%>'><%=classname%></A> 
            >> <A href='sort.jsp?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"> 
            <%  	sqlname="select * from scott.download where ID='"+id+"'";
   rs=stmt.executeQuery(sqlname); 
		if(rs.next()){                                        
                                            
%>
            <table width="98%" border="0" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
              <tr bgcolor="#FFFFFF"> 
                <td colspan="3"><b><%=rs.getString("showname")%></b></td>
              </tr>
              <tr> 
                <td width="80" align="right" nowrap bgcolor="#FFFFFF">影片版本:</td>
                <td width="231" bgcolor="#FFFFFF"><%=replacenull(rs.getString("bb"))%></td>
                <td rowspan="8" align="center" width="215" bgcolor="#FFFFFF"> 
                 无图片 
                </td>
              </tr>

⌨️ 快捷键说明

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