}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php[13~?module=index");
+ LOAD_URL("modules.php[13~?module=index");
}
// Add description as navigation point
ADD_DESCR("member", basename(__FILE__));
$UID = $GLOBALS['userid'];
-$WHERE = " WHERE visible='Y'";
-if (IS_ADMIN()) $WHERE = "";
+$whereStatement = " WHERE visible='Y'";
+if (IS_ADMIN()) $whereStatement = "";
-$result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$WHERE." ORDER BY sort", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__);
$cats = SQL_NUMROWS($result);
if ($cats > 0)
{
if ($joined == "N") $cnt++;
}
- if (($cats - $cnt) < $CONFIG['least_cats'])
+ if (($cats - $cnt) < $_CONFIG['least_cats'])
{
unset($_POST['ok']);
$LEAST = true;
{
switch ($joined)
{
- case "Y":
+ case 'Y':
$sql = "";
$result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%d AND cat_id=%d LIMIT 1",
array($UID, bigintval($cat)), __FILE__, __LINE__);
}
break;
- case "N":
+ case 'N':
$sql = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%d AND cat_id=%d LIMIT 1";
break;
}
if ($LEAST)
{
// Also here we have to secure it... :(
- LOAD_TEMPLATE("admin_settings_saved", true, CATS_LEAST.": ".$CONFIG['least_cats']);
+ LOAD_TEMPLATE("admin_settings_saved", true, CATS_LEAST.": ".$_CONFIG['least_cats']);
}
// Put some data into constants for the template
define('__ROWS', ($cats*2+4));
while (list($id, $cat) = SQL_FETCHROW($result))
{
// Default he has not joined
- $JOINED_N = " checked"; $JOINED_Y = "";
+ $JOINED_N = ' checked'; $JOINED_Y = "";
// Check category selection
$result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%d AND cat_id=%d LIMIT 1",
// When we found an entry don't read it, just change the JOINED_x variables
if (isset($_POST['cat']))
{
- if ($_POST['cat'][$id] =="Y") { $JOINED_Y = " checked"; $JOINED_N = ""; }
+ if ($_POST['cat'][$id] =='Y') { $JOINED_Y = ' checked'; $JOINED_N = ""; }
}
else
{
if (SQL_NUMROWS($result_user) == 1)
{
- $JOINED_Y = " checked"; $JOINED_N = "";
+ $JOINED_Y = ' checked'; $JOINED_N = "";
}
// Free memory