<?
require_once('includes/configure.php');
require_once "../admin/include/function.php";
require_once "../admin/include/parameter.php";
require_once "includes/$lang/reservrecordedit.php";

$sql="select * from ivc_reservation left join ivc_members on irs_memberno=im_formno 
left join ivc_products on im_scheme=ip_id left join ivc_rooms on ip_room = ir_id 
where irs_id='$id' and irs_status='Y' and irs_memberno='".$_SESSION["egoMemberNo"]."'";
$result=mysql_query($sql);	
while($myrow=MySQL_fetch_array($result,MYSQL_ASSOC))
{
	$reserv=$myrow["irs_for"];
	$gname=$myrow["irs_guestname"];
	$gic=$myrow["irs_guestic"];
	$gcontact=$myrow["irs_guestcontact"];
	$gemail=$myrow["irs_guestemail"];

	$adult=$myrow["irs_adult1"];
	$child=$myrow["irs_child1"];
	$room=$myrow["irs_room1"];

	$bookingno=$myrow["irs_bookingno"];
	if($myrow["irs_confirm_choice"]=="1"){
		$cin=window_date($myrow["irs_checkin1"]);
		$cout=window_date($myrow["irs_checkout1"]);
	}else if($myrow["irs_confirm_choice"]=="2"){
		$cin=window_date($myrow["irs_checkin2"]);
		$cout=window_date($myrow["irs_checkout2"]);
	}else if($myrow["irs_confirm_choice"]=="3"){
		$cin=window_date($myrow["irs_checkin3"]);
		$cout=window_date($myrow["irs_checkout3"]);
	}
	
	$name=$myrow["im_name"];
	$ic=$myrow["im_ic"];
	$email=$myrow["im_email"];
	$mobile=$myrow["im_mobile"];
	$scheme=$myrow["ip_name"];
	$roomtype=$myrow["ir_type"]." - ".$myrow["ir_descr"];

	$remark=str_replace("/r/n","<br>",$myrow["irs_remark"]);

}


?>
<!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=utf-8" />
<title><? echo TITLE?></title>
<link rel="stylesheet" type="text/css" href="../styles.css" >
</head>

<body>
<table width="800" border="0" align="center" cellpadding="2" cellspacing="1" class="small">
  <tr>
    <td width="205" class="title1"><strong>
      <?=BOOKING_NO ?>
      : <? echo $bookingno ?></strong></td>
    <td width="206" align="right" class="title1"><img src="../images/iconic_07.jpg" width="113" height="68" /></td>
  </tr>
  <tr>
    <td colspan="2" class="text1"><strong><span class="TextH1">
      <? if($reserv=="Personal")echo FOR_PERSONAL;
else echo FOR_GUEST; ?>
    </span></strong></td>
  </tr>
  <? if($reserv=="Guest"){ ?>
  <tr>
    <td height="25" colspan="2" class="text1"><?=GUEST_NAME; ?>
      : <span class="TextH1"><strong><? echo $gname ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=GUEST_IC; ?>
      : <span class="TextH1"><strong><? echo $gic ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=GUEST_CONTACT; ?>
      : <span class="TextH1"><strong><? echo $gcontact ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=GUEST_EMAIL; ?>
      : <span class="TextH1"><strong><? echo $gemail ?></strong></span></td>
  </tr>
  <? }else{ ?>
  <tr>
    <td height="25" colspan="2" class="text1"><?=PNAME; ?>
      : <span class="TextH1"><strong><? echo $name ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=PIC; ?>
      : <span class="TextH1"><strong><? echo $ic ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=PCONTACT; ?>
      : <span class="TextH1"><strong><? echo $mobile ?></strong></span></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="text1"><?=PEMAIL; ?>
      : <span class="TextH1"><strong><? echo $email ?></strong></span></td>
  </tr>
  <? } ?>
  <tr>
    <td colspan="2" class="TextH1"><div align="center"></div></td>
  </tr>
  <tr>
    <td colspan="2" class="TextH1"><table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td class="text1"><?=TYPE_PRODUCT;?>
          : <strong><? echo $scheme ?></strong></td>
        <td class="text1"><?=TYPE_ROOM;?>
          : <strong><? echo $roomtype ?></strong></td>
      </tr>
      <tr>
        <td colspan="2" class="text1">&nbsp;</td>
      </tr>
      <tr>
        <td width="37%" class="text1"><?=NO_ROOM; ?>
          : <strong><? echo $room ?> &nbsp;</strong></td>
        <td width="63%" class="text1"><?=NO_ADULT; ?>
          : <strong> <? echo $adult ?> &nbsp; &nbsp;</strong> &nbsp; &nbsp;
          &nbsp; &nbsp;
          <?=NO_CHILD; ?>
          : <strong><? echo $child ?></strong></td>
      </tr>
      <tr>
        <td class="text1"><?=CHECK_IN; ?>
          : <strong><? echo $cin ?> &nbsp; &nbsp; &nbsp;</strong> &nbsp;</td>
        <td class="text1"><?=CHECK_OUT; ?>
          : <strong><? echo $cout ?></strong></td>
      </tr>
      <tr>
        <td colspan="2" class="text1">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="2" class="text1"><?=REMARK; ?>
          :</td>
      </tr>
      <tr>
        <td colspan="2" class="text1"><b><? echo str_replace("\r\n","<br>",$remark); ?></b></td>
      </tr>
      <tr>
        <td colspan="2" class="text1"><strong><br /></strong>
          <p class="text1"><strong>Disclaimer: </strong></p>
          <p class="text1">The Reservation Request made is an invitation to treat, the IVCB (Iconic Vacation Club Berhad) will not take the Reservation Request as a final and confirm reservation made by the member. The Reservation Request only serves as a request to the date and availability of room(s). IVCB will not be responsible for any reservation request made by member that is not in accordance to the terms and conditions herein. </p>
          <p class="text1">&nbsp;</p></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>