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

📄 search.asp

📁 视频点播系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
          <td width="30" bgcolor="#AAAAAA"> </td>
          <td width="93" class="title" bgcolor="#AAAAAA"> </td>
        </tr>
      </table>
      <table width="604" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
                        <FORM name=form2 action=search.asp method=post>
              </FORM>
              <%
   dim rstype
   dim typesql
   dim okname,typename1
   '---------------------------search----------------------
name=trim(request("keyword"))
name=replace(name,"'","''")
'Response.Write name
if request("typeid")="片名" then
    sql="select * from learning where title Like '%"& name &"%' or title like title Like '%"& name &"%' or title Like '%"& name &"%'order by articleid desc"
else
   sql="select * from learning where name Like '%"& name &"%' or name like name Like '%"& name &"%' or name Like '%"& name &"%'order by articleid desc"
end if   
set rs=conn.execute(sql)
'Rsponse.Write  rs.RecordCount 
if name="" then
   'response.redirect"index.asp"
   response.write"查找字符不能为空串,请重输入查找的信息<a href=""javascript:history.go(-1)"">返回重查</a>"
   response.end
 elseif rs.eof then
   response.write"没有你要查找的信息<a href=""javascript:history.go(-1)"">返回重查</a>"
   response.end
else   
  Set rs= Server.CreateObject("ADODB.Recordset")
  rs.open sql,conn,1,1
   'set rs=server.createobject("ADODB.recordset")
   'rs.open sql,conn
  'searchsub rs
end if  
%> 
                  <%
   const MaxPerPage=10
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim typename
      typename="软件搜索结果"
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
       set rst=server.CreateObject("ADODB.RecordSet") 
   %> <%      
       '  dim sql
'dim rs
'if request("hits")="1" then
  ' sql="select * from learning order by hits desc"     
'else
  ' sql="select * from learning order by articleid desc"
'end if   
'Set rs= Server.CreateObject("ADODB.Recordset")
'rs.open sql,conn,1,1
  if rs.eof and rs.bof then
       response.write "<p align='center'> 还 没 有 任 何 电 影</p>"
   else
	  'totalPut=rs.recordcount
      totalPut=rs.recordcount
      if currentpage<1 then
          currentpage=1
      end if
      if (currentpage-1)*MaxPerPage>totalput then
	   if (totalPut mod MaxPerPage)=0 then
	     currentpage= totalPut \ MaxPerPage
	   else
	      currentpage= totalPut \ MaxPerPage + 1
	   end if

      end if
       if currentPage=1 then
          

            showContent
            showpage totalput,MaxPerPage,"search.asp"
       else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
       

            showContent
                showpage totalput,MaxPerPage,"search.asp"
        else
	        currentPage=1
        

           showContent
             showpage totalput,MaxPerPage,"search.asp"
	      end if
	   end if
   end if
	        
   sub showContent
       dim i
	   i=0
         'Split("Sun,Mon,Tue,Wed,Thu,Fri,Sat",",")
	BgImg1 = "06,04,08,09"
	BgImg2 = "12,11,14,15"


                    %> <%i=0
          do while not rs.eof
	If i mod 2 = 0 Then MyBgImg = BgImg1 Else MyBgImg = BgImg2
		MyBgImg = Split(MyBgImg,",")
