⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news_index1.asp

📁 第一次开发医院管理
💻 ASP
字号:
<!--#include file="conn.asp" -->
<% 
dim times,topic,ntype
ntype = request("ntype")
sql = " select  top 6 * from news where type="&ntype&" order by datetime desc "
set rs = Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,0,1
dim rstype
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
 %>
<html>
<head>
<link href="../image/main.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <%
   do while not rs.eof
   times = cstr(year(rs("datetime"))) + "年" + cstr(month(rs("datetime"))) + "月" + cstr(day(rs("datetime"))) +  "日"
   if len(rs("topic"))>=26 then
   topic=left(rs("topic"),24)+".."
   else
   topic=rs("topic")
   end if   
   %>
  <tr> 
    <td height="25" colspan="2" valign="middle"><a href="detail.asp?id=<%= rs("id") %>&ntype=<%= rs("type") %>" target="_parent"><%= topic %></a></td>
  </tr>
  <%
  rs.movenext
  loop
  rs.close
  set rs = nothing
  closedatabase
  %>
  <tr><td><a href="more.asp?ntype=<%= ntype %>" target="_parent">更多...</a></td></tr>
</table>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -