📄 fileserach.asp
字号:
<!--#include file="HMconnection.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="imagefile.asp"-->
<%dim SearType,SearKey,FilmType
FilmType=""
SearType=request("sradio")
SearKey=trim(request("keyword"))
%>
<html>
<head>
<title><%=webname%>-<%=types%></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL="stylesheet" HREF="style/style.css" TYPE="text/css">
</head>
<%
MaxPerPage=5
dim totalPut,CurrentPage,TotalPages,i,j,typetitle,ty
typetitle="charter"
if not isempty(trim((request("page")))) then
currentPage=cint(trim(request("page")))
else
currentPage=1
end if
%>
<BODY bgcolor="#B2DBFD" leftMargin=0 topMargin=0 oncontextmenu=self.event.returnValue=false onselectstart="return false">
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E5E5E5">
<tr>
<td width="100%">
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="98%">
<TBODY>
<TR><TD height="24" bgcolor="#FFFFFF">
<div align="center">
<!--#include file="webtop.asp"-->
</div>
</TD></TR>
</TBODY>
</TABLE>
<div align=center>
<table cellspacing=0 cellpadding=0 width="98%" border=0 bgcolor="#FFFFFF"> <tbody>
<tr>
<TD WIDTH="1" vAlign=TOP bgColor=#0000FF></TD>
<td valign=top width=190 background="style/orange.jpg ">
<DIV ALIGN="CENTER">
<!--#include file="webleft.asp"-->
</DIV>
</td>
<td valign=top width="579">
<table cellspacing=0 cellpadding=0 width="100%" align=center bgcolor=#ffffff border=0>
<tbody>
<tr> <td height=1></td></tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 width="100%" border=0> <tbody>
<tr valign=top>
<td colspan=2 height=40>
<div align=center> <div align=center> <div align=center>
<center>
<table cellspacing=0 cellpadding=0 width="95%" border=0 height="22"
background=style/orange.jpg%20>
<tbody>
<tr>
<td> </td>
</tr>
<tr>
<form method=POST name="fsform" action="fileserach.asp">
<td height="32" background="images/searchbar_04.gif" STYLE="border-bottom: 1 solid #cccccc">
<div align="center"><img src="images/search3.gif" width="16" height="16" align=absMiddle>
影片搜索:
<input id="sradio" type="radio" name="sradio" value="filmnames" checked>按片名
<input id="sradio" type="radio" name="sradio" value="actors">按演员
<input id="sradio" type="radio" name="sradio" value="directors">按导演
<input size=16 name=keyword style="border: 1px solid #000000">
<input type="hidden" name="submit" value="mysubmit">
<input type="image" border="0" name="submit" value="mysubmit" src="images/search_menu.gif" width="41" height="20" align=absMiddle>
</div>
</td>
</form>
</tr>
</tbody>
</table>
</center>
<table cellspacing=0 cellpadding=0 width="95%" border=0>
<tbody>
<tr valign=top> <td colspan=2 height=40>
<div align=center> <br style="line-height:3px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="images/searchpic.gif">
</td>
</tr>
<tr>
<td>
<%dim SearSQL,imagefile
dim SearRS
if SearKey="" then
SearSQL="select * from film order by dateandtime desc"
else
select case SearType
case "filmnames" :
FilmType="按影片名称"
SearSQL="select * from film where title like '%"&SearKey&"%' order by dateandtime desc"
case "actors" :
FilmType="按演员名称"
SearSQL="select * from film where mainactors like '%"&SearKey&"%' order by dateandtime desc"
case "directors" :
FilmType="按导演名称"
SearSQL="select * from film where directors like '%"&SearKey&"%' order by dateandtime desc"
end select
end if
Set SearRS= Server.CreateObject("ADODB.Recordset")
SearRS.open SearSQL,conn,1,1
if SearRS.eof and SearRS.bof then
response.write "<p align='center'> <br>对不起,该类影片暂无 </p>"
else
totalPut=SearRS.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
showpage totalput,MaxPerPage,"fileserach.asp"
showContent
showpage1 totalput,MaxPerPage,"fileserach.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
SearRS.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=SearRS.bookmark
showpage totalput,MaxPerPage,"fileserach.asp"
showContent
showpage1 totalput,MaxPerPage,"fileserach.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"fileserach.asp"
showContent
showpage1 totalput,MaxPerPage,"fileserach.asp"
end if
end if
end if
sub showContent
dim i
i=0
do while not SearRS.eof
%>
<table cellspacing=0 cellpadding=0 width="100%"
border=0 height="168">
<tbody bgcolor="#EFEFEF">
<tr>
<td valign=center align=middle width="132" rowspan="2">
<div align=center><font color="#000000"><a href="showfilm.asp?id=<%=SearRS("id")%>&typeid=<%=SearRS("typeid")%>">
<img src="<%if SearRS("imagesname")="" or SearRS("imagesname")=" " then
imagefile="filmpic/defaut2.jpg"
else
imagefile=FIfile(trim(SearRS("imagefile")))&trim(SearRS("imagesname"))
end if%>
<%=imagefile%>" width="90" height="128" border="0"></a></font></div>
</td>
<td valign=top height="127">
<p><font color="#333333"><br>
影片名称:</font><font color="#FF6600"><a href="showfilm.asp?id=<%=SearRS("id")%>&typeid=<%=SearRS("typeid")%>"><font color="#FB6400"><%=SearRS("title")%></font></a></font>
<font color="#000000">点播:</font><font color="#999999"><font color="#FF6600"><%=SearRS("hits")%>
<font color="#000000">次</font></font></font><br>
<FONT COLOR="#333333">主要演员:</FONT><FONT COLOR="#993300"><%=SearRS("mainactors")%></FONT><BR>
<FONT COLOR="#333333">导 演 :</FONT><FONT COLOR="#993300"><%=SearRS("directors")%></FONT><BR>
开放范围:<%if SearRS("grade")="0" then%><font color="#CC9933">所有人(免费)</font><%end if
if SearRS("grade")="1" then%><font color="#0000ff">本站会员</font>
<%end if
if SearRS("grade")="2" then%><font color="#0000ff"><b>VIP会员</b></font>
<%END IF%>
<br>
内容简介:<FONT COLOR="#000000"><br>
<%=left(SearRS("content"),90)%></FONT><font color="#666666">...<br>
</font></p>
</td>
</tr>
<tr>
<td valign=bottom>
<div align="right"><font color="#999999">添加时间:</font><font color="#993300"><%=SearRS("dateandtime")%></font> </div>
</td>
</tr>
<tr>
<td valign=center colspan=2>
<table cellspacing=0 cellpadding=0 width="100%">
<tbody>
<tr>
<td background=images/bgline.gif
height=2></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<% i=i+1
if i>=MaxPerPage then exit do
SearRS.movenext
loop
%> <%
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"" bgcolor=#CCCCCC width=""100%"" align=center>"
response.write "<tr><td width=""30%"">"
Response.Write ("您输入的查询条件为:"<font color='red'>"&Filmtype&"</font>" 和 "<font color='red'>"&SearKey&"</font>" ")
Response.Write "共检索到影片:<font color=""red"">"&totalnumber&"</font> 部 <font color=""red""> "&CurrentPage&"/"&n&"</font> 页</td>"
end function
function showpage1(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 align=""left""><td width=""64%"">"
response.write "<td width=""50%""><div align=""center"">"
if CurrentPage<2 then
response.write "<font color='999966'><br>首页 上一页</font> "
else
response.write "<a href="&filename&"?sradio="&SearType&"&keyword="&SearKey&"&page=1&><br>首页</a> "
response.write "<a href="&filename&"?sradio="&SearType&"&keyword="&SearKey&"&page="&CurrentPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?sradio="&SearType&"&keyword="&SearKey&"&page="&(CurrentPage+1)
response.write ">下一页</a> <a href="&filename&"?sradio="&SearType&"&keyword="&SearKey&"&page="&n&">尾页</a>"
end if
Response.Write "</div></td></tr></table>"
end function
SearRS.close
set SearRS=nothing
%>
</td>
</tr>
</table>
</div></td></tr> <tr> <td colspan=2 height=3></td></tr>
</tbody> </table></div></div></div></td></tr> <tr> <td colspan=2 height=2></td></tr>
</tbody> </table></td>
<TD WIDTH="1" vAlign=TOP bgColor=#0000FF></TD>
</tr> </tbody> </table>
<!--#include file="webbottom.asp"--> </div>
</td></tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -