From fd367c2a3dd13ba46e322e329358554a35715328 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mu=C3=B1oz=20Garcia?=
 <73303506+danimu03@users.noreply.github.com>
Date: Thu, 13 May 2021 11:48:48 +0200
Subject: [PATCH] Delete formManager.php
---
 panel_admin/includes/formManager.php | 146 ---------------------------
 1 file changed, 146 deletions(-)
 delete mode 100644 panel_admin/includes/formManager.php
diff --git a/panel_admin/includes/formManager.php b/panel_admin/includes/formManager.php
deleted file mode 100644
index ff5fca0..0000000
--- a/panel_admin/includes/formManager.php
+++ /dev/null
@@ -1,146 +0,0 @@
-reply = array();
-    }
-
-    public function getReply() {
-		if($this->correct){
-			if($this->option == "new"){
-				$this->reply = "
-									
-									
-										
-											
 Operacion realizada con exito 
-											
 Se ha aƱadido el gerente correctamente en la base de datos.
-											
-										
-									
-								
-								";
-			}else if($this->option == "edit"){
-								$this->reply = "
-													
-													
-														
-															
 Operacion realizada con exito 
-															
 Se ha editado el gerente correctamente en la base de datos.
-															
-														
-													
-												
-												";
-			}else if($this->option == "del"){
-								$this->reply = "
-													
-													
-														
-															
 Operacion realizada con exito 
-															
 Se ha eliminado el gerente correctamente en la base de datos.
-															
-														
-													
-												
-												";
-			}
-
-		} else {
-			$this->reply = "
-								
-								
-									
-										
 ERROR  
-										
 Ha habido un error en la operacion. Revisa los datos introducidos
-										
-									
-								
-							
-							";
-			
-		}
-        return $this->reply;
-    }
-
-    //Process form:
-	public function processesForm($_id, $_idcinema, $_option) {
-		$this->correct = true;
-		$this->option = $_option;
-
-		$id= $this->test_input($_id);
-		$idcinema=$this->test_input($_idcinema);
-		
-	
-		//Habria que validar todo para que encaje en la base de datos
-			
-		$bd = new Manager_DAO('complucine');
-		if($bd){
-			if($this->option == "new"){
-				//Check if any var is empty
-				if(!is_null($id)&&!empty($idcinema)){
-					// check if already exist a manager with same name
-					$exist = $bd->GetManagerCinema($id, $idcinema);
-					if( mysqli_num_rows($exist) != 0){
-						$this->correct =false;
-					}
-					else{
-						$bd->createManager($id, $idcinema);
-
-					}
-					$exist->free();
-				}
-				else{
-					$this->correct =false;
-				}	
-			} else if ($this->option == "del"){
-				//Check if exist a manager with this id
-				$exist = $bd-> GetManager($id);
-				if( mysqli_num_rows($exist) == 1){
-					$bd->deleteManager($id);
-				}
-				else{
-					$this->correct =false;
-				}
-			} else if ($this->option == "edit"){
-				 //Check if any var is  empty
-                 if(!empty($idcinema)){
-					//Check if exist a manager with this id
-					$exist = $bd-> GetManager($id);
-					if( mysqli_num_rows($exist) == 1){
-						$bd->editManager($id,$idcinema);
-					}
-					else{
-						$this->correct =false;
-					}
-					$exist->free();
-				}
-				else{
-					$this->correct =false;
-				}
-			} 
-			else {$this->correct = false;}			
-		}
-		
-	
-	}
-
-	protected function test_input($input){
-		return htmlspecialchars(trim(strip_tags($input)));
-	}
-}
-
-
-?>
\ No newline at end of file