diff --git a/pages/profil.php b/pages/profil.php index e2e0a8b..fb65e25 100644 --- a/pages/profil.php +++ b/pages/profil.php @@ -31,25 +31,24 @@ img}' class='imageProfil' onmousedown='return false'/>"; // Nom d'utilisateur - echo "
+ echo "
{$u->username}
+ echo "
{$u->email}
+ echo "
{$u->hidenPasswd}
diff --git a/script/user.php b/script/user.php
index fabd795..32aeb82 100644
--- a/script/user.php
+++ b/script/user.php
@@ -15,6 +15,32 @@ class User{
$this->img = $image;
$this->email = $mail;
}
+
+ public function updateUsername(string $newUsername){
+ if(!empty($newUsername)){
+ $this->username = $newUsername;
+ }
+ }
+
+ public function updateEmail(string $newEmail) {
+ if(!empty($newEmail)){
+ $this->email = $newEmail;
+ }
+ }
+
+ public function updatePassWd(string $newPassword1, string $newPassword2){
+ if(!empty($newPassword2) && !empty($newPassword1)){
+ if($newPassword1 == $newPassword2){
+ $u->passwd = $newPassword1;
+ }
+ }
+ }
+
+ public function modifyImage(string $image){
+ if(!empty($image)){
+ $u->img = $image;
+ }
+ }
}
$u = new User('Testeur', 'motDepasse', '../images/imageProfil.png', 'testeur.compte@wikifantasy.com'); /*Test*/
@@ -24,31 +50,7 @@ function hidenPassWd(string $passwd){
return str_repeat('*', strlen($passwd));
}
-function modifyName(string $name){
- if(!empty($name)){
- $u->username = $name;
- }
-}
-
-function modifyEmail(string $mail){
- if(!empty($mail)){
- $u->email = $mail;
- }
-}
-
-function modifyPassWd(string $password1, string $password2){
- if(!empty($password2) && !empty($password2)){
- if($password1 == $password2){
- $u->passwd = $password;
- }
- }
-}
-function modifyImage(string $image){
- if(!empty($image)){
- $u->img = $image;
- }
-}
?>
\ No newline at end of file
diff --git a/styles/styleLogin.css b/styles/styleLogin.css
index 482405b..c5fd77d 100644
--- a/styles/styleLogin.css
+++ b/styles/styleLogin.css
@@ -49,6 +49,18 @@ body.dark-mode .buttonSudmite{
font-size: 20px;
}
+
+body.dark-mode .connexion{
+ width:90%;
+ height: 40px;
+ padding-left: 3%;
+ margin-left: 1%;
+ margin-top: -1%;
+ border-radius: 25px;
+ border: none;
+ font-size: 15px;
+}
+
/* ====== LIGHT MODE ====== */
body.light-mode h1{
color : black;
@@ -116,13 +128,3 @@ body.light-mode .connexion{
}
-.connexion{
- width:90%;
- height: 40px;
- padding-left: 3%;
- margin-left: 1%;
- margin-top: -1%;
- border-radius: 25px;
- border: none;
- font-size: 15px;
-}
diff --git a/styles/styleProfil.css b/styles/styleProfil.css
index 3623a99..f58d3b6 100644
--- a/styles/styleProfil.css
+++ b/styles/styleProfil.css
@@ -58,6 +58,18 @@ body.dark-mode .imgModify{
}
+body.dark-mode .infoProfil > input {
+ width:90%;
+ height: 40px;
+ padding-left: 3%;
+ margin-left: 1%;
+ margin-top: -1%;
+ border-radius: 25px;
+ border: none;
+ font-size: 15px;
+ font-family: "Lemon", serif;
+}
+
/* ====== LIGHT MODE ====== */
body.light-mode h1{
color : black;
@@ -109,6 +121,27 @@ body.light-mode .login{
border: 2px solid black;
}
+body.light-mode .imgModify{
+ width: 3%;
+ margin-left: 5%;
+ margin-top: 5%;
+}
+
+
+body.light-mode .infoProfil > input {
+ width:90%;
+ height: 40px;
+ padding-left: 3%;
+ margin-left: 1%;
+ margin-top: -1%;
+ border-radius: 25px;
+ border: 1px solid black;
+ background-color: #fff1f1;
+ font-size: 15px;
+ font-family: "Lemon", serif;
+}
+
+
/* ====== OTHER ====== */
.buttonSudmiteDiv{
text-align: center;
@@ -127,7 +160,7 @@ body.light-mode .login{
margin-top: 5%;
}
-.nameProfil{
+.infoProfil{
margin-left: 10%;
text-align: center;
font-size: 120%;
@@ -146,4 +179,4 @@ body.light-mode .login{
height: 40px;
margin-left: 25%;
display:block;
-}
\ No newline at end of file
+}