Add files via upload
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include_once('../assets/php/common/hall_dao.php');
|
||||
include_once($prefix.'assets/php/common/hall_dao.php');
|
||||
|
||||
class Hall{
|
||||
|
||||
@ -25,6 +25,18 @@
|
||||
return "";
|
||||
}
|
||||
|
||||
public static function create_hall($hall){
|
||||
$bd = new HallDAO('complucine');
|
||||
if($bd ){
|
||||
if(!$bd->searchHall($hall['cinema'], $hall['number'])){
|
||||
$bd->createHall($hall['number'], $hall['cinema'], $hall['cols'], $hall['rows']);
|
||||
return "Se ha creado la sala con exito";
|
||||
} else {
|
||||
return "Esta sala ya existe";
|
||||
}
|
||||
} else { return "Error al conectarse a la base de datos"; }
|
||||
}
|
||||
|
||||
//Getters && Setters:
|
||||
public function setNumber($number){ $this->_number = $number; }
|
||||
public function getNumber(){ return $this->_number; }
|
||||
|
Reference in New Issue
Block a user