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

📄 manage_news.asp

📁 后台管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
'合法性检查
if session("flag")=false then
response.write("<script>window.alert('登录超时,请重新登录!');window.open('index.htm','_self')</script>") 
response.end()
response.clear()
end if
if request.Cookies("username")="" then
response.write("<script>window.alert('登录超时,请重新登录!');window.open('index.htm','_self')</script>") 
response.end()
response.clear()
end if
Response.write("<script language=javascript>function selectAll(){for(var i=0;i<document.form1.news_id.length;i++){")
Response.Write("var temp=document.form1.news_id[i];  temp.checked=!temp.checked;}")
Response.Write("}</script>")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>爱斯特淋浴设备有限公司管理后台</title>
<link href="../file/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.STYLE2 {font-size: 13px}
-->
</style>
</head>
<body><form  name="form1" method="post">
  <table cellpadding="2" cellspacing="1" border="0" width="96%" class="tableBorder" align=center>
      <tr>
        <th height="25" colspan="8" >
         公司新闻管理</th>
      </tr>
	  <td width="2%" class="BodyTitle"></td> 
	<td width="10%" align="center" class="BodyTitle"><strong>新闻标题</strong></td>
	<td width="25%" align="center"  class="BodyTitle"><strong>新闻简介</strong></td>
	<td width="10%" align="center"  class="BodyTitle"><strong>新闻发布部门</strong></td>
	<td width="12%" align="center" class="BodyTitle" ><strong>新闻发布时间</strong></td>
	<td width="6%" align="center"  class="BodyTitle"><strong>删除</strong></td>
	<td width="6%" align="center" class="BodyTitle" ><strong>修改</strong></td>
	<td width="6%" align="center" class="BodyTitle" ><strong>强调</strong></td>
	
	<%
	  set rs= Server.CreateObject("ADODB.Recordset")
       sqltxt="select * from news order by news_time desc"
       rs.open sqltxt,conn,1,1
       	  %>
		  <!--#include file="../page1.asp"-->
		  <%
		  for i=1 to x
		 %>
    <tr align=center onMouseOver="this.bgColor='#FAF9E3';" onMouseOut="this.bgColor='#FFFFFF';" class="TableRow2" > 
	  <td width=2% class="TableRow2" ><input type="checkbox" name="news_id" id="news_id" value="<%=rs("id")%>"></td>    
		<td width="10%"  class="TableRow2"><a href="../../show_info.asp?news_id=<%=rs("id")%>" target="_blank"><%=rs("news_title")%></a></td>
		<td width="25%" class="TableRow2"><%=rs("news_intro")%></td>
       <td width="10%" class="TableRow2"><%=rs("news_depart")%></td>	
			 <td width="12%" class="TableRow2"><%=rs("news_time")%></td>
			 <td width="6%" class="TableRow2"><a href="#" onClick=if(window.confirm("确定要删除吗?"))window.open('save_news.asp?action=del&news_id=<%=rs("id")%>','_self')>删除</a></td>
			 <td width="6%"class="TableRow2"><a href="edit_news.asp?news_id=<%=rs("id")%>">修改</a></td>
			 <%
			 '判断是否已经强调
			 if rs("stress")=0 then
			 %>
			 <td width="6%" class="TableRow2"><a href="save_news.asp?action=stress&news_id=<%=rs("id")%>&stress_id=<%=rs("stress")%>">未强调</a></td>
			 <%
			 else
			 %>
			 <td width="5%" class="TableRow2"><a href="save_news.asp?action=stress&news_id=<%=rs("id")%>&stress_id=<%=rs("stress")%>">已强调</a></td>
			 <%
			 end if
		response.Write("</tr>")
		rs.movenext
		next
		%>
	<tr><td class="tablerow2" colspan="8"><input type="checkbox" onClick="selectAll();">选择所有的新闻  &nbsp;
       <input type="button" value="删除选中" onClick='if(window.confirm("确定删除这些新闻吗?")){document.form1.action="del_news.asp";document.form1.submit();}'>  &nbsp;&nbsp;
<input name="delall" type="button" value="删除全部" onClick='if(window.confirm("确定删除这些新闻吗?一旦删除将无法恢复!")){selectAll();document.form1.action="del_news.asp";document.form1.submit();}'></td></tr></form>
  <tr><td  colspan="8" class="tablerow2"><!--#include file="../page2.asp"--></td></tr> </table>	
        <br>

</body>
</html>

⌨️ 快捷键说明

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