<!--#include file="../conn/conn_other.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="Incs/syscode.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if

	WebName=homename
	WebUrl=homeurl
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=WebName%> - 在线视频 - 搜索结果</title>
<meta name="keywords" content="<%=webmeta%>" />
<meta name="description" content="<%=webmeta1%>"/>
<link href="Images/style.css" rel="stylesheet">
<script language="javascript" src="Js/js.js"></script>
</head>
<body>
<iframe src="/top_html.asp" width="100%" height="101" frameborder="0" scrolling="no" align="middle" ></iframe>
<table width="975" border="0" align="center">
  <tr>
    <td>
<div class="menu">
	<%=GetChannelList(0,0)%>
</div>
<div class="search">
	<div class="sfrom">
	<form name="searchform" method="post" action="Search.asp" onsubmit="return gsearch();">
	<input class="stext" id="Key" name="Key" type="text" value="" />
	<input id="sType" name="sType" type="hidden" value="1">
	<div class="showsearch">
		<div class="nowsearch" id="headSlected" onclick="if(document.getElementById('headSel').style.display=='none'){document.getElementById('headSel').style.display='block';}else {document.getElementById('headSel').style.display='none';};return false;" onmouseout="drop_mouseout('head');">名称</div>
		<div class="showselect"><a href="#" onclick="if(document.getElementById('headSel').style.display=='none'){document.getElementById('headSel').style.display='block';}else {document.getElementById('headSel').style.display='none';};return false;" onmouseout="drop_mouseout('head');"></a></div>
		<div class="clear"></div>
		<ul class="soption" id="headSel" style="display:none;">
			<li><a href="#" onclick="return search_show('head','1',this)" onmouseover="drop_mouseover('head');" onmouseout="drop_mouseout('head');">名称</a></li>
			<li><a href="#" onclick="return search_show('head','2',this)" onmouseover="drop_mouseover('head');" onmouseout="drop_mouseout('head');">演员</a></li>
		</ul>
	</div>
	<input name="submit" type="submit" class="sbutton" value="搜索">
	</form>
	</div>
	<div class="stexts">热门搜索：<script language="javascript" src="Js/hot.js"></script></div>
</div>
<script language="javascript" src="Banner/banner_2.js"></script>
<div class="ibox">
<%
Dim Key,sType
Key=CheckStr(Trim(Request("Key")))
sType=CheckNum(Trim(Request("sType")))
Dim Tag,Table,TagStr,Order,PageSize,PageUrl
Tag="VideoID"										
Table="[Dm_Video]"								
TagStr="*"	
Order="VideoID"									
PageSize=HtmlListNum								
PageUrl="Search.asp"								
LinkNum=5										
Dim TotalCount,PageCount,Page
Dim Rs,Sql,WhereStr
If Key<>"" Then
	If Key<>"" And sType<>0 Then
		Select Case sType
			Case 1
				WhereStr="Where VideoName Like '%"&Key&"%'"
				PageUrl=PageUrl&"?Key="&Key&"&sType="&sType&""
			Case 2
				WhereStr="Where Player Like '%"&Key&"%'"
				PageUrl=PageUrl&"?Key="&Key&"&sType="&sType&""
		End Select
	Else
		WhereStr="Where VideoName Like '%"&Key&"%'"
		PageUrl=PageUrl&"?Key="&Key
	End If
End If
Dim ClassID,Abc
ClassID=CheckNum(Trim(Request("ClassID")))
Abc=CheckStr(Request("Abc"))
If ClassID<>0 And Abc<>"" Then
	WhereStr="Where ClassID="&ClassID&" And VideoAbc='"&Abc&"'"
	PageUrl=PageUrl&"?ClassID="&ClassID&"&Abc="&Abc&""
End If
TotalCount=GetTotalCount(Tag,Table,WhereStr)
PageCount=GetPageCount(TotalCount,PageSize)
Page=GetPageNow(PageCount)
Sql=GetPageSql(Tag,Table,TagStr,Order,PageSize,WhereStr,Page)
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,1
%>
	<div class="ll">
	<%
    If ClassID<>0 And Abc<>"" Then
    %>
    	<div class="nav"><a href="Index.html">首页</a>>>搜索字母索引{<%=Abc%>}的结果</div>
    <%
    Else
    %>
    	<div class="nav"><a href="Index.html">首页</a>>>搜索{<%=Key%>}的结果</div>
    <%
    End If
    %>
		<div class="ptlist">
<%
If Rs.Bof And Rs.Eof Then
	Rw("<ul>")&vbcrlf
	Rw("<li><a href=""Images/error.gif"" target=""_blank""><img src=""Images/error.gif"" ></a><p class=""t"">没有搜索到您想搜索的内容！</p></li>")&vbcrlf
	Rw("</ul>")&vbcrlf
	Rw("</div>")&vbcrlf
Else
	Rw("<ul>")&vbcrlf
	Do While Not Rs.Eof
		Dim ClassName,RsClass
		Set RsClass=Conn.Execute("Select * From Dm_Class Where ClassID="&Rs("ClassID")&"")
		If Not (RsClass.Bof And RsClass.Eof) Then
			ClassName=RsClass("ClassName")
			ClassEName=RsClass("ClassEName")
		End If
		RsClass.Close
		Set RsClass=Nothing
		Rw("<li><a href=""film/"&GetClassPath(Rs("ClassID"),ClassEName)&GetVideoPath(Rs("VideoID"),Rs("VideoEName"))&""" title="""&Rs("VideoName")&""" target=""_blank""><img src="""&Rs("VideoPic")&""" alt="""&Rs("VideoName")&""" onerror=""this.src='Images/error.gif'""></a><p class=""t""><a href=""film/"&GetClassPath(Rs("ClassID"),ClassEName)&GetVideoPath(Rs("VideoID"),Rs("VideoEName"))&""" title="""&Rs("VideoName")&""" target=""_blank"">"&Rs("VideoName")&"</a></p><p>主演："&LeftStr(Rs("Player"),24)&"</p><p>分类："&ClassName&"</p><p>时间："&FormatTime(Rs("PostTime"),4)&"</p></li>")&vbcrlf
	Rs.MoveNext
	Loop
	Rw("</ul>")&vbcrlf
	Rw("</div>")&vbcrlf
	Call PageShow(TotalCount,PageSize,Page,PageCount,PageUrl,LinkNum)
End If
Rs.Close
Set Rs=Nothing
%>
	</div>
	<div class="lr">
	  	<h5>最新影视</h5>
      	<div class="plist">
		<%=GetTopVideo(17,"",1,False,True,False,20,0)%>
		</div>
		<div class="space"></div>
		<h5>点播排行</h5>
		<div class="plist">
		<%=GetTopVideo(17,"",2,False,False,True,20,0)%>
		</div>
	</div>
</div>
<script language="javascript" src="Banner/banner_3.js"></script>
<div class="footer">
	<script language="javascript" src="Js/foot.js"></script>
    <p>Powered By <a href="<%= homeurl %>" target="_blank"><%= homename %></a></p>
</div>
	</td>
  </tr>
</table>

</body>
</html>
<%Call CloseDB()%>
