diff --git a/controllers/UserCtrl.php b/controllers/UserCtrl.php index c1f288a..a9fee94 100644 --- a/controllers/UserCtrl.php +++ b/controllers/UserCtrl.php @@ -243,6 +243,10 @@ class UserCtrl extends MotherCtrl { } } } + if ($_POST['delete_image'] === '1') { + $objUser->setImage('images.jpg'); + } + if (count($arrError) == 0 && isset($strImageName)) { $strDest = $_ENV['IMG_USER_PATH'] . $strImageName; diff --git a/uploads/profiles/699d648ba35c3.webp b/uploads/profiles/699d648ba35c3.webp deleted file mode 100644 index 3fa3f0a..0000000 Binary files a/uploads/profiles/699d648ba35c3.webp and /dev/null differ diff --git a/uploads/profiles/69a5f0418103c.webp b/uploads/profiles/69a5f0418103c.webp new file mode 100644 index 0000000..5652841 Binary files /dev/null and b/uploads/profiles/69a5f0418103c.webp differ diff --git a/uploads/profiles/69a5f1e87275c.webp b/uploads/profiles/69a5f1e87275c.webp new file mode 100644 index 0000000..db8dfc7 Binary files /dev/null and b/uploads/profiles/69a5f1e87275c.webp differ diff --git a/uploads/profiles/69a5f231cd969.webp b/uploads/profiles/69a5f231cd969.webp new file mode 100644 index 0000000..0605d6c Binary files /dev/null and b/uploads/profiles/69a5f231cd969.webp differ diff --git a/uploads/profiles/69a5f23fe150e.webp b/uploads/profiles/69a5f23fe150e.webp new file mode 100644 index 0000000..2a2361e Binary files /dev/null and b/uploads/profiles/69a5f23fe150e.webp differ diff --git a/uploads/profiles/images.jpg b/uploads/profiles/images.jpg deleted file mode 100644 index 44949df..0000000 Binary files a/uploads/profiles/images.jpg and /dev/null differ diff --git a/views/_partial/delphoto.tpl b/views/_partial/delphoto.tpl new file mode 100644 index 0000000..019ebcb --- /dev/null +++ b/views/_partial/delphoto.tpl @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/views/useredit.tpl b/views/useredit.tpl index c3fd0df..d8aecfb 100644 --- a/views/useredit.tpl +++ b/views/useredit.tpl @@ -72,23 +72,42 @@
- - {if $objUser->getImage()} -
- image actuel -
- {/if} - Photo de profil + +
+ + Photo de profil -
Formats acceptés : JPG, PNG, WEBP. Laisser vide pour ne pas changer.
+ + +
+ + {if $objUser->getImage() != "images.jpg"} + + {/if} +
+ + + + +
Formats acceptés : JPG, PNG, WEBP. Laisser vide pour ne pas changer.
+
- +{include file="views/_partial/delphoto.tpl"} {include file="views/_partial/apigeo.tpl"} {/block} \ No newline at end of file