📄 booktemp.php
字号:
<?
require_once('include/connection.php');
include('include/admin_or_user.php');
?>
<?
echo "<script>";
echo "room=new Array();";
$emptyroomsql="select * from room where room_state=-1 order by room_level ,room_person ";
$emptyroom=odbc_exec($conn,$emptyroomsql);
$i=0;
$roomlevel=odbc_result($emptyroom,'room_level');
echo "room[".$roomlevel."]=new Array();";
while(odbc_fetch_row($emptyroom))
{
$roomperson=odbc_result($emptyroom,'room_person');
$roomnumber=odbc_result($emptyroom,'room_number');
if($roomlevel!=odbc_result($emptyroom,'room_level'))
{echo "room[".$roomlevel."]=new Array();";
$i=0;
}
echo "room[".$roomlevel."][".$i."]=".$roomnumber;
$i++;
}
echo "</script>";
echo "<script>";
echo "function select(v){}";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 36px;
margin-right: 36px;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<p align="center" class="STYLE1">预订房间</p>
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="1">
<tr>
<td><div align="right">客人称谓:</div></td>
<td><label>
<input name="name" type="text" id="name" size="20" maxlength="30" />
</label></td>
</tr>
<tr>
<td><div align="right">人 数:</div></td>
<td><label>
<input name="person" type="text" id="person" size="3" maxlength="6" />
人
</label></td>
</tr>
<tr>
<td><div align="right">入住时间:</div></td>
<td><label>
<select name="selectmonth">
<? $i=1;
while($i<=12) {?>
<option value="<? echo $i;?>"><? echo $i;?>月</option>
<? $i++;}?>
</select>
<select name="selectday">
<? $i=1;
while($i<=31) {?>
<option value="<? echo $i;?>"><? echo $i;?>日</option>
<? $i++;}?>
</select>
</label></td>
</tr>
<tr>
<td><div align="right">入住天数:</div></td>
<td><label>
<input name="days" type="text" id="days" size="3" maxlength="6" />
天</label></td>
</tr>
<tr>
<td><div align="right">房间选择:</div></td>
<td>
<select name="select id="select">
<? $selectperson="select distinct room_person ,room_level from room order by room_person,room_level";
$m=odbc_exec($conn,$selectperson);
while(odbc_fetch_row($m))
{
?>
<option value="<? echo odbc_result($m,'room_person');echo ","; echo odbc_result($m,'room_level');?>"><? echo odbc_result($m,'room_person');echo "人";echo odbc_result($m,'room_level');echo "星级"; ?></option>
<?
}?>
</select>
<label>
<input name="s1" type="button" id="s1" value="查询" />
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<? $emptyroomsql="select * from room where room_state=-1 order by room_level ,room_person ";
$emptyroom=odbc_exec($conn,$emptyroomsql);
$m=1;
$roomlevel=odbc_result($emptyroom,'room_level');
$roomperson=odbc_result($emptyroom,'room_person');
while(odbc_fetch_row($emptyroom))
{
if($roomlevel!=odbc_result($emptyroom,'room_level'))
{ echo "<br>";
$roomlevel=odbc_result($emptyroom,'room_level');
echo $roomlevel;echo "星级:";
}
?>
<input type="checkbox" name="checkbox<? echo $m;?>" value="<? echo odbc_result($emptyroom,'room_number'); echo odbc_result($emptyroom,'room_person');?>" /><? echo odbc_result($emptyroom,'room_number');echo "("; echo odbc_result($emptyroom,'room_person');echo "人房)"; ?>
<? }?>
</label></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -