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

📄 usermain.php

📁 SetCursor CWnd LoadCursor DestroyWindow CDialog GetClientRect C Button GetStockObject CFont GetWindo
💻 PHP
字号:
<?
 //header("Pragma: no-cache");

 require_once('include/connection.php'); 
 include('include/admin_or_user.php');
 require_once('include/monthdays.php'); 
 
 header("Refresh:600");
  $month=date("m")*1;
  $day=date("d")*1;
  $sql="select * from book where longintime like '%".$month."-".$day."%' order by person ";
  $todayloginroom=odbc_exec($conn,$sql);
  $sql="select * from coustom order by in_time,days";
  $out_room=odbc_exec($conn,$sql);
  ?>
  <?
function show_out_room($in_time,$days)
   {
    $month=date("m")*1;
    $day=date("d")*1; 
    $m=substr($in_time,5,2)*1;
      $d=substr($in_time,8,2)*1;
	  $md=monthday($m);
	  $d1=$d+$days;
	   if ($d1>$md)
	      {$d1=$d1-$md;
		   $m++;
		   }
	  if($m==$month&&$d1==$day)
	   return 1;
	   else return 0;
	 }	   
 
 ?>



<!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;
}
-->
</style>
<link href="css/hotel.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>

<body>
<table width="100%" cellpadding="6" cellspacing="10">
  <tr>
    <td class="noboarder"><div align="center">今天入住预定房</div></td>
    <td class="noboarder"><div align="center">今天结帐房间</div></td>
  </tr>
  <tr>
    <td><table width="39%" border="1" align="center" bordercolor="#CACAAA">
      <tr>
       <td valign="top">
      <div align="center">
  <?
  $total=0; 
  while(odbc_fetch_row($todayloginroom)) 
  {
    $total=$total+1; ?>
 
        <a href="bookin.php?id=<? echo odbc_result($todayloginroom,'id');?>&name=<?  echo base64_encode(odbc_result($todayloginroom,'name'));?>&person=<? echo odbc_result($todayloginroom,'person');?>&days=<? echo odbc_result($todayloginroom,'bookdays');?>&room=<? echo base64_encode(str_replace("@","",odbc_result($todayloginroom,'room_number')));?>">
		<? echo str_replace("@","",odbc_result($todayloginroom,'room_number'));?>		</a><br />
<? }

		if($total==0) 
		{ echo "<span class='STYLE1'>";
		  echo "暂无";
		  echo "</span>";
		  }
		?>
        </span></div></td>
      </tr>
    </table></td>
    <td><table width="39%" border="1" align="center" bordercolor="#CACAAA">
      <tr>
       <td valign="top">
	<div align="center">
	  <? 
	  $total=0;
	  while(odbc_fetch_row($out_room)) { ?>
     <? 
	 if(show_out_room(odbc_result($out_room,'in_time'), odbc_result($out_room,'days')))
	   {
	   $total++;
	   echo '<a href="charge.php?room_number='.base64_encode(odbc_result($out_room,'room_number')).'">';
	   echo odbc_result($out_room,'room_number');
	   echo '</a>';
	   ?>
	   
	   <br />
        <?
		}
		 }
		 if($total==0) 
		{ echo "<span class='STYLE1'>";
		  echo "暂无";
		  echo "</span>";
		  }
		 ?>
	  </div>
     </td>
      </tr>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>

<script src="copyright.inc">
</script>


</body>
</html>

⌨️ 快捷键说明

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