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 ""; @@ -82,16 +85,17 @@ echo " |
"; echo "User Status:"; echo " | "; 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 " | ";
@@ -101,14 +105,15 @@ echo ""; echo "User Level:"; echo " | "; 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 " | ";
echo "";
+//some html:
?>