From 998f4331ae01be55b64f864ebf3a02fd2b4ba647 Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Tue, 12 Jan 2021 17:19:05 +0100 Subject: [PATCH] commented profile.php --- profile.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/profile.php b/profile.php index 78e6234..4acc107 100644 --- a/profile.php +++ b/profile.php @@ -1,10 +1,10 @@ Please login'); } - + //for easier use we shove some of the session array into variables. $userid = $_SESSION['userid']; $username = $_SESSION['username']; $useremail = $_SESSION['email']; @@ -13,6 +13,8 @@ $userln = $_SESSION['lastName']; $activated = $_SESSION['activated']; $isadmin = $_SESSION['isadmin']; $profilepicture = $_SESSION['profilepicture']; + +//lets build a page: ?> @@ -33,9 +35,10 @@ $profilepicture = $_SESSION['profilepicture']; Profile of '.$username.''; echo "
"; +//lets build a table with infos: echo ''; echo ""; echo "";


"; @@ -82,16 +85,17 @@ echo "
"; echo ""; echo ""; @@ -101,14 +105,15 @@ echo ""; echo ""; echo ""; +//some html: ?>
"; echo "User Status:"; echo ""; -if ($activated == 0) { +if ($activated == 0) { //if not activated print it in red and render a activation link echo '

Not Activated!


'; echo 'Click here to activate'; } -if ($activated == 1) { +if ($activated == 1) { //if activated print so, but in green echo '

Activated!

'; } echo "
"; echo "User Level:"; echo ""; -if ($isadmin == 0) { +if ($isadmin == 0) { //if not admin, print "User" in green echo '

User


'; } -if ($isadmin == 1) { +if ($isadmin == 1) { //if admin, print so but in red echo '

Admin

'; } echo "