<?php session_start();



if($_SESSION[invcox] == ""){



header("location:login.php?action=need");



}else{



include("config.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">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Arnim Resort Reservation System</title>

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

<?php include("calendar.php");?>

<script language="javascript">



function total_price_cak2(){



var qty = parseFloat(document.getElementById('qty').value);



var unit_price = parseFloat(document.getElementById('unit_price').value);



var total_price = Math.round(qty*unit_price);



document.getElementById('total_price').value =total_price;



}



function total_price_cak(){



var total_price = parseFloat(document.getElementById('total_p').value);



var discount = parseFloat(document.getElementById('discount').value);



var total_price2 = Math.round(total_price-discount); // totol price after discount



if(discount>'0'){



document.getElementById("afd").style.display='block';



document.getElementById('afd').innerHTML =total_price2;



}else{



document.getElementById("afd").style.display='none';



}



var vat2 = parseFloat(document.getElementById('vat').value); 



var tax2 = parseFloat(document.getElementById('tax').value);



var vat =  Math.round((total_price2/100)*vat2); 



if(vat>'0'){



document.getElementById("tvat").style.display='block';



document.getElementById('tvat').innerHTML =vat;



}else{



document.getElementById("tvat").style.display='none';



}



var tax =  Math.round((total_price2/100)*tax2); 



if(tax>'0'){



document.getElementById("ttax").style.display='block';



document.getElementById('ttax').innerHTML =tax;



}else{



document.getElementById("ttax").style.display='none';



}



var total_price3 = Math.round(total_price2+(vat+tax)); // totol price after vat tax



document.getElementById('total_payeble').value =total_price3; // set the fiinal payeble



var payment_amount = parseFloat(document.getElementById('payment_amount').value);



var due = Math.round(total_price3-payment_amount); // due



document.getElementById('due').value =due;



}



function cash(i){



document.getElementById('Bank').style.display = 'none';



document.getElementById(i).style.display = 'block';



}



function add_invoice(){



var ajaxRequest;  // The variable that makes Ajax possible!



try{



// Opera 8.0+, Firefox, Safari



ajaxRequest = new XMLHttpRequest();



} catch (e){



// Internet Explorer Browsers



try{



ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");



} catch (e) {



try{



ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");



} catch (e){



// Something went wrong



alert("Your browser broke!");



return false;



}



}



}



// Create a function that will receive data sent from the server



ajaxRequest.onreadystatechange = function(){



if(ajaxRequest.readyState == 4){

 

var ajaxDisplay = document.getElementById('invoice_list');



ajaxDisplay.innerHTML = ajaxRequest.responseText;	



total_price_cak();



}



}



//-------------------------



var guest_nationality = document.getElementById('guest_nationality').value;



var guest_residence = document.getElementById('guest_residence').value;



var category = document.getElementById('category').value;



var name = document.getElementById('name').value;



var pp = document.getElementById('pp').value;



var pp2 = document.getElementById('pp2').value;



var pp3 = document.getElementById('pp3').value;



var pp4 = document.getElementById('pp4').value;



var afor = document.getElementById('afor').value;



 

var qty = document.getElementById('qty').value;



var unit_price = document.getElementById('unit_price').value;



var user = document.getElementById('user').value;



var isse_date = document.getElementById('isse_date').value;



var proffession = document.getElementById('proffession').value;



var pptypes = document.getElementById('pptypes').value;



var country = document.getElementById('country').value;



var queryString = "?guest_nationality=" + guest_nationality + "&guest_residence=" + guest_residence + "&category=" + category + "&name=" + name + "&pp=" + pp + "&afor=" + afor +  "&qty=" + qty + "&unit_price=" + unit_price + "&pp2=" + pp2 + "&pp3=" + pp3 + "&pp4=" + pp4 + "&user=" + user  + "&isse_date=" + isse_date  + "&proffession=" + proffession  + "&pptypes=" + pptypes  + "&country=" + country ;



ajaxRequest.open("GET", "ajax_add_invoice_hotel.php" + queryString, true);



ajaxRequest.send(null); 



}



function delete_invoice(i){



var ajaxRequest;  // The variable that makes Ajax possible!



try{



// Opera 8.0+, Firefox, Safari



ajaxRequest = new XMLHttpRequest();



} catch (e){



// Internet Explorer Browsers



try{



ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");



} catch (e) {



try{



ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");



} catch (e){



// Something went wrong



alert("Your browser broke!");



return false;



}



}



}



// Create a function that will receive data sent from the server



ajaxRequest.onreadystatechange = function(){



if(ajaxRequest.readyState == 4){



var ajaxDisplay = document.getElementById('invoice_list');



ajaxDisplay.innerHTML = ajaxRequest.responseText;	



total_price_cak();



}



}



//-------------------------



var id =i;



var user = document.getElementById('user').value;



var queryString = "?id=" + id +  "&user=" + user;		



ajaxRequest.open("GET", "ajax_delete_invoice_hotel.php" + queryString, true);



ajaxRequest.send(null); 



}



<!-- Begin




function day_calcu() {
	
	
  // Convert both dates to Date objects
  
  var date1=document.getElementById('isse_date').value;
  var date2=document.getElementById('pp3').value;

  
  const d1 = new Date(date1);
  const d2 = new Date(date2);


  // Calculate difference in milliseconds
  const diffInMs = Math.abs(d2 - d1);

  // Convert milliseconds to days
  const diffInDays = Math.floor(diffInMs / (1000 * 60 * 60 * 24));

var days=diffInDays;

if (days < 1) { days = 1;   }
  //return diffInDays;
  
  document.getElementById('qty').value=days;

 
//document.getElementById('isse_date').setAttribute("min", date1);
  document.getElementById("pp3").setAttribute("min", date1); 

total_price_cak2();
}



function popUp(URL) {



day = new Date();



id = day.getTime();



eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=yes,width=800,height=550,left = 100,top = 50');");



}



// End -->



function load_data(i){



var ajaxRequest;  // The variable that makes Ajax possible!



try{



// Opera 8.0+, Firefox, Safari



ajaxRequest = new XMLHttpRequest();



} catch (e){



// Internet Explorer Browsers



try{



ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");



} catch (e) {



try{



ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");



} catch (e){



// Something went wrong



alert("Your browser broke!");



return false;



}



}



}



// Create a function that will receive data sent from the server



ajaxRequest.onreadystatechange = function(){



if(ajaxRequest.readyState == 4){



var ajaxDisplay = document.getElementById('data_div_customer');



ajaxDisplay.innerHTML = ajaxRequest.responseText;	



document.getElementById('guest_nationality').value=document.getElementById('acontact_person').value;



document.getElementById('guest_residence').value=document.getElementById('acontact_person_phn').value;



document.getElementById('special_ins').value=document.getElementById('acontact_person_email').value;



} 



}



//-------------------------



var customer = document.getElementById('customer').value;



var queryString = "?customer=" + customer;		



ajaxRequest.open("GET", "ajax_load_custmer_data.php" + queryString, true);



ajaxRequest.send(null); 



}



function load_data_customer(i){



var ajaxRequest;  // The variable that makes Ajax possible!



try{



// Opera 8.0+, Firefox, Safari



ajaxRequest = new XMLHttpRequest();



} catch (e){



// Internet Explorer Browsers



try{



ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");



} catch (e) {



try{



ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");



} catch (e){



// Something went wrong



alert("Your browser broke!");



return false;



}



}



}



// Create a function that will receive data sent from the server



ajaxRequest.onreadystatechange = function(){



if(ajaxRequest.readyState == 4){



var ajaxDisplay = document.getElementById('data_div_customer');



ajaxDisplay.innerHTML = ajaxRequest.responseText;	



document.getElementById('guest_nationality').value=document.getElementById('acontact_person').value;



document.getElementById('guest_residence').value=document.getElementById('acontact_person_phn').value;



document.getElementById('special_ins').value=document.getElementById('acontact_person_email').value;



}



}



//-------------------------



var customer = document.getElementById('customer2').value;



var queryString = "?customer=" + customer;		



ajaxRequest.open("GET", "ajax_load_custmer_data_customer.php" + queryString, true);



ajaxRequest.send(null); 



}



function load_info_passport(i){



var ajaxRequest;  // The variable that makes Ajax possible!



try{



// Opera 8.0+, Firefox, Safari



ajaxRequest = new XMLHttpRequest();



} catch (e){



// Internet Explorer Browsers



try{



ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");



} catch (e) {



try{



ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");



} catch (e){



// Something went wrong



alert("Your browser broke!");



return false;



}



}



}



// Create a function that will receive data sent from the server



ajaxRequest.onreadystatechange = function(){



if(ajaxRequest.readyState == 4){



var ajaxDisplay = document.getElementById('data_div_passport');



ajaxDisplay.innerHTML = ajaxRequest.responseText;	



document.getElementById('name').value=document.getElementById('passport_holder_name2x').value;



document.getElementById('pp').value=document.getElementById('passport_no2x').value;



document.getElementById('pp2').value=document.getElementById('date_of_birth2x').value;



document.getElementById('isse_date').value=document.getElementById('pp_issue_date2x').value;



document.getElementById('pp3').value=document.getElementById('pp_expiry_date2x').value;



document.getElementById('afor').value=document.getElementById('relation2x').value;



}



}



//-------------------------



var customer = i;



var queryString = "?customer=" + customer;		



ajaxRequest.open("GET", "ajax_load_passport.php" + queryString, true);



ajaxRequest.send(null); 



}



</script>

<style type="text/css">



<!--



.style3 {font-size: 10px}



.style4 {color: #FF0000}

.style5 {color: #333333}
.style6 {font-size: 12px}
.style7 {font-size: 12}



-->



</style>

</head>



<body onload="show_form('ajax_genarel_form.php');">

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="box-wrap">

  <tr>

    <td><?php include("top.php");?></td>

  </tr>

  <tr>

    <td><table width="100%" border="0" cellspacing="1" cellpadding="0">

        <tr>

          <td height="15" align="left" class="link2">&nbsp;</td>

        </tr>

        <tr>

          <td height="30" align="left" background="images/place_bg.jpg" class="location"><strong>&nbsp;Home &gt; </strong><strong>Arnim Resort</strong></td>

        </tr>

        <tr>

          <td align="center">&nbsp;</td>

        </tr>

        <tr>

          <td align="center"><?php if($_GET[info]!=""){echo '<span class="red"><strong>'.$_GET[info].'</strong></span>';}?></td>

        </tr>

        <?php if($_GET[action] == 'edit'){ 



$dresult=mysql_query("select * from stock where id='$_GET[id]'");



$drow=mysql_fetch_array($dresult);



?>

        <tr>

          <td>&nbsp;</td>

        </tr>

        <?php }else{?>

        <tr>

          <td><form action="insert_stock_out_hotel.php" method="post" enctype="multipart/form-data" name="enquiryform" class="round_box" id="enquiryform">

              <table width="100%" border="0" cellpadding="2" cellspacing="1">

                <tr>

                  <td colspan="7" class="location"><strong>Add New Reservation</strong></td>
                </tr>

                <tr>

                  <td width="12%" height="30">Invoice Date :</td>

                  <td width="21%" class="input200"><table width="250" border="0" cellspacing="0" cellpadding="0">

                      <tr>

                        <td width="70%"><input name="date1" type="text" id="date1" size="15"  value="<?php echo date("d-m-Y");?>" required="required"/></td>

                        <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('date1', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                      </tr>

                    </table></td>

                  <td colspan="5" class="input200"><strong>Relation</strong>: Self, Husband, Wife, Son, Daughter, Father, Mother, Father in Law, Mother in Law, Daughter in Law, 

                    

                    Brother, Sister, Brother in Law, Sister in Law, Grandfather, Grandmother, Nephew, Cousin, Family, 
                    Guest, Friend, Colleague, Student, Teacher</td>
                </tr>

                <tr>

                  <td height="50" colspan="7" valign="middle" >Invoice To Agency:<span class="style4">*</span>
                    <select name="customer" id="customer" data-placeholder="Select Agency" class="customer" required="required" onchange="load_data();">

                      <option value="" selected="selected">Select Agency</option>

                      <?php 



$aresult=mysql_query("select * from client order by id desc ");



$arow=mysql_fetch_array($aresult);



do{



?>

                      <option value="<?php echo $arow[id];?>" <?php if($drow[customer] == $arow[id]){echo 'selected="selected"';}?>><?php echo $arow[company];?> - <?php echo $arow[id];?> :::::::: (<?php echo $arow[contact_person];?>, <?php echo $arow[contact_person_phn];?>, <?php echo $arow[contact_person_email];?>)</option>

                      <?php }while($arow=mysql_fetch_array($aresult));?>
                    </select>

                  <script language="javascript" type="text/javascript">



var config = {



'.customer'           : {},



'.chosen-select-deselect'  : {allow_single_deselect:true},



'.chosen-select-no-single' : {disable_search_threshold:10},



'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},



'.chosen-select-width'     : {width:"95%"}



}



for (var selector in config) {



$(selector).chosen(config[selector]);



}



                    </script>                    <div id="data_div_customer" style="display:none;"></div></td>
                </tr>

                <tr>

                  <td height="50" colspan="7" valign="middle">Customer (Optional):
                    <select name="customer2" id="customer2" data-placeholder="Select Customer" class="customer2" onchange="load_data_customer();">

                      <option value="" selected="selected">Select Customer</option>

                      <?php 



$aresult=mysql_query("select * from customer order by id desc  limit 2");



$arow=mysql_fetch_array($aresult);



do{



?>

                      <option value="<?php echo $arow[id];?>" <?php if($drow[customer] == $arow[id]){echo 'selected="selected"';}?>><?php echo $arow[passport_no];?> - <?php echo $arow[customer_name];?> :::>> (<?php echo $arow[contact_person];?>, <?php echo $arow[contact_person_phn];?>, <?php echo $arow[contact_person_email];?>)</option>

                      <?php }while($arow=mysql_fetch_array($aresult));?>
                    </select>

                  <script language="javascript" type="text/javascript">



var config = {



'.customer2'           : {},



'.chosen-select-deselect'  : {allow_single_deselect:true},



'.chosen-select-no-single' : {disable_search_threshold:10},



'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},



'.chosen-select-width'     : {width:"95%"}



}



for (var selector in config) {



$(selector).chosen(config[selector]);



}



                    </script></td>
                </tr>

                <tr>

                  <td colspan="7" align="left" valign="middle" bgcolor="#FFFFFF" class="round_box">Search By Guest Name / NID / Passport No :

                    <select name="passport_nox" id="passport_nox" data-placeholder="Select passport_no" class="passport_nox" onchange="load_info_passport(this.value);">

                      <option value="" selected="selected">Guest Name / NID / Passport No</option>

                      <?php 



$aresult=mysql_query("select * from customer order by id desc limit 3000");



$arow=mysql_fetch_array($aresult);



do{



?>

                      <?php if($arow[passport_no]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name];?> | <?php echo $arow[passport_no];?> | <?php echo $arow[date_of_birth];?> | <?php echo $arow[pp_issue_date];?> | <?php echo $arow[pp_expiry_date];?>"> <?php echo $arow[passport_holder_name];?> - <?php echo $arow[passport_no];?></option>

                      <?php }?>

                      <?php if($arow[passport_no2]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name2];?> | <?php echo $arow[passport_no2];?> | <?php echo $arow[date_of_birth2];?> | <?php echo $arow[pp_issue_date2];?> | <?php echo $arow[pp_expiry_date2];?>"> <?php echo $arow[passport_holder_name2];?> - <?php echo $arow[passport_no2];?></option>

                      <?php }?>

                      <?php if($arow[passport_no3]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name3];?> | <?php echo $arow[passport_no3];?> | <?php echo $arow[date_of_birth3];?> | <?php echo $arow[pp_issue_date3];?> | <?php echo $arow[pp_expiry_date3];?>"> <?php echo $arow[passport_holder_name3];?> - <?php echo $arow[passport_no3];?></option>

                      <?php }?>

                      <?php if($arow[passport_no4]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name4];?> | <?php echo $arow[passport_no4];?> | <?php echo $arow[date_of_birth4];?> | <?php echo $arow[pp_issue_date4];?> | <?php echo $arow[pp_expiry_date4];?>"> <?php echo $arow[passport_holder_name4];?> - <?php echo $arow[passport_no4];?></option>

                      <?php }?>

                      <?php if($arow[passport_no5]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name5];?> | <?php echo $arow[passport_no5];?> | <?php echo $arow[date_of_birth5];?> | <?php echo $arow[pp_issue_date5];?> | <?php echo $arow[pp_expiry_date5];?>"> <?php echo $arow[passport_holder_name5];?> - <?php echo $arow[passport_no5];?></option>

                      <?php }?>

                      <?php if($arow[passport_no6]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name6];?> | <?php echo $arow[passport_no6];?> | <?php echo $arow[date_of_birth6];?> | <?php echo $arow[pp_issue_date6];?> | <?php echo $arow[pp_expiry_date6];?>"> <?php echo $arow[passport_holder_name6];?> - <?php echo $arow[passport_no6];?></option>

                      <?php }?>

                      <?php if($arow[passport_no7]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name7];?> | <?php echo $arow[passport_no7];?> | <?php echo $arow[date_of_birth7];?> | <?php echo $arow[pp_issue_date7];?> | <?php echo $arow[pp_expiry_date7];?>"> <?php echo $arow[passport_holder_name7];?> - <?php echo $arow[passport_no7];?></option>

                      <?php }?>

                      <?php if($arow[passport_no8]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name8];?> | <?php echo $arow[passport_no8];?> | <?php echo $arow[date_of_birth8];?> | <?php echo $arow[pp_issue_date8];?> | <?php echo $arow[pp_expiry_date8];?>"> <?php echo $arow[passport_holder_name8];?> - <?php echo $arow[passport_no8];?></option>

                      <?php }?>

                      <?php if($arow[passport_no9]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name9];?> | <?php echo $arow[passport_no9];?> | <?php echo $arow[date_of_birth9];?> | <?php echo $arow[pp_issue_date9];?> | <?php echo $arow[pp_expiry_date9];?>"> <?php echo $arow[passport_holder_name9];?> - <?php echo $arow[passport_no9];?></option>

                      <?php }?>

                      <?php if($arow[passport_no10]!=""){?>

                      <option value="<?php echo $arow[passport_holder_name10];?> | <?php echo $arow[passport_no10];?> | <?php echo $arow[date_of_birth10];?> | <?php echo $arow[pp_issue_date10];?> | <?php echo $arow[pp_expiry_date10];?>"> <?php echo $arow[passport_holder_name10];?> - <?php echo $arow[passport_no10];?></option>

                      <?php }?>

                      <?php }while($arow=mysql_fetch_array($aresult));?>
                    </select>

                    <script language="javascript" type="text/javascript">



