<?
require_once('includes/configure.php');
require_once "../admin/include/function.php";
require_once "includes/$lang/reservappr.php";
require_once "../admin/include/paginator.php";
require_once "../admin/include/paginator_html.php";


?>
<!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" <?= HTML_PARAMS ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?= CHARSET ?>" />
<title><?=TITLE?></title>
<!-- SmartMenus 6 config and script core files -->
<? if($_SESSION["egoLang"]=="ENG"){ ?>
<script type="text/javascript" src="c_config.js"></script>
<? }else if($_SESSION["egoLang"]=="CH"){ ?>
<script type="text/javascript" src="ch_config.js"></script>
<? } ?>
<script type="text/javascript" src="c_smartmenus.js"></script>

<!-- SmartMenus 6 config and script core files -->


<link rel="stylesheet" type="text/css" href="../styles.css" >
</head>

<body>
<table width="1000" height="600" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
  <tr>
    <td height="82" background="../images/iconic_01.jpg"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="91%" height="30" align="right" valign="bottom" class="topmenu"><? include_once "includes/topmenu.php"; ?></td>
        <td width="9%" rowspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td height="4"></td>
      </tr>
      <tr>
        <td height="14" align="right">
          <? include_once "includes/menu.php"; ?>
</td>
        <td height="29" rowspan="2"></td>
      </tr>
      <tr>
        <td height="3" align="right"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="500" valign="top" background="../images/memberlogin_bg.jpg" style="background-repeat:no-repeat">
      <table width="76%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="789" height="340" valign="bottom" class="title1"><?=RESERV_APPR;?></td>
      </tr>
      
      <tr>
        <td >
		<form name="form" method="post" action="<?=$PHP_SELF ?>" >
	   <table width="820" height="250" border="0" align="center" cellpadding="0" cellspacing="0">
      
      <tr>
        
        <td valign="top"><br />
          <table border="0" cellpadding="1" width="100%" cellspacing="2" class="small">
          <tr>
            <td width="20" height="23" rowspan="2" bgcolor="#03A1BC" class="text2" align="center"><?=NO; ?></td>
            <td width="155" rowspan="2" bgcolor="#03A1BC" class="text2"><div align="center"><?=RESERV_REQUEST; ?></div></td>
            <td colspan="2" bgcolor="#03A1BC" class="text2"><div align="center"><?=CHOICE_1 ?></div></td>
            <td colspan="2" bgcolor="#03A1BC" class="text2"><div align="center"><?=CHOICE_2 ?></div></td>
            <td colspan="2" bgcolor="#03A1BC" class="text2"><div align="center"><?=CHOICE_3 ?></div></td>
            <td width="84" rowspan="2" bgcolor="#03A1BC" class="text2"><div align="center"><?=DATE_APPLY; ?></div></td>
            <td width="24" rowspan="2" bgcolor="#03A1BC" class="footer">&nbsp;</td>
          </tr>
          <tr>
            <td width="86" bgcolor="#03A1BC" class="text2"><div align="center">
              <?=CHECK_IN; ?>
            </div></td>
            <td width="78" bgcolor="#03A1BC" class="text2"><div align="center">
              <?=CHECK_OUT; ?>
            </div></td>
            <td width="82" bgcolor="#03A1BC" class="text2"><div align="center">
                <?=CHECK_IN; ?>
            </div></td>
            <td width="82" bgcolor="#03A1BC" class="text2"><div align="center">
                <?=CHECK_OUT; ?>
            </div></td>
            <td width="82" bgcolor="#03A1BC" class="text2"><div align="center">
                <?=CHECK_IN; ?>
            </div></td>
            <td width="85" bgcolor="#03A1BC" class="text2"><div align="center">
                <?=CHECK_OUT; ?>
            </div></td>
          </tr>
          <?

	$sql="select irs_id, irs_checkin1, irs_checkout1,irs_checkin2, irs_checkout2,irs_checkin3, irs_checkout3,irs_created,irs_for from ivc_reservation where irs_status='N' and irs_memberno='".$_SESSION["egoMemberNo"]."' ";
	$result=mysql_query($sql);
	$num_rows=mysql_num_rows($result);

	$pass="so=1";
    $a =& new Paginator_html($_GET['page'],$num_rows,$pass);	
	$a->set_Limit(15);
	$a->set_Links(10);  	
	$limit1 = $a->getRange1();  
	$limit2 = $a->getRange2();  
	$sql.=" order by irs_id limit $limit1,$limit2 ";	
	$result=mysql_query($sql) or die(mysql_error());

	while($myrow=MySQL_fetch_array($result,MYSQL_ASSOC))
	{
		$i++;
		echo "<tr bgcolor='#ffffff' class='text1'>"; 
		$id=$myrow["irs_id"];
	    echo "<td align='center' class='text12'>".$i."</td>";	  										
	    echo "<td height='20' align='center' class='text12'>".$myrow["irs_for"]."</td>";	 
	    echo "<td height='20' align='center' class='text12'>".window_date($myrow["irs_checkin1"])."</td>";	  				
	    echo "<td align='center' class='text12'>".window_date($myrow["irs_checkout1"])."</td>";	  				
		if($myrow["irs_checkin2"]<>"0000-00-00")echo "<td align='center' class='text12'>".window_date($myrow["irs_checkin2"])."</td>";	  				 		
		else echo "<td>&nbsp; </td>";		

	    if($myrow["irs_checkout2"]<>"0000-00-00")echo "<td align='center' class='text12'>".window_date($myrow["irs_checkout2"])."</td>";	  				
		else echo "<td>&nbsp; </td>";		

		if($myrow["irs_checkin3"]<>"0000-00-00")echo "<td align='center' class='text12'>".window_date($myrow["irs_checkin3"])."</td>";	  				 		
		else echo "<td>&nbsp; </td>";		

	    if($myrow["irs_checkout3"]<>"0000-00-00")echo "<td align='center' class='text12'>".window_date($myrow["irs_checkout3"])."</td>";	  				
		else echo "<td>&nbsp; </td>";		
		
	    echo "<td align='center' class='text12'>".window_date($myrow["irs_created"])."</td>";	  										
		echo "<td align='center' class='text12'><a href='m_reservApprEdit.php?id=$id'><img src='images/view.png' border='0'></a>";
		echo "</td>";	  								
		echo "</tr>";

	}

?>
          <tr>
            <td colspan="13" class="text1"><br />
              <? echo "Total Record :[".$num_rows."] "; if($num_rows)$a->previousNext();	?></td>
          </tr>
          <tr>
            <td colspan="13" class="text1"><p class="text1"><strong>Disclaimer:</strong></p>
              <p class="text1">Thank you for your reservation, we are in the midst of  processing your reservation. We will revert when your reservation is confirmed.  Kindly check your status of reservation under the &lsquo;Confirmation Record&rsquo;.</p></td>
          </tr>
          </table>
          <!--        <div class="scroll"> --></td>
      </tr>
    </table>
		</form>		</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><? include_once "includes/bottom.php" ?></td>
  </tr>
</table>
</body>
</html>