<!--#include file="../conn/conn2.asp" -->
<!--#include file="../conn/function.asp" -->
<%
D_domain=split(split("http://"&Request.ServerVariables("HTTP_HOST")&Request.ServerVariables("URL"),"http://")(1),"/zj")(0)
%>
<!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>搜索</title>
<style type="text/css">
			html {
				overflow:auto;
			}
			body { 
				font-size:12px;
				line-height:180%;
				font-family:"微软雅黑";
				background-color: transparent; 
				
			}
			a{ font-size:12px; color:#777777; text-decoration:none;}
			a:hover {color:#0066ff;text-decoration: underline}
</style>
</head>
<body>
<%
if GetBody(D_domain)="" then
%>
<embed src="W_yz.swf?domain=<%=D_domain%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="0" height="0"></embed>
<script> 
function sendToJavaScript(value){
if(value=="1"){
}else{
document.getElementById("old").innerHTML="<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red'>搜索功能未授权！</font></div>"
}
}
</script>
<div id="old"></div>
<%
else 
if split(GetBody(D_domain),"|")(4)="1" then
%>
<%else%>
<div align='center' style='margin:10px 10px 10px 10px;padding:5px 5px 5px 5px;border:1px solid #ff0000'><font color='red'>搜索功能未授权！</font></div>
<%
end if
end if
%>
<form action="search.asp?action=search" method="post">
<input type="text" name="keyword" style="height:20px;width:650px;background-color:#ffffff; padding-top:3px;"> <input type="submit" value="搜索" style="width:80px;height:30px; border:hidden; font-family:'微软雅黑'; font-size:15px;">
</form>
<%
action=request.QueryString("action")
if action="search" then
keyword=request.Form("keyword")
response.Write("搜索关键词“"&keyword&"”的结果：<br><br>")
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select S_id,S_title,S_content from slide where (S_title like '%"&keyword&"%' or S_content like '%"&keyword&"%' ) order by S_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select U_title from menu1 where U_type='slideshow'"
rs1.open sql1,conn,1,1
U_title=rs1("U_title")
rs1.close
set rs1=nothing
response.Write "<a href='../html/slideshowinfo.asp?id="&rs("S_id")&"&from=so'><font size='+1' color='#0066ff'><u>"&replace(rs("S_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a><br>"&replace(rs("S_content"),keyword,"<font color='red'>"&keyword&"</font>")&"<br><font color='#006600'>"&D_domain&"/html/slideshowinfo.asp?S_id="&rs("S_id")&"</font><br> <font color='#777777'>位置：<a href='../html/index.asp?from=so'>"&C_title&"</a> - <a href='../html/slideshow.asp?from=so'>"&U_title&"</a> - <a href='../html/slideshowinfo.asp?id="&rs("S_id")&"&from=so'>"&rs("S_title")&"</a></font><br><br>"
rs.movenext
		loop
		S_no=1
		else S_no=0
	end if
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select T_id,T_title,T_content from text1 where (T_title like '%"&keyword&"%' or T_content like '%"&keyword&"%' ) order by T_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select U_title from menu1 where U_type='text' and U_typeid="&rs("T_id")
rs1.open sql1,conn,1,1
U_title=rs1("U_title")
rs1.close
set rs1=nothing
response.Write "<a href='../html/text.asp?id="&rs("T_id")&"&from=so'><font size='+1' color='#0066ff'><u>"&replace(rs("T_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a><br>"&replace(left(LoseHtml(rs("T_content")),100),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&D_domain&"/html/textinfo.asp?T_id="&rs("T_id")&"</font><br> <font color='#777777'>位置：<a href='../html/index.asp?from=so'>"&C_title&"</a> - <a href='../html/text.asp?id="&rs("T_id")&"&from=so'>"&rs("T_title")&"</a></font><br><br>"
rs.movenext
		loop
		T_no=1
		else T_no=0
	end if
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select N_id,N_sort,N_title,N_content from news where (N_title like '%"&keyword&"%' or N_content like '%"&keyword&"%' ) order by N_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select U_title from menu1 where U_type='news' and U_typeid="&rs("N_sort")
rs1.open sql1,conn,1,1
U_title=rs1("U_title")
rs1.close
set rs1=nothing
response.Write "<a href='../html/newsinfo.asp?id="&rs("N_id")&"&from=so'><font size='+1' color='#0066ff'><u>"&replace(rs("N_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a><br>"&replace(left(LoseHtml(rs("N_content")),100),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&D_domain&"/html/newsinfo.asp?N_id="&rs("N_id")&"</font><br> <font color='#777777'>位置：<a href='../html/index.asp?from=so'>"&C_title&"</a> - <a href='../html/news.asp?id="&rs("N_sort")&"&from=so'>"&U_title&"</a> - <a href='../html/newsinfo.asp?id="&rs("N_id")&"&from=so'>"&rs("N_title")&"</a></font><br><br>"
rs.movenext
		loop
		N_no=1
		else N_no=0
	end if
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select P_id,P_sort,P_title,P_content from photo where (P_title like '%"&keyword&"%' or P_content like '%"&keyword&"%' ) order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select U_title from menu1 where U_type='photo' and U_typeid="&rs("P_sort")
rs1.open sql1,conn,1,1
U_title=rs1("U_title")
rs1.close
set rs1=nothing
response.Write "<a href='../html/photoinfo.asp?id="&rs("P_id")&"&from=so'><font size='+1' color='#0066ff'><u>"&replace(rs("P_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a><br>"&replace(left(LoseHtml(rs("P_content")),100),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&D_domain&"/html/photoinfo.asp?P_id="&rs("P_id")&"</font><br> <font color='#777777'>位置：<a href='../html/index.asp?from=so'>"&C_title&"</a> - <a href='../html/photo.asp?id="&rs("P_sort")&"&from=so'>"&U_title&"</a> - <a href='../html/photoinfo.asp?id="&rs("P_id")&"&from=so'>"&rs("P_title")&"</a></font><br><br>"
rs.movenext
		loop
		P_no=1
		else P_no=0
	end if
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select V_id,V_sort,V_title,V_content from video where (V_title like '%"&keyword&"%' or V_content like '%"&keyword&"%' ) order by V_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
Set rs1= Server.CreateObject("ADODB.RecordSet")
sql1="select U_title from menu1 where U_type='video' and U_typeid="&rs("V_sort")
rs1.open sql1,conn,1,1
U_title=rs1("U_title")
rs1.close
set rs1=nothing
response.Write "<a href='../html/videoinfo.asp?id="&rs("V_id")&"&from=so'><font size='+1' color='#0066ff'><u>"&replace(rs("V_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a><br>"&replace(left(LoseHtml(rs("V_content")),100),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&D_domain&"/html/videoinfo.asp?V_id="&rs("V_id")&"</font><br> <font color='#777777'>位置：<a href='../html/index.asp?from=so'>"&C_title&"</a> - <a href='../html/video.asp?id="&rs("V_sort")&"&from=so'>"&U_title&"</a> - <a href='../html/videoinfo.asp?id="&rs("V_id")&"&from=so'>"&rs("V_title")&"</a></font><br><br>"
rs.movenext
		loop
		V_no=1
		else V_no=0
	end if
rs.close
set rs=nothing
if S_no+T_no+N_no+P_no+V_no=0 then
response.Write("抱歉！未找到您要搜索的内容！")
end if
else
response.Write("请输入要搜索的关键词...")
end if

%>
</body>
</html>