resubido panel admin pisado
This commit is contained in:
parent
40d1964d6a
commit
4dad0c48ee
@ -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>
|
||||
|
@ -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()){
|
||||
|
@ -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()){
|
||||
|
@ -12,23 +12,24 @@
|
||||
if($this->login){
|
||||
switch($this->state) {
|
||||
case 'mc': if(isset($_POST['edit_cinema'])) {
|
||||
editCinema();
|
||||
}
|
||||
else if(isset($_POST['delete_cinema'])) {
|
||||
deleteCinema();
|
||||
}
|
||||
else if(isset($_POST['add_cinema'])) {
|
||||
addCinema();
|
||||
$template->print_cinemas();
|
||||
}
|
||||
else {
|
||||
addCinema();
|
||||
$template->print_cinemas();
|
||||
|
||||
};
|
||||
$this->editCinema();
|
||||
}
|
||||
else if(isset($_POST['delete_cinema'])) {
|
||||
$this->deleteCinema();
|
||||
}
|
||||
else if(isset($_POST['add_cinema'])) {
|
||||
$this->addCinema();
|
||||
$template->print_cinemas();
|
||||
}
|
||||
else {
|
||||
$this-> addCinema();
|
||||
$template->print_cinemas();
|
||||
|
||||
};
|
||||
break;
|
||||
case 'mf': if(isset($_POST['edit_film'])) {
|
||||
$this->editFilm();
|
||||
}
|
||||
else if(isset($_POST['delete_film'])) {
|
||||
$this->deleteFilm();
|
||||
}
|
||||
@ -97,6 +98,8 @@
|
||||
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 @@
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user