<?php

session_start();

include("DMMYSQLG.php"); 
include("JQUERY.inc");
?>
<html>
<link rel="stylesheet" href="css/estilo1.css" type="text/css"/>
<script type="text/javascript" language="JavaScript1.2" src="DSSCRIPT.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/javascript" src="js/click.js"></script>
</head>
<body>

<div align="center">
<form name="frm1" method="post" action="" >
<?php

$fecha=$_GET['fecha'];
$grupo=urldecode($_GET['grupo']);
$sql=mysqli_query($con ,"SELECT * FROM valeryus19 where status='RESERVA GRUPO' and fcodgrupo='$grupo' and cancelado='0' order by n_reg");
?>
<table width="1108" border='1'>
      <tr>
        <th colspan="11" > 
			<div id="sticky-anchor"></div>
			<div align="center" id="sticky">    
			  <input type="Submit" name="bot3" value="Consultar Folio"  onClick="openpage('valeryus40010_CO.php','_self')" class="bot_WsW"/>
			  <input type="button" name="bot" value="Modificar Folio" onClick="openpage('res_grupos_MO.php','_self')" class="original"/>
			  <input type="button" name="bot1" value="Cancelar Folio" onClick="openpage('res_grupos_EL.php','_self')" class="bot_RjR"/>		  
					<input name="bot44" type="button" class="original" onClick="edit();" value="Editar Grupo"/>    
					 <input name="bot44" type="button" class="original" onClick="openextras();" value="Extras"/>    
					  <input type="button" name="Submit" value="Regresar" onClick="openpage('res_grupos_PR.php','_self')" class="bot_WsW"/>
			</div>
		</th>
      </tr>
	  <tr>
      <th colspan="11" id="nameg">GRUPO: <?php
echo "".$grupo."";?> </th>
      </tr>
      <tr>
      <th width="30"><div align="center">SEL</div></th>
      <th width="50"><div align="center">FOLIO</div></th>  
      <th width="200"><div align="center">GRUPO</div></th>
	  <th width="90"><div align="center">HABITACION</div></th>
	  <th width="150"><div align="center">TIPO</div></th>
	  <th width="200"><div align="center">NOMBRE</div></th>
 <th width="200"><div align="center">APELLIDO</div></th>
	  <th width="50"><div align="center">ADUL</div></th>
	  <th width="50"><div align="center">MEN</div></th>
	  <th width="115"><div align="center">FEC. DE ENTRADA</div></th>
	  <th width="115"><div align="center">FEC. DE SALIDA</div></th>
      <th width="100"><div align="center">STATUS</div></th>
	  
    </tr>
<?php
  

