From f9a0a3c5baf8c6ad3d2668d1e240b6fb98037024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Fri, 4 Jun 2021 14:30:48 +0200 Subject: [PATCH] Add files via upload --- panel_user/includes/formChangeName.php | 6 ++++++ purchase/includes/formSelectCinemaSession.php | 2 +- purchase/resume.php | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/panel_user/includes/formChangeName.php b/panel_user/includes/formChangeName.php index 64102a5..8b6c433 100644 --- a/panel_user/includes/formChangeName.php +++ b/panel_user/includes/formChangeName.php @@ -80,6 +80,12 @@ class FormChangeName extends Form { } else { $bd->changeUserName(unserialize($_SESSION['user'])->getId(), $nombre); $user = $bd->selectUser($nombre, $password); + + $actual_img = "../img/users/".unserialize($_SESSION['user'])->getName().".jpg"; + $new_img = "../img/users/".$nombre.".jpg"; + copy($actual_img, $new_img); + unlink($actual_img); + $_SESSION['user'] = serialize($user); $_SESSION["nombre"] = $user->getName(); $_SESSION['message'] = "
diff --git a/purchase/includes/formSelectCinemaSession.php b/purchase/includes/formSelectCinemaSession.php index e640dcc..6c346de 100644 --- a/purchase/includes/formSelectCinemaSession.php +++ b/purchase/includes/formSelectCinemaSession.php @@ -143,7 +143,7 @@ class FormSelectCinemaSession extends Form { '.$cinemasListHTML.'

Sesiones

'.$sessionsListHTML.' -

Aplicar código promocional

+

Aplicar código promocional

'.$errorCode.'
'; } else { diff --git a/purchase/resume.php b/purchase/resume.php index f29c2b9..cad6296 100644 --- a/purchase/resume.php +++ b/purchase/resume.php @@ -9,6 +9,7 @@ include_once($prefix.'assets/php/includes/session.php'); include_once($prefix.'assets/php/includes/cinema_dao.php'); include_once($prefix.'assets/php/includes/cinema.php'); + include_once($prefix.'assets/php/includes/promotion_dao.php'); if(isset($_SESSION["purchase"]) && isset($_SESSION["film_purchase"])){ $purchase = unserialize($_SESSION["purchase"]);