Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/12/2010, 09:19
sniffer_ven
 
Fecha de Ingreso: mayo-2009
Mensajes: 131
Antigüedad: 15 años
Puntos: 0
ayuda para listar fila

hola tengo un problema con este codigo que no me lista las fila es un pequeño sistema para la reserva de boletos de bus. Las fila que nesesito listar son de horario, tarifa, y tiempo de recorrido el codigo es este:

Código:
<?php
include("db.php");
?>
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<!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" xml:lang="en" lang="en">
<head>
<script language="javascript" type="text/javascript" src="/AT/js/util.js"></script>
<link rel="stylesheet" type="text/css" href="/AT/styles/estilo.css" />
<link rel="shortcut icon" href="/AT/images/favicon.ico"/> 
<title>Boletaje Autobuses Tlapacoyan [ Seleccionar Corrida ]</title>
</head>

<body onload="Util.scrlsts();">
<div id="Cabecera" align="center">
	<img src="/AT/images/logo.jpg" alt="Autobuses Tlapacoyan"/>
</div>

<?php
if(isset($_GET['or']) && isset($_GET['de']) && isset($_GET['fe']) && isset($_GET['fh']))
{
	//Cargamos los valores de los datos.
	$origen=base64_decode($_GET['or']);
	$destino=base64_decode($_GET['de']);
	$fecha=base64_decode($_GET['fe']);
	$fechaHoy=base64_decode($_GET['fh']);
	$fechaHoy=explode("-",$fechaHoy);
	$fecha=explode("-",$fecha);
	$fechaHoy = date("Y-m-d",mktime(0,0,0,$fechaHoy[1],$fechaHoy[0],$fechaHoy[2]));
	$fecha = date("Y-m-d",mktime(0,0,0,$fecha[1],$fecha[0],$fecha[2]));
	$hora = getdate(time());
	$hora=($hora["hours"] +18). ":" . $hora["minutes"] . ":" . $hora["seconds"] ; 
	//Creamos la consulta SQL
	/*if($fecha==$fechaHoy)
		$tabla = mysql_query("select b.id,b.hora_salida,b.precio,b.hora_llegada 
		from boleto b 
		where 
		b.ciudad_salida like('$origen') 
		and b.ciudad_llegada like('$destino') 
		and b.fecha_salida like('$fecha') 
		and b.hora_salida > '$hora' ");
	else if($fecha>$fechaHoy)*/
		$tabla = mysql_query("select b.id,b.hora_salida,b.precio,b.hora_llegada 
		from boleto b 
		where 
		b.ciudad_salida like('$origen') 
		and b.ciudad_llegada like('$destino') 
		and b.fecha_salida like('$fecha')");
	/*else
	{
?>
	<div class="error">
	Ha Sucedido Una Excepci&oacute;n Por Favor Ingrese A La 
	<a href="/AT/" >P&aacute;gina Principal.</a></div><br />
	<i class="copy">&reg;2010 Autobuses Tlapacoyan</i>
	</body>
	</html>
<?php
	return 0;
	}*/
?>
<div id="Cuerpo"  align="center">
	<form id="busqueda" method="post" action="">
	<table id="opciones">
		<tr>
			<td colspan="3" align="center">
				<img src="/AT/images/salida.gif"  width="100%"/>
			</td>
		</tr>
		<tr>
			<td>
				<label>Fecha de Ida</label>
			</td>
			<td>
				<label>Origen</label>
			</td>
			<td>
				<label>Destino</label>
			</td>
		</tr>
		<tr>
			<td>
				<?php echo $fecha; ?>
			</td>
			<td>
				<?php echo $origen; ?>
			</td>
			<td>
				<?php echo $destino; ?>
			</td>
		</tr>
		<tr>
			<td>
				<label>Horario</label>
			</td>
			<td>
				<label>Tarifa</label>
			</td>
			<td>
				<label>Tiempo de recorrido</label>
			</td>
		</tr>
		<?php
			$fila=1;
			while ($registro = mysql_fetch_array($tabla)) { 
		?>
		<tr class="color <?php if($fila==1){echo $fila;$fila++;} else if($fila==2) {echo $fila;$fila=1;} ?>" onclick="">
			<td>
				<input type="radio" id="id_corrida" name="id_corrida" value="<?php echo $registro[0]; ?>" onclick="" />
				<label class="contenidoTabla"><?php echo $registro[1]; ?></label>
			</td>
			<td>
				<label class="contenidoTabla"><?php echo $registro[2]; ?></label>
			</td>
			<td>
				<label class="contenidoTabla"><?php echo $registro[3]; ?></label>
			</td>
		</tr>
		<?php
			}
		?>
		<tr>
			<td>
				<img src="/AT/images/regresar.gif" onclick="Util.Regresar();" class="links" />
			</td>
			<td>
				&nbsp;
			</td>
			<td>
				<img src="/AT/images/continuar.gif" id="continuar" onclick="Util.seleccionar();" class="links"/>
			</td>
		</tr>
	</table>
	</form>
</div>
<?php
}else{
?>
<div class="error">Por Favor Ingrese A La <a href="/AT/" >P&aacute;gina Principal.</a></div><br />
<?php
}
?>
<i class="copy">&reg;2010 Autobuses Tlapacoyan</i>
</body>
</html>