resubido panel admin pisado

This commit is contained in:
marian1010 2021-05-13 11:39:54 +02:00
parent 40d1964d6a
commit 4dad0c48ee
4 changed files with 25 additions and 22 deletions

View File

@ -8,8 +8,8 @@ include_once('../assets/php/form.php');
class formAddCinema extends Form{
public function __construct(){
$op = array("action"= ."./?state=mc">);
parent::__construct('formAddCinema',$op)
$op = array("action"=>"./?state=mc">);
parent::__construct('formAddCinema',$op);
}
protected function generaCamposFormulario($datos,$errores=array()){
@ -19,7 +19,7 @@ class formAddCinema extends Form{
$errorDirection = self::createMensajeError($errores,'direction','span',array('class'=>'error'));
$errrorPhone = self ::createMensajeError($errores,'phone',array('class'=>'error'));
$html = '<div class="column side"></div>
$html = '<div class="row"></div>
<fieldset id = "cinema_form">'.$htmlErroresGlobales.'</pre>
<legend>Añadir cine</legend>
<input type="text" name="name" id="name" placeholder="Nombre" required/><pre>'.$errorName.'</pre>

View File

@ -8,8 +8,8 @@ include_once('../assets/php/form.php');
class formDeleteCinema extends Form{
public function __construct(){
$op = array("action"= ."./?state=mc">);
parent::__construct('formDeleteCinema',$op)
$op = array("action"=>"./?state=mc">);
parent::__construct('formAddCinema',$op);
}
protected function generaCamposFormulario($datos,$errores=array()){

View File

@ -8,8 +8,8 @@ include_once('../assets/php/form.php');
class formEditCinema extends Form{
public function __construct(){
$op = array("action"= ."./?state=mc">);
parent::__construct('formEditCinema',$op)
$op = array("action"=>"./?state=mc">);
parent::__construct('formAddCinema',$op);
}
protected function generaCamposFormulario($datos,$errores=array()){

View File

@ -12,23 +12,24 @@
if($this->login){
switch($this->state) {
case 'mc': if(isset($_POST['edit_cinema'])) {
editCinema();
$this->editCinema();
}
else if(isset($_POST['delete_cinema'])) {
deleteCinema();
$this->deleteCinema();
}
else if(isset($_POST['add_cinema'])) {
addCinema();
$this->addCinema();
$template->print_cinemas();
}
else {
addCinema();
$this-> addCinema();
$template->print_cinemas();
};
break;
case 'mf': if(isset($_POST['edit_film'])) {
$this->editFilm();
}
else if(isset($_POST['delete_film'])) {
$this->deleteFilm();
}
@ -96,6 +97,8 @@
case 'ur': echo"<h1>En construcción</h1>";; break;
case 'ag': echo"<h1>En construcción</h1>";; break;
default: echo "<h1>BIENVENIDO AL PANEL DE ADMINISTRADOR</h1>"; break;
}
}
}
function getTemplate(){
return $this->template;
@ -168,4 +171,4 @@
}
}
?>
?>