Ejemplo n.º 1
0
         echo "Error de la base de datos";
     } else {
         $msg = "Winner Selected.Contest done.";
         header("Location: ../views/homeOrganizer.php?msg={$msg}");
     }
 } else {
     $action = $_GET["action"];
     if ($action == "logout") {
         session_start();
         $_SESSION["validated"] = "";
         session_destroy();
         header("Location: ../index.php");
     } else {
         if ($action == "evalidation") {
             $e = new Establishment();
             $boolean = $e->selectNotValidated();
             if ($boolean == false) {
                 $msg = "Not establishments for validate in system at this moment.";
                 header("Location: ../views/establishmentsValidation.php?msg={$msg}");
             } else {
                 $array = serialize($boolean);
                 header("Location: ../views/establishmentsValidation.php?array={$array}");
             }
         } else {
             if ($action == "pvalidation") {
                 $p = new Pincho();
                 $boolean = $p->selectNotValidated();
                 if ($boolean == false) {
                     $msg = "Not pinchos for validate in system at this moment.";
                     header("Location: ../views/pinchosValidation.php?msg={$msg}");
                 } else {