</script> 

                    <a href="add_client.php" target="_blank"></a> 

                    <script language="javascript" type="text/javascript">var config = {



'.passport_nox'           : {},



'.chosen-select-deselect'  : {allow_single_deselect:true},



'.chosen-select-no-single' : {disable_search_threshold:10},



'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},



'.chosen-select-width'     : {width:"95%"}



}



for (var selector in config) {



$(selector).chosen(config[selector]);



}



</script>

                    <div id="data_div_passport"></div></td>
                </tr>

                <tr>

                  <td height="7" colspan="7"><br /></td>
                </tr>

                <tr>

                  <td height="30" colspan="7" class="round_box"><table width="100%" border="1" cellpadding="0" cellspacing="3" bordercolor="#CCCCCC" bgcolor="#FFFFFF">

                      <?php 



$aresult=mysql_query("select * from stock WHERE billno='$_GET[id]' order by id asc");



$arow=mysql_fetch_array($aresult);



$total=0;



do{



$total=$total+$arow[total_price];		  ?>

                      <tr>

                        <td width="261" height="22" align="right" bgcolor="#D1EFEF"><span class="style7">Main Guest /<br />                          
                        Contact Person:</span><span class="style4">*</span></td>

                        <td width="294" height="22" align="left" valign="middle" bgcolor="#FFFFFF" class="smoll"><textarea name="guest_nationality" id="guest_nationality" required="required"></textarea></td>

                        <td width="269" align="right" valign="middle" bgcolor="#D1EFEF" class="smoll"><span class="style6">Phone :</span><span class="style4">*</span></td>

                        <td width="275" align="left" valign="middle" bgcolor="#FFFFFF" class="smoll"><textarea name="guest_residence" id="guest_residence" required="required"></textarea></td>

                        <td width="171" align="right" valign="middle" bgcolor="#D1EFEF" class="smoll style6">Email :</td>

                        <td width="403" align="left" valign="middle" bgcolor="#FFFFFF" class="smoll"><textarea name="special_ins" id="special_ins"></textarea></td>
                      </tr>

                      <tr>

                        <td height="10" align="right" bgcolor="#D1EFEF"> Note / <span class="style7">Guest </span>Request:</td>

                        <td height="10" colspan="5" align="left" bgcolor="#D1EFEF" class="smoll"><input name="adition_service_charge" type="text" id="adition_service_charge" size="100" /></td>
                      </tr>
                      <tr>
                        <td height="10" colspan="6" align="right">&nbsp;</td>
                      </tr>
                      <tr>
                        <td height="10" align="right" bgcolor="#FFC6C6">Restaurant Bill: </td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa1" id="visa1"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Transport Bill:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa6" id="visa6"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6"><strong>Agent / Reference</strong>:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa11" id="visa11"></textarea>
                        </span></td>
                      </tr>
                      <tr>
                        <td height="10" align="right" bgcolor="#FFC6C6">Juice Bar Bill: </td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa2" id="visa2"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Bus Ticket Bill: </td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa7" id="visa7"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Commission Amount:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa12" id="visa12"></textarea>
                        </span></td>
                      </tr>
                      <tr>
                        <td height="10" align="right" bgcolor="#FFC6C6">Others Bill:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa3" id="visa3"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Air Ticket Bill:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa8" id="visa8"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Commission Paid Date: </td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa13" id="visa13"></textarea>
                        </span></td>
                      </tr>
                      <tr>
                        <td height="10" align="right" bgcolor="#FFC6C6">&nbsp;</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa4" id="visa4"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">&nbsp;</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa9" id="visa9"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#FFC6C6">Refund Status:</td>
                        <td height="10" align="left" bgcolor="#FFC6C6"><span class="smoll">
                          <textarea name="visa14" id="visa14"></textarea>
                        </span></td>
                      </tr>
                      <tr>
                        <td height="10" align="right" bgcolor="#CCCCCC"><strong>Internal Note</strong></td>
                        <td height="10" align="left" bgcolor="#CCCCCC"><span class="smoll">
                          <textarea name="visa5" id="visa5"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#CCCCCC">&nbsp;</td>
                        <td height="10" align="left" bgcolor="#CCCCCC"><span class="smoll">
                          <textarea name="visa10" id="visa10"></textarea>
                        </span></td>
                        <td height="10" align="right" bgcolor="#CCCCCC">&nbsp;</td>
                        <td height="10" align="left" bgcolor="#CCCCCC"><span class="smoll">
                          <textarea name="visa15" id="visa15"></textarea>
                        </span></td>
                      </tr>


                      <?php }while($arow=mysql_fetch_array($aresult));



