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

📄 edit.asp

📁 亿众购物系统 一套设计完善、高效的web商城解决方案
💻 ASP
字号:
<!--#include file="../Session.asp"-->
<html>
<head> 
<title>新闻管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/site.css" rel="stylesheet" type="text/css">
<body>
<table width="100%" align="center">
   <tr valign="middle"> 
    <td height="40" colspan="5" align="center" class="tdstyle"><a href="../Sorry.asp"><font color="#000000" size="2"><strong>添加新闻</strong></font></a>&nbsp; 
      |&nbsp; <a href="Edit.asp"><font color="#000000" size="2"><strong>管理新闻</strong></font></a></td>
   </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
  <form name="del" method="post" action="Del.asp">
    <tr> 
      <td height="40" colspan="6" align="center" valign="middle" class="tdstyle"><strong><font color="#000000" size="3">新闻列表</font></strong></td>
    </tr>
	<%
		sql="Select * From News Order By id DESC"
		set rs=server.createobject("adodb.recordset")
		rs.open sql,conn,3,1
		if rs.eof then
			response.write " <tr valign=middle><td height=30 colspan=6 align=center class=tdstyle>暂无记录</td></tr>"
			response.end
		else
			rs.pagesize = 15
			if request("page")="" or IsNumeric(request("page"))=False then
				page = 1
			else
				page=int(request("page"))
			end if
			if page>rs.pagecount then
				page=rs.pagecount
			end if
			if not rs.BOF then
				Rs.Move Rs.PageSize*(page-1)
			end if
		i=1
		%>
    <tr> 
      <td width="8%" height="30" align="center" valign="middle" class="tdstyle"><strong>ID</strong></td>
      <td width="47%" align="center" valign="middle" class="tdstyle"><strong>新闻标题</strong></td>
      <td width="21%" align="center" valign="middle" class="tdstyle"><strong>添加时间</strong></td>
      <td width="8%" align="center" valign="middle" class="tdstyle"><strong>阅读人次</strong></td>
	  <td width="8%" align="center" valign="middle" class="tdstyle"><strong>修 改</strong></td>
      <td width="8%" align="center" valign="middle" class="tdstyle"><strong>删 除</strong></td>
    </tr>
    <%do while not rs.eof and i<=rs.pagesize%>
    <tr> 
      <td align="center" valign="middle" class="tdstyle"><%=i%></td>
      <td valign="middle" class="tdstyle"><a href="View.asp?id=<%=rs("id")%>" OnClick='return openAdminWindow(this.href);'><%=rs("Topic")%></a> <script language=""javascript"">function openAdminWindow(url) {	popupWin = window.open(url,'new_page','scrollbars=yes,width=350,height=430');	return false;}</script></td>
      <td align="center" valign="middle" class="tdstyle"><%=rs("date")%></td>
      <td align="center" valign="middle" class="tdstyle"><%=rs("stat")%></td>
	  <td align="center" valign="middle" class="tdstyle"><input name="Submit2" type="button" class="button2" value="修 改" onclick="window.location='../Sorry.asp'"> </td>
      <td align="center" valign="middle" class="tdstyle"> <input type="checkbox" name="sel<%=i%>"> <input type=hidden name=id<%=i%> value=<%=rs("id")%>></td>
    </tr>
  <%i=i+1
  	rs.MoveNext
	loop %>
    <tr> 
      <td height="30" colspan="6" align="right" class="tdstyle"> 
        <input type=hidden name=coun value=<%=i%>> 
        <input type="submit" class="button" value="删 除"> <input type="reset" class="button" value="重 选"> 
      </td>
    </tr>
   </form>
  <tr> 
    <form name="form" method=post action="">
      <td height="25" colspan="10" align="center" valign="middle" class="tdstyle"> 
        <%if rs.recordcount<>0 then
			if page-1 mod 10=0 then
				p=(page-1) \ 10
			else
				p=(page-1) \ 10
			end if
			response.write "页次:"& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" 分页:"
			if rs.pagecount>1 and page<>1 then response.write "<a href=?page=1 title='首页'>[|<]</a> "
				if p*10>0 then response.write "<a href='?page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
					uming_i=1
					for ii=p*10+1 to P*10+10
						if ii=page then
							response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
						else
							response.write "<a href='?page="&ii&"'>["+Cstr(ii)+"]</a>   "
						end if
				if ii=rs.pagecount then exit for
					uming_i=uming_i+1
				next
				if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
				if rs.pagecount>1 and page<>rs.pagecount then response.write "<a href=?page="& rs.pagecount &" title='尾页'>[>|]</a>"
						response.write("  跳页:<input type=text name=page size=2 maxlength=3 class=input1> <input type=submit name=Submit value=Go class=button>")
			end if
	end if%>
	</td>
    </form>
  </tr>
</table>
</body>
</html>
<%'end if
rs.close
set rs=nothing%>

⌨️ 快捷键说明

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