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

📄 editshop.asp

📁 ASP+ACCESS 产品报价系统 开发环境简单 主要是周杰伦FANs的交互活动
💻 ASP
字号:



<!--#include file="conn.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=../css.css rel=STYLESHEET type=text/css>
</head>

<%
set rs=server.createobject("adodb.recordset")
if request("action")="del" then
    sql="select * from admin where admin_id="&request("admin_id")
    rs.open sql,conn,3,3
    if rs.eof then
        response.redirect "editshop.asp"
    else
    rs.delete
    rs.update
    end if
    rs.close
    response.write "删除商店及用户成功"
    response.write "<br>"
    response.write "<a href=editshop.asp>返回</a>"
else
%>

<table width="550" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="6894d8">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="1" cellpadding="0" height="32" align="center">
        <tr> 
          <td bgcolor="#0099CC" height="21" width="140"> 
            <div align="center"><font color="#FFFFFF">编号</font></div>
            </td>
          <td bgcolor="#0099CC" height="21" width="94"> 
            <div align="center"><font color="#FFFFFF">登陆名</font></div>
          </td>
          <td bgcolor="#0099CC" height="21" width="51"> 
            <div align="center"><font color="#FFFFFF">密码</font></div>
          </td>
          <td bgcolor="#0099CC" height="21" width="78"> 
            <div align="center"><font color="#FFFFFF">级别</font></div>
          </td>
          <td bgcolor="#0099CC" height="21" width="104"> 
            <div align="center"></div>
          </td>
          <td bgcolor="#0099CC" height="21" colspan="2"> 
            <div align="center">操作</div>
          </td>
        </tr>
        <%
  page=request.querystring("page")
  if page="" then page=1
  if not(isnumeric(page)) then page=1
  if page<1 then page=1
  page=int(page)
  
  sql="select * from admin"
  rs.open sql,conn,3,3
  if rs.eof then
      response.write "肯定出错了!"
      response.end
  else
      rs.pagesize=100
      totalrec=rs.recordcount
      totalpage=rs.pagecount
      if page>totalpage then page=totalpage
      rs.absolutepage=page
      'rs.absolutepage=page
      i=0
      dim admin_id,admin_name,admin_pass,admin_type
      do while not rs.eof and (i<rs.pagesize)
      i=i+1
      redim preserve 
admin_id(i),admin_name(i),admin_pass(i),admin_type(i)
    admin_id(i)=rs("admin_id")
admin_name(i)=rs("admin_name")
admin_pass(i)=rs("admin_pass")
admin_type(i)=rs("admin_type")

      rs.movenext
      loop
  end if
  rs.close
  %>
        <%for i = 1 to ubound(hw_id)%>
        <tr bgcolor="#FFFFFF"> 
          <td height="22" width="140"><%=admin_id(i)%> </td>
          <td height="22" width="94"> 
            <div align="center"><%=admin_name(i)%></div>
          </td>
          <td height="22" width="51"> 
            <div align="center"><%=admin_pass(i)%></div>
          </td>
          <td height="22" width="78"> 
            <div align="center"><%=admin_type(i)%></div>
          </td>
          <td height="22" width="104"> 
            <div align="center"></div>
          </td>
          <td height="22" width="30"> 
            <div align="center"> <a href="delshop.asp?admin_id=<%=admin_id(i)%>&action=del">删除</a></div>
          </td>
          <td height="22" width="45"> 
            <div align="center"><a href="changehop.asp?admin_id=<%=admin_id(i)%>">修改</a> 

            </div>
          </td>
        </tr>
        <%next%>
      </table>
    </td>
  </tr>
</table>
<table border="0" width="500" cellspacing="0" height="10" align="center">
  <tr> 
    <td> 
      <p align="left">共<font color=red><%=totalpage%></font>页 第<%=page%>页 <font color=666666> 
        <%if page-1>0 then%>
        <a href="editshop.asp?page=<%=page-1%>">上一页</a> 
        <%else%>
        <font color=666666>上一页</font> 
        <%end if%>
          
        <%if page+1<=totalpage then%>
        <a href="editshop.asp?page=<%=page+1%>">下一页</a> 
        <%else%>
        <font color=666666>下一页</font> 
        <%end if%>
        </font></p>
    </td>
  </tr>
  <tr> 
    <td></td>
  </tr>
</table>
<%end if
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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