<?php
 
session_start();
$com = "C";
include("DMMYSQLG.php");
include("DSA3000.php");
include("DMMYSQLG.php");
require_once("DFJQUERY.inc");
include("DF30000.inc");
include("DF80000.php");

$f_f="";
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<?php


if (isset($_REQUEST['bot'])&&$_REQUEST['bot']==""){
	echo '<h2>!!! SELECCIONE UN REGISTRO !!!</h2>';
	echo '<meta content="1; url=cat_allotmen_PR.php"  HTTP-EQUIV="REFRESH">';
}else{
	if(!isset($_REQUEST['tap2'])){
		include('cat_allotmen_CL.php');
		$varible_clase = new clase();
		$res=$varible_clase->lista_busqueda($_REQUEST["bot"]);
		$reg=mysqli_fetch_array($res);
		$_REQUEST['tap2']=$reg['descripcion'];
		$_REQUEST['n_reg']=$reg['n_reg'];
		$_REQUEST['fecini']=chfecha($reg['fecini'],'Y-m-d','d/m/Y');
		$_REQUEST['fecfin']=chfecha($reg['fecfin'],'Y-m-d','d/m/Y');
		$_REQUEST['numreservas']=$reg['numreservas'];
		$_REQUEST['ocupadas']=$reg['ocupadas'];
		}
?>
<style type="text/css">
<!--
.Estilo19 {font-size: 16px}
-->
</style>
<script language="javascript">
function ocultaMuestra(divVent){
	if(divVent.style.display=='none'){
		divVent.style.display='';

	}else{
		divVent.style.display='none';

	}
}	
	</script>
<body>

<form name="frm1" method="post" action="" enctype="multipart/form-data">
  <p>
    <input name="bot" type="hidden" value="<?php
 echo $_REQUEST['bot'];?>"> 
  </p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table width="431"  align="center">
    <tr>
      <th colspan="4">CONSULTAR ALLOTMENT. </th>
    </tr>
    <tr>
      <td width="85"><strong>CODIGO.</strong></td>
      <td width="330" colspan="3"><span class="Estilo19">
        <input name="tclave" type="text" id="tclave" tabindex="20" disabled="disabled" size="15" value="<?php
 echo $_REQUEST['n_reg']; ?> ">
      </span></td>
    </tr>
  </table>
  <div id="divVent" style="display:">
    <table width="431"  align="center"  >
      <tr>
        <td width="85"><strong>DESCRIPCION.</strong></td>
        <td width="330"><label>
        <input name="tap2" id="tap2" disabled="disabled" type="text" tabindex="2" value="<?php
 echo $_REQUEST['tap2']; ?> "
		  onBlur="may(this)" size="50"
		 <?php
 
		if(isset($_REQUEST['bot'])){
		echo 'value="'.$reg['descripcion'].'"';
		}
		?>>
        </label></td>
      </tr>
      <tr>
        <td><strong>NUMERO DE HABITACIONES. </strong></td>
        <td><input name="numreservas" type="text" id="numreservas"  value="<?php
 echo $_REQUEST['numreservas'];?>" disabled="disabled"
	   <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['numreservas'].'"';
		}
		?>></td>
      </tr>
      <tr>
        <td><strong>HABITACIONES OCUPADAS. </strong></td>
        <td><input name="ocupadas" type="text" id="ocupadas"  value="<?php
 echo $_REQUEST['ocupadas'];?>" disabled="disabled"
	   <?php
 
		if(isset($_POST['bot'])){
		echo 'value="'.$reg['ocupadas'].'"';
		}
		?>></td>
      </tr>
      <tr>
        <td><strong>FECHA DE LLEGADA. </strong></td>
   
        <td><input name="fecini" type="text" class="emplea datefrom" id="fecini" size="15" disabled="disabled"  
		<?php
 
		if(isset($_POST['bot'])){
		$fec1=$reg["fecini"];
		include('DF20000.php');
		echo 'value="'.$f_f.'"';
		}
		?>>
           <!-- <input name="reset" id="bot_a" type="image" src="logos/cal4.jpg"/>
            <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "fecini",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot_a"      // ID of the button
    }
  );
        </script> --> </td>
      </tr>
      <tr>
        <td><strong>FECHA DE SALIDA. </strong></td>
        <td><input name="fecfin" type="text" class="emplea dateto" id="fecfin" size="15" disabled="disabled" 
		<?php
 
		if(isset($_POST['bot'])){
		$fec1=$reg["fecfin"];
		include('DF20000.php');
		echo 'value="'.$f_f.'"';
		}
		?>>
         <!--   <input name="reset" id="bot_b" type="image" src="logos/cal4.jpg"/>
            <script type="text/javascript">
  Calendar.setup(
    {
      inputField  : "fecfin",        // ID of the input field
      ifFormat    : "%d/%m/%Y",    // the date format
      button      : "bot_b"      // ID of the button
    }
  );
        </script> -->       </td>
      </tr>
      <tr>
        <td height="29" colspan="2">
          <div align="center">
            <input type="button" name="bot4" value="Regresar" onClick="openpage('cat_allotmen_PR.php','_self')"/>
          </div></td>
      </tr>
    </table>
  </div>
  <div id="divArt" style="display:none">
</form>
    <?php
 
if(isset($_POST['bot3'])){
	echo '<div align="center"
<?php
 mysqli_close($con);?>>
	<form id="form1" name="form1" action="cat_allotmen_PR.php" target="_self">
		<input type="submit" name="submit" value="Regresar">
	</form>
	</div>';
	
}
?>
 <?php
 
}
?>
</body>
</html>
<?php
 mysqli_close($con);?>

</body>
</html>



