![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
23/01/2009, 14:21
|
![Avatar de argy](http://static.forosdelweb.com/customavatars/avatar200552_1.gif) | | | Fecha de Ingreso: octubre-2007 Ubicación: Longitud 75º Latitud 18º Sur
Mensajes: 614
Antigüedad: 17 años, 3 meses Puntos: 18 | |
Respuesta: syntax error, unexpected T_ELSE in básicamente tu error está en el últmo else. Cita: <?php
include('connect.php');
include('login.php');
if($loginCorrecto)
{
$hora= date("g:i:s a", time()+7200);
if($hora<'12:00:00 pm' && $hora>'12:00:00 am')
{
echo "Buenos Dias <b>".$nombreUsuarioL."</b>";
echo "<p>";
echo "</p>";
}
elseif($hora>'12:00:00 pm' && $hora<'6:59:00 pm')
{
echo "Buenas Tardes <b>".$nombreUsuarioL."</b>";
echo "<p>";
echo "</p>";
}
elseif($hora>'7:00:00 pm' && $hora<'12:00:00 am')
{
echo "Buenas Noches <b>".$nombreUsuarioL."</b>";
echo "<p>";
echo "</p>";
}
?><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<?php
include ('connect.php');
$vehiculo=$_POST['vehiculo'];
$afiliacion=$_POST['afiliacion'];
$enero=$_POST['enero'];
$febrero=$_POST['febrero'];
$marzo=$_POST['marzo'];
$abril=$_POST['abril'];
$mayo=$_POST['mayo'];
$junio=$_POST['junio'];
$julio=$_POST['julio'];
$agosto=$_POST['agosto'];
$septiembre=$_POST['septiembre'];
$octubre=$_POST['octubre'];
$noviembre=$_POST['noviembre'];
$diciembre=$_POST['diciembre'];
$ano=$_GET['ano'];
if ($vehiculo)
{
mysql_query("UPDATE estado_de_cuenta SET enero='$enero', febrero='$febrero', marzo='$marzo', abril='$abril', mayo='$mayo', junio='$junio', julio='$julio', agosto='$agosto', septiembre='$septiembre', octubre='$octubre', noviembre='$noviembre', diciembre='$diciembre' WHERE vehiculo = '$vehiculo'") or die (mysql_error());
$verifica="SELECT * FROM estado_de_cuenta WHERE vehiculo = '".$vehiculo."' ";
$ver=mysql_query($verifica) or die (mysql_error());
while($con=mysql_fetch_assoc($ver))
{
$vehiculo=$_GET['vehiculo'];
$afiliacion=$_GET['afiliacion'];
$enero=$_GET['enero'];
$febrero=$_GET['febrero'];
$marzo=$_GET['marzo'];
$abril=$_GET['abril'];
$mayo=$_GET['mayo'];
$junio=$_GET['junio'];
$julio=$_GET['julio'];
$agosto=$_GET['agosto'];
$septiembre=$_GET['septiembre'];
$octubre=$_GET['octubre'];
$noviembre=$_GET['noviembre'];
$diciembre=$_GET['diciembre'];
$ano=$_GET['ano'];
if($afiliacioncon != '0' or $enerocon != '0' or $febrerocon != '0' or $marzocon != '0' or $abrilcon != '0' or $mayocon != '0' or $juniocon != '0' or $juliocon != '0' or $agostocon != '0' or $septiembrecon != '0' or $octubrecon != '0' or $noviembrecon != '0' or $diciembrecon != '0')
{
echo '<SCRIPT LANGUAGE="javascript">';
echo 'location.href = "http://www.everestltda.com/extract/valida.php?placa='.$vehiculo.'"';
echo '</SCRIPT>';
}
else
{
echo "Muchas gracias!!!!!, el vehiculo <b><font color='red'>".$vehiculo."</font></b> ya se encuentra al dia, por favor continue.\n";
echo "<p><a href='inserta_viaje.php?placa='.$vehiculo.'>Genera r extracto del contrato</a></p>";
}
}
}
else
{
//conecta a la base de datos
$mysql_id = mysql_connect('p50mysql199.secureserver.net', 'everestltda', 'Buckdich0920');
mysql_select_db('everestltda', $mysql_id);
$vehiculo=$_GET['vehiculo'];
$sql="SELECT * from estado_de_cuenta WHERE vehiculo = '".$vehiculo."' AND ano = '".$ano."'";
$ejecuta=mysql_query($sql) or die (mysql_error());
?>
<form id="form1" name="form1" method="post" action="pagar.php">
<label>
<table align="center">
<?php
echo '<table>';
while ($row=mysql_fetch_assoc($ejecuta))
{
echo '<tr>';
echo '<td>Numero Interno</td>';
?>
<td><input type="text" name="vehiculo" value="<?php echo $row['vehiculo']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Afiliacion</td>';
?>
<td><input type="text" name="afiliacion" value="<?php echo $row['afiliacion']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Enero</td>';
?>
<td><input type="text" name="enero" value="<?php echo $row['enero']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Febrero</td>';
?>
<td><input type="text" name="febrero" value="<?php echo $row['febrero']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Marzo</td>';
?>
<td><input type="text" name="marzo" value="<?php echo $row['marzo']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Abril</td>';
?>
<td><input type="text" name="abril" value="<?php echo $row['abril']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Mayo</td>';
?>
<td><input type="text" name="mayo" value="<?php echo $row['mayo']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Junio</td>';
?>
<td><input type="text" name="junio" value="<?php echo $row['junio']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Julio</td>';
?>
<td><input type="text" name="julio" value="<?php echo $row['julio']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Agosto</td>';
?>
<td><input type="text" name="Agosto" value="<?php echo $row['agosto']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Septiembre</td>';
?>
<td><input type="text" name="septiembre" value="<?php echo $row['septiembre']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Octubre</td>';
?>
<td><input type="text" name="octubre" value="<?php echo $row['octubre']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Noviembre</td>';
?>
<td><input type="text" name="noviembre" value="<?php echo $row['noviembre']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td>Diciembre</td>';
?>
<td><input type="text" name="diciembre" value="<?php echo $row['diciembre']; ?>" ></td>
<?php
echo '</tr>';
echo '<tr>';
echo '<td colspan="2" align="center"><input type="submit" name="submit" value="Registrar Pago"></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2" align="center"> <a href="javascript:history.back(1)">Volver Atrás</a></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2" align="center"> <a href="menu.php">Ir al Menu</a></td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2" align="center"> <a href="logout.php">Salir</a></td>';
echo '</tr>';
}
echo '</table>';
}
}
else
{
echo "Bienvenido visitante, el sistema no te ha reconocido";
?>
<SCRIPT LANGUAGE="javascript">
location.href = "http://www.everestltda.com/extract/ingreso.php";
</SCRIPT>
<?php
}
?> .
__________________ Software libre para un mundo libre. Eventualmente en el foro. |