]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_user.php
wernis extension is now alpha code (only listing in admin area is missing), naming...
[mailer.git] / inc / modules / admin / what-list_user.php
index f964aef935a529966e0e12221893f914542a715b..95dd6303344f861ca4ab97ca87be4b7519e4279b 100644 (file)
@@ -128,34 +128,34 @@ WHERE userid=%d LIMIT 1",
 }
  else
 {
-       $WHERE = "";
+       $whereStatement = "";
        if (($_GET['letter'] != _ALL2) && ($_GET['letter'] != _OTHERS) && (!empty($_GET['letter'])))
        {
                // List only persons w
-               $WHERE = " WHERE family LIKE '".$_GET['letter']."%'";
+               $whereStatement = " WHERE family LIKE '".$_GET['letter']."%'";
        }
        if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family";
 
        // Parse the mode parameter
        if (isset($_GET['mode'])) {
                // Is a WHERE statement already there?
-               if (!empty($WHERE)) {
+               if (!empty($whereStatement)) {
                        // Then append the status column
-                       $WHERE .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
+                       $whereStatement .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
                } else {
                        // Start a new one
-                       $WHERE = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
+                       $whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
                }
        }
 
-       $SQL = "SELECT userid, sex, surname, family, email, REMOTE_ADDR, refid, status".$MORE." FROM "._MYSQL_PREFIX."_user_data".$WHERE." ORDER BY ".$_GET['sortby'];
+       $SQL = "SELECT userid, sex, surname, family, email, REMOTE_ADDR, refid, status".$MORE." FROM "._MYSQL_PREFIX."_user_data".$whereStatement." ORDER BY ".$_GET['sortby'];
        $result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
 
        // Calculate page count (0.5 fixes a bug with page count)
-       $PAGES = round(SQL_NUMROWS($result_master) / $CONFIG['user_limit'] + 0.5);
+       $PAGES = round(SQL_NUMROWS($result_master) / $_CONFIG['user_limit'] + 0.5);
 
        if (empty($_GET['page']))   $_GET['page']   = "1";
-       if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['user_limit'];
+       if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['user_limit'];
 
        // Add limitation to SQL string and run him again
        $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset'];
@@ -178,7 +178,7 @@ WHERE userid=%d LIMIT 1",
                define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
                if ($PAGES > 1)
                {
-                       define('__PAGE_NAV', ADD_PAGENAV($PAGES, $CONFIG['user_limit'], true, $colspan, true));
+                       define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true));
                }
                 else
                {