From b5d3ee539fede2278badb5221050a846ad08af35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Mon, 12 Jul 2021 09:30:40 +0200 Subject: [PATCH] Delete session-FER_SURFACE.php --- assets/php/includes/session-FER_SURFACE.php | 136 -------------------- 1 file changed, 136 deletions(-) delete mode 100644 assets/php/includes/session-FER_SURFACE.php diff --git a/assets/php/includes/session-FER_SURFACE.php b/assets/php/includes/session-FER_SURFACE.php deleted file mode 100644 index 82a44b5..0000000 --- a/assets/php/includes/session-FER_SURFACE.php +++ /dev/null @@ -1,136 +0,0 @@ -_id = $id; - $this->_idfilm = $idfilm; - $this->_idhall = $idhall; - $this->_idcinema = $idcinema; - $this->_date = $date; - $this->_startTime = $startTime; - $this->_seatPrice = $seatPrice; - $this->_format = $format; - $this->_seats_full = $seats_full; - } - - public static function getListSessions($hall,$cinema,$date){ - $bd = new SessionDAO('complucine'); - if($bd ) { - if($date) - return $bd->getAllSessions($hall, $cinema, $date, null); - else - return $bd->getAllSessions($hall, $cinema, null, null); - } - } - public static function getListSessionsBetween2Dates($hall,$cinema,$start,$end){ - $bd = new SessionDAO('complucine'); - if($bd ) { - return $bd->getAllSessions($hall, $cinema, $start, $end); - } - } - - public static function create_session($cinema, $hall, $start, $date, $film, $price, $format,$repeat){ - $bd = new SessionDAO('complucine'); - if($bd ){ - if(!$bd->searchSession($cinema, $hall, $start, $date)){ - $bd->createSession(null,$film, $hall, $cinema, $date, $start, $price, $format); - - if($repeat > "0") { - $repeats = $repeat; - $repeat = $repeat - 1; - $date = date('Y-m-d', strtotime( $date . ' +1 day') ); - self::create_session($cinema, $hall, $start, $date, $film, $price, $format,$repeat); - return "Se han creado las ".$repeat ." sesiones con exito"; - } - - else - return "Se ha creado la session con exito"; - } else - return "Esta session ya existe"; - - } else return "Error al conectarse a la base de datos"; - } - - public static function edit_session($cinema, $or_hall, $or_date, $or_start, $hall, $start, $date, $film, $price, $format){ - $bd = new SessionDAO('complucine'); - if($bd ){ - if($bd->searchSession($cinema, $or_hall, $or_start, $or_date)){ - if(!$bd->searchSession($cinema,$hall,$start,$date)){ - $origin = array("cinema" => $cinema,"hall" => $or_hall,"start" => $or_start,"date" => $or_date); - $bd->editSession($film, $hall, $cinema, $date, $start, $price, $format,$origin); - return "Se ha editado la session con exito"; - }else if($or_hall == $hall && $or_start == $start && $or_date == $date){ - $origin = array("cinema" => $cinema,"hall" => $or_hall,"start" => $or_start,"date" => $or_date); - $bd->editSession($film, $hall, $cinema, $date, $start, $price, $format, $origin); - return "Se ha editado la session con exito"; - }else{ - return "Ya existe una sesion con los parametros nuevos"; - } - - } else - return "La session a editar no existe"; - - } else return "Error al conectarse a la base de datos"; - } - - public static function delete_session($cinema, $hall, $start, $date){ - $bd = new SessionDAO('complucine'); - if($bd ){ - if($bd->searchSession($cinema, $hall, $start, $date)){ - $bd->deleteSession($hall, $cinema, $date, $start); - return "Se ha eliminado la session con exito"; - } else - return "Esta session no existe"; - - } else return "Error al conectarse a la base de datos"; - } - - //Esto deberia estar en film.php? seguramente - public static function getThisSessionFilm($idfilm){ - $bd = new SessionDAO('complucine'); - if($bd ) { - return $bd->filmTittle($idfilm); - } - } - - public function setId($id){ $this->_id = $id; } - public function getId(){ return $this->_id; } - - public function setIdfilm($idfilm){ $this->_idfilm = $idfilm; } - public function getIdfilm(){ return $this->_idfilm; } - - public function setIdhall($idhall){ $this->_idhall = $idhall; } - public function getIdhall(){ return $this->_idhall; } - - public function setIdcinema($cinema){ $this->_idcinema = $idcinema; } - public function getIdcinema(){ return $this->_idcinema; } - - public function setDate($date){ $this->_date = $date; } - public function getDate(){ return $this->_date; } - - public function setStartTime($startTime){ $this->_startTime = $startTime; } - public function getStartTime(){ return $this->_startTime; } - - public function setSeatPrice($seatPrice){ $this->_seatPrice = $seatPrice; } - public function getSeatPrice(){ return $this->_seatPrice; } - - public function setFormat($format){ $this->_format = $format; } - public function getFormat(){ return $this->_format; } - - public function setSeatsFull($bool){ $this->_seats_full = $bool; } - public function getSeatsFull(){ return $this->_seats_full; } - - } -?> \ No newline at end of file