?>

                    </table></td>
                </tr>

                <tr>

                  <td height="6" colspan="7">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30" colspan="7" class="round_box"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#488B1F">

                      <tr>

                        <td width="19%" align="center" bgcolor="#81C155">Room No </td>

                        <td align="center" bgcolor="#81C155">Room Type<strong></strong></td>

                        <td width="17%" align="center" bgcolor="#81C155">Meal / Food</td>

                        <td width="17%" align="center" bgcolor="#81C155"><strong>Guest Name

                          <input name="user" type="hidden" id="user" value="<?php echo $_SESSION[invcox];?>" />

                        </strong></td>

                        <td width="12%" align="center" bgcolor="#81C155">NID / Passport</td>

                        <td width="10%" align="center" bgcolor="#81C155">D.O.B</td>

                        <td width="12%" align="center" bgcolor="#81C155">Nationality </td>

                        <td width="5%" align="center" bgcolor="#81C155">&nbsp;</td>
                      </tr>

                      <tr>

                        <td align="center" ><script language="JavaScript" type="text/javascript">



var config = {



'.category'           : {},



'.chosen-select-deselect'  : {allow_single_deselect:true},



'.chosen-select-no-single' : {disable_search_threshold:10},



'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},



'.chosen-select-width'     : {width:"95%"}



}



