From e88092b3c3f60083ec50b44f7d41881a0502a09f 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:34 +0200 Subject: [PATCH] Delete manage_managers.php --- panel_admin/manage_managers.php | 268 -------------------------------- 1 file changed, 268 deletions(-) delete mode 100644 panel_admin/manage_managers.php diff --git a/panel_admin/manage_managers.php b/panel_admin/manage_managers.php deleted file mode 100644 index dded178..0000000 --- a/panel_admin/manage_managers.php +++ /dev/null @@ -1,268 +0,0 @@ -allManagersData(); - $ids = array(); - $idscinemas = array(); - $usernames = array(); - $email = array(); - $rol = array(); - - foreach($managers as $key => $value){ - $ids[$key] = $value->getId(); - $idscinemas[$key] = $value->getIdcinema(); - $usernames[$key] = $value->getUsername(); - $email[$key] = $value->getEmail(); - $rol[$key] = $value->getRoll(); - } - - - echo "
-
-
- - - - - - - - - - - - - "; - for($i = 0; $i < count($managers); $i++){ - echo ' - - - - - - - - - '; - } - echo' -
IdIdCinemaNombreEmailpasswordRol
'. $ids[$i] .''. $idscinemas[$i] .''. $usernames[$i] .''. $email[$i] .''. $rol[$i] .' -
- - - - - - -
-
-
- - - - - - -
-
-
-
- '; - - - - } - - function addManager(){ - echo'
-
-

Añadir gerente

-
-
- -
-
-
-
-
- '; - } - - function selectUser() { - echo'
-
-

Selecciona el usuario al que quieres dar privilegios.

-
-
-
- Selecciona usuario.'; - - showUsers(); - echo '
-
- - -
-
-
-
-
- '; - - } - - function selectCinema() { - echo'
-
-

Selecciona el cine asociado al nuevo manager.

-
-
-
- Selecciona cine.'; - - showCinemas(); - echo '
-
- - - -
-
-
-
-
- '; - - } - function deleteManager() { - echo'
-
-

Borrar gerente

-
-
-
- ¿Estás seguro de que quieres eliminar este gerente? - -

Id: '.$_POST['id'].'

-

IdCinema: '.$_POST['idcinema'].'

-

Nombre: '.$_POST['username'].'

-

Email: '.$_POST['email'].'

-

Rol: '.$_POST['rol'].'

-
-
- - -
-
-
-
-
- '; - } - - - function editManager() { - - echo'
-
-

Editar gerente ID: '.$_POST['id'].'

-
-
-
- Selecciona su cine.'; - showCinemas(); - echo '
-
- - - -
-
-
-
-
- '; - - } - - // Show cinemas and users functions - function showCinemas() { - $cine = new Cinema_DAO("complucine"); - $cinemas = $cine->allCinemaData(); - $ids = array(); - $names = array(); - $directions = array(); - $phones = array(); - - foreach($cinemas as $key => $value){ - $ids[$key] = $value->getId(); - $names[$key] = $value->getName(); - $directions[$key] = $value->getDirection(); - $phones[$key] = $value->getPhone(); - } - for($i = 0; $i < count($cinemas); $i++){ - echo ' - - '; - } - } - function showUsers() { - $user = new UserDAO("complucine"); - $users = $user->allUsersNotM(); - $ids = array(); - $usernames = array(); - $emails = array(); - $roles = array(); - - - foreach($users as $key => $value){ - $ids[$key] = $value->getId(); - $usernames[$key] = $value->getName(); - $emails[$key] = $value->getEmail(); - $roles[$key] = $value->getRol(); - } - for($i = 0; $i < count($users); $i++){ - echo ' - - '; - } - } - - // Logic Functions - function confirmDelete() { - $cine = new FormManager(); - $cine->processesForm($_POST['id'], null,"del"); - $_SESSION['message'] = $cine->getReply(); - header('Location: ../panel_admin/index.php?state=mg'); - } - function confirmEdit() { - $manager = new FormManager(); - $manager->processesForm($_POST['id'], $_POST['idcinema'],"edit"); - $_SESSION['message']= $manager->getReply(); - header('Location: ../panel_admin/index.php?state=mg'); - } - function confirmAdd() { - $manager = new FormManager(); - $manager->processesForm($_POST['iduser'], $_POST['idcinema'],"new"); - $_SESSION['message'] = $manager->getReply(); - header('Location: ../panel_admin/index.php?state=mg'); - } - - -?> \ No newline at end of file