📄 news.asp
字号:
<!--#include file="top.asp"--><%usertopview%>
<%if userflag4=0 then
response.redirect"ok.asp?action=flag"
end if%>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td width="600" valign=top>
<!--==============-->
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:管理中心 > 企业新闻</td></tr>
<tr>
<td>
<!--####################################-->
<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor=#6C94D1>
<tr>
<td height=25 bgcolor=#6C94D1> <font color=white>企业新闻管理</font></td>
</tr>
<tr>
<td bgcolor=#ffffff height=60>
<!--======-->
<table width="98%" border="0" cellspacing="1" cellpadding="0" align=center>
<tr><td colspan=5 height=4></td></tr>
<%sql="select * from SMT_news where SMT_yp_id="&session("id")&" order by SMT_id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td height=194 colspan=5 align=center>暂无内容</td></tr>"
else
'分页的实现
listnum=20
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum%>
<%i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<tr align=center bgcolor=#efefef>
<td width="6%" height=20>编号</td>
<td width=*>标 题 <font color=#666666>(点击编辑)</font></td>
<td width="6%">审核</td>
<td width="15%">添加时间</td>
<%if userflag46<>0 then response.write "<td width=""7%"">留言</td>"%>
<td width="6%">状态</td>
<td width="6%">删除</td>
</tr>
<%do while not rs.eof and i<listnum
n=n+1
set rsq=server.createobject("adodb.recordset")
sqlq="select * from SMT_leaveword where SMT_book_sort=7 and SMT_book_table="&rs("SMT_id")&" and SMT_book_ypid="&session("id")&""
rsq.open sqlq,conn,1,1
if not rsq.eof then
aaa="<a href=leaveword_view.asp?sortid=7&tableid="&rs("SMT_id")&" class=red>查看</a>"
else
aaa="--"
end if
rsq.close
set rsq=nothing%>
<tr align=center bgcolor=#fafafa>
<td height=20 bgcolor=#efefef><%=n%></td>
<td align=left> <a href=news_edit.asp?page=<%=request("page")%>&id=<%=rs("SMT_id")%>><%=rs("SMT_title")%></a></td>
<td bgcolor=#efefef><%if rs("SMT_key1")=1 then%>已审<%else%><font color=red>未审</font><%end if%></td>
<td bgcolor=#efefef><%=year(rs("SMT_date"))&"-"&month(rs("SMT_date"))&"-"&day(rs("SMT_date"))%></td>
<%if userflag46<>0 then response.write "<td bgcolor=#efefef>"&aaa&"</td>"%>
<td><%if rs("SMT_key")=1 then%><a href=news_add_save.asp?id=<%=rs("SMT_id")%>&zt=0&page=<%=request("page")%>&action=key>开</a><%else%><a href=news_add_save.asp?id=<%=rs("SMT_id")%>&zt=1&page=<%=request("page")%>&action=key><font color=red>关</font></a><%end if%></td>
<td bgcolor=#efefef><a href="news_add_save.asp?page=<%=request("page")%>&id=<%=rs("SMT_id")%>&action=del">删除</a></td>
</tr>
<%rs.movenext
i=i+1
j=j-1
loop%>
<tr>
<%filename="news.asp"%>
<td colspan=7 align=right bgcolor=#efefef height=20>共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href=<%=filename%>>|<<</a>
<a href=<%=filename%>?page=<%=page-1%>><<</a>
<a href=<%=filename%>?page=<%=page-1%>>[<%=page-1%>]</a> <%end if%>
<% if Rs.pagecount=1 then %>
<%else%>[<%=page%>]
<%end if%>
<% if Rs.pagecount-page <> 0 then %>
<a href=<%=filename%>?page=<%=page+1%>>[<%=page+1%>]</a>
<a href=<%=filename%>?page=<%=page+1%>>>></a>
<a href=<%=filename%>?page=<%=Rs.pagecount%>>>>|</a>
<%end if%> </td>
<%end if%></tr>
<tr><td colspan=5 height=4></td></tr>
</table>
<!--======-->
</td>
</tr>
</table>
<!--####################################-->
</td>
</tr>
<tr><td height=25></td></tr>
</table>
<!--==============-->
</td>
</tr>
</table>
<!--====== bottom ========-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor=#ffffff>
<tr><td height=2 bgcolor=#6C94D1></td></tr>
<tr>
<td align="center" height=80><%=citybottom%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -