]> git.mxchange.org Git - mailer.git/blobdiff - modules.php
Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / modules.php
index 41b049938a9696da4f5f66f0e3fe7206129a7881..53a8e0ff41e62c6d3b18344e89625acac042623f 100644 (file)
@@ -55,22 +55,18 @@ $GLOBALS['module'] = htmlentities(strip_tags($_GET['module']), ENT_QUOTES);
 require ("inc/config.php");
 
 // Check if logged in
-if (IS_LOGGED_IN())
-{
+if (IS_LOGGED_IN()) {
        // Is still logged in so we welcome him with his name
-       $result = SQL_QUERY_ESC("SELECT surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
         array($GLOBALS['userid']), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
+       if (SQL_NUMROWS($result) == 1) {
                // Load surname and family's name and build the username
                list($s, $f) = SQL_FETCHROW($result);
                $username = $s." ".$f;
 
                // Update only cookies and no login data!
                UPDATE_LOGIN_DATA(false);
-       }
-        else
-       {
+       } else {
 
                // Hmmm, logged in and no valid cookies???
                $username = "<I>"._UNKNOWN."</I>";
@@ -78,13 +74,9 @@ if (IS_LOGGED_IN())
 
        // Free memory
        SQL_FREERESULT($result);
-}
- elseif (IS_ADMIN())
-{
+} elseif (IS_ADMIN()) {
        $username = _ADMIN;
-}
- else
-{
+} else {
        // He's a guest, hello there... ;-)
        $username = _GUEST;
 }