search.asp
上传用户:qyswxdl
上传日期:2013-06-01
资源大小:1373k
文件大小:19k
源码类别:

家庭/个人应用

开发平台:

ASP/ASPX

  1. <!--#include file="articleconn.asp"-->
  2. <HTML><HEAD>
  3. <%set rs=conn.execute("select * from [home]")%>
  4. <TITLE><%=rs("homes")%></TITLE>
  5. <META http-equiv=Content-Type content="text/html; charset=gb2312">
  6. <LINK href="img/style.css" type=text/css rel=stylesheet>
  7. <META content="MSHTML 6.00.2800.1505" name=GENERATOR>
  8. <script language="JavaScript">
  9. <!--
  10. function checkinput()
  11. {
  12. if (document.search.keyword.value=="")
  13.  {
  14. alert("请输入想查询的内容!");
  15. document.search.keyword.focus();
  16. return false;
  17.  }
  18.  return true;
  19. }
  20. -->
  21. </script>
  22. <SCRIPT language=javascript>
  23. <!--
  24. function MM_openBrWindow(theURL,winName,features) { //v2.0
  25.   mediaWindow = window.open(theURL,winName,features);
  26.   mediaWindow.focus();
  27. }
  28. //-->
  29. </SCRIPT>
  30. <script language="javascript">kstatus();function kstatus(){self.status="<%=rs("Description")%>";setTimeout("kstatus()",0);}</script>
  31. <SCRIPT language=JavaScript1.2> 
  32. <!-- 
  33. function Show(divid) { 
  34. divid.filters.revealTrans.apply(); 
  35. divid.style.visibility = "visible"; 
  36. divid.filters.revealTrans.play(); 
  37. function Hide(divid) { 
  38. divid.filters.revealTrans.apply(); 
  39. divid.style.visibility = "hidden"; 
  40. divid.filters.revealTrans.play(); 
  41. //--> 
  42. </SCRIPT>
  43. <script>
  44. function OpenWindow(htmurl,widths,heights)
  45. {
  46.    var paramet = 'toolbar=no,resizable=no,scrollbars=no,width='+ widths + ',height=' + heights;
  47.    newWindow = window.open(htmurl,"yule21",paramet);
  48.    newWindow.focus();
  49. }
  50. </script>
  51.  <script>
  52. IEver=navigator.appVersion.substring(navigator.appVersion.indexOf('MSIE')+5,navigator.appVersion.indexOf(';',17));
  53. if(IEver=="6.0")
  54.     {
  55.       ie6 = true;
  56.       width_add = 10; 
  57.       height_add = 29;
  58.       hand_add = -14;
  59.     }
  60. else
  61.     {
  62.       ie6 = false;
  63.       width_add = 10;
  64.       height_add = 29;
  65.       hand_add = 14;
  66.     }
  67. function OpenWindow(PlayerURL)
  68. {
  69.   if (ie6)
  70. newwindow=window.open('','','fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=-1');
  71.   else
  72. newwindow=window.open('','','fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=-1');
  73. newwindow.moveTo(100,100);
  74. newwindow.resizeTo(440+width_add,428+height_add+hand_add);
  75. newwindow.focus();
  76. newwindow.location=PlayerURL;
  77. }
  78. function play(id)
  79. {
  80.     OpenWindow('look.asp?id1='+id);
  81. }
  82. </script></HEAD>
  83. <BODY >
  84. <!--#include file=top.asp-->
  85. <TABLE cellSpacing=0 cellPadding=0 width=993 border=0>
  86. <TBODY>
  87. <TR>
  88. <TD bgColor=#7d7d7d height=1></TD></TR></TBODY></TABLE>
  89. <TABLE cellSpacing=0 cellPadding=0 width=993 border=0>
  90. <TBODY>
  91. <TR>
  92. <TD bgColor=#ffffff height=2></TD></TR></TBODY></TABLE>
  93. <TABLE cellSpacing=0 cellPadding=0 width=993 bgColor=#ffffff border=0>
  94. <TBODY>
  95. <TR>
  96. <TD vAlign=top align=middle>
  97. <TABLE cellSpacing=0 cellPadding=0 width=977 border=0>
  98. <TBODY>
  99. <TR>
  100. <TD background=img/2.gif height=8></TD></TR></TBODY></TABLE>
  101. <TABLE cellSpacing=1 cellPadding=0 width=977 bgColor=#b7b7b7 border=0>
  102. <TBODY>
  103. <TR>
  104. <TD bgColor=#ffffff>
  105. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  106. <TBODY>
  107. <TR>
  108. <TD>
  109. <TABLE height=94 cellSpacing=0 cellPadding=1 width="100%" border=0>
  110. <TBODY>
  111. <TR>
  112. <TD align=right width=189><IMG height=90 src="img/channel_title_movie.gif" width=188></TD>
  113. <TD>
  114. <OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=90 width=780 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
  115. <PARAM NAME="movie" VALUE="img/banner_780x90.swf">
  116. <PARAM NAME="quality" VALUE="High">
  117.  
  118. <embed src="img/banner_780x90.swf" quality="High" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="90"></embed></OBJECT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  119. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  120. <TBODY>
  121. <TR>
  122. <TD background=img/1.jpg height=12></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  123. <TABLE cellSpacing=0 cellPadding=0 width=977 border=0>
  124. <TBODY>
  125. <TR>
  126. <TD height=2></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  127. <TABLE cellSpacing=0 cellPadding=0 width=993 bgColor=#ffffff border=0>
  128. <TBODY>
  129. <TR>
  130. <TD vAlign=top align=middle height=173>
  131. <TABLE height=36 cellSpacing=0 cellPadding=0 width=977 border=0>
  132. <TBODY>
  133. <TR>
  134. <TD vAlign=top width=191 height=25>
  135. <!--#include file=left.asp--></TD>
  136. <TD width=2 valign="top"></TD>
  137. <TD width=1 bgColor=#c6c6c6 valign="top"></TD>
  138. <TD vAlign=top width=783>
  139. <TABLE cellSpacing=0 cellPadding=0 width=783 border=0>
  140. <TBODY>
  141. <TR>
  142. <TD><A href="/bfqxz/RealPlayer.exe"><IMG height=60 src="img/dl_01.jpg" width=179 border=0></A></TD>
  143. <TD><A href="/bfqxz/Windows Media Player.exe"><IMG height=60 src="img/dl_02.jpg" width=171 border=0></A></TD>
  144. <TD><A href="/bfqxz/ffdshow.exe"><IMG height=60 src="img/dl_03.jpg" width=168 border=0></A></TD>
  145. <TD><A href="/bfqxz/ie6setup.exe"><IMG height=60 src="img/dl_04.jpg" width=160 border=0></A></TD>
  146. <TD><A href="#"><IMG height=60 src="img/dl_05.jpg" width=105 border=0></A></TD></TR></TBODY></TABLE>
  147. <TABLE height=40 cellSpacing=0 cellPadding=0 width="100%" background=img/5.gif border=0>
  148. <TBODY>
  149. <TR>
  150. <TD width=116 valign="top">
  151. <img border="0" src="img/19.gif" width="116" height="32"></TD>
  152. <TD align=right><TABLE height=24 cellSpacing=0 cellPadding=0 border=0>
  153. <TBODY>
  154. <TR>
  155. <TD width=2><img src height=1 width=2></TD>
  156. </TR></TBODY></TABLE></TD>
  157. <TD align=right valign="top"><IMG height=31 src="img/7.gif" width=83></TD></TR></TBODY></TABLE>
  158. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR align=right>
  159. <TD><table border="0" cellspacing="0" width="100%" cellpadding="0" id="table8">
  160.   <tr bordercolor="#111111">
  161.     <TD vAlign=top align=left><table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
  162.         <tr>
  163.           <td colspan="2"><%
  164.    dim rstype
  165.    dim typesql
  166.    dim okname,typename1
  167.    '---------------------------search----------------------
  168. name=trim(request("keyword"))
  169. name=replace(name,"'","''")
  170. 'Response.Write name
  171. if request("typeid")="片名" then
  172.     sql="select * from learning where title Like '%"& name &"%' or title like title Like '%"& name &"%' or title Like '%"& name &"%'order by articleid desc"
  173. else
  174.    sql="select * from learning where name Like '%"& name &"%' or name like name Like '%"& name &"%' or name Like '%"& name &"%'order by articleid desc"
  175. end if   
  176. set rs=conn.execute(sql)
  177. 'Rsponse.Write  rs.RecordCount 
  178. if name="" then
  179.    'response.redirect"index.asp"
  180.    response.write"<script>alert('查找字符不能为空格,请重输入查找的内容!请您返回重查');</Script><script Language=Javascript>location.href = '';</script>"
  181.    response.end
  182.  elseif rs.eof then
  183.    response.write"<script>alert('对不起,暂时还没有你要查找的演员或影片! 请您返回重查');</Script><script Language=Javascript>location.href = '';</script>"
  184.    response.end
  185. else   
  186.   Set rs= Server.CreateObject("ADODB.Recordset")
  187.   rs.open sql,conn,1,1
  188.    'set rs=server.createobject("ADODB.recordset")
  189.    'rs.open sql,conn
  190.   'searchsub rs
  191. end if  
  192. %>
  193.               <%
  194.    const MaxPerPage=6
  195.    dim totalPut   
  196.    dim CurrentPage
  197.    dim TotalPages
  198.    dim i,j
  199.    dim typename
  200.       typename="软件搜索结果"
  201.    if not isempty(request("page")) then
  202.       currentPage=cint(request("page"))
  203.    else
  204.       currentPage=1
  205.    end if
  206.        set rst=server.CreateObject("ADODB.RecordSet") 
  207.    %>
  208.               <%      
  209.        '  dim sql
  210. 'dim rs
  211. 'if request("hits")="1" then
  212.   ' sql="select * from learning order by hits desc"     
  213. 'else
  214.   ' sql="select * from learning order by articleid desc"
  215. 'end if   
  216. 'Set rs= Server.CreateObject("ADODB.Recordset")
  217. 'rs.open sql,conn,1,1
  218.   if rs.eof and rs.bof then
  219.        response.write "<script>alert('暂时还没有您要找的影片,请与管理员联系!')</Script>"
  220.    response.end
  221.    else
  222.   totalPut=rs.recordcount
  223.       totalPut=rs.recordcount
  224.       if currentpage<1 then
  225.           currentpage=1
  226.       end if
  227.       if (currentpage-1)*MaxPerPage>totalput then
  228.    if (totalPut mod MaxPerPage)=0 then
  229.      currentpage= totalPut  MaxPerPage
  230.    else
  231.       currentpage= totalPut  MaxPerPage + 1
  232.    end if
  233.       end if
  234.        if currentPage=1 then
  235.            showpage totalput,MaxPerPage,"search.asp"
  236.             showContent
  237.             showpage totalput,MaxPerPage,"search.asp"
  238.        else
  239.           if (currentPage-1)*MaxPerPage<totalPut then
  240.             rs.move  (currentPage-1)*MaxPerPage
  241.             dim bookmark
  242.             bookmark=rs.bookmark
  243.            showpage totalput,MaxPerPage,"search.asp"
  244.             showContent
  245.             showpage totalput,MaxPerPage,"search.asp"
  246.         else
  247.         currentPage=1
  248.           showpage totalput,MaxPerPage,"search.asp"
  249.            showContent
  250.            showpage totalput,MaxPerPage,"search.asp"
  251.       end if
  252.    end if
  253.    end if
  254.    sub showContent
  255. 'Split("Sun,Mon,Tue,Wed,Thu,Fri,Sat",",")
  256. BgImg1 = "06,04,08,09"
  257. BgImg2 = "12,11,14,15"
  258.        dim i
  259.    i=0
  260.                     %>
  261.               <%i=0
  262.           do while not rs.eof
  263. If i mod 2 = 0 Then MyBgImg = BgImg1 Else MyBgImg = BgImg2
  264. MyBgImg = Split(MyBgImg,",")
  265. %>
  266.           </td>
  267.         </tr>
  268.         <tr>
  269.           <td width="374" valign="top"><table width="295" height="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#DBDBDB">
  270.               <tr>
  271.                 <td bgcolor="#ffffff" width="110"><a target="_blank" title="影片名称:<%=rs("title")%>
  272. 主演:<%content=rs("name")
  273.                           if len(content)>8 then content=left(content,8)&"?-"
  274.                           response.write content
  275.                             %>
  276. 上传时间:<%=rs("dateandtime")%>
  277. 观看次数:<%=rs("hits")%>′?
  278. 站长:<%=webname%>
  279. " href="movie.asp?id=<%=rs("articleid")%>"><img border="0" height="152" src="<%if rs("domurl")="" then%>img/w.gif<%else%><%=rs("domurl")%><%end if%>" width="110"></a></td>
  280.                 <td bgcolor="#ffffff" valign="top"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="2">
  281.                     <tr>
  282.                       <td align="center" bgcolor="#E9E9E9"><span class="style2"></span></td>
  283.                       <td colspan="2" align="center" bgcolor="#E9E9E9"><div align="left"><span class="style2"> <strong> <span class="3dfont2"></span></strong><strong><span class="3dfont2"><a target="_blank" title="影片名称:<%=rs("title")%>
  284. 主演:<%content=rs("name")
  285.                           if len(content)>8 then content=left(content,8)&"?-"
  286.                           response.write content
  287.                             %>
  288. 上传时间:<%=rs("dateandtime")%>
  289. 观看次数:<%=rs("hits")%>′?
  290. 站长:<%=webname%>" href="movie.asp?id=<%=rs("articleid")%>"><strong>
  291.                           <%content=rs("title")
  292.                           if len(content)>13 then content=left(content,13)&""
  293.                           response.write content
  294.                             %>
  295.                       </strong></a></span> </strong></span></div></td>
  296.                     </tr>
  297.                     <tr>
  298.                       <td colspan="3">类别: <%=rs("typeid")%></td>
  299.                     </tr>
  300.                     <tr>
  301.                       <td colspan="3">主演:
  302.                           <%content=rs("name")
  303.                           if len(content)>5 then content=left(content,5)&"?-"
  304.                           response.write content
  305.                             %></td>
  306.                     </tr>
  307.                     <tr>
  308.                       <td colspan="3">级别:
  309.                           <% if rs("canlook")=1 then%>
  310.                       普通电影
  311.                       <%elseif rs("canlook")=3 then%>
  312.                       黄金电影
  313.                       <%elseif rs("canlook")=0 then%>
  314.                       免费电影
  315.                       <%end if%></td>
  316.                     </tr>
  317.                     <tr>
  318.                       <td colspan="3">观看:<%=rs("hits")%>次</td>
  319.                     </tr>
  320.                     <tr>
  321.                       <td width="10%" align="center"> </td>
  322.                       <td width="45%" align="center"><div align="left"><a href="movie.asp?id=<%=rs("articleid")%>" target="_blank"><img src="images/online.gif" width="82" height="23" border="0"></a> </div></td>
  323.                       <td width="45%" align="center"><a href="movie.asp?id=<%=rs("articleid")%>" target="_blank"><img src="images/download.gif" width="82" height="23" border="0"></a></td>
  324.                     </tr>
  325.                 </table></td>
  326.             </table>
  327.               <%rs.movenext%></td>
  328.           <td width="396"><% If not rs.eof Then %>
  329.               <table width="295" height="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#DBDBDB">
  330.                 <tr>
  331.                   <td bgcolor="#ffffff" width="110"><a target="_blank" title="影片名称:<%=rs("title")%>
  332. 主演:<%content=rs("name")
  333.                           if len(content)>8 then content=left(content,8)&"?-"
  334.                           response.write content
  335.                             %>
  336. 上传时间:<%=rs("dateandtime")%>
  337. 观看次数:<%=rs("hits")%>′?
  338. 站长:<%=webname%>
  339. " href="movie.asp?id=<%=rs("articleid")%>"><img border="0" height="152" src="<%if rs("domurl")="" then%>img/w.gif<%else%><%=rs("domurl")%><%end if%>" width="110"></a></td>
  340.                   <td bgcolor="#ffffff" valign="top"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="2">
  341.                       <tr>
  342.                         <td align="center" bgcolor="#E9E9E9"><span class="style2"></span></td>
  343.                         <td colspan="2" align="center" bgcolor="#E9E9E9"><div align="left"><span class="style2"> <strong> <span class="3dfont2"></span></strong><strong><span class="3dfont2"><a target="_blank" title="影片名称:<%=rs("title")%>
  344. 主演:<%content=rs("name")
  345.                           if len(content)>8 then content=left(content,8)&"?-"
  346.                           response.write content
  347.                             %>
  348. 上传时间:<%=rs("dateandtime")%>
  349. 观看次数:<%=rs("hits")%>′?
  350. 站长:<%=webname%>" href="movie.asp?id=<%=rs("articleid")%>"><strong>
  351.                             <%content=rs("title")
  352.                           if len(content)>13 then content=left(content,13)&""
  353.                           response.write content
  354.                             %>
  355.                         </strong></a></span> </strong></span></div></td>
  356.                       </tr>
  357.                       <tr>
  358.                         <td colspan="3">类别: <%=rs("typeid")%></td>
  359.                       </tr>
  360.                       <tr>
  361.                         <td colspan="3">主演:
  362.                             <%content=rs("name")
  363.                           if len(content)>5 then content=left(content,5)&"?-"
  364.                           response.write content
  365.                             %></td>
  366.                       </tr>
  367.                       <tr>
  368.                         <td colspan="3">级别:
  369.                             <% if rs("canlook")=1 then%>
  370.                       普通电影
  371.                       <%elseif rs("canlook")=3 then%>
  372.                       黄金电影
  373.                       <%elseif rs("canlook")=0 then%>
  374.                       免费电影
  375.                       <%end if%></td>
  376.                       </tr>
  377.                       <tr>
  378.                         <td colspan="3">观看:<%=rs("hits")%>次</td>
  379.                       </tr>
  380.                       <tr>
  381.                         <td width="10%" align="center"> </td>
  382.                         <td width="45%" align="center"><div align="left"><a href="movie.asp?id=<%=rs("articleid")%>" target="_blank"><img src="images/online.gif" width="82" height="23" border="0"></a> </div></td>
  383.                         <td width="45%" align="center"><a href="movie.asp?id=<%=rs("articleid")%>" target="_blank"><img src="images/download.gif" width="82" height="23" border="0"></a></td>
  384.                       </tr>
  385.                   </table></td>
  386.               </table>
  387.               <%rs.movenext%>
  388.           </td>
  389.         </tr>
  390.         <tr>
  391.           <% End If %>
  392.         </tr>
  393.         <tr>
  394.           <td colspan="2"><% i=i+2
  395.       if i>=MaxPerPage then exit do
  396.    loop
  397.               %>
  398.           </td>
  399.         </tr>
  400.       </table>
  401.         <%
  402. end sub 
  403. function showpage(totalnumber,maxperpage,filename)
  404. dim n
  405. if totalnumber mod maxperpage=0 then
  406. n= totalnumber  maxperpage
  407. else
  408. n= totalnumber  maxperpage+1
  409. end if
  410. %>
  411.         <table border="0" cellspacing="0" height="25" width="591" background="images/top-bg3.gif">
  412.           <form method=Post action="<%=filename%>?typeid=<%=typeid%>">
  413.             <tr>
  414.               <td>&nbsp;&nbsp;     
  415.               <font color="000000" class="fontshadow">〓 <%=typeid%> 〓&nbsp;&nbsp;共有<font color="ff0000"><b><%=totalnumber%></b></font>部&nbsp;&nbsp;&nbsp;当前:第<font color="ff0000"><strong><%=CurrentPage%></strong></font>页/共<font color="ff0000"><strong><%=n%></strong></font>页
  416.               <td><div align="right">
  417.                   <%if CurrentPage<2 then%>
  418.                   <font color="888888">首页&nbsp;上一页&nbsp;&nbsp;&nbsp;
  419.                   <%else%>
  420.                   <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=1&"><font color="000000">首页</font></a><font color="000000">&nbsp; <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=CurrentPage-1%>"><font color="000000">上一页</font></a><font color="000000">&nbsp;&nbsp;&nbsp;
  421.                   <%
  422. end if
  423. if n-currentpage<1 then
  424. %>
  425.                   <font color="888888">下一页&nbsp;尾页&nbsp;&nbsp;&nbsp;
  426.                   <%else%>
  427.                   <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=(CurrentPage+1)%>"><font color="000000">下一页</font></a><font color="000000">&nbsp; <a class=left href="<%=filename%>?typeid=<%=typeid%>&page=<%=n%>"><font color="000000">尾页</font></a><font color="000000">&nbsp;
  428.                   <%end if%>
  429.                 </font></font></font></font></font></font></div>
  430.               <font color="888888"><font color="000000"><font color="000000"><font color="888888"><font color="000000"><font color="000000">
  431.               <td align="center"><select name="page" style="color:#000000;font-size: 9pt" onchange="javascript:submit()">
  432.                   <%for i = 1 to n%>
  433.                   <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
  434.                   <%next%>
  435.               </select></td>
  436.             </font></font></font></font></font></font></font></tr>
  437.           </form>
  438.         </table>
  439.         <% 
  440. end function
  441. %>
  442.         <%
  443. sub gotopage
  444. end sub
  445. %>
  446.     
  447. <tr>
  448. <td>&nbsp; </td>
  449. </tr>
  450. </table>
  451. </TD>
  452. </TR></TBODY></TABLE>
  453. </TD>
  454. </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
  455. <!--#include file=bottom.asp-->
  456. </BODY></HTML>