while($row = mysqli_fetch_array($sql)){
	echo "	<tr>";
	//mediante el evento onclick llamaremos a la funcion PedirDatos(), la cual tiene como parametro
	//de entrada el ID del empleado
        $disabled=( $row["ftipocto"] =="MAESTRA")? "disabled title='maestra'" :"";
        
	if ($row['cancelado'] == 1){
	echo "<td> <div align='center'><input name='bot' type='radio' value='". $row["n_reg"]."' disabled>"
                . "<input name='fno' type='hidden'  id='fno-". $row["n_reg"]."' value='". $row["fnorasvip"]."' >"
                . "</div></td>";
	echo "<td><div align='center'><input class='Estilo1 edit'  ><a style=\"pedirDatos('".$row['n_reg']."')\">".$row['n_reg']." </input></div></a></td>";
	echo "<td> <div align='center'><span class='Estilo1 edit gpo'  $disabled id='nombh-". $row["n_reg"]."'>" . $row["fcodgrupo"] . "</span></div></td>";
        echo "<td> <div align='center'><span class='Estilo1 edit' $disabled  id='numeh-". $row["n_reg"]."' style=' width: 30px;' > " . $row["fnumcto"] . "</span></div></td>";
	echo "<td> <div align='center'><span class='Estilo1 edit'   id='tipo-". $row["n_reg"]."'> " . $row["ftipocto"] . " </span></div></td>";
	echo "<td> <div align='center'><input class='Estilo1 edit' $disabled  id='nom-". $row["n_reg"]."' style=' width: 100px;' value='" . $row["fnombre"] . "'/></div></td>";
echo "<td> <div align='center'><input class='Estilo1 edit'          id='ape-". $row["n_reg"]."' style=' width: 100px;' value='" .  $row["fapellido"] . "'/></div></td>";
        echo "<td> <div align='center'><input class='Estilo1 edit' $disabled id='adu-". $row["n_reg"]."' style=' width: 30px;' value='" . $row["fnumadu"] . "'/></div></td>";
	echo "<td> <div align='center'><input class='Estilo1 edit' $disabled id='men-". $row["n_reg"]."' style=' width: 30px;' value='" . $row["fnummenor"] . "'/></div></td>";
	$fec1=$row["ffecllegada"];
	include('DF20000.php');
	echo "<td > <div align='center'><input class='Estilo1 edit datefrom' id='ent-". $row["n_reg"]."' value='" . $f_f . "'/></div></td>";
	$fec1=$row["ffecsalida"];
	include('DF20000.php');
	echo "<td > <div align='center'><input class='Estilo1 edit dateto' id='sal-". $row["n_reg"]."' value='" . $f_f . "/></div></td>";
	echo "<td > <div align='center'><span class='Estilo1 edit'>CANCELADO</span></div></td>";
	

	}else{
	echo '<td> <div align="center"><input name="bot" type="radio"    value="'. $row["n_reg"].'"/>'
                . "<input name='fno' type='hidden'  id='fno-". $row["n_reg"]."' value='". $row["fnorasvip"]."' >"
                . '</div></td>';
	echo "<td><div align='center'><input class='Estilo1 edit' $disabled id='num-". $row["n_reg"]."'  value='" . $row["n_reg"] . "' disabled/></div></td>";
	echo "<td > <div align='center'><span class='Estilo1 edit gpo' $disabled id='nombh-". $row["n_reg"]."'>" . $row["fcodgrupo"] . "</span></div></td>";
        echo "<td > <div align='center'><span class='Estilo1 edit' $disabled id='numeh-". $row["n_reg"]."' style=' width: 30px;' >  " . $row["fnumcto"] . "</span></div></td>";
        echo "<td> <div align='center'><span class='Estilo1 edit' $disabled id='tipo-". $row["n_reg"]."'> " . $row["ftipocto"] . " </span></div></td>";
	echo "<td > <div align='center'><input class='Estilo1 edit' $disabled id='nom-". $row["n_reg"]."'  value='" . $row["fnombre"] . "'/></div></td>";
        echo "<td > <div align='center'><input class='Estilo1 edit' $disabled id='ape-". $row["n_reg"]."'  value='" .  $row["fapellido"] . "'/></div></td>";
	echo "<td> <div align='center'><input class='Estilo1 edit' $disabled id='adu-". $row["n_reg"]."' style=' width: 30px;' value='" . $row["fnumadu"] . "'/></div></td>";
	echo "<td> <div align='center'><input class='Estilo1 edit' $disabled id='men-". $row["n_reg"]."' style='width: 30px;' value='" . $row["fnummenor"] . "'/></div></td>";
	$fec1=$row["ffecllegada"];
	include('DF20000.php');
	echo "<td> <div align='center'><input class='Estilo1 edit datefrom' $disabled id='ent-". $row["n_reg"]."' value='" . $f_f . "'/></div></td>";
	$fec1=$row["ffecsalida"];
	include('DF20000.php');
	echo "<td><div align='center'><input class='Estilo1 edit dateto' $disabled id='sal-". $row["n_reg"]."' value='" . $f_f . "'/></div></td>";
	echo "<td><div align='center'><span class='Estilo1 edit'></span></div></td>";
	
	}
	
	echo "	</tr>";
}
mysqli_close($con);
?>
</table>
</form>
</div>
</body>
</html>
