📄 news_admin.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title>后台管理</title>
<script language="javascript">
function check(zt,nr)
{
if(zt==""||nr=="")
{alert("新闻不能为空!");
return false;}
}
</script>
<link rel="stylesheet" href="style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<%if session("newsyhm")="" then%>
<script language="javascript">
alert("还没有登陆!");
window.location="cm86login.asp";
</script>
<%end if
xw=request.form("xw")
cz = request.querystring("cz")
zt = request.form("zt")
lx = request.form("lx")
id = request.querystring("id")
if zt<>"" and xw<>"" and cz="tj" then
zt = xrzh(zt)
xw = xrzh(xw)
exec="insert into NEWS (zt,lx,nr,sj,sp) values ('"+zt+"','"+lx+"','"+xw+"','"+cstr(date())+"','0')"
conn.execute exec
conn.close
response.redirect "news_admin.asp"
end if
response.write exec
if id<>"" and cz="sc" then
exec="delete from news where id="+id
conn.execute exec
conn.close
response.redirect "news_admin.asp"
end if
if id<>"" and cz="sp" then
exec="update news set sp='1' where id="+id
conn.execute exec
conn.close
response.redirect "news_admin.asp"
end if%>
<body>
<div align="center">
<table width="778" border="1" cellspacing="0" cellpadding="0" bgcolor="#7894AF" align="center">
<tr bgcolor="#eeeeee">
<td height="25">
<table width="778"><tr><td><%=why%> 欢迎来到 <%=bb%>!<%
RESPONSE.Write "CM提醒你---你来访的时间是: " & YEAR(date()) & "年" & MONTH(date()) & "月" & DAY(date()) & "日"
%></td>
<td width="10%"><a href="admin.asp" target="_parent">返回</a></td>
<td width="10%"><a href="news_sz.asp">修改信息</a></td>
<td width="10%"><a href="news_type.asp">类别设置</a></td></tr></table>
</td>
</tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="1" align="center">
<%exec="select * from news order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
page =int(Request.QueryString("page"))
rs.PageSize =30
If page < 1 Then page = 1
If page > rs.PageCount Then page = rs.PageCount
if not rs.eof then rs.AbsolutePage =page
for i=1 to rs.pagesize
if rs.eof then exit for
zt=xszh(rs("zt"))
if len(zt)>80 then zt=left(zt,80)+".."%>
<tr height="25"><td align="center" width="3%"><%=i%></td>
<td align="center" width="20%"><%=rs("lx")%></td>
<td><a href="news_admin.asp?id=<%=rs("id")%>" title="<%=rs("sj")%>"><%=zt%></a>
<%if rs("sp")="0" then%>
<a href="news_admin.asp?id=<%=rs("id")%>&cz=sp" onClick="javascript:return confirm('是否审批!');"><font color="#FF0000">审批</font></a>
|
<%end if%>
<a href="news_admin.asp?id=<%=rs("id")%>&cz=sc" onClick="javascript:return confirm('是否删除?');"><font color="#FF0000">删除</font></a>
</td></tr>
<%rs.movenext
next%>
<tr height="25"><td colspan="3" align="center">
第<%for i=1 to rs.PageCount%>
<a href="bbs.asp?lx=<%=lx%>&page=<%=i%>">
<%if i=page then
response.write "<font color=#ff0000>" + cstr(i) + "</font>"
else
response.write "[<font color=#ff0000>"+cstr(i)+"</font>]"
end if%></a>
<%next%>
页</font>
</td></tr>
<tr><td colspan="3">
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center">Copyright 2006-2008 http://cm86.vicp.net All Rights Reserved </p>
<p align="center"><font color="#E3E9F1" size="6" face="华文行楷">CM 新 闻 发 布 系 统 V 1。0</font> </p>
<p> </p>
</div>
</body>
</htm>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -