diff --git a/panel_manager/includes/formSession.php b/panel_manager/includes/formSession.php index 1b81bf9..43d1157 100644 --- a/panel_manager/includes/formSession.php +++ b/panel_manager/includes/formSession.php @@ -31,7 +31,7 @@ class FormSession extends Form {
Datos -
+



'; if($data['option'] == "edit_session") - $htmlform .= '
+ $htmlform .= ' + + + +

'; $htmlform .= ' @@ -86,8 +90,13 @@ class FormSession extends Form { if($data["option"] == "new_session"){ $_SESSION['msg'] = Session::create_session($data); header( "Location: ../?state=success" ); - }else { - + }else if($data["option"] == "edit_session"){ + $_SESSION['msg'] = Session::edit_session($data); + header( "Location: ../?state=success" ); + } + else if($data["option"] == "delete_session") { + $_SESSION['msg'] = Session::delete_session($data); + header( "Location: ../?state=success" ); } } } diff --git a/panel_manager/includes/processForm.php b/panel_manager/includes/processForm.php index c0b9bee..2f5148c 100644 --- a/panel_manager/includes/processForm.php +++ b/panel_manager/includes/processForm.php @@ -16,4 +16,17 @@ ,"price" => $_POST["price"],"format" => $_POST["format"],"repeat" => $_POST["repeat"], "cinema" => $_SESSION["cinema"]); FormSession::processesForm($data); } + + if(isset($_POST['edit_session'])){ + $data = array("option" => "edit_session","film" => $_POST["film"],"hall" => $_POST["hall"],"date" => $_POST["date"],"start" => $_POST["start"] + ,"price" => $_POST["price"],"format" => $_POST["format"],"repeat" => $_POST["repeat"], "cinema" => $_SESSION["cinema"] + , "origin_hall"=> $_POST["origin_hall"],"origin_date"=> $_POST["origin_date"],"origin_start"=> $_POST["origin_start"]); + FormSession::processesForm($data); + } + + if(isset($_POST['delete_session'])){ + $data = array("option" => "delete_session","cinema" => $_SESSION["cinema"], "hall"=> $_POST["origin_hall"] + ,"date"=> $_POST["origin_date"],"start"=> $_POST["origin_start"]); + FormSession::processesForm($data); + } ?> \ No newline at end of file