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{
|
class formAddCinema extends Form{
|
||||||
|
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
$op = array("action"= ."./?state=mc">);
|
$op = array("action"=>"./?state=mc">);
|
||||||
parent::__construct('formAddCinema',$op)
|
parent::__construct('formAddCinema',$op);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generaCamposFormulario($datos,$errores=array()){
|
protected function generaCamposFormulario($datos,$errores=array()){
|
||||||
@ -19,7 +19,7 @@ class formAddCinema extends Form{
|
|||||||
$errorDirection = self::createMensajeError($errores,'direction','span',array('class'=>'error'));
|
$errorDirection = self::createMensajeError($errores,'direction','span',array('class'=>'error'));
|
||||||
$errrorPhone = self ::createMensajeError($errores,'phone',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>
|
<fieldset id = "cinema_form">'.$htmlErroresGlobales.'</pre>
|
||||||
<legend>Añadir cine</legend>
|
<legend>Añadir cine</legend>
|
||||||
<input type="text" name="name" id="name" placeholder="Nombre" required/><pre>'.$errorName.'</pre>
|
<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{
|
class formDeleteCinema extends Form{
|
||||||
|
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
$op = array("action"= ."./?state=mc">);
|
$op = array("action"=>"./?state=mc">);
|
||||||
parent::__construct('formDeleteCinema',$op)
|
parent::__construct('formAddCinema',$op);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generaCamposFormulario($datos,$errores=array()){
|
protected function generaCamposFormulario($datos,$errores=array()){
|
||||||
|
@ -8,8 +8,8 @@ include_once('../assets/php/form.php');
|
|||||||
class formEditCinema extends Form{
|
class formEditCinema extends Form{
|
||||||
|
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
$op = array("action"= ."./?state=mc">);
|
$op = array("action"=>"./?state=mc">);
|
||||||
parent::__construct('formEditCinema',$op)
|
parent::__construct('formAddCinema',$op);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function generaCamposFormulario($datos,$errores=array()){
|
protected function generaCamposFormulario($datos,$errores=array()){
|
||||||
|
@ -12,23 +12,24 @@
|
|||||||
if($this->login){
|
if($this->login){
|
||||||
switch($this->state) {
|
switch($this->state) {
|
||||||
case 'mc': if(isset($_POST['edit_cinema'])) {
|
case 'mc': if(isset($_POST['edit_cinema'])) {
|
||||||
editCinema();
|
$this->editCinema();
|
||||||
}
|
}
|
||||||
else if(isset($_POST['delete_cinema'])) {
|
else if(isset($_POST['delete_cinema'])) {
|
||||||
deleteCinema();
|
$this->deleteCinema();
|
||||||
}
|
}
|
||||||
else if(isset($_POST['add_cinema'])) {
|
else if(isset($_POST['add_cinema'])) {
|
||||||
addCinema();
|
$this->addCinema();
|
||||||
$template->print_cinemas();
|
$template->print_cinemas();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
addCinema();
|
$this-> addCinema();
|
||||||
$template->print_cinemas();
|
$template->print_cinemas();
|
||||||
|
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'mf': if(isset($_POST['edit_film'])) {
|
case 'mf': if(isset($_POST['edit_film'])) {
|
||||||
$this->editFilm();
|
$this->editFilm();
|
||||||
|
}
|
||||||
else if(isset($_POST['delete_film'])) {
|
else if(isset($_POST['delete_film'])) {
|
||||||
$this->deleteFilm();
|
$this->deleteFilm();
|
||||||
}
|
}
|
||||||
@ -97,6 +98,8 @@
|
|||||||
case 'ag': 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;
|
default: echo "<h1>BIENVENIDO AL PANEL DE ADMINISTRADOR</h1>"; break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function getTemplate(){
|
function getTemplate(){
|
||||||
return $this->template;
|
return $this->template;
|
||||||
}
|
}
|
||||||
@ -168,4 +171,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user