Este es el archivo dos que recoge datos y selecciona otro y lo envia en get
Código PHP:
<?
/*************************************************************************************
Notas:
*************************************************************************************/
//Nombre de la pagina
define ( "PAGE", "Reservaciones " );
//seguridad
include_once '../security.php';
//Consultas
include_once '../includes/config.php';
include_once '../includes/general.php';
include_once '../clases/clases.php';
include_once '../clases/bicicletas.php';
include_once '../clases/salas.php';
include_once '../clases/horarios.php';
include_once '../clases/tipomembresias.php';
include_once '../clases/reservaciones.php';
include_once '../clases/cliente.class.php';
include_once '../clases/status.php';
//Variables
//print_r($_SESSION);
$Cargo = $_SESSION ['SESS_Cargo'];
$IdUsuario = $_SESSION ['SESS_MEMBER_ID'];
if (isset ( $HTTP_POST_VARS ['IdHorario'] )) {$IdHorario = $HTTP_POST_VARS ['IdHorario'];}
else { if (isset ( $_GET ['IdHorario'] )) { $IdHorario = $_GET ['IdHorario']; }
else { $IdHorario = 0; } }
if (isset ( $HTTP_POST_VARS ['IdSala'] )) {$IdSala = $HTTP_POST_VARS ['IdSala'];}
else { if (isset ( $_GET ['IdSala'] )) { $IdSala = $_GET ['IdSala']; }
else { $IdSala = 0; } }
if (isset ( $HTTP_POST_VARS ['Bicicleta'] )) {$Bicicleta = $HTTP_POST_VARS ['Bicicleta'];}
else { if (isset ( $_GET ['Bicicleta'] )) { $Bicicleta = $_GET ['Bicicleta']; }
else { $Bicicleta = 0; } }
if (isset ( $HTTP_POST_VARS ['Lunes'] )) {$Lunes = $HTTP_POST_VARS ['Lunes'];}
else { if (isset ( $_GET ['Lunes'] )) { $Lunes = $_GET ['Lunes']; }
else { $Lunes = 0; } }
if (isset ( $HTTP_POST_VARS ['Martes'] )) {$Martes = $HTTP_POST_VARS ['Martes'];}
else { if (isset ( $_GET ['Martes'] )) { $Martes = $_GET ['Martes']; }
else { $Martes = 0; } }
if (isset ( $HTTP_POST_VARS ['Sesiones'] )) {$Sesiones = $HTTP_POST_VARS ['Sesiones'];}
else { if (isset ( $_GET ['Sesiones'] )) { $Sesiones = $_GET ['Sesiones']; }
else { $Sesiones = 0; } }
if (isset ( $HTTP_POST_VARS ['Miercoles'] )) {$Miercoles = $HTTP_POST_VARS ['Miercoles'];}
else { if (isset ( $_GET ['Miercoles'] )) { $Miercoles = $_GET ['Miercoles']; }
else { $Miercoles = 0; } }
if (isset ( $HTTP_POST_VARS ['Jueves'] )) {$Jueves = $HTTP_POST_VARS ['Jueves'];}
else { if (isset ( $_GET ['Jueves'] )) { $Jueves = $_GET ['Jueves']; }
else { $Jueves = 0; } }
if (isset ( $HTTP_POST_VARS ['Viernes'] )) {$Viernes = $HTTP_POST_VARS ['Viernes'];}
else { if (isset ( $_GET ['Viernes'] )) { $Viernes = $_GET ['Viernes']; }
else { $Viernes = 0; } }
if (isset ( $HTTP_POST_VARS ['Sabado'] )) {$Sabado = $HTTP_POST_VARS ['Sabado'];}
else { if (isset ( $_GET ['Sabado'] )) { $Sabado = $_GET ['Sabado']; }
else { $Sabado = 0; } }
if (isset ( $HTTP_POST_VARS ['IdTipoMembresia'] )) {$IdTipoMembresia = $HTTP_POST_VARS ['IdTipoMembresia'];}
else { if (isset ( $_GET ['IdTipoMembresia'] )) { $IdTipoMembresia = $_GET ['IdTipoMembresia']; }
else { $IdTipoMembresia = 0; } }
if (isset ( $HTTP_POST_VARS ['Status'] )) {$IdStatusr = $HTTP_POST_VARS ['Status'];}
else { if (isset ( $_GET ['Status'] )) { $IdStatusr = $_GET ['Status']; }
else { $IdStatusr = 2; } }
if (isset ( $HTTP_POST_VARS ['Activo'] )) {$Activo = $HTTP_POST_VARS ['Activo'];}
else { if (isset ( $_GET ['Activo'] )) { $Activo = $_GET ['Activo']; }
else { $Activo = 0; } }
if (isset ( $HTTP_POST_VARS ['FechaIni'] )) {$FechaIni = $HTTP_POST_VARS ['FechaIni'];}
else { if (isset ( $_GET ['FechaIni'] )) { $FechaIni = $_GET ['FechaIni']; }
else { $FechaIni = 0; } }
if (isset ( $HTTP_POST_VARS ['Msg'] )) {
$Msg = $HTTP_POST_VARS ['Msg'];
} else {
if (isset ( $_GET ['Msg'] )) {
$Msg = $_GET ['Msg'];
} else {
$Msg = '';
}
}
$i = 1 ;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?=PAGE . ' | ' . SITENAME;?></title>
<?
require_once '../metatags.php';
?>
<? require_once '../includes/javascript.php';?>
<SCRIPT LANGUAGE=javascript>
<!--
function Validate(frm)
{
if(ValidateForm(frm))
{
frm.submit();
}
}
//-->
</SCRIPT>
</head>
<body>
<?
require_once '../encabezado.php';
?>
<table width="100%" height="100%" border="0" cellpadding="5"
cellspacing="5" bgcolor="#FFFFFF">
<tr>
<td height="10" class="ParagraphTitle">Nueva Clase </td>
</tr>
<tr>
<td valign="top">
<center>
<h2><?=$Msg;?></h2>
</center>
<form name="bicis" action="#" method="post">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<td><input type="hidden" name="IdTipoMembresia" value="<?=$IdTipoMembresia;?>" /></td>
<td><input type="hidden" name="IdHorario" value="<?=$IdHorario;?>" /></td>
<td><input type="hidden" name="IdSala" value="<?=$IdSala;?>" /></td>
<td><input type="hidden" name="FechaIni" value="<?=$FechaIni;?>" /></td>
<td><input type="hidden" name="Sesiones" value="<?=$Sesiones;?>" /></td>
<td><input type="hidden" name="Lunes" value="<?=$Lunes;?>" /></td>
<td><input type="hidden" name="Martes" value="<?=$Martes;?>" /></td>
<td><input type="hidden" name="Miercoles" value="<?=$Miercoles;?>" /></td>
<td><input type="hidden" name="Jueves" value="<?=$Jueves;?>" /></td>
<td><input type="hidden" name="Viernes" value="<?=$Viernes;?>" /></td>
<td><input type="hidden" name="Sabado" value="<?=$Sabado; ?>" /></td>
<ul>
<li>Membresia:<?=$IdTipoMembresia?></li>
<li>Socio:<?= $IdUsuario; ?></li>
<li>Horario:<?=$IdHorario;?></li>
<li>Sala:<?=$IdSala;?></li>
<li>Fecha De Reservacion:<?= $FechaIni ?></li>
<li>Días</li>
<li>Lunes:<?=$Lunes?></li>
<li>Martes:<?= $Martes ?></li>
<li>Miercoles:<?=$Miercoles;?></li>
<li>Jueves:<?= $Jueves; ?></li>
<li>Viernes:<?=$Viernes?></li>
<li>Sabado:<?= $Sabado; ?></li>
</ul><br/><br/>
Seleccione La Bicicleta De Su Preferencia<br/>
<?php
$RBicicletas = RegresaBicicletas($IdHorario,$IdSala);
while ($Biciclietasinfo = mysql_fetch_array($RBicicletas ))
{
//print_r($Biciclietasinfo);
//echo "i =".$i."<br/>";
if ($i == 1) {
$Ini = "<tr><td>" ;
$Fin = "</td>" ;
} elseif ($i == 7){
$Ini = "<td>" ;
$Fin = "</td></tr>" ;
} else {
$Ini = "<td>" ;
$Fin = "</td>" ;
}
if ($Biciclietasinfo['Estado'] == "1" ) {
echo $Ini ;
?>
<a href="recbici.php?&Bicicleta=<?= $Biciclietasinfo['IdBicicleta'] ;?>&Sala=<?=$IdSala ;?>&FechaIni=<?=$FechaIni;?>&IdHorario=<?=$IdHorario;?>&Sesiones=<?=$Sesiones ?>&Lunes=<?=$Lunes ;?>&Martes=<?=$Martes ;?>&Miercoles=<?=$Miercoles ;?>&Jueves=<?=$Jueves ;?>&Viernes=<?=$Viernes ;?>&Sabado=<?=$Sabado ;?>&Membresia=<?=$IdTipoMembresia;?>" /> <img src="<?= URLBASE ; ?>images/<?= DISPONIBLE ; ?>" border="0" /><br/>
<?= $Biciclietasinfo['IdBicicleta'] ; ?></a>
<?php
echo $Fin ;
}else{
echo $Ini ;
?>
<img src="<?= URLBASE ; ?>images/<?= OCUPADA ; ?>" border="0" /><br/>
<?= $Biciclietasinfo['IdBicicleta'] ; ?>
<?php
echo $Fin ;
}
If ($i == 7){
$i = 1 ;
}else {
$i = $i + 1 ;
}
} ?>
</form>
</td>
</tr>
</table>
<?
require_once '../footer.php';
?>
</body>
</html>