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

📄 list.asp

📁 在线点播系统
💻 ASP
字号:
<!--#include file="header.asp"-->
<%
if request.QueryString("listid")="" then
	response.write"<script language=javascript>alert('影片类别不存在');history.back();</Script>"
	response.end
end if
if myobj.ChkNum(request.QueryString("listid"))=false then
	response.write"<script language=javascript>alert('影片类别不存在');history.back();</Script>"
	response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from film_class where id="&request.querystring("listid")&"",conn,1,1
if rs.eof then
	call nr()
	response.write"<script language=javascript>alert('影片类别不存在');history.back();</Script>"
	response.end
else
	class_caption=rs("caption")
end if
rs.close
%>
<script language="JavaScript">
function tourl(form1_url){
    location=form1_url;
    for(var i=0;i<document.form1.elements.length;i++){
        document.form1.elements[i].options[0].selected=true
    }
}
</script>
<table width="776" height="500" border="0" align="center" cellpadding="0" cellspacing="0" class="t1">
  <tr>
    <td width="9" rowspan="2" valign="top" background="images/img31.gif"><img src="images/img30.gif" width="9" height="15"></td>
    <td height="15" align="center" background="images/img35.gif">&nbsp;</td>
    <td width="13" rowspan="2" align="center" valign="top" background="images/img36.gif"><img src="images/img34.gif" width="13" height="15"></td>
    <td background="images/img37.gif">&nbsp;</td>
    <td width="9" rowspan="2" align="right" valign="top" background="images/img33.gif"><img src="images/img32.gif" width="9" height="15"></td>
  </tr>
  <tr>
    <td width="200" align="center" valign="top"><table width="190" height="28" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="images/img41.gif" width="190" height="28"></td>
      </tr>
    </table>
      <table width="100" height="10" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <%
set rs=server.createobject("adodb.recordset")
rs.open "select * from films where film_class='"&class_caption&"' and Year(join_time)=Year(getdate()) and Month(join_time)=Month(getdate()) order by see_count desc",conn,1,1
if rs.eof and rs.bof then
%>
      <table width="190" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">本类别没有当月加入的影片</td>
        </tr>
      </table>
      <%
else
j=0
do while not rs.eof
j=j+1
%>
      <table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30" align="center"><%if j=1 then%>
              <img src="images/top1.gif" width="24" height="24">
              <%else%>
              <img src="images/top<%=j%>.gif" width="15" height="15">
              <%end if%></td>
          <td width="120" align="left"><%if j=1 then%>
              <strong>
              <%end if%>
              <a href="film.asp?id=<%=rs("id")%>" title="<%=rs("film_name")%>">
              <%if len(rs("film_name"))>12 then%>
              <%=left(rs("film_name"),12)%>...
              <%else%>
              <%=rs("film_name")%>
              <%end if%>
              </a>
              <%if j=1 then%>
              </strong>
              <%end if%></td>
          <td width="40" align="right"><%if j=1 then%>
              <strong>
              <%end if%>
              <%=rs("see_count")%>次
              <%if j=1 then%>
              </strong>
              <%end if%></td>
        </tr>
        <tr align="center">
          <td height="5" colspan="3"><table width="190" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
              <tr>
                <td></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <%
if j>=10 then exit do
rs.movenext
loop
end if
rs.close
%>
      <table width="100" height="10" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="190" height="28" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="images/img42.gif" width="190" height="28"></td>
        </tr>
      </table>
      <table width="100" height="10" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <%
set rs=server.createobject("adodb.recordset")
rs.open "select * from films where film_class='"&class_caption&"' and film_commend=1 and Year(join_time)=Year(getdate()) and Month(join_time)=Month(getdate()) order by id desc",conn,1,1
if rs.eof and rs.bof then
%>
      <table width="190" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">本类别没有当月加入的推荐影片</td>
        </tr>
      </table>
      <%
else
j=0
do while not rs.eof
j=j+1
%>
      <table width="180" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="140" align="left"><%if j=1 then%>
              <strong>
              <%end if%>
              <a href="film.asp?id=<%=rs("id")%>" title="<%=rs("film_name")%>">
              <%if len(rs("film_name"))>12 then%>
              <%=left(rs("film_name"),12)%>...
              <%else%>
              <%=rs("film_name")%>
              <%end if%>
              </a>
              <%if j=1 then%>
              </strong>
              <%end if%></td>
          <td width="40" align="right"><%if j=1 then%>
              <strong>
              <%end if%>
              <%=rs("see_count")%>次
              <%if j=1 then%>
              </strong>
              <%end if%></td>
        </tr>
        <tr align="center">
          <td height="5" colspan="2"><table width="180" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
              <tr>
                <td></td>
              </tr>
          </table></td>
        </tr>
      </table>
    <%
if j>=20 then exit do
rs.movenext
loop
end if
rs.close
%></td>
    <td width="543"  align="center" valign="top">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from films where film_class='"&class_caption&"' order by id desc",conn,1,1
if rs.eof and rs.bof then
%>
      <table width="500" height="100" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">本类别还没有任何影片</td>
        </tr>
      </table>
      <%
else

