From 73faa928a6cb7e30c4e66ef16dcba72c8ec11dd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20M=C3=A9ndez?=
<45081533+FerMdez@users.noreply.github.com>
Date: Mon, 10 May 2021 12:30:15 +0200
Subject: [PATCH] Add files via upload
---
assets/php/common/user_dao.php | 12 +++++++
fdicines/about_us/index.php | 4 +--
fdicines/planificacion/index.php | 2 +-
login/login_register_view.php | 2 +-
panel_user/includes/formChangeEmail.php | 44 +++++++++++--------------
panel_user/includes/formChangeName.php | 17 +++++-----
panel_user/includes/formChangePass.php | 5 ++-
register/includes/formRegister.php | 2 +-
8 files changed, 48 insertions(+), 40 deletions(-)
diff --git a/assets/php/common/user_dao.php b/assets/php/common/user_dao.php
index 127fe2f..ef3783b 100644
--- a/assets/php/common/user_dao.php
+++ b/assets/php/common/user_dao.php
@@ -111,6 +111,18 @@
}
+ //Change user email by id.
+ public function changeUserEmail($id, $email){
+ $id = $this->mysqli->real_escape_string($id);
+ $email = $this->mysqli->real_escape_string($email);
+
+ $sql = sprintf( "UPDATE users SET email = '%s' WHERE id = '%d'", $email, $id );
+ $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
+
+ return $resul;
+
+ }
+
//Create a new User Data Transfer Object.
public function loadUser($id, $username, $email, $password, $rol){
return new User($id, $username, $email, $password, $rol);
diff --git a/fdicines/about_us/index.php b/fdicines/about_us/index.php
index d2f27d9..9c0adf4 100644
--- a/fdicines/about_us/index.php
+++ b/fdicines/about_us/index.php
@@ -50,12 +50,12 @@
- Somos un grupo de estudiantes de la asignatura de Sistemas Web
+ Somos un grupo de estudiantes de la asignatura de Sistemas Web
de la Facultad de Informática de la Universidad Complutense de Madrid.
CompluCine es un proyecto web universitario y en ningún momento pretende ofrecer una funcionalidad real.
- Para más información acerca del proyecto, haz click aquí.
+ Para más información acerca del proyecto, haz click aquí.