Event Details



[insert_php]
include( ‘/home/taxiamig/public_html/m/conexion/conexion.php’);
$idevento = $_REQUEST[‘evento’];
$sql = ” select * from event e left join unit u on e.unitid = u.unitid, user s where e.eventid = $idevento and e.userid = s.userid”;
// echo “
” . $sql;
$rsConsulta = @mysql_query($sql, $conexion);
if (!$rsConsulta) {
exit;
} else {
$totConsulta = mysql_num_rows($rsConsulta);
//
if ($totConsulta > 0) {
$arrConsulta = mysql_fetch_assoc($rsConsulta);
$name = $arrConsulta[‘name’];
$placa = $arrConsulta[‘placa’];
//
$lat[0] = $arrConsulta[‘checkinlat’];
$lat[1] = $arrConsulta[‘checkoutlat’];
//
$long[0] = $arrConsulta[‘checkinlong’];
$long[1] = $arrConsulta[‘checkoutlong’];
//
if ($lat[0])
$geopos0 = “true”;
else {
$geopos0 = “false”;
$lat[0] = “0”;
$long[0] = “0”;
}
//
if ($lat[1])
$geopos1 = “true”;
else {
$geopos1 = “false”;
$lat[1] = “0”;
$long[1] = “0”;
}
//
$img[0] = “green-dot.png”;
$img[1] = “blue-dot.png”;
//
$variable = “Inicio : ” . $arrConsulta[‘checkintime’];
$etiqueta[0] = $variable;
$variable = “Fin : ” . $arrConsulta[‘checkouttime’];
$etiqueta[1] = $variable;
}
//
$sql = ” select * from location where eventid = $idevento”;
//echo “
” . $sql;
$rsPuntos = @mysql_query($sql, $conexion);
if ($rsPuntos) {
$iP=0;
$totPuntos = mysql_num_rows($rsPuntos);
while($arrPuntos = mysql_fetch_array($rsPuntos)){
$p_lati[$iP] = $arrPuntos[‘latitud’];
$p_long[$iP] = $arrPuntos[‘longitud’];
$iP++;
}
}
}
[/insert_php]


[insert_php]
echo "

El usuario " . $name . " ha tomado el taxi de placas " . $placa . ".

";
$i=0;
foreach($etiqueta as $ind => $valor){
if (($lat[$ind]) && ($long[$ind])){
$etiqueta = "etiqueta" . $ind;
echo "

";
echo "";
echo $valor;
echo "

";
}
$i++;
}
echo "

";
[/insert_php]

No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.