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

📄 admin_affiche.asp

📁 ASP+Accesss数据库设备WEB报修
💻 ASP
字号:
<%if session("pass")<>"ok" then 
    Response.Redirect "index.asp"
    Response.End 
  end if
%>
<!--#include file="conn.asp"-->

<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css">
</head>
<script src="../js/js_Affiche.js"></script>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<%
sql="select afficheid,affichecontent,affichename,affichetime from affiche order by afficheid desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1

rs.pagesize=10
'实现分页
if rs.Eof then
	rs_total = 0
else
   rs_total = rs.RecordCount
end if
dim pageno
maxpage=rs.pagecount
getpageno = (Request("pageno"))
if(getpageno = "")then
	pageno = 1
else
	pageno = getpageno
End if
if(not rs.Eof)then
	rs.AbsolutePage = pageno
End if
%>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="TableBorder" align=center>
<tr align="center">
    <td height=25 colspan=2 class="TableTitle1"><strong>公 告 管 理</strong></tr>
<tr>
    <td width="100"  height=25 class="TableRow2"><strong>管理快捷方式:</strong></td>
    <td height="25" class="TableRow2" ><a href="Admin_main.asp">管理首页</a>
     | <a href="Admin_Affiche_Add.asp">添加公告</a>     </td>
</tr>
</table>
<form name="Del_Affiche" method="post">
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100% align=center class="border">
  <TBODY>
  <TR>
      <TD align=center width=100%>

  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="TableBorder">
    <tr> 
      <td width="10%" height="25" align="center" class="TableTitle1" >ID</td>
      <td width="60%" height="25" align="center" class="TableTitle1" >修改</td>
      <td width="20%" height="25" align="center" class="TableTitle1" >更新日期</td>
      <td width="10%" height="25" align="center" class="TableTitle1" >删除</td>
    </tr>
                  <%
		      If(rs.Eof)Then
		      %>
              <tr>
               <td height="120" colspan="9" align="center" class="TableRow2">没有公告记录!</td>
            </tr>
            <!--#include file="copyright.asp" -->
              <%
				Response.End()
				End If
				repeat_rows = 0
				While(repeat_rows < rs.PageSize and Not rs.Eof)
			  %>
              <%AfficheId=rs("AfficheId")%>
    <tr>
      <td width="10%" height="25" align="center" class="TableRow2" ><%=rs("afficheid")%></td>
      <td width="60%" height="25" align="center" class="TableRow2" ><a class="date" href="Admin_Affiche_Edit.asp?AfficheId=<%=rs("afficheid")%>"><b><%=rs("affichename")%></b></a></td>
      <td width="20%" height="25" align="center" class="TableRow2" ><%=rs("affichetime")%></td>
      <td width="10%" height="25" align="center" class="TableRow2" ><input name="BoxUser" type="checkbox" value="<%=rs("afficheid")%>"></td>
    </tr>
                   <%
	          repeat_rows = repeat_rows + 1
	          rs.MoveNext
	          Wend
	          %>
  </table>
  <table  width="100%"  border="0" cellspacing="0" cellpadding="0" align=center>
    <tr>
      <td height="8" colspan=5></td>
    </tr>
    <tr>
      <td><table width="98%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#799AE1" bordercolordark="#ffffff">
          <tr>
            <td><table  width="98%"  border="0" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td width="69%">[<%=pageno%>/<%=rs.pagecount%>]&nbsp;|&nbsp;[共<font color=red><%=rs_total%></font>条]&nbsp;
                      <%
						if(pageno <> 1)then
						%>
                      <a href="?condition=<%=getcondition%>&key=<%=getkey%>">第一页</a>
                      <%
						end if
						%>
                      <%
						if(pageno <> 1)then
						%>
                    &nbsp;<a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=(pageno-1)%>">上一页</a>&nbsp;
                    <%
						end if
						%>
                    <%
						'这里要判断一下pageno和rs.pagecount的值相等的情况,如果不判断,当它俩的值相等时,pageno<>cstr(rs.pagecount)还是true
						if(instr(pageno,cstr(rs.pagecount)) = 0)then
						%>
                    <a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=(pageno+1)%>">下一页</a>
                    <%
						end if
						%>
                    <%
						if(instr(pageno,cstr(rs.pagecount)) = 0)then
						%>
                    &nbsp;<a href="?condition=<%=getcondition%>&key=<%=getkey%>&pageno=<%=rs.pagecount%>">最后一页</a>
                    <%
						end if
						rs.close
						set rs = nothing
						%></td>
                  <td width="3%"></td>
                  <td width="19%" align=right nowrap>[<a style="color:red;cursor:hand;" onClick="Check1(Del_Affiche)">删除</a>]
                    <%'这里用这几个隐藏域是为了把显示这个页面所需的参数传递到删除页面,然后再由删除页面传回本页面。%>
                      <input type="hidden" name="condition2" value="<%=getcondition%>">
                      <input type="hidden" name="key" value="<%=getkey%>">
                      <input type="hidden" name="pageno" value="<%=getpageno%>"></td>
                  <td width="6%" align="right" nowrap>[全选/反选]</td>
                  <td width="3%" height="26" align=center nowrap><input type="checkbox" name="checkbox" onClick="CheckAll(this.form.BoxUser,this.form.checkbox)"></td>
                </tr>
            </table></td>
          </tr>
      </table></td>
    </tr>
  </table>
</TABLE>
</form>
<!--#include file="copyright.asp" -->
</BODY>
</HTML>

⌨️ 快捷键说明

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