for (var selector in config) {



$(selector).chosen(config[selector]);



}



</script> 

                          <script language="javascript" type="text/javascript">



var config = {



'.country'           : {},



'.chosen-select-deselect'  : {allow_single_deselect:true},



'.chosen-select-no-single' : {disable_search_threshold:10},



'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},



'.chosen-select-width'     : {width:"95%"}



}



for (var selector in config) {



$(selector).chosen(config[selector]);



}



</script>

                          <select name="country" required="required" class="country" id="country" data-placeholder="Select">

                            <option value="" selected="selected">Select Room</option>

<?php 

$waresult=mysql_query("select * from hotel_room order by room_no asc");

$warow=mysql_fetch_array($waresult);

 

do{

?>

                           

                            

                            <option value="<?php echo $warow[room_no];?>"><?php echo $warow[room_no];?></option>

                

                <?php 

}while($warow=mysql_fetch_array($waresult));

				?>
                          </select></td>

                        <td align="center" ><select name="category" class="category" id="category" data-placeholder="Select Product">

                          <option value="" selected="selected">Select</option>

                          <option value="Superior Triple Non-AC Room with Balcony (Sea and Hill View)">Superior Triple 1</option>

                          <option value="Deluxe Family Non-AC Room with Balcony (Hill View)">Deluxe Family 2</option>

                          <option value="Deluxe Couple AC Room with Large Balcony (Sea and Hill View)">Deluxe Couple 3</option>

                          <option value="Premium Family AC Suite with Large Balcony (Sea View)">Premium Family Suite 4</option>

                          <option value="Connecting Sea View AC Room">Connecting Room 5</option>

                          <option value="Premium Couple AC Suite with Large Balcony (Sea View)">Premium Couple Suite 6</option>

                          <option value="Sea View AC Room">Sea View AC Room 5</option>

                        </select></td>

                        <td align="center" ><select name="proffession" class="category" id="proffession" data-placeholder="Select Product">

                          <option value="" selected="selected">Select</option>

                          <option value="Only Room">Only Room</option>

                          <option value="Complimentary Breakfast">Breakfast</option>

                          <option value="Complimentary Lunch">Lunch</option>

                          <option value="Complimentary Dinner">Dinner</option>

                          <option value="Complimentary BBQ">BBQ</option>

                          <option value="Complimentary Breakfast and Lunch">B and L</option>

                          <option value="Complimentary Breakfast and Dinner">B and D</option>

                          <option value="Complimentary Breakfast, Lunch and Dinner">B, L and D</option>

                          <option value="Complimentary Breakfast, Lunch and BBQ">B, L and BBQ</option>

                          <option value="Complimentary Breakfast, Lunch and BBQ Dinner">B, L and BBQ D</option>

                          <option value="Complimentary Birthday Cake">Birthday Cake</option>

                          <option value="Complimentary Anniversary Cake">Anniversary Cake</option>

                          <option value="Complimentary Breakfast and Birthday Cake">B and B Cake</option>

                          <option value="Complimentary Breakfast and Anniversary Cake">B and A Cake</option>

                          <option value="Food list on Additional Note">Food list on Note</option>

                        </select></td>

                        <td align="center" ><input name="name" type="text" id="name" size="20" /></td>

                        <td align="center" ><input name="pp" type="text" required="required" id="pp" size="10" /></td>

                        <td align="center" ><input name="pp2" type="text" id="pp2" size="10" /></td>

                        <td align="center" valign="middle" ><input name="pptypes" type="text" id="pptypes" value="Bangladeshi" size="10" /></td>

                        <td rowspan="3" align="center" ><input type="button" name="button2" id="button2" value="Add"  onclick="add_invoice();" style="cursor:pointer"/></td>
                      </tr>

                      <tr>

                        <td width="7%" align="center" bgcolor="#81C155">Pax Adult/Child</td>

                        <td width="10%" align="center" bgcolor="#81C155">Relation</td>

                        <td width="10%" align="center" bgcolor="#81C155"><span class="style81"><strong>Check-in</strong></span></td>

                        <td width="10%" align="center" bgcolor="#81C155"><span class="style81"><strong>Check-Out</strong></span></td>

                        <td width="10%" align="center" bgcolor="#81C155"> Day of Stay </td>

                        <td width="7%" align="center" bgcolor="#81C155">Per Day </td>

                        <td width="10%" align="center" bgcolor="#81C155"><strong>Total Price</strong></td>
                      </tr>

                      <tr>

                        <td align="center" ><input name="pp4" type="text" id="pp4" size="15" /></td>

                        <td align="center" ><input name="afor" type="text" id="afor" size="10" /></td>

                        <td align="center" ><input name="isse_date" type="date" id="isse_date" size="10"  onkeyup="day_calcu();" onblur="day_calcu();"/></td>

                        <td align="center" ><input name="pp3" type="date" id="pp3" size="10"  onkeyup="day_calcu();" onblur="day_calcu();" min="2025-09-05"/></td>

                        <td align="center" ><input name="qty" type="text" id="qty" size="2" value="1"  required="required"    autocomplete="off"  readonly="readonly"/></td>

                        <td align="center" ><input name="unit_price" type="text" required="required" id="unit_price" autocomplete="off" onfocus="javascript:if(this.value=='0')this.value=''" onblur="javascript:if(this.value=='')this.value='0'"  onkeyup="total_price_cak2();" value="0" size="4"/></td>

                        <td align="center" ><input name="total_price" type="text"  required="required" id="total_price" value="0" size="5" readonly="readonly"/></td>
                      </tr>

                    </table></td>
                </tr>

                <tr>

                  <td height="7" colspan="7">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30" colspan="7" align="center" class="round_box"><div id="invoice_list">

                    <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#488B1F">

                      <tr>

                        <td align="center" bgcolor="#81C155">Room No </td>

                        <td align="center" bgcolor="#81C155">Room Type<strong></strong></td>

                        <td align="center" bgcolor="#81C155"><strong>Guest Name</strong></td>

                        <td width="19%" align="center" bgcolor="#81C155"><strong>NID / Passport </strong></td>

                        <td width="5%" align="center" bgcolor="#81C155"><strong>Check-in</strong></td>

                        <td width="5%" align="center" bgcolor="#81C155"><strong>Check-Out</strong></td>

                        <td width="6%" align="center" bgcolor="#81C155"><strong>Pax Qty</strong></td>

                        <td width="5%" align="center" bgcolor="#81C155"><strong>Relation</strong></td>

                        <td width="3%" align="center" bgcolor="#81C155">Food</td>

                        <td width="6%" align="center" bgcolor="#81C155">Nationality</td>

                        <td align="center" bgcolor="#81C155">Stay Day</td>

                        <td align="center" bgcolor="#81C155">Per Day</td>

                        <td align="center" bgcolor="#81C155"><strong>Total Price</strong></td>

                        <td width="3%" align="center" bgcolor="#81C155">&nbsp;</td>
                      </tr>

                      <?php 

