<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");
include("DF30000.inc");
include("DF80000.php");
$f_f="";
?>
<html>
<head>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<?php

require_once("DFJQUERY.inc");
?>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<style type="text/css">
<!--
#Layer1 {
	position:absolute;
	width:944px;
	height:149px;
	z-index:1;
	left: 93px;
	top: 240px;
}
</style>
<style>
#regBus{
height:400px;
overflow:auto;
}
</style>
</head>
<body>
<div align="center">
  <form name="form1" method="post" action="">
    <table width="458" border="0" align="center">
      <tr>
        <th colspan="2"><span class="Estilo1">CUENTA DE HISTORICOS </span></th>
      </tr>
    </table>
  </form>
</div>
<div align="center">
<form name="frm1" id="frm1" method="post" action="">
<?php
if(!isset($dt_empres['fec_alta']))$dt_empres['fec_alta']="";
$fecha = $dt_empres['fec_alta'];
$sql = mysqli_query($con ,"SELECT * FROM valeryus19 WHERE status='HISTORICO' and tus='IN' ORDER BY fnumcto");
include("DE10000.php");
?>
<table width="957"  cellpadding="0" cellspacing="0" >
<tr> <th colspan="11"> <div align="left"> </div>
<div align="left">
   <input name="det_inv" type="button" class="form" id="det_inv" onClick="openpage('caj_cuentas_AG-DET.php','_self')" value="Cuenta De Historico">
	    </div></th></tr>
      <tr>
        <th width="21"  nowrap><div align="center">SEL</div></th>
        <th width="37"  nowrap><div align="left">FOLIO</div></th>
        <th width="93"  nowrap><div align="left">FOTOGRAFIA</div></th>
		<th width="83">HABITACION</th>
		<th width="153"  nowrap>CLIENTE</th>
		<th width="42"  nowrap>SALDO</th>
		<th width="98"  nowrap>STATUS</th>
		<th width="122"  nowrap>FECHA DE ENTRADA</th>
		<th width="109"  nowrap>FECHA DE SALIDA</th>
		<th width="135"  nowrap>TARIFA</th>	
		<th width="135"  nowrap>FORMA DE PAGO</th>	
    </tr>
	
	<?php	while($reg = mysqli_fetch_array($sql))
	{
	  	echo "<tr>";
		echo '<td style="background:#FF9933"> <div align="center" style="background-color:$reg["almacen"]"><input name="bot" type="radio" value="'. $reg["n_reg"].'"></div></td>';
		echo "<td style='background:#FF9933'> <div align='center'><strong><h5>" . $reg["n_reg"] . "&nbsp;</h5></strong></div></td>";
		$fotografia = 'foto/valeryus19/NO_'. $reg["n_reg"] .'.JPG';
		if (file_exists($fotografia)) {
		echo '<td class="inputcodigo"><div align="center"><img src="foto/valeryus19/NO_'.$reg["n_reg"].'.JPG" width="80" height="55">&nbsp</div></td>';
		}else{
		echo '<td class="inputcodigo"><div align="center"><img src="foto/sin_producto.jpg" width="40" height="40">&nbsp</div></td>';
		}
		echo "<td style='background:#FF9933'> <div align='center'><strong><h5>" . $reg["fmuncto"] . "&nbsp;</h5></strong></div></td>";
		echo "<td style='background:#FF9933'> <div align='left'><strong><h5>" . $reg["fapellido"] .' '. $reg["fnombre"] . "&nbsp;</h5></strong></div></td>";
		echo "<td style='background:#FF9933'> <div align='center'><h5>$" . $reg["suma"] . "&nbsp;</h5></div></td>";
		echo "<td style='background:#FF9933'> <div align='center'><h5>" . $reg["status"] . "&nbsp;</h5></div></td>";
		$fec1=$reg["ffecllegada"];
		include('DF20000.php');
		echo "<td style='background:#FF9933'> <div align='center'><strong><h5>" . $f_f . "&nbsp</h5></strong></div></td>";
		$fec1=$reg["ffecsalida"];
		include('DF20000.php');
		echo "<td style='background:#FF9933'> <div align='center'><h5>" . $f_f . "&nbsp</h5></div></td>";
		if ($reg['tex4']!=0)
		  $tar="" .$reg['tex']."-".$reg['tex4']."";
		else if ($reg['text4']!=0)
		  $tar="".$reg['text1']."-".$reg['text4']."";	
		else if (($reg['tex']!=0)&&($reg['text4']!=0))  
          $tar="" .$reg['tex']."-".$reg['tex4']." | ".$reg['text1']."-".$reg['text4']."";
		else 
			$tar="";
		echo "<td style='background:#FF9933'> <div align='center'><h5>".$tar."</h5></div></td>";
		echo "<td style='background:#FF9933'> <div align='left'><h5>" . $reg['fformpago'] . "&nbsp</h5></div></td>";
		echo "</tr>";
	}
	?>
  </table>
  </form>
</div>
</body>
</html>
<?php

//285 --> 100
?>