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

📄 newbook.asp

📁 by php excellent hotel management system
💻 ASP
字号:
<%
'###########################################################################################
'			   Copyright (C) 2006 FreeLin rights reserved.                                 '
'			      本系统由FREELIN工作室独立开发2006.3.20                                      '
'				     版权所有,并保留所有版权,不得修改传播                                       '
'					    http://www.yisky.com                                          '
'						     co_lin@126.com                                                '
'###########################################################################################
%>
<!--#include file="config.asp"-->
<!--#include file="freelin.asp"-->
<%
if request.querystring("action") = "del" then
	proId = trim(request.querystring("id"))
	conn.execute "delete from booker where id="& proId &""
	conn.close
	xln_showmsg "操作成功","删除预定成功","newbook.asp","自动返回"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理预定--FreeLin设计</title>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<script>
function del(id)
{
	var msg;
	msg=window.confirm("FreeLin 提示:真的要删除该预定?");
	if (msg)
	{
		location.href="newbook.asp?action=del&id="+id;
	}
}
function showbooker(id){window.open("showbooker.asp?id="+id,"","height=300,width=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no");
}
function showhouse(id){window.open("showhouse.asp?id="+id,"","height=400,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body> 
<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#f0f0f0">
  <tr> 
    <td height="30" align="center" bgcolor="#FAFAFA"><strong>管理预定</strong></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="10" cellpadding="0">
        <tr> 
          <td> 
            <%
set rs=server.createobject("adodb.recordset")
sql="select * from booker where xln_view=""no"" order by id desc"
rs.open sql,conn,1,1
rs.PageSize=20
page_count=rs.PageCount 
all_record=rs.recordcount
If(all_record<1) Then
	response.Write "<div align=center><font class=ipage>对不起,没有新的预定!</font></div>"
else	
page=int(request.QueryString ("page"))
if page<1 then page=1
if page>page_count then page=page_count
if page="" then page=1
rs.AbsolutePage=page
%>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="31">客房编号</td>
                <td width="228">预定数量</td>
                <td width="255">入住时间</td>
                <td width="193">联系电话</td>
                <td>管理操作</td>
              </tr>
              <%for i=1 to rs.PageSize
	if rs.EOF then 
	exit for
	end if
	If((i mod 2)=0) Then
		bgc="bgcolor='#FFFFFF'"
	else
		bgc="bgcolor='#FAFAFA'"
	end if
id = rs("id")
%>
              <tr> 
                <td width="171" <%=bgc%>><a title="点击查看客房介绍" href="javascript:showhouse('<%=rs("proNO")%>');"><%=rs("proNO")%></a></td>
                <td <%=bgc%>><%=rs("number")%></td>
                <td <%=bgc%>><%=rs("indata")%></td>
                <td <%=bgc%>><%=rs("tel")%></td>
                <td width='116' <%=bgc%>><a href="javascript:showbooker('<%=id%>');"><font color=red>查看</font></a>&nbsp;&nbsp;<a href="javascript:del('<%=id%>');">删除</a></td>
              </tr>
              <%
rs.movenext
next%>
            </table>
            <%If(page_count=1) Then%>
            <div align="right">共有<%=all_record%>个预定&nbsp;<SPAN class=ipage><%=page%></span>/<%=page_count%>&nbsp;上一页&nbsp;1&nbsp;下一页</div>
            <%
else
	if page=1 and page<>page_count then%>
            <div align="right">共有<%=all_record%>个预定&nbsp;<SPAN class=ipage><%=page%></span>/<%=page_count%>&nbsp;上一页&nbsp; 
              <%for i=1 to page_count%>
              <a href="listpro.asp?page=<%=i%><%=classurl%>"><%=i%></a>&nbsp; 
              <%next%>
              <a href="listpro.asp?page=<%=page+1%><%=classurl%>">下一页</a></div>
            <%elseif page=page_count and page<>1 then%>
            <div align="right">共有<%=all_record%>个预定&nbsp;<SPAN class=ipage><%=page%></span>/<%=page_count%>&nbsp;<a href="listpro.asp?page=<%=page-1%><%=classurl%>">上一页</a>&nbsp; 
              <%for i=1 to page_count%>
              <a href="listpro.asp?page=<%=i%><%=classurl%>"><%=i%></a>&nbsp; 
              <%next%>
              下一页</div>
            <%else%>
            <div align="right">共有<%=all_record%>个预定&nbsp;<SPAN class=ipage><%=page%></span>/<%=page_count%>&nbsp;<a href="listpro.asp?page=<%=page-1%><%=classurl%>">上一页</a>&nbsp; 
              <%for i=1 to page_count%>
              <a href="listpro.asp?page=<%=i%><%=classurl%>"><%=i%></a>&nbsp; 
              <%next%>
              <a href="listpro.asp?page=<%=page+1%><%=classurl%>">下一页</a></div>
            <%
end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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