<?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="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="1010" height="100" border="0" align="center" onMouseOver="sumaTex();restaTex();totalTex();">
  <tr><th colspan="10" class=\"titulo\"><div align="center" class="Estilo18">CUENTA DE HUESPEDES</div></th></tr>
  <tr>
   <td width="96">&nbsp;</td>
   <td width="100" height="100">&nbsp;</td>
   
   <td width="100">&nbsp;</td>
   <?php
$NUM='206';
	$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="100" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">206<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="100"><span class="Estilo16">206<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="100" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">206<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933" width="100"><span class="Estilo16">206</span></td>
	<?php
} ?>
   <td width="100">&nbsp;</td>
   <td width="100">&nbsp;</td>
   <?php
$NUM='205';
	$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="100" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">205<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="100"><span class="Estilo16">205<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="100" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">205<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933" width="100"><span class="Estilo16">205</span></td>
	<?php
} ?>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td>&nbsp;</td>
    <?php
$NUM='207';
	$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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">207<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"><span class="Estilo16">207<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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">207<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}else{ ?>
	<td style="#339933"><span class="Estilo16">207</span></td>
	<?php
} ?>
	
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td>&nbsp;</td>
    <?php
$NUM='208';
	$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="95" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">208<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="95" style="#999999"><span class="Estilo16">208<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td width="95" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">208<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td width="95" style="#339933"><span class="Estilo16">208</span></td>
	<?php
} ?>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="20">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="100">&nbsp;</td>
    <td>&nbsp;</td>
	<?php
$NUM='201';
	$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="50" style="#FF33CC" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">201<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="50" style="#999999"><span class="Estilo16">201<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre'].""?>]</span></span></td>
	<?php
}elseif($num_fad!=0){
	$array=mysqli_fetch_array($sqk); ?>
	<td height="50" style="#CC0000" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">201<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}else{ ?>
    <td height="50" style="#339933"><span class="Estilo16">201</span></td>
	<?php
} ?>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td height="100">&nbsp;</td>
    <?php
$NUM='202';
	$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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg'] ?>','_self')"><span class="Estilo16">202<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"><span class="Estilo16">202<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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg'] ?>','_self')"><span class="Estilo16">202<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
	<?php
}else{ ?>
	<td style="#339933"><span class="Estilo16">202</span></td>
	<?php
} ?>
    
	<?php
$NUM='203';
	$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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">203<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"><span class="Estilo16">203<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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">203<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>
    <?php
}else{ ?>
	<td style="#339933"><span class="Estilo16">203</span></td>
	<?php
} ?>
	
	<?php
$NUM='204';
	$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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">204<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"><span class="Estilo16">204<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" onClick="openpage('valeryus31001_MO.php?bit=<?php
echo $array['n_reg']; ?>','_self')"><span class="Estilo16">204<span class="Estilo21">[<?php
echo "".$array['fapellido']." ".$array['fnombre']."-->$".number_format($array['suma'],2,'.',',').""?>]</span></span></td>	
	<?php
}else{?>
	<td style="#339933"><span class="Estilo16">204</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>