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

📄 news.asp

📁 狼道公司源码下载
💻 ASP
字号:
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="Check.asp" -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理页面</title>
<LINK href="style.css" type=text/css rel=stylesheet>

</head>
<body leftmargin=0 bottommargin=0 rightmargin=0 topmargin=0>
<script src="images/admin.js" type="text/javascript"></script>
<div class=menuskin id=popmenu 
      onmouseover="clearhidemenu();highlightmenu(event,'on')" 
      onmouseout="highlightmenu(event,'off');dynamichide(event)" style="Z-index:100"></div>
<div align=center>

<script language = JavaScript>
function showsetting(myform){
 for (var j=0;j<7;j++){
 var tab = eval('document.all.settable'+j);
 if(myform.AdsType.selectedIndex==j)
 tab.style.display = '';
 else
 tab.style.display = 'none';
 }
}
</script>
<!--#include file="Top.asp" -->

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
    <tr>
      <th>新闻/招聘管理</th>
    </tr>
<tr>
  <td height=23 colspan=2 align="center" class=BodyTitle style="FONT-SIZE: 9pt; FILTER: dropshadow(color=#FFFFFF,offx=1,offy=1); COLOR: #000000;">&nbsp;</td>
</tr>
</table>
<BR>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
    <tr>
      <th width="5%" noWrap>编号</th>
      <th width="15%" noWrap>类别</th>
      <th width="45%" noWrap>标题</th>
      <th width="15%" noWrap>发布日期</th>
      <th width="9%" noWrap>浏览次数</th>
      <th width="11%" noWrap>管理</th>
    </tr>
<%
Page=Request("Page")
if Page="" then Page=1
if Not isnumeric(Page) then Page=1
if CInt(Page)<1 then Page=1
Page=Abs(Cint(Page))
PCount=0
RCount=0
PSize=16

   SQLStr="select Title,Flag,FlagHot,ID,UPdateTime,Hits from News order by UpdateTime desc" 
Set rs=server.CreateObject("adodb.recordset")


rs.open SQLStr,Conn,1,1
if not rs.eof then
  rs.pagesize=Psize
  RCount=rs.recordcount
  PCount=rs.PageCount
  if Cint(Page)>CInt(PCount) then Page=PCount
  rs.absolutepage=Page
end if

i=0
do while not rs.eof  and i<CInt(PSize)
i=i+1
%>
<tr height="25">
 <td class=forumRow align=center><%=i%></td>
 <td align=center class=forumRow>[<%
 if rs("Flag")="1" then
    Response.Write("新闻")
 else
    Response.Write("<font color='red'>招聘</font>")
 end if
 %>]</td>
 <td align=left class=forumRow>
 <a href="/NewsInfo.asp?ID=<%=rs("ID")%>" target="_blank"><%=rs("Title")%></a> 
 <%
 if rs("FlagHot")="1" then
 %>
 <img src="../Images/hot.gif" width="19" height="7">
 <%end if%>
 </td>
 <td align=center class=forumRow><%=rs("UPdateTime")%></td>
 <td align=center class=forumRow><%=Rs("Hits")%>&nbsp;</td>
 <td align=center noWrap class=forumRow>
<a href="News_Mod.asp?ID=<%=rs("ID")%>&Page=<%=Page%>">修改</a>   | <A HREF="News_OK.asp?ID=<%=rs("ID")%>&act=del" onClick="Ask('<%=rs("Title")%>')">删除</A></td>
 </tr>
 
  <%
 rs.movenext
 loop
 rs.close
 set rs=nothing
 %>
 
<tr height="25">
  <td colspan="6" align=center class=forumRow><div title="<BR>">
    <table cellspacing=1 width='100%' border=0>
      <form method=Post action=News.asp>
        <tr>
          <td align=center> 共有资讯 <font COLOR=#FF0000><B><%=RCount%></B></font> &nbsp;<a href="?Page=1">首 页</a>&nbsp;<a href="?Page=<%=Page-1%>">上一页</a>&nbsp;<a href="?Page=<%=Page+1%>">下一页</a>&nbsp;<a href="?Page=<%=PCount%>">尾 页</a> &nbsp;页次:<strong><font color=red><%=Page%></font>/<%=PCount%></strong>页 &nbsp;转到:&nbsp;
              <select name="KingYang" style="font-size: 9pt" onChange="ChangePage(this.value)">
                <%
			for i=1 to PCount
			%>
                <option value="<%=i%>" <%if i=CInt(Page) then Response.Write(" selected")%>>第<%=i%>页</option>
                <%
			Next
			%>
              </select>          </td>
        </tr>
      </FORM>
    </table>
  </div></td>
  </tr>
 </table>
</div>
</body></html>

<script language="vbscript">
  sub Ask(Title)
    if not confirm("您确定要删除"&Title&"吗?") then
	   window.event.returnvalue=false
	   exit sub
	end if
  end sub
  
    sub ChangePage(page)
    window.location="?Page="&Page&""
  end sub
</script>

⌨️ 快捷键说明

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