%> 
          </td>
        </tr>
        <tr> 
                <td valign="top"> <table width="100%" border="0" bordercolorlight="#000000" class="y" cellpadding="0">
                    <tr> 
                      <td width="121" rowspan="2" valign="top"> 
                      <TABLE width="115" height="144" border=0 cellPadding=0 cellSpacing=0 background="images/image_bg.gif">
                          <TR> 
                            <TD height=16 align=middle vAlign=center>
                            <img src="images/spacer.gif" width="1" height="1"></TD>
                          </TR>
                          <TR> 
                            <TD align="center">
                            <a target="_blank" href="movie.asp?id=<%=rs("articleid")%>"><img border="0" height="119" src="<%if rs("domurl")="" then%>IMAGES/nopic.gif<%else%><%=rs("domurl")%><%end if%>" width="100"></a></TD>
                          </TR>
                          <TR> 
                            <TD height="9">
                            <img src="images/spacer.gif" width="1" height="1"></TD>
                          </TR>
                        </TABLE></td>
                      <td> 
                      <span class="3dfont2"><a target="_blank" href="movie.asp?id=<%=rs("articleid")%>" class="mayi"><strong><%content=rs("title")
                          if len(content)>10 then content=left(content,10)&"…"
                          response.write content
                            %></strong></a>
                        
                      </td>
                    </tr>
                    <tr> 
                      <td>
                      <img src="images/fang.gif" width="15" height="15">类别: <font color="#FFFFFF"> 
                    <% if rs("canlook")=1 then%>
                    </font> 普通电影<font color="#FFFFFF"> 
                    <%elseif rs("canlook")=3 then%>
                    </font>黄金电影 <font color="#FFFFFF"> 
                    <%elseif rs("canlook")=0 then%>
                    </font>免费电影 <font color="#FFFFFF"> 
                    <%end if%>
                    </font> <br> 
                      <img src="images/fang.gif" width="15" height="15">主演: <%content=rs("name")
                          if len(content)>7 then content=left(content,7)&"…"
                          response.write content
                            %>  <br> 
                      <img src="images/fang.gif" width="15" height="15">地区: <font class="eng_S"><%=rs("where")%>地区</font><br> 
                      <img src="images/fang.gif" width="15" height="15">上传: <span class="eng_S"><%=rs("dateandtime")%></span><br> 
                      <img src="images/fang.gif" width="15" height="15">推荐: <strong><img border="0" src="img/<%=rs("softlevel")%>STAR.GIF"></strong><br> 
                      <img src="images/fang.gif" width="15" height="15">点播: <strong><%=rs("hits")%></strong> </td>
                    </tr>
                    <tr bgcolor="#327600"> 
                      <td colspan=2></td>
                    </tr>
                  </table><%rs.movenext%></td>
          <td><% If not rs.eof Then %><table width="100%" border="0" bordercolorlight="#000000" class="y" cellpadding="0">
                    <tr> 
                      <td width="121" rowspan="2" valign="top"> 
                      <TABLE width="115" height="144" border=0 cellPadding=0 cellSpacing=0 background="images/image_bg.gif">
                          <TR> 
                            <TD height=16 align=middle vAlign=center>
                            <img src="images/spacer.gif" width="1" height="1"></TD>
                          </TR>
                          <TR> 
                            <TD align="center">
                            <a target="_blank" href="movie.asp?id=<%=rs("articleid")%>"><img border="0" height="119" src="<%if rs("domurl")="" then%>IMAGES/nopic.gif<%else%><%=rs("domurl")%><%end if%>" width="100"></a></TD>
                          </TR>
                          <TR> 
                            <TD height="9">
                            <img src="images/spacer.gif" width="1" height="1"></TD>
                          </TR>
                        </TABLE></td>
                      <td> 
                      <span class="3dfont2"><a target="_blank" href="movie.asp?id=<%=rs("articleid")%>" class="mayi"><strong><%content=rs("title")
                          if len(content)>10 then content=left(content,10)&"…"
                          response.write content
                            %></strong></a> </td>
                    </tr>
                    <tr> 
                      <td>
                      <img src="images/fang.gif" width="15" height="15">类别: <font color="#FFFFFF"> 
                    <% if rs("canlook")=1 then%>
                    </font> 普通电影<font color="#FFFFFF"> 
                    <%elseif rs("canlook")=3 then%>
                    </font>黄金电影 <font color="#FFFFFF"> 
                    <%elseif rs("canlook")=0 then%>
                    </font>免费电影 <font color="#FFFFFF"> 
                    <%end if%>
                    </font><br> 
                      <img src="images/fang.gif" width="15" height="15">主演: <%content=rs("name")
                          if len(content)>7 then content=left(content,7)&"…"
                          response.write content
                            %><br> 
                      <img src="images/fang.gif" width="15" height="15">地区:  <font class="eng_S"><%=rs("where")%>地区</font><br> 
                      <img src="images/fang.gif" width="15" height="15">上传:  <span class="eng_S"><%=rs("dateandtime")%></span> <br> 
                      <img src="images/fang.gif" width="15" height="15">推荐:  <strong><img border="0" src="img/<%=rs("softlevel")%>STAR.GIF"></strong><br> 
                      <img src="images/fang.gif" width="15" height="15">点播:  <strong><%=rs("hits")%></strong></td>
                    </tr>
                    <tr bgcolor="#327600"> 
                      <td colspan=2></td>
                    </tr>
                  </table><%rs.movenext%>
                   </td>
			 <% End If %>
        </tr>
        <tr> 
          <td colspan="2"> 
            <% i=i+2
	      if i>=MaxPerPage then exit do
	   loop
		              %></td>
              </tr>
              <tr> 
 <%
  end sub
  function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
          Response.Write "<table border=""0"" cellspacing=""1"" width=""100%"">"
  response.write "<tr><td width=""26%"">"
     response.write "<form method=Post action="&filename&"?typeid="&typeid&">"
  response.write "&nbsp;共<b><font color=#FF0000>"&totalnumber&"</font></b>部&nbsp;<b><font color=#FF0000>"&maxperpage&"</font></b>部/页 "
  response.write "<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页&nbsp;</td>"
if CurrentPage>1 then
			  response.write "<td width='76'><a href="&filename&"?page=1&typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&">首页</a>&nbsp;"
			  response.write "<a href="&filename&"?page="&CurrentPage-1&"&typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&">上一页</a>&nbsp; </td>"
			  else
			  response.write "<td width='76'>首页&nbsp;上一页</td>"
			  end if 
			  
pp=CurrentPage-2            
  if pp<1 then            
  pp=1            
  end if            
for pno=pp to n            
p=p+1            
if pno=CurrentPage then

response.write "<td width='33'><b><font color=#FF0000>["&pno&"]</font></b>&nbsp;</td><form method=Post action="&filename&"?typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&">"
else
response.write "<td width='33'><b><a href="&filename&"?typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&"&page="&pno&">["&pno&"]</a></b>&nbsp;</td>"
end if 
if p>=5 then exit for            
next
if CurrentPage< n then
    response.write "<td width='76'><a href="&filename&"?page="&(CurrentPage+1)&"&typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&">下一页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&n&"&typeid="&Replace(request("typeid"), "'", "''")&"&keyword="&name&">尾页</a></td>"	
    else
	response.write "<td width='76'>下一页&nbsp;尾页</td>"
 end if 
response.write " <td width='36'>转到:</TD><td width='73'><input type='text' name='page' size=4 maxlength=4 class=smallInput  value="&currentpage&" style='font-size:9pt;background-color:#f7f7f7;border-left: 1px solid rgb(192,192,192); border-right: 1px solid rgb(192,192,192); border-top: 1px solid rgb(192,192,192); border-bottom: 1px solid rgb(192,192,192)'>"
response.write " <input name='submit' type='image' src='images/search.gif'  width='24' height='15'>"
 end function 
sub gotopage
end sub

%>      </tr></table>  </TR>
</TABLE>

  
  <TR>
    <TD bgColor=#000000 height=1></TD></TR></TABLE>

</BODY></HTML><!--#include file="end.asp"-->

⌨️ 快捷键说明

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