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

📄 manage_news.asp

📁 漂亮的欧美旅游模板
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_libs/my_request.asp"-->
<!--#include file="../my_libs/my_lib.asp"-->
<!--#include file="../my_libs/pages.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<link rel="stylesheet" type="text/css" href="style_admin.css" />
</head>

<body>

<br>
<b>新闻管理<font face="宋体" color="#FF6600">↓</font></b><br>

<table border="1" width="100%" id="table1">
	<tr>
		<td width="4%" class="top_td" align="center">id</td>
		<td width="55%" class="top_td" align="center">标题</td>
		<td width="20%" class="top_td" align="center">发布时间</td>
		<td width="18%" colspan="4" class="top_td" align="center">操作</td>
	</tr>
		<%
	dim sql,rs,arrlist(4),i,ii
	sql="select nid,zm_newstitle,zm_newsistop,zm_newsisok,zm_newsaddtime from ssort_news order by zm_newsaddtime desc"
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	if (rs.eof and rs.bof) then
	response.write "<tr>"
    response.write "<td class=12px width=760 colspan=6><font color=#FF0000>暂时还没有任何数据</font></td>"
    response.write "</tr>"
    else
    rs.PageSize =20 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if

end if
						  ii=1
						  while not rs.eof and ii<=rs.pagesize
for i=0 to 4
arrlist(i)=rs(i)
next

%>
	<tr>
		<td width="4%" align="center"><%=(page-1)*19+ii%></td>
		<td width="55%" align="center"><%=arrlist(1)%></td>
		<td width="20%" align="center"><%=arrlist(4)%></td>
		<td width="4%" align="center">
		<%if arrlist(2)=1 then%>
		<input type="submit" value="置顶" name="B1" onclick="window.location='change_news.asp?flag=0,1,<%=arrlist(0)%>'" onFocus="this.blur()">
		<%else%>
		<input type="submit" value="正常" name="B1" onclick="window.location='change_news.asp?flag=1,1,<%=arrlist(0)%>'" onFocus="this.blur()">
		<%end if%>
		</td>
		<td width="4%" align="center">
		<%if arrlist(3)=1 then%>
		<input type="submit" value="暂存" name="B2" onclick="window.location='change_news.asp?flag=0,0,<%=arrlist(0)%>'" onFocus="this.blur()">
		<%else%>
		<input type="submit" value="发布" name="B2" onclick="window.location='change_news.asp?flag=1,0,<%=arrlist(0)%>'" onFocus="this.blur()">
		<%end if%></td>
		<td width="4%" align="center"><input type="submit" value="修改" name="B3" onclick="window.location='modi_news.asp?id=<%=arrlist(0)%>'"></td>
		<td width="4%" align="center"><input type="submit" value="删除" name="B4" onclick="window.location='del_news.asp?id=<%=arrlist(0)%>'"></td>
	</tr>
<%
rs.movenext
ii=ii+1
wend
call PageControl(iCount,maxpage,page,"border=0 width=100% align=center class=left_td ","<p align=right>")
rs.close
set rs=nothing
%>
</table>

</body>

</html>

⌨️ 快捷键说明

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