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

📄 manage_dish.asp

📁 又一套宾馆全站源码
💻 ASP
字号:
<%
	if Session("user_id")="" then
    	response.write "请您先<a href=entry.asp>登录</a>!"
		response.end
  	end if
  	
    set rs = server.Createobject("ADODB.recordset")
	rs.open "Select * from t_dish",Application("Connect_String"),3,2
	  	pgsize=20
	page=request.querystring("page")
	rs.pagesize=pgsize
	pgnm=rs.pagecount 
	if page="" or clng(page)<1 then page=1
	if clng(page)>=pgnm then page=pgnm
	if pgnm>0 then rs.absolutepage=page
	count=0
	 if request("id") <> "" then
	   set rs = server.Createobject("ADODB.recordset")
	   rs.open "Select * from t_dish where dish_id = "& request("id") &" order by dish_date desc",Application("Connect_String"),3,2
	   rs.delete
	   rs.update
	   response.redirect "manage_dish.asp"
	 end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>珠海宾馆管理系统</title>
<link rel=stylesheet type=text/css href=../style.css>
</head>

<body>

<div align="center">
  <center>
  <table border="1" cellpadding="2" width="80%">
    <tr>
      <td width="50%">
        <p align="center">名称</td>
      <td width="50%">
        <p align="center">操作</td>
    </tr>
<%do while not rs.eof and count<rs.pagesize%>
    <tr>
      <td width="50%"><%=rs("dish_title")%></td>
      <td width="50%" align=center><a href="input_dish_img.asp?id=<%=rs("dish_id")%>">修改</a> / <a href=manage_dish.asp?id=<%=rs("dish_id")%>>删除</a></td>  
    </tr>  
<%     count=count+1  
  rs.movenext  
  loop  
%>  
  </table>  
  </center>  
</div>  
  <%
        Response.Write "<p align=right>转到页码: "
      for p=1 to pgnm
      Response.Write "<a href=manage_dish.asp?page=" & p & "><b>" & p &"</b></a>&nbsp;"
      if p/30=0 then
      Response.Write "<br>"
      end if
      next 
  %>
<p align="center"><input type="button" value="返回" onclick="location.href=&quot;admin.asp&quot;"></p>
  
</body>  
  
</html>  

⌨️ 快捷键说明

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