$aresult=mysql_query("select * from hotel WHERE mtype='0' and user='$_GET[user]' order by id asc");

$arow=mysql_fetch_array($aresult);

$total=0;

do{

$total=$total+$arow[total_price];?>

                      <tr>

                        <td width="8%" ><?php echo $arow[country]; ?></td>

                        <td width="12%" ><?php echo $arow[category]; ?></td>

                        <td width="15%" valign="middle" ><?php echo $arow[name]; ?></td>

                        <td valign="middle" ><?php echo $arow[pp]; ?></td>

                        <td valign="middle" ><?php echo dtformat($arow[isse_date]); ?></td>

                        <td valign="middle" ><?php echo dtformat($arow[pp3]); ?></td>

                        <td valign="middle" ><?php echo $arow[pp4]; ?></td>

                        <td valign="middle" ><?php echo $arow[afor]; ?></td>

                        <td valign="middle" ><?php echo $arow[proffession]; ?></td>

                        <td valign="middle" ><?php echo $arow[pptypes]; ?></td>

                        <td width="4%" ><?php echo $arow[qty]; ?></td>

                        <td width="4%" ><?php echo $arow[unit_price]; ?></td>

                        <td width="5%" ><?php echo $arow[total_price]; ?></td>

                        <td align="center"  class="link"><a href="javascript:void(0);" onclick="delete_invoice('<?php echo $arow[id]; ?>');">Del</a></td>
                      </tr>

                      <?php }while($arow=mysql_fetch_array($aresult));

