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

📄 delhw.asp

📁 ASP+ACCESS 产品报价系统 开发环境简单 主要是周杰伦FANs的交互活动
💻 ASP
字号:
<%
if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
<!--#include file="conn.asp"--><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=../css.css rel=STYLESHEET type=text/css>
<title>网上手机销售系统</title></head>

<%
if request("action")="del" then
    sql="select * from hw where hw_id="&request("hw_id")
    rs.open sql,conn,3,3
    if rs.eof then
        response.redirect "delhw.asp"
    else
    rs.delete
    rs.update
    end if
    rs.close
    response.write "货物删除成功"
    response.write "<br>"
    response.write "<a href=delhw.asp>返回</a>"
else
%>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="571" border="0" cellspacing="1" cellpadding="0" bgcolor="#378d02" style="border-collapse: collapse" bordercolor="#111111" >
  <tr> 
    <td> <table width="100%" border="0" cellspacing="1" cellpadding="0" height="32" align="center">
        <tr bgcolor="#99cc00"> 
          <td width="140" height="21"> <div align="center"><font color="#000000">商品名称</font></div></td>
          <td width="94" height="21"> <div align="center"><font color="#000000">作者 
              </font> </div></td>
          <td width="51" height="21"> <div align="center"><font color="#000000">会员价</font></div></td>
          <td width="106" height="21" bgcolor="#99cc00"> 
            <div align="center"><font color="#000000">ISBN号码</font></div></td>
          <td width="76" height="21" bgcolor="#99cc00"> 
            <div align="center"><font color="#000000">加入日期</font></div></td>
          <td height="21" colspan="2"> <div align="center"><font color="#000000">操作</font></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 hw order by hw_id DESC"
  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 hw_id(),hw_name(),hw_cash(),hw_pic(),hw_date(),sort_id(),isbn(),hw_sn(),Nsort_ind()
      do while not rs.eof and (i<rs.pagesize)
      i=i+1
      redim preserve hw_id(i),hw_name(i),hw_cash(i),hw_pic(i),hw_date(i),sort_id(i),isbn(i),hw_sn(i),Nsort_id(i)
      hw_id(i)=rs("hw_id")
      hw_name(i)=rs("hw_name")
      hw_cash(i)=rs("hw_cash")
      hw_pic(i)=rs("hw_pic")
      hw_date(i)=rs("hw_date")
      sort_id(i)=rs("sort_id")
      isbn(i)=rs("isbn")
      hw_sn(i)=rs("hw_sn")
Nsort_id(i)=rs("Nsort_id")
      rs.movenext
      loop
  end if
  rs.close
  %>
        <%for i = 1 to ubound(hw_id)%>
        <tr bgcolor="#FFFFFF"> 
          <td height="22" width="140"><div align="center"><%=hw_name(i)%> </div></td>
          <td height="22" width="94"> <div align="center"><%=hw_sn(i)%></div></td>
          <td height="22" width="51"> <div align="center"><%=hw_cash(i)%></div></td>
          <td height="22" width="106"> <div align="center"><%=isbn(i)%></div></td>
          <td height="22" width="76"> <div align="center"><%=hw_date(i)%></div></td>
          <td height="22" width="30"> <div align="center"> <a href="delhw.asp?hw_id=<%=hw_id(i)%>&action=del">删除</a></div></td>
          <td height="22" width="45"> <div align="center"><a href="changehw.asp?hw_id=<%=hw_id(i)%>&sort_id=<%=sort_id(i)%>&Nsort_id=<%=Nsort_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="delhw.asp?page=<%=page-1%>">上一页</a> 
        <%else%>
        <font color=666666>上一页</font> 
        <%end if%>
          
        <%if page+1<=totalpage then%>
        <a href="delhw.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 + -