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 { $array = serialize($boolean); header("Location: ../views/pinchosValidation.php?array={$array}"); } } else { if ($action == "pvalida") { $name = $_GET["name"]; $p = new Pincho(); $boolean = $p->validatePincho($name); if ($boolean == false) { $msg = "Server error. Try again."; header("Location: ../views/homeOrganizer.php?msg={$msg}");