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

📄 delhw.asp

📁 一套完整的毕业论文。物资管理信息系统。 请大家指点
💻 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=../style.css rel=STYLESHEET type=text/css>
</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
%>






<table border="0" width="100%" cellspacing="1" height="10">
  
  
  <%
  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=10
      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()
      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)
      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")
      rs.movenext
      loop
  end if
  rs.close
  %>
  <%for i = 1 to ubound(hw_id)%>

  <tr>
    <td width="100%"><img border="0" src="<%=hw_pic(i)%>" width="100" height="100">
      <br>商品编号:<%=hw_id(i)%><br>商品名称:<%=hw_name(i)%><br>商品价格:<%=hw_cash(i)%><br>加入日期:<%=hw_date(i)%><br><a href="delhw.asp?hw_id=<%=hw_id(i)%>&action=del">删除此商品</a></td>
  </tr>
  <tr>
    <td width="100%"></td>
  </tr>
  <%next%>
                  <tr>         
                    <td width=478>        
                      <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 width="100%"></td>
  </tr>

</table>
<%end if
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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