📄 otype.asp
字号:
<! *************************************************************
程序名称:漳州网讯新闻发布管理系统
程序作者:奥易
联系方式:E-mail:aoyi2001@163.com QQ: 18031403
http://www.fcsh.net
*************************************************************** >
<!--#include file="conn.asp"-->
<%
owen1=request("owen1")
owen2=request("owen2")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title>漳州网讯--<%=owen1%></title>
</head>
<body topmargin="0"><!--#include file="top.asp"-->
<table align="center" border="0" width="782" cellspacing="0" cellpadding="0" height="208" background="images/bg.gif">
<tr>
<td valign="top" align="center">
<table width="759" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td width="170" height="300" valign="top" bgcolor="efefef"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="center" bgcolor="#0066CC"><strong><font color="#FFFFFF">新
闻 搜 索</font></strong></td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="get" action="search.asp">
<tr>
<td height="30" align="center" bgcolor="#efefef"> <input type="text" name="key" size="19" class="input">
</td>
</tr>
<tr>
<td height="30" align="center" bgcolor="#efefef"> <select name="otype" class="input">
<option value="title" selected class="input">新闻标题</option>
<option value="msg" class="input">新闻内容</option>
</select>
<input type="submit" name="Submit" value="搜索" class="input"></td>
</tr>
</form>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" align="center" bgcolor="#0066CC"><a href="otype.asp?owen1=<%=owen1%>"><strong><font color="#FFFFFF"><%=owen1%></font></strong></a></td>
</tr>
<%
set rsSmallClass=server.CreateObject("adodb.recordset")
rsSmallClass.open "Select * From SmallClass Where BigClassName='" & owen1 & "'",conn,1,1
if not(rsSmallClass.bof and rsSmallClass.eof) then
do while not rsSmallClass.eof
%>
<tr onmouseover="this.bgColor='#FFFFFF';" onmouseout="this.bgColor='#EFEFEF';" bgColor=#EFEFEF>
<td height="25" align="center"><a href="otype.asp?owen1=<%=owen1%>&owen2=<%=rsSmallClass("SmallClassName")%>"><font size="2"><b><%=rsSmallClass("SmallClassName")%></b></font></a></td>
</tr>
<%
rsSmallClass.movenext
loop
end if
rsSmallClass.close
set rsSmallClass=nothing
%>
</table></td>
<td width="600" align="center" valign="top" bgcolor="#FFFFFF">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="5"> </td>
</tr>
</table>
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<%
page=clng(request("page"))
Set rs=Server.CreateObject("ADODB.RecordSet")
if owen1<>"" and owen2 <>"" then
sql="select * from news where BigClassName='"&owen1&"' and SmallClassName='"&owen2&"' order by id desc"
rs.Open sql,conn,1,1
elseif owen1<>"" then
sql="select * from news where BigClassName='"&owen1&"' order by id desc"
rs.Open sql,conn,1,1
end if
if rs.eof and rs.bof then
response.Write("暂时没有记录")
else
%>
<tr>
<td width="6%" height="30" rowspan="2"><img src="images/sub.gif" width="31" height="30"></td>
<td width="76%" height="28"> <a href="otype.asp?owen1=<%=owen1%>"><strong><%=owen1%></strong></a></td>
<td width="18%" align="center">更多...</td>
</tr>
<tr>
<td height="2" colspan="2" bgcolor="#6699cc"> </td>
</tr>
<%
rs.PageSize=10
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
for j=1 to rs.PageSize
%>
<tr>
<td height="24" align="center" >◎</td>
<td height="24" colspan="2" style="BORDER-bottom: #999999 1px dotted"> <% if rs("imagenum")<>"0" then response.write "<img src='images/news.gif' border=0 alt='图片新闻'>" end if %>
<a href="onews.asp?id=<%= RS("id") %>" target="_blank"><%= RS("TITLE") %></a> <font color="#999999">[<%= RS("infotime") %>]
(阅读<font color="#ff0000"><%= RS("hits") %></font>次) </font></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
<tr valign="bottom">
<td height="50" colspan="3" align="center" >
<form method=Post action="otype.asp?owen1=<%= owen1 %>&owen2=<%= owen2 %>">
<%if Page<2 then
response.write "首页 上一页 "
else
response.write "<a href=otype.asp?owen1="&owen1&"&owen2="&owen2&"&page=1>首页</a> "
response.write "<a href=otype.asp?owen1="&owen1&"&owen2="&owen2&"&page=" & Page-1 & ">上一页</a> "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write "<a href=otype.asp?owen1="&owen1&"&owen2="&owen2&"&page=" & (page+1) & ">"
response.write "下一页</a> <a href=otype.asp?owen1="&owen1&"&owen2="&owen2&"&owen2="&owen2&"&page="&rs.pagecount&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
response.write " 共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
response.write " 转到:<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
response.write " <input class=input type='submit' value=' Goto ' name='cndok'></span></p>"
%>
</form> </td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -