function estado_sesion()
{
    session_start();
    $estado = 1;
    $hoy = date("Y-m-d H:i:s");
    $tiempo = segundos($_SESSION['fecha'], $hoy);
    if (isset($_SESSION['usuario']) and trim($_SESSION['usuario']) != "" and $tiempo < 7200) {
        $estado = 0;
    }
    return $estado;
}
示例#2
0
     $est_d = "No hay registro";
 } else {
     $tiempo = segundos($detalle1[0][7], $fecha);
     if ($tiempo / 60 < 60) {
         $txt_mini = "Hace " . $tiempo / 60 . " min";
     } else {
         $tot = $tiempo / 60;
         $tot = round($tot / 60, 2);
         $txt_mini = "Hace " . $tot . " hrs";
     }
     $est_d = " " . $detalle1[0][3] . " <span class=titulo_mini>(" . $txt_mini . ")</span>";
 }
 if (count($detalle2) == 0) {
     $est_c = "No hay registro";
 } else {
     $tiempo = segundos($detalle2[0][7], $fecha);
     if ($tiempo / 60 < 60) {
         $txt_mini = "Hace " . $tiempo / 60 . " min";
     } else {
         $tot = $tiempo / 60;
         $tot = round($tot / 60, 2);
         $txt_mini = "Hace " . $tot . " hrs";
     }
     $est_c = " " . $detalle2[0][3] . " <span class=titulo_mini>(" . $txt_mini . ")</span>";
 }
 $texto .= "<hr><div class=titulo_pop40>Cajero habilitado:  " . $est_c . "</div>";
 $texto .= "<div class=titulo_pop40><hr>Hay dinero: " . $est_d . "</div>";
 $texto .= "<div class=titulo_mini>*La consulta es menor a 12 horas</div>";
 $texto .= "<div class=titulo_pop_descrip> <strong>Ayuda a la comunidad!</strong>";
 $texto .= "<br>El cajero esta habilitado? <br><input type='button' value='Si' class='btn_pop' onclick='addDescripCajero(2,0," . $dat[12] . ");'> <input type='button' value='No' class='btn_pop' onclick='addDescripCajero(2,1," . $dat[12] . ");'>";
 $texto .= "<br>El cajero cuenta con dinero? <br><input type='button' value='Si' class='btn_pop' onclick='addDescripCajero(1,0," . $dat[12] . ");'> <input class='btn_pop' type='button' value='No' onclick='addDescripCajero(1,1," . $dat[12] . ");'>";