<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
//include("DSA3000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
include("DF80000.php");
include ("varfun.php");

?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<script language="javascript">
function openWindow(dataGen,valores){
	var objDate=new Date();
	var getVars,getVarsAux,distPage;
	var idVentana;
	for(getVarsAux in valores){
		getVars +='&'+getVarsAux+'='+valores['getVarsAux'];
	}
	if(typeof dataGen.width=='undefined') dataGen.width='800';
	if(typeof dataGen.height=='undefined') dataGen.height='600';
	distPage='?tmr='+objDate.getHours()+objDate.getMinutes()+objDate.getSeconds()+objDate.getDay()+objDate.getMonth()+objDate.getFullYear();
	idVentana=window.open(dataGen.action+distPage+getVars,dataGen.name,'width='+dataGen.width+',height='+dataGen.height+',top=100,left=50,scrollbars=yes,menubar=yes,status=yes');
	return idVentana;
}
</script>

<body>
<form  name="frm1" method="post" action="" enctype="multipart/form-data">
<input name="bot" type="hidden" value="<?php
 echo $_POST["bot"]?>">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="ger_mapeo_PR.php" class="Estilo22">SECC. NUEVA PB</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="valeryus31001_PR.php" class="Estilo22">SECC. NUEVA PA</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="valeryus31003_PR.php" class="Estilo22">SECC. ORIGINAL PA</a>
<table width="883" height="100" border="0" align="center" onMouseOver="sumaTex();restaTex();totalTex();">
  <tr><th colspan="15" class=\"titulo\"><div align="center" class="Estilo18">CUENTA DE HUESPEDES</div></th></tr>
  <tr>
   
   
   <td width="137" height="100">&nbsp;</td>
   <td width="220" height="100">&nbsp;</td>
   <?php
$NUM='125';
	$fecha1 = (isset($dt_empres['fec_alta']))?$dt_empres['fec_alta']:"";
	$sql=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED' and ffecsalida='$fecha1'");
	$sqd=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and ffecllegada='$fecha1' and cancelado='0' and status='RESERVA INDIVIDUAL'");    $sqk=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED'");
	$num_salidas=mysqli_num_rows($sql);
	$num_out=mysqli_num_rows($sqd);
	$num_fad=mysqli_num_rows($sqk);
	if ($num_salidas!=0){ 
	$array=mysqli_fetch_array($sql);?>
	<td width="67" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">125<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}elseif($num_out!=0){
	$array=mysqli_fetch_array($sqd);?>
	<td width="38" style="#999999"><span class="Estilo16">125<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="33" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">125<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="35" style="#339933"><span class="Estilo16">125</span></td>
	<?php
} ?>

   <?php
$NUM='124';
	$fecha1 = (isset($dt_empres['fec_alta']))?$dt_empres['fec_alta']:"";
	$sql=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED' and ffecsalida='$fecha1'");
	$sqd=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and ffecllegada='$fecha1' and cancelado='0' and status='RESERVA INDIVIDUAL'");    $sqk=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED'");
	$num_salidas=mysqli_num_rows($sql);
	$num_out=mysqli_num_rows($sqd);
	$num_fad=mysqli_num_rows($sqk);
	if ($num_salidas!=0){ 
	$array=mysqli_fetch_array($sql);?>
	<td width="61" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">124<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}elseif($num_out!=0){
	$array=mysqli_fetch_array($sqd);?>
	<td width="79" style="#999999"><span class="Estilo16">124<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="66" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">124<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="77" style="#339933"><span class="Estilo16">124</span></td>
	<?php
} ?>
   
   <td width="24" height="100">&nbsp;</td>
  </tr>
  <tr>
    <td width="137" height="100" rowspan="2">&nbsp;</td>
   <td width="220">&nbsp;</td>
   <td width="67">&nbsp;</td>
    <td height="49">&nbsp;</td>
    <td height="100" rowspan="2">&nbsp;</td>
   
    
    <?php
$NUM='123';
	$fecha1 = (isset($dt_empres['fec_alta']))?$dt_empres['fec_alta']:"";
	$sql=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED' and ffecsalida='$fecha1'");
	$sqd=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and ffecllegada='$fecha1' and cancelado='0' and status='RESERVA INDIVIDUAL'");    $sqk=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED'");
	$num_salidas=mysqli_num_rows($sql);
	$num_out=mysqli_num_rows($sqd);
	$num_fad=mysqli_num_rows($sqk);
	if ($num_salidas!=0){ 
	$array=mysqli_fetch_array($sql);?>
	<td height="100" rowspan="2" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">123<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}elseif($num_out!=0){
	$array=mysqli_fetch_array($sqd);?>
	<td height="25" rowspan="2" style="#999999"><span class="Estilo16">123<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td height="25" rowspan="2" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">123<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td height="25" rowspan="2" style="#339933"><span class="Estilo16">123</span></td>
	<?php
} ?>
  </tr>
  <tr>
    <td height="49" colspan="3" style="#0066CC">&nbsp;</td>
    </tr>
  <tr>
  <td height="100">&nbsp;</td>
    <td height="100" colspan="3" style="#0066CC"><span class="Estilo23">ALBERCA</span></td>
    <td height="100">&nbsp;</td>
    
    
    <?php
$NUM='122';
	$fecha1 = (isset($dt_empres['fec_alta']))?$dt_empres['fec_alta']:"";
	$sql=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED' and ffecsalida='$fecha1'");
	$sqd=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and ffecllegada='$fecha1' and cancelado='0' and status='RESERVA INDIVIDUAL'");    $sqk=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED'");
	$num_salidas=mysqli_num_rows($sql);
	$num_out=mysqli_num_rows($sqd);
	$num_fad=mysqli_num_rows($sqk);
	if ($num_salidas!=0){ 
	$array=mysqli_fetch_array($sql);?>
	<td height="100" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">122<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}elseif($num_out!=0){
	$array=mysqli_fetch_array($sqd);?>
	<td height="25" style="#999999"><span class="Estilo16">122<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td height="25" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">122<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td height="25" style="#339933"><span class="Estilo16">122</span></td>
	<?php
} ?>
  </tr>
  <tr>
  <td height="100">&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td height="100">&nbsp;</td>
    
    
    <?php
$NUM='121';
	$fecha1 = (isset($dt_empres['fec_alta']))?$dt_empres['fec_alta']:"";
	$sql=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED' and ffecsalida='$fecha1'");
	$sqd=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and ffecllegada='$fecha1' and cancelado='0' and status='RESERVA INDIVIDUAL'");    $sqk=mysqli_query($con ,"select * from valeryus19 where fnumcto='$NUM' and status='HUESPED'");
	$num_salidas=mysqli_num_rows($sql);
	$num_out=mysqli_num_rows($sqd);
	$num_fad=mysqli_num_rows($sqk);
	if ($num_salidas!=0){ 
	$array=mysqli_fetch_array($sql);?>
	<td height="100" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">121<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}elseif($num_out!=0){
	$array=mysqli_fetch_array($sqd);?>
	<td width="61" height="100" style="#999999"><span class="Estilo16">121<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="79" height="100" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">121<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="66" height="100" style="#339933"><span class="Estilo16">121</span></td>
	<?php
} ?>
  </tr>
</table>
</form>
</body>
<?php
 
mysqli_close($con); //ultima actualizacion 25/abril/2011
                   //490 ultima actualizacion 13/octubre/2011
				   //636 ultima actualizacion 14/noviembre/2011
?>
</html>