📄 query.asp
字号:
<!--#include file="conn.asp"-->
<%
dim rstype,howmany
dim newstype
function gettype()
set rstype = conn.execute("select * from type where id="&rs("type")&"")
newstype = rstype("type")
rstype.close
set rstype = nothing
Response.Write(newstype)
end function
dim keyword
keyword = Trim(Request.Form("keyword"))
%>
<html>
<head>
<title>:::宜兴市人民医院:::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../image/main.css" type="text/css">
</head>
<body text="#000000" leftmargin="0" topmargin="0" background="bg.gif">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="770">
<!-- fwtable fwsrc="未命名-1.png" fwbase="head.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="image/spacer.gif" width="770" height="1" border="0" alt=""></td>
<td><img src="image/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="770" height="148">
<param name=movie value="../image/head-5.swf">
<param name=quality value=high>
<embed src="../image/head-5.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="770" height="148">
</embed>
</object></td>
<td><img src="image/spacer.gif" width="1" height="99" border="0" alt=""></td>
</tr>
<tr>
<td><img src="image/spacer.gif" width="1" height="49" border="0" alt=""></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0" height="184" bgcolor="#cccccc">
<tr>
<td width="152" valign="top" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<!-- fwtable fwsrc="keshi.png" fwbase="keshi.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td width="99%"><img src="../image/spacer.gif" width="159" height="1" border="0" alt=""></td>
<td width="1%"><img src="../image/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td width="99%"><img name="keshi_r1_c1" src="../image/keshi_r1_c1.jpg" width="159" height="30" border="0" alt=""></td>
<td width="1%"><img src="../image/spacer.gif" width="1" height="30" border="0" alt=""></td>
</tr>
<tr>
<td background="../image/keshi_bg.jpg" align="center" width="99%" height="434">
<iframe width="90%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" align="top" height="95%" src="depart_index.asp"></iframe>
</td>
<td width="1%" height="434"><img src="../image/spacer.gif" width="1" height="406" border="0" alt=""></td>
</tr>
<tr>
<td width="99%"><img name="keshi_r3_c1" src="../image/keshi_r3_c1.jpg" width="159" height="21" border="0" alt=""></td>
<td width="1%"><img src="../image/spacer.gif" width="1" height="21" border="0" alt=""></td>
</tr>
</table>
</td>
<td width="618" align="center" valign="top"> <br>
<%
sql = "select * from [news] where topic like '%"&keyword&"%' or content like '%"&keyword&"%' "
set rs = Server.CreateObject("adodb.recordset")
rs.open sql,conn,0,1
%>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<% if rs.eof and rs.bof then %>
<tr>
<td height="25" colspan="2" valign="middle">没有找到任何相关纪录</td>
</tr>
<%else
howmany=rs.RecordCount
DIM TIMES,topic
do while not rs.eof
times = cstr(year(rs("datetime"))) + "<font color=red>年</font>" + cstr(month(rs("datetime"))) + "<font color=blue>月</font>" + cstr(day(rs("datetime"))) + "<font color=green>日</font>"
if len(rs("topic"))>=20 then
topic=left(rs("topic"),18)+".."
else
topic=rs("topic")
end if
%>
<tr>
<td height="25" colspan="2" valign="middle"><img src="bullet.gif" align="absmiddle">[<a href="more.asp?ntype=<%= rs("type") %>"><%= gettype() %></a>]<a href="detail.asp?id=<%= rs("id") %>" target="_blank"><%= topic %></a>[<%= times %>]</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs = nothing
end if%>
</table>
<%
sql = "select * from [doctor] where name like '%"&keyword&"%' or comment like '%"&keyword&"%' or depart like '%"&keyword&"%' "
set rs = Server.CreateObject("adodb.recordset")
rs.open sql,conn,0,1
%>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<% if rs.eof and rs.bof then %>
<tr>
<td height="25" colspan="2" valign="middle">没有找到任何相关纪录</td>
</tr>
<%else
howmany=howmany+rs.RecordCount
do while not rs.eof
%>
<tr>
<td height="25" colspan="2" valign="middle"><img src="bullet.gif" align="absmiddle"><a href="detaild.asp?id=<%= rs("id") %>" target="_blank"><%= rs("name") %></a>[<%= rs("depart") %>]</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs = nothing
end if
%>
</table>
<table width="95%" border="0">
<tr>
<td>
共找到<%= howmany %>条相关纪录
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0" height="69">
<tr>
<td background="../image/bottom_bg.gif"> </td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -