Ejemplo n.º 1
0
     $nota = $_POST["votation"];
     $idPincho = $_POST["idPincho"];
     $pval = new ProfessionalValorations();
     $boolean = $pval->doVotation($nota, $idPincho);
     if ($boolean == false) {
         $msg = "Database update error";
         header("Location: ../views/professionalVote.php?msg={$msg}");
     } else {
         header("Location: professionalController.php?action=vote");
     }
 } else {
     if (isset($_POST["idFinalist"])) {
         //Marcar pincho como finalista
         $idPincho = $_POST["idFinalist"];
         $p = new Pincho();
         $bool = $p->setFinalist($idPincho);
         if ($bool == false) {
             $msg = "Database update error";
             header("Location: ../views/professionalFinalist.php?msg={$msg}");
         } else {
             header("Location: professionalController.php?action=finalist");
         }
     } else {
         if (isset($_POST["name"]) && isset($_POST["pass"]) && isset($_POST["email"]) && isset($_POST["phone"])) {
             //Editar perfil profesional
             $professional = array();
             $professional["name"] = $_POST["name"];
             $professional["pass"] = $_POST["pass"];
             $professional["email"] = $_POST["email"];
             $professional["phone"] = $_POST["phone"];
             $p = new Professional();