maxpage=10 '每页最大显示数
dim totalhow  '数据库中的总记录数
dim totalpage '总共页数
dim CurrentPage '当前处于的页数
currentPage=request.Querystring("page")
totalhow=rs.recordcount
if totalhow mod maxpage=0 then
totalpage= totalhow \ maxpage
else
totalpage = totalhow \ maxpage +1
end if


if currentpage<1 then
   currentpage=1
end if
if (currentpage-1)*MaxPage>totalhow then
   if (totalhow mod MaxPage)=0 then
      currentpage= totalhow \ MaxPage
	   else
      currentpage= totalhow \ MaxPage + 1
   end if
end if
if (currentPage-1)*MaxPage<totalhow then
    rs.move (currentPage-1)*MaxPage
    else
    currentPage=1
end if
%>
      <table width="530" height="30" border="0" cellpadding="0" cellspacing="0">
        <form name="form1" method="post">
          <tr>
            <td width="200">&nbsp;&nbsp;&nbsp;&nbsp;共有<span class="f3"><%=totalhow%></span>部影片 &nbsp;&nbsp; 第<span class="f3"><%=currentPage%></span>页/共<span class="f3"><%=totalpage%></span>页 </td>
            <td width="300" align="right"><font face="Webdings">7</font>&nbsp;<!--首页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%><!--首页尾-->&nbsp;&nbsp;<!--上一页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%><!--上一页尾-->&nbsp;&nbsp;<!--下一页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%><!--下一页尾-->&nbsp;&nbsp;<!--尾页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%><!--尾页尾-->&nbsp;<font face="Webdings">8</font>
&nbsp;&nbsp;<select name="topage" size="1" class="select1" onChange="JavaScript:tourl(document.form1.topage.options[document.form1.topage.selectedIndex].value)">
          <%for j=1 to totalpage%>
          <option value="list.asp?listid=<%=request.querystring("listid")%>&page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
          <%next%>
        </select>
            </td>
          </tr>
        </form>
      </table>
      <table width="500" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="530" height="160" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td><table border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <%for i=1 to 10
              if rs.eof then exit for%>
                <td width="110" align="center"><a href="film.asp?id=<%=rs("id")%>"><img src="<%if isnull(rs("film_pic"))=true or rs("film_pic")="" then%>images/no_film_pic.jpg<%else%>filmpic/<%=rs("film_pic")%><%end if%>" width="100" height="135" border="1" class="img1"></a>
                    <table width="100" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                </table></td>
                <td width="155" align="left"><table width="145" height="20" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td align="left"><strong><A class="f2" href="film.asp?id=<%=rs("id")%>" title="<%=rs("film_name")%>">
                        <%if len(rs("film_name"))>10 then%>
                        <%=left(rs("film_name"),10)%>...
                        <%else%>
                        <%=rs("film_name")%>
                        <%end if%>
                      </A></strong></td>
                    </tr>
                  </table>
                    <table width="145" height="120" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="left" valign="top"><a class="f6" href="film.asp?id=<%=rs("id")%>" title="[主要演员]:<%=rs("film_player")%>"><%=left(rs("film_gut"),80)%>......</a></td>
                      </tr>
                    </table>
                    <table width="100" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>&nbsp;</td>
                      </tr>
                </table></td>
                <%
if i mod 2=0 then
%>
              </tr>
              <tr>
                <%
end if 
rs.movenext
next
%>
              </tr>
          </table></td>
        </tr>
      </table>
      <!-----分页------>
      <table width="500" height="1" border="0" cellpadding="0" cellspacing="0" class="t2">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="530" height="30" border="0" cellpadding="0" cellspacing="0">
        <form name="form2" method="post">
          <tr>
            <td width="200">&nbsp;&nbsp;&nbsp;&nbsp;共有<span class="f3"><%=totalhow%></span>部影片 &nbsp;&nbsp; 第<span class="f3"><%=currentPage%></span>页/共<span class="f3"><%=totalpage%></span>页 </td>
            <td width="300" align="right"><font face="Webdings">7</font>&nbsp;<!--首页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>"><%end if%>首页<%if currentpage>1 then%></a><%end if%><!--首页尾-->&nbsp;&nbsp;<!--上一页头--><%if currentpage>1 then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage-1%>"><%end if%>上一页<%if currentpage>1 then%></a><%end if%><!--上一页尾-->&nbsp;&nbsp;<!--下一页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=currentPage+1%>"><%end if%>下一页<%if cint(currentpage)<totalpage then%></a><%end if%><!--下一页尾-->&nbsp;&nbsp;<!--尾页头--><%if cint(currentpage)<totalpage then%><a href="list.asp?listid=<%=request.querystring("listid")%>&page=<%=totalpage%>"><%end if%>尾页<%if cint(currentpage)<totalpage then%></a><%end if%><!--尾页尾-->&nbsp;<font face="Webdings">8</font>
&nbsp;&nbsp;<select name="topage2" size="1" class="select1" onChange="JavaScript:tourl(document.form2.topage2.options[document.form2.topage2.selectedIndex].value)">
          <%for j=1 to totalpage%>
          <option value="list.asp?listid=<%=request.querystring("listid")%>&page=<%=j%>" <%if cint(request.Querystring("page"))=j then%>selected<%end if%>> 第<%=j%>页 </option>
          <%next%>
        </select>
            </td>
          </tr>
        </form>
      </table>
<%
end if
rs.close
%>
      <table width="100" height="30" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

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