📄 news_manage.asp
字号:
<%@language=vbscript codepage=936 %>
<!--#include file="../database/conn.asp"-->
<SCRIPT language=javascript>
function unselectall()
{
if(document.del.chkAll.checked){
document.del.chkAll.checked = document.del.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll")
e.checked = form.chkAll.checked;
}
}
function ConfirmDel()
{
if(confirm("确定要删除选中的新闻吗?一旦删除将不能恢复!"))
return true;
else
return false;
}
</SCRIPT>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="600" align="center" valign="top"> <br> <p align="center"><strong>新 闻 管 理</strong></p>
<form name="del" method="Post" action="../news/newsupdate.asp?method=Del" onsubmit="return ConfirmDel();">
<table width="611" border="0" cellpadding="0" cellspacing="2">
<tr bgcolor="#A4B6D7">
<td width="444" height="25"><a href="News_Manage.asp"> 新闻资讯管理</a> >>
<%
if 1=1 then
sql="select * from news "
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%></td>
<td width="161">
<%
if rs.eof and rs.bof then
response.write "共找到 0 条新闻</td></tr></table>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
response.Write "共找到 " & totalPut & " 条新闻"
%> </td>
</tr>
</table>
<table class="border" border="0" cellspacing="2" width="620" cellpadding="0" style="word-break:break-all">
<tr bgcolor="#A4B6D7" class="title">
<td width="25" height="25" align="center">选中</td>
<td width="263" align="center" bgcolor="#A4B6D7" >新闻标题</td>
<td width="32" align="center" >分类</td>
<td width="100" align="center" >时间</td>
<td width="80" align="center" >操作</td>
</tr>
<%do while not rs.eof%>
<tr class="">
<td width="25" height="22" align="center" bgcolor="#A4B6D7">
<input name='id' type='checkbox' onclick="unselectall()" id="id" value='<%=cstr(rs("id"))%>'> </td>
<td width="263" bgcolor="#ECF5FF"><a href="../Shownews.asp?id=<%=rs("id")%>" target="_blank"><%=left(rs("title"),18)%></a></td>
<td width="32" bgcolor="#ECF5FF"><div align="center"><%=rs("titletype")%></div></td>
<td width="100" align="center" bgcolor="#ECF5FF"><%=rs("riqi")%> </td>
<td width="80" align="center" bgcolor="#ECF5FF"> <a href="News_modi.asp?ID=<%=rs("id")%>">修改</a>
<a href="news_del.asp?id=<%=rs("id")%>">删除</a> </td>
</tr>
<%
rs.movenext
loop
%>
</table>
<table width="620" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
选中本页显示的所有新闻</td>
<td><input name="submit" type='submit' value='删除选定的新闻' <%if session("purview")>=3 and session("purview")<=4 and PurviewChecked=False then response.write "disabled"%>>
<input name="Action" type="hidden" id="Action" value="Del"></td>
</tr>
</table>
</form>
<br> </td>
</tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
End if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -