<!--#include file="conn/conn.asp" -->
<!--#include file="conn/function.asp" -->
<%
action=request.QueryString("action")
keyword=request.Form("keyword")
%>
<!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=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>搜索页面 - <%=C_webtitle%></title>
<meta name="keywords" content="">
<style>
*{-webkit-tap-highlight-color:rgba(0, 0, 0, 0);outline:0}
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0;vertical-align:baseline}
img{border:0 none;vertical-align:top}
i,em{font-style:normal}
ol,ul{list-style:none}
input,select,button,h1,h2,h3,h4,h5,h6{font-size:100%;font-family:inherit}
table{border-collapse:collapse;border-spacing:0}
a,a:visited{text-decoration:none;color:#333}
body{margin:0 auto;min-width:320px;max-width:640px;height:100%;background:#f3f3f3;font-size:14px;font-family:Helvetica,STHeiti STXihei, Microsoft JhengHei, Microsoft YaHei, Arial;line-height:1.5;color:#666;-webkit-text-size-adjust:100% !important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
.hide,.h{display:none !important}
.show{display:block !important}

.button{
border-radius:2px; width:100%; background:#289ED7; border:0; height:38px; line-height:38px; font-size:16px; color:#FFF;
}
.button.blue{
border:1px solid #1e7db9;
box-shadow: 0 1px 2px #8fcaee inset,0 -1px 0 #497897 inset,0 -2px 3px #8fcaee inset;
background: -webkit-linear-gradient(top,#42a4e0,#2e88c0);
background: -moz-linear-gradient(top,#42a4e0,#2e88c0);
background: linear-gradient(top,#42a4e0,#2e88c0);
}
.blue:hover{
background: -webkit-linear-gradient(top,#70bfef,#4097ce);
background: -moz-linear-gradient(top,#70bfef,#4097ce);
background: linear-gradient(top,#70bfef,#4097ce);
}
.blue:active{
top:1px;
box-shadow: 0 1px 3px #114566 inset,0 3px 0 #fff;
background: -webkit-linear-gradient(top,#1a71a8,#1976b1);
background: -moz-linear-gradient(top,#1a71a8,#1976b1);
background: linear-gradient(top,#1a71a8,#1976b1);
}
</style>
</head>
<body>

<form action="wap_search.asp?action=search" method="post">
<table width="100%">
<tr><td width="80%" style="padding:5px 20px 5px 5px;">
<input type="text" name="keyword" value="<%=keyword%>" style="width:100%; height:18px; line-height:18px; padding:10px 0 10px 10px ; border-radius:2px; border:1px solid #C9C9C9; "> 
</td><td width="20%" style="padding:5px;">
<input type="submit" value="搜索" class="button blue">
</td></td></table>
</form>
               
<%
if action="search" and  keyword<>"" then

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from SL_text 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
response.Write "<div style='padding:10px;'><table width='100%'><tr><td colspan='2'><a href='index.asp?type=text&S_id="&rs("T_id")&"'><font size='+1' color='#0066ff'><u>"&replace(rs("T_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a></td></tr><tr><td width='20%' align='center' valign='middle'><img src='"&rs("T_pic")&"' width='100' style='padding:5px;border:#CCCCCC solid 1px;'></td><td width='80%'>"&replace(left(LoseHtml(rs("T_content")),20),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&request.servervariables("HTTP_HOST")&C_dir&"index.asp?type=text&S_id="&rs("T_id")&"</font><br> <font color='#777777'>位置：<a href='"&C_dir&"index.asp'>"&C_webtitle&"</a> - <a href='index.asp?type=text&S_id="&rs("T_id")&"'>"&rs("T_title")&"</a></font></td></tr></table></a></div>"
rs.movenext
		loop
	end if
rs.close
set rs=nothing


Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from SL_news,SL_nsort where (N_title like '%"&keyword&"%' or N_content like '%"&keyword&"%' ) and N_sort=S_id order by N_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
response.Write "<div style='padding:10px;'><table width='100%'><tr><td colspan='2'><a href='index.asp?type=newsinfo&S_id="&rs("N_id")&"'><font size='+1' color='#0066ff'><u>"&replace(rs("N_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a></td></tr><tr><td width='20%' align='center' valign='middle'><img src='"&rs("N_pic")&"' width='100' style='padding:5px;border:#CCCCCC solid 1px;'></td><td width='80%'>"&replace(left(LoseHtml(rs("N_content")),20),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&request.servervariables("HTTP_HOST")&C_dir&"index.asp?type=newsinfo&S_id="&rs("N_id")&"</font><br> <font color='#777777'>位置：<a href='"&C_dir&"index.asp'>"&C_webtitle&"</a> - <a href='index.asp?type=news&S_id="&rs("S_id")&"'>"&rs("S_title")&"</a> - <a href='index.asp?type=newsinfo&S_id="&rs("N_id")&"'>"&rs("N_title")&"</a></font></td></tr></table></a></div>"
rs.movenext
		loop
	end if
rs.close
set rs=nothing

Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from SL_product,SL_psort where (P_title like '%"&keyword&"%' or P_content like '%"&keyword&"%' ) and P_sort=S_id order by P_id desc"
rs.open sql,conn,1,1
if not rs.eof then
Do while Not rs.eof
response.Write "<div style='padding:10px;'><table width='100%'><tr><td colspan='2'><a href='index.asp?type=productinfo&S_id="&rs("P_id")&"'><font size='+1' color='#0066ff'><u>"&replace(rs("P_title"),keyword,"<font color='red'>"&keyword&"</font>")&"</u></font></a></td></tr><tr><td width='20%' align='center' valign='middle'><img src='"&rs("P_path")&"' width='100' style='padding:5px;border:#CCCCCC solid 1px;'></td><td width='80%'>"&replace(left(LoseHtml(rs("P_content")),20),keyword,"<font color='red'>"&keyword&"</font>")&"...<br><font color='#006600'>"&request.servervariables("HTTP_HOST")&C_dir&"index.asp?type=productinfo&S_id="&rs("P_id")&"</font><br> <font color='#777777'>位置：<a href='"&C_dir&"index.asp'>"&C_webtitle&"</a> - <a href='index.asp?type=news&S_id="&rs("S_id")&"'>"&rs("S_title")&"</a> - <a href='index.asp?type=productinfo&S_id="&rs("P_id")&"'>"&rs("P_title")&"</a></font></td></tr></table></div>"
rs.movenext
		loop
	end if
rs.close
set rs=nothing
end if
%>
   

</body>
</html>
