<?php
 
session_start();
$com = "M";
include("DMMYSQLG.php");
include("DSA1000.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="valeryus31001_PR.php" class="Estilo22">SECC. NUEVA PA</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="valeryus31002_PR.php" class="Estilo22">SECC. ORIGINAL PB</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="valeryus31003_PR.php" class="Estilo22">SECC. ORIGINAL PA</a>
<table width="883" border="0" align="center">
  <tr><th height="23" colspan="22" class=\"titulo\"><div align="center" class="Estilo18">CUENTA DE HUESPEDES</div></th></tr>
  <tr height="12" we>
    <td height="79"></td>
	<?php
$NUM='105';
	$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 style="#FF33CC" height="79" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">105<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 style="#999999" height="79"><span class="Estilo16">105<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td style="#CC0000" height="79" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">105<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933" height="79" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">105</span></td>
	<?php
} ?>
    
    <td colspan="2" rowspan="2" style="#0066CC"></td>
    <?php
$NUM='104';
	$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 style="#FF33CC" width="121" height="79" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">104<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 style="#999999" width="68" height="79"><span class="Estilo16">104<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td style="#CC0000" width="68" height="79" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">104<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933" width="67" height="79" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">104</span></td>
	<?php
} ?>
	
   
  </tr>
  <tr height="12" we>
  <?php
$NUM='107';
	$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 rowspan="2" style="#FF33CC" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">107<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 rowspan="2" style="#999999"><span class="Estilo16">107<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td rowspan="2" style="#CC0000" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">107<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}else{ ?>
	<td width="21" rowspan="2" style="#339933" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">107</span></td>
	<?php
} ?>
    <td height="20"></td>
    <td width="121"></td>
    <td height="20"></td>
    
    
  </tr>
  <tr height="12" we>
    <td height="107" width="100"></td>
    <td colspan="3" rowspan="2" style="#0066CC" height="145"><span class="Estilo17">ALBERCA</span></td>
    <td height="107"></td>
    
    
  </tr>
  <tr height="12" we>
  <?php
$NUM='106';
	$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="92" height="137" style="#FF33CC" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">106<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="92" height="137" style="#999999"><span class="Estilo16">106<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="92" height="137" style="#CC0000" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">106<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="92" height="137" style="#339933" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">106</span></td>
	<?php
} ?>
    
    <td width="100" height="137"></td>
    <td height="137"></td>
  </tr>
  <tr height="12" we>
    <td height="17"></td>
    <td height="17"></td>
    <td width="119" height="17"></td>
    <td width="127" height="17"></td>
    <td width="121" height="17"></td>
    <td height="17"></td>
    <td height="17"></td>
    <td height="17"></td>
    <td height="17"></td>
  </tr>
  <tr height="12" we>
    <td height="75"></td>
    <td height="75"></td>
	<?php
$NUM='101';
	$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="119" height="75" style="#FF33CC" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">101<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="119" height="75" style="#999999"><span class="Estilo16">101<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="119" height="75" style="#CC0000" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">101<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="119" height="75" style="#339933" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">101</span></td>
	<?php
} ?>
    
	<?php
$NUM='102';
	$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 style="#FF33CC" width="127" height="75" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">102<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 style="#999999" width="127" height="75"><span class="Estilo16">102<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td style="#CC0000" width="127" height="75" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">102<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933" width="127" height="75" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">102</span></td>
	<?php
} ?>
    
	<?php
$NUM='103';
	$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 style="#FF33CC" width="121" height="75" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">103<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 style="#999999" width="68" height="75"><span class="Estilo16">103<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td style="#CC0000" width="68" height="75" onClick="openpage('ger_mapeo_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">103<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}else{ ?>
	<td style="#339933" width="67" height="75" onClick="openpage('ger_mapeo_A.php?ncto=<?php
echo $NUM; ?>','_self')"><span class="Estilo16">103</span></td>
	<?php
} ?>
    
  </tr>
  <tr height="12" we>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
    <td height="21"></td>
  </tr>
</table>
</form>
</body>
<?php
 
mysqli_close($con); //319 ultima actualizacion 25/abril/2011
                   //305 ultima actualizacion 25/abril/2011
				   //384 ultima actualizacion 14/noviembre/2011
?>
</html>