} else { if (isset($_POST["idPro"])) { //Borrado de profesionales $idPro = $_POST["idPro"]; $dbp = new Professional(); $dbpro = new ProfessionalValorations(); $borra = $dbpro->borradoProfessional($idPro); $borra = $dbp->borradoProfessional($idPro); header("Location: organizerController.php?action=management"); } else { if (isset($_POST["idWinner"])) { //Selección de ganador $idWinner = $_POST["idWinner"]; $p = new Pincho(); $lose = $p->doAllLoser(); $win = $p->doWinner($idWinner); if ($win == false) { 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") {