Beispiel #1
0
 public function eliminarAccionResponsable($db, $id, $idAccion)
 {
     /*
      * VALIDACIONES
      */
     $salida = false;
     $datos = $db->delete("s_emergencias_acciones_usuarios", ["s_id" => $idAccion]);
     setNotificacion();
     header("location: ../home.php?s=emergencias&a=accion_responsable&id=" . $id);
 }
Beispiel #2
0
function validarDatosNulos($post, $url)
{
    $error = false;
    foreach ($post as $v) {
        if ($v == "") {
            setNotificacion("Error", "Faltan datos<br>Intente nuevamente", "error");
            $error = true;
            break;
        }
    }
    if ($error) {
        header($url);
        exit;
    }
}
Beispiel #3
0
 public function editar($db, $post, $id)
 {
     /*
      * VALIDACIONES
      */
     if ($post["txtPassword"] != $post["txtRePassword"]) {
         setNotificacion("Error", "Las claves no coinciden<br>Intente nuevamente", "error");
         header("location: ../home.php?s=perfil&a=editar&id=" . $_SESSION["usuario"]["id"]);
     } else {
         $salida = false;
         $dato = $db->update("s_inscripciones", ["CLAVE" => $post["txtPassword"]], ["CEDULA" => $id]);
         setNotificacion();
         header("location: ../home.php?s=inscripciones");
     }
 }