📄 newsshow.asp
字号:
<!--#INCLUDE FILE="../database/conn.asp"-->
<!--#INCLUDE FILE="../student/select.asp"--> <% '在本文的98 行全选 作用%>
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
.normal { font-family: "宋体"; font-style: normal; font-weight: normal; font-variant: normal; text-decoration: none; font-size: 11pt}
a:link { color: #000000; text-decoration: none}
a:visited { color: #000000; text-decoration: none}
a:hover { color: #FF0000; text-decoration: underline}
.smallfont { font-family: "宋体"; font-style: normal; font-weight: normal; font-variant: normal; text-decoration: none; font-size: 10pt}
.style1 {color: #FFFFFF}
-->
</style>
</head>
<body>
<%
id="'%"& trim(Request.Form("id"))&"%'"
zuozhe="'%"& trim(Request.Form("zuozhe"))&"%'"
xibie = "'%"&trim(Request.Form("xibie"))&"'"
title="'%"&trim(Request.Form("title"))&"'"
riqi="'%"& trim(Request.Form("riqi"))&"'"
leibie="'%"& trim(Request.Form("leibie"))&"'"
content="'%"& trim(Request.Form("content"))&"'"
SQL="select * from news "
if id<> "'%'" OR zuozhe<> "'%'" then
SQL=SQL +" where "
if title<>"'%'" then SQL=SQL&" title like "&title&" and "
if zuozhe<>"'%'" then SQL=SQL&" zuozhe like "&zuozhe&" and "
SQL=left(SQL,len(SQL)-4) '函数去掉最后的 and
Set Rs = Server.CreateObject("ADODB.RECORDSET")
Rs.Open Sql,Conn,1,3 '获取的记录集
'公共翻页模块开始%>
<!--#include file=../Pub/TurnPage.asp-->
<%
Dim RowCount,lRowCount
RowCount = 3 '每页显示的记录条数
lRowCount=0
Call TurnPage(Rs,RowCount) '输入参数 rs 与RowCount 即记录集与每页记录数
'公共翻页模块结束%>
<form name=del method=post >
<table width=600 bgcolor=#999999 border=0 cellpadding=1 cellspacing=1 >
<tr>
<td align=center width=25>选中</td>
<td align=center width=270>标题</td>
<td align=center width=45>姓名</td>
<td align=center width=160>时间</td>
</tr>
<tr>
<td colspan="4"width=* > </td></tr>
<%
if not Rs.eof then
Do while Not Rs.EOF and RowCount>0
lRowCount=lRowCount+1
yushu=lRowCount mod 2
if yushu then
response.write "<tr bgcolor='#99CC99'>"
else
response.write "<tr bgcolor='#CCFFCC'>"
end if %>
<td align=center width=25 bgcolor=#FFFFFF>
<INPUT type="checkbox" name=mid value='<%=trim(Rs.fields("id"))%>'></td>
<td align=left width=270 bgcolor=#cccccc>
<a href="javascript:Edit('<%=trim(Rs.fields("id"))%>','newsxiugai.asp')"><%=Rs.fields("title")%></a></td>
<td align=right width=45 bgcolor=#FFFFFF><%=Rs.fields("zuozhe")%></td>
<td align=right width=160 bgcolor=#FFFFFF><%=Rs.fields("riqi")&""%></td>
</tr>
<%
RowCount = RowCount - 1
Rs.MoveNext
Loop%>
<TR>
<TD align="center" colspan=4>共有 <FONT COLOR="#0000FF"><%=Rs.recordcount%></FONT> 条纪录</TD>
</TR>
<TR>
<TD height=1></TD>
<TD bgcolor=000000></TD>
</TR></TABLE>
<TABLE WIDTH=600 BORDER=0 CELLSPACING=2 CELLPADDING=0>
<TR><input type=hidden name=student_no>
<TD width=40 height=20 bgcolor=dcdcdc align=center>编辑</TD>
<TD width=570>
<input type="checkbox" name=all value=1 onclick=selectall(<%=lRowCount%>)>选中|<A HREF="javascript:Delete('../login/userupdate.asp')" >删除</A></TD>
</TR>
<%else%>
<tr>
<td></td>
<td></td>
<td></td>
<td colspan=4 align=right>查找结果为 0</td></tr>
<% end if
%>
<% end if
%>
<%
On Error Resume Next
Conn.Close
Set Conn = Nothing
%>
</table>
</form></center>
<body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -