diff --git a/panel_manager/edit_halls.php b/panel_manager/edit_halls.php new file mode 100644 index 0000000..1d681cf --- /dev/null +++ b/panel_manager/edit_halls.php @@ -0,0 +1,16 @@ + Crear una Sala "; + $form->gestiona(); + } + +?> \ No newline at end of file diff --git a/panel_manager/edit_sessions.php b/panel_manager/edit_sessions.php index a3ce8ab..e867a93 100644 --- a/panel_manager/edit_sessions.php +++ b/panel_manager/edit_sessions.php @@ -3,12 +3,12 @@ require_once($prefix.'assets/php/config.php'); include_once('./includes/formHall.php'); - require_once($prefix.'assets/php/common/hall_dto.php'); + require_once($prefix.'assets/php/common/hall.php'); - require_once($prefix.'assets/php/common/session_dto.php'); + require_once($prefix.'assets/php/common/session.php'); include_once($prefix.'assets/php/common/session_dao.php'); - require_once($prefix.'assets/php/common/film_dto.php'); + require_once($prefix.'assets/php/common/film.php'); include_once($prefix.'assets/php/common/film_dao.php'); $formHall = new FormHall(); diff --git a/panel_manager/includes/formHall.php b/panel_manager/includes/formHall.php index 0972e16..ee45443 100644 --- a/panel_manager/includes/formHall.php +++ b/panel_manager/includes/formHall.php @@ -15,7 +15,35 @@ class FormHall extends Form { parent::__construct('formSession'); $this->reply = array(); } - + + protected function generaCamposFormulario($datos, $errores = array()){ + $this->option = $_SESSION['option']; + $_SESSION['option'] = ""; + $htmlform = ""; + + + + if($this->option == "new"){ + $number = $datos['number'] ?? ''; + $rows = $datos['rows'] ?? ''; + $cols = $datos['cols'] ?? ''; + $seats = $datos['seats'] ?? ''; + + + $htmlform .= ' +
+ '; + } + + + return $htmlform; + } //Methods: //Returns validation response: @@ -46,8 +74,7 @@ class FormHall extends Form { } //Process form: - public function processesForm($number, $cinema, $rows, $cols, $option) { - $this->option = $option; + public function processesForm($datos){ $this->correct = true; $bd = new HallDAO('complucine'); diff --git a/panel_manager/index.php b/panel_manager/index.php index 100eb33..ae40f52 100644 --- a/panel_manager/index.php +++ b/panel_manager/index.php @@ -5,16 +5,9 @@ include_once('panel_manager.php'); - $login = false; + $login = (isset($_SESSION["login"]) && $_SESSION["rol"] == "manager") ? true : false; + $panel = isset($_REQUEST['state']) ? new Panel($_REQUEST['state'],$login) : $panel = new Panel('',$login); - if(isset($_SESSION["login"]) && $_SESSION["rol"] == "manager") $login = true; - - if(isset($_REQUEST['state'])) { - $panel = new Panel($_REQUEST['state'],$login); - } - else { - $panel = new Panel('',$login); - } ?> +