?>

                      <tr>

                        <td colspan="12" align="right" >Total </td>

                        <td ><?php echo $total;?></td>

                        <td align="center"  class="link">&nbsp;</td>
                      </tr>
                    </table>

                    <input name="total_p" id="total_p" type="hidden" value="<?php echo $total;?>" />

                    </div></td>
                </tr>

                <tr>

                  <td height="30">&nbsp;</td>

                  <td colspan="6" class="input200"><br />
                    <span class="style5">Superior Triple Room Non-AC : <strong>201, 301, 401</strong> | Deluxe Family  Room Non-AC : <strong>202, 302, 402</strong> | Deluxe Couple  Room AC : <strong>203, 303, 403</strong><br />
Premium Family Suite AC:<strong> 204-5, 304-5, 404-5</strong> | Premium Couple Suite AC :<strong> 206</strong>, <strong>306</strong>, <strong>406 | </strong>Additional AC Room : <strong>205, 305, 405</strong></span><strong><br />

                    <span class="style6">.</span></strong></td>
                </tr>

                <tr>

                  <td height="30">Discount : </td>

                  <td class="input200"><input name="discount" type="text" id="discount"  value="0" onkeyup="total_price_cak();" onfocus="javascript:if(this.value=='0')this.value=''" onblur="javascript:if(this.value=='')this.value='0'" autocomplete="OFF"/>

                    <div id="afd" class="show_info"></div></td>

                  <td width="14%" class="input200">&nbsp;</td>

                  <td width="19%" align="right" class="input200">&nbsp;</td>

                  <td width="34%" colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">VAT %:</td>

                  <td class="input200"><input name="vat" type="text" id="vat" onkeyup="total_price_cak();" value="0" onfocus="javascript:if(this.value=='0')this.value=''" onblur="javascript:if(this.value=='')this.value='0'" autocomplete="OFF"/>

                    <div id="tvat" class="show_info"></div></td>

                  <td class="input200">&nbsp;</td>

                  <td align="right" class="input200">&nbsp;</td>

                  <td colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">TAX %:</td>

                  <td class="input200"><input name="tax" type="text" id="tax"  value="0" onkeyup="total_price_cak();" onfocus="javascript:if(this.value=='0')this.value=''" onblur="javascript:if(this.value=='')this.value='0'" autocomplete="OFF"/>

                    <div id="ttax" class="show_info"></div></td>

                  <td class="input200">&nbsp;</td>

                  <td align="right" class="input200">&nbsp;</td>

                  <td colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Total Payeble :</td>

                  <td class="input200"><input name="total_payeble" type="text" id="total_payeble" value="0"  readonly="readonly" /></td>

                  <td class="input200">&nbsp;</td>

                  <td align="right" class="input200">&nbsp;</td>

                  <td colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Paid Amount :</td>

                  <td class="input200"><input name="payment_amount" type="text" id="payment_amount"  onkeyup="total_price_cak();" value="0" onfocus="javascript:if(this.value=='0')this.value=''" onblur="javascript:if(this.value=='')this.value='0'" autocomplete="OFF"/></td>

                  <td class="input200">Money Receipt No:</td>

                  <td align="left" class="input200"><input name="money_receipt_no" type="text" id="money_receipt_no" /></td>

                  <td colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Pay Methode :</td>

                  <td class="input200"><select name="pay_methode" id="pay_methode" onchange="cash(this.value);">

                      <option value="Wallet">Wallet</option>

                      <option value="Cash" selected="selected">Cash</option>

                      <option value="bKash">bKash</option>

                      <option value="Nagad">Nagad</option>

                      <option value="Rocket">Rocket</option>

                      <option value="iPay">iPay</option>

                      <option value="Adjust">Adjust</option>

                      <option value="Adjust & Cash">Adjust & Cash</option>

                      <option value="Adjust & Bank">Adjust & Bank</option>

                      <option value="Deposit on Bank">Deposit on Bank</option>

                      <option value="Bank & bKash">Bank & bKash</option>

                      <option value="Bank & Nagad">Bank & Nagad</option>

                      <option value="Bank & Rocket">Bank & Rocket</option>

                      <option value="Cheque">Cheque</option>

                    </select></td>

                  <td class="input200">&nbsp;</td>

                  <td class="input200">&nbsp;</td>

                  <td colspan="3" class="input200">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Refund Amount:</td>

                  <td><div id="Bank" style="display: none ">

                      <table width="100%" border="0" cellpadding="2" cellspacing="1">

                        <tr>

                          <td align="left" >Bank Name :</td>

                          <td ><input name="bankname" type="text" id="bankname" size="20" /></td>
                        </tr>

                        <tr>

                          <td align="left" >Account Name :</td>

                          <td ><input name="acname" type="text" id="acname" size="20" /></td>
                        </tr>

                        <tr>

                          <td width="20%" align="left" > Account Number :</td>

                          <td width="80%" ><input name="acc_no" type="text" id="acc_no" size="20" /></td>
                        </tr>

                        <tr>

                          <td align="left" >Cheque  no : </td>

                          <td ><input name="chackno" type="text" id="chackno" size="20" /></td>
                        </tr>

                        <tr>

                          <td align="left" >Date of Cheque Maturity: </td>

                          <td ><table width="175" border="0" cellspacing="0" cellpadding="0">

                              <tr>

                                <td width="76%"><input name="chdate" type="text" id="chdate" value="<?php echo date("d-m-Y"); ?>" size="20" /></td>

                                <td width="24%" align="center"><a title="Calendar" onclick="displayDatePicker('chdate', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
                              </tr>

                            </table></td>
                        </tr>
                      </table>

                    </div></td>

                  <td><span class="input200">Payment Voucher No:</span></td>

                  <td><span class="input200">

                    <input name="payment_vouchar_no" type="text" id="payment_vouchar_no" />

                    </span></td>

                  <td colspan="3">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Due / Advance : </td>

                  <td><span class="input200">

                    <input name="due" type="text" id="due" value="0"  readonly="readonly"/>

                    </span></td>

                  <td>Payment Note: </td>

                  <td><textarea name="pay_note" id="pay_note" cols="45" rows="5"></textarea></td>

                  <td colspan="3">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">Previous Due </td>

                  <td>&nbsp;</td>

                  <td>&nbsp;</td>

                  <td>&nbsp;</td>

                  <td colspan="3">&nbsp;</td>
                </tr>

                <tr>

                  <td height="30">&nbsp;</td>

                  <td colspan="6"><input type="submit" name="Submit2" value="Submit" /></td>
                </tr>
              </table>

              <br />

            </form></td>

        </tr>

        <?php }?>

        <tr>

          <td height="10"><p><br />

              <br />

            </p></td>

        </tr>

        <tr>

          <td class="round_box"><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#999999">

              <tr>

                <td colspan="15" bgcolor="#6EA749" class="location"><strong>(Invoice Entry)</strong></td>

              </tr>

              <tr>

                <td bgcolor="#9FCA84"><strong>Sr.</strong></td>

                <td width="93" align="center" bgcolor="#9FCA84"><strong>Date</strong></td>

                <td align="center" bgcolor="#9FCA84">Room No </td>

                <td align="center" bgcolor="#9FCA84">Check-in</td>

                <td align="center" bgcolor="#9FCA84">Check-Out</td>

                <td align="center" bgcolor="#9FCA84"><strong>Guest Name</strong></td>

                <td width="59" align="center" bgcolor="#9FCA84"> Agent<br />

                  Invoice</td>

                <td width="59" align="center" bgcolor="#9FCA84">Guest<br />
                  Invoice<strong><br />

                </strong></td>

                <td width="57" align="center" bgcolor="#9FCA84"><strong>All<br />

                  Info</strong></td>

                <td width="56" align="center" bgcolor="#9FCA84"><strong> Total<br />

                  Bill</strong></td>

                <td width="51" align="center" bgcolor="#9FCA84"><strong>Paid</strong></td>

                <td width="45" align="center" bgcolor="#9FCA84"><strong>Due</strong></td>

                <td width="54" align="center" bgcolor="#9FCA84"><strong>Verify</strong></td>

                <td align="center" bgcolor="#9FCA84"><strong>Edit</strong></td>

                <td width="56" align="center" bgcolor="#9FCA84"><strong>Entry By</strong></td>

              </tr>

              <?php 



$page_name="hotel.php?id=$_GET[id]"; 



$limit=$_GET['limit'];



$start=$_GET['start'];								



if(!($start > 0)) {                  



$start = 0;



}



$eu = ($start - 0); 



//this is coming from config /// if($_POST[paiging]!=""){$paiging=$_POST[paiging];}else{$paiging='30';}



$limit = '50';               



$this1 = $eu + $limit; 



$back = $eu - $limit; 



$next = $eu + $limit;



$ant=mysql_query("select * from hotel group by billno order by billno desc ");



$nume=mysql_num_rows($ant);



$result=mysql_query("select * from hotel group by billno order by billno desc  limit $eu, $limit");



$row=mysql_fetch_array($result);



if($row!=""){



$sr=$eu;



$date1x=$row[date1];



do{



if($date1x!="$row[date1]"){



?>

              <tr>

                <td height="10" colspan="15" bgcolor="#CCCCCC">&nbsp;</td>

              </tr>

              <?php



}



$date1x=$row[date1];



$xresult=mysql_query("select sum(total_payeble)as total_payeble,sum(payment_amount)as payment_amount from hotel where billno='$row[billno]'");



$xrow=mysql_fetch_array($xresult);



$sr=$sr+1;    



?>

              <tr>

                <td width="29" height="25" bgcolor="#D1EFEF"><?php echo $sr;?></td>

                <td height="25" align="center" bgcolor="#FFFFFF"><?php echo dtformat($row[date1]);?></td>

                <td width="63" height="25" align="center" bgcolor="#C4E2AF"><span class="learge style5"><?php



$rxresult=mysql_query("select country from  hotel where billno='$row[billno]'");



$rxrow=mysql_fetch_array($rxresult);



do{



echo " $rxrow[country]  ";



echo "<br />";



}while($rxrow=mysql_fetch_array($rxresult));



?></span></td>

                <td width="85" align="center" bgcolor="#FFFFFF"><?php echo $row[isse_date]; ?></td>

                <td width="82" align="center" bgcolor="#FFFFFF"><?php echo $row[pp3]; ?></td>

                <td width="117" height="25" align="center" bgcolor="#C4E2AF"><span class="style3">

                  <?php



$rxresult=mysql_query("select name from  hotel where billno='$row[billno]'");



$rxrow=mysql_fetch_array($rxresult);



do{



echo " $rxrow[name]  ";



echo "<br />";



}while($rxrow=mysql_fetch_array($rxresult));



?>

                  </span></td>

                <td height="25" align="center" bgcolor="#EAF2E3" class="link"><a href="javascript:popUp('arnim_resort_reservation.php?id=<?php echo $row[billno];?>')"><?php echo $row[billno];?></a></td>

                <td height="25" align="center" bgcolor="#D1EFEF" class="link"><a href="javascript:popUp('arnim_resort_reservation_voucher.php?id=<?php echo $row[billno];?>')"><?php echo $row[billno];?></a></td>

                <td height="25" align="center" bgcolor="#D1EFEF" class="link"><a href="javascript:popUp('arnim_resort_reservation_all_information.php?id=<?php echo $row[billno];?>')"><?php echo $row[billno];?></a></td>

                <td height="25" align="center" bgcolor="#FFA6A6" class="link"><?php echo number_format($row[total_payeble]);?></td>

                <td height="25" align="center" bgcolor="#C4E2AF" class="link"><?php echo number_format($row[payment_amount]);?></td>

                <td height="25" align="center" bgcolor="#FFA6A6" class="link"><?php echo $row[due];?>&nbsp;</td>

                <td align="center" bgcolor="#FFFFFF" class="link"><?php 



$rresult=mysql_query("select * from user WHERE userid='$_SESSION[invcox]' and status='1'");



$rrow=mysql_fetch_array($rresult);



if($rrow[income_type] == '1'){



?>

                  <form id="form2" name="form2" method="post" action="hotel_approve.php">

                    <table width="100%" border="0" cellspacing="2" cellpadding="0">

                      <tr>

                        <td><input name="id" type="hidden" id="id" value="<?php echo $row[id];?>" />

                          <input name="activecode" type="text" id="activecode" size="2"  value="<?php echo $row[activecode];?>"/></td>

                        <td><input type="submit" name="Submit2" value="Go" /></td>

                      </tr>

                    </table>

                  </form>

                  <a href="hotel_approve.php?id=<?php echo $drow[id];?>"></a>

                  <?php }else{echo $row[activecode];} ?></td>

                <td width="28" align="center" bgcolor="#FFFFFF" class="link"><?php 



$show=0;



$today=date("Y-m-d");
if($row[status] == '0'){ 
if($row[date1] == $today){



//-----------------



if($_SESSION[invcox] == "$row[user]"){


$show=1;



?>

                  <a href="edit_hotel.php?id=<?php echo $row[billno];?>">Edit</a>

                  <?php }}} 



if($show == '0'){ 


$ssresult=mysql_query("select * from user WHERE userid='$_SESSION[invcox]' and status='1'");



$ssrow=mysql_fetch_array($ssresult);



if($ssrow[edithotel] == '1'){



$today=date("Y-m-d");



$datenewface = date('Y-m-d', strtotime("+$ssrow[edithoteldays] day", strtotime("$row[date1]")));



if($today<="$datenewface"){



?>

                  <a href="edit_hotel.php?id=<?php echo $row[billno];?>">Edit</a>

                  <?php }}}?></td>

                <td width="56" height="25" align="center" bgcolor="#FFFFFF" class="link"><?php echo $row[user];?></td>

              </tr>

              <?php 



}while($row=mysql_fetch_array($result));?>

              <tr>

                <td colspan="15" ><table border="0" align = "center" cellpadding="0" cellspacing="2">

                    <tr>

                      <?php // if our variable $back is equal to 0 or more then only we will display the link to move back //



if($back >=0) { 



echo  "<td  align='left' class='paiging' width='60px'><a href='$page_name&start=$back&limit=$limit'><< PREV</a></td>"; 



} 



//// Let us display the page links at  center. We will not display the current page as a link //



?>

                      <?php 



$i=0;



$srx=0;



$l=1;



for($i=0;$i < $nume;



$i=$i+$limit){



if($i <> $eu){



?>

                      <td width="25px" align="center" class="paiging"><?php 



echo " <a href='$page_name&start=$i&limit=$limit'>$l</a>";



?></td>

                      <?php 



}else{echo "<td align='center' width='25px'><span class='paiging_red'>$l</span></td>";}



/// Current page is not displayed as link and given font color red



$l=$l+1;



$srx=$srx+1;



if($srx == "50"){$srx=0; echo '</tr><tr>';}



}



?>

                      <?php ///////////// If we are not in the last page then Next link will be displayed. Here we check that /////



if($this1 < $nume) { 



echo "<td  align='right' class='paiging' width='60px'><a href='$page_name&start=$next&limit=$limit'>NEXT >></a></td>";} 



?>

                    </tr>

                  </table></td>

              </tr>

              <?php 



}



?>

            </table>

            <br /></td>

        </tr>

      </table></td>

  </tr>

  <tr>

    <td height="25"><?php include("bot.php");?></td>

  </tr>

</table>

</body>

</html>

<?php }?>