Add files via upload
This commit is contained in:
		@@ -183,48 +183,18 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		static function new_session(){	
 | 
							static function new_session(){	
 | 
				
			||||||
			echo "inicio";
 | 
								$formSession = new FormSession("new_session");
 | 
				
			||||||
			if(isset($_POST["new_session"])){
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				$data = array("option" => "new_session","hall" => $_POST['hall'],"cinema" => $_SESSION["cinema"],"date" => $_POST['date']);
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
			}else if(isset($_POST["select_film"])){
 | 
					 | 
				
			||||||
				
 | 
					 | 
				
			||||||
				$film = array("idfilm" => $_POST["id"],"tittle" => $_POST["tittle"], "description" => $_POST["description"], "duration" => $_POST["duration"]);
 | 
					 | 
				
			||||||
				$data = array("option" => "new_session","hall" => $_POST['hall'],"cinema" => $_SESSION["cinema"],"date" => $_POST['date'],"film" => $film, "start" => $_POST['start']
 | 
					 | 
				
			||||||
					, "price" => $_POST['price'], "format" => $_POST['format']);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			
 | 
					 | 
				
			||||||
			if($data){
 | 
					 | 
				
			||||||
				$panel = '<h1>Crear una sesión.</h1><hr /></br>
 | 
					 | 
				
			||||||
				'.FormSession::generaCampoFormulario($data, null);
 | 
					 | 
				
			||||||
			}else $panel = self::warning();
 | 
					 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
								$panel = '<h1>Crear una sesion.</h1><hr/></br>'
 | 
				
			||||||
 | 
									.$formSession->gestiona();
 | 
				
			||||||
			return $panel;
 | 
								return $panel;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		static function edit_session(){	
 | 
							static function edit_session(){	
 | 
				
			||||||
			if(isset($_POST["edit_session"])){
 | 
								$formSession = new FormSession("edit_session");
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
				$_SESSION["or_hall"] = "";
 | 
								$panel = '<h1>Editar una sesion.</h1><hr/></br>'
 | 
				
			||||||
				$_SESSION["or_date"] = "";
 | 
									.$formSession->gestiona();
 | 
				
			||||||
				$_SESSION["or_start"] = "";
 | 
					 | 
				
			||||||
		
 | 
					 | 
				
			||||||
				$film = Session::getThisSessionFilm($_POST["film"]);
 | 
					 | 
				
			||||||
				$data = array("option" => "edit_session","hall" => $_POST["hall"],"cinema" => $_SESSION["cinema"],"date" => $_POST['date'],"film" => $film,
 | 
					 | 
				
			||||||
					"start" => $_POST['start'],"price" => $_POST['price'],"format" => $_POST['format']);
 | 
					 | 
				
			||||||
					
 | 
					 | 
				
			||||||
			}else if(isset($_SESSION["session"])){
 | 
					 | 
				
			||||||
				$film = array("idfilm" => $_POST["id"],"tittle" => $_POST["tittle"], "description" => $_POST["description"], "duration" => $_POST["duration"]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
				$data = array("option" => "edit_session","hall" => $_POST['hall'],"cinema" => $_SESSION["cinema"],"date" => $_POST['date'],"film" => $film, "start" => $_POST['start']
 | 
					 | 
				
			||||||
					, "price" => $_POST['price'], "format" => $_POST['format']);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			
 | 
					 | 
				
			||||||
			if($data){
 | 
					 | 
				
			||||||
				$panel = '<h1>Editar una sesión.</h1><hr /></br>
 | 
					 | 
				
			||||||
				'.FormSession::generaCampoFormulario($data, null);
 | 
					 | 
				
			||||||
			} else $panel = self::warning();
 | 
					 | 
				
			||||||
			return $panel;
 | 
								return $panel;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user