} // END - if
// Default is not found
- $ret = "??? (".$wht.")";
+ $ret = "??? (".$wht.')';
// Look for title
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
$ret = checkModulePermissions($mod_chk);
} else {
// Module not found we don't add it to the database
- $ret = "404";
+ $ret = '404';
}
} elseif (!$found) {
// Problem with module detected
$prefix .= " -> ";
// We need to remove .php and the end
- if (substr($search, -4, 4) == ".php") {
+ if (substr($search, -4, 4) == '.php') {
// Remove the .php
$search = substr($search, 0, -4);
} // END - i
}
// Navigation link
- $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module']."&what=".$content['sub_what'].addUrlData("")."\" target=\"_self\">";
+ $OUT .= "<a name=\"menu\" class=\"menu_blur\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module']."&what=".$content['sub_what']."\" target=\"_self\">";
} else {
$OUT .= "<em>";
}
$OUT .= " <option value=\"".$content['value']."\"";
if (REQUEST_POST('max_mails') == $content['value']) $OUT .= ' selected="selected"';
$OUT .= ">".$content['value']." {--PER_DAY--}";
- if (!empty($content['comment'])) $OUT .= " (".$content['comment'].")";
+ if (!empty($content['comment'])) $OUT .= " (".$content['comment'].')';
$OUT .= "</option>\n";
}
define('__MAX_RECEIVE_OPTIONS', $OUT);
if (SQL_NUMROWS($result) == 1) {
// Save his points to add them to the jackpot
list($points) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
// Delete points entries as well
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s", array(bigintval($uid)), __FUNCTION__, __LINE__);
// Now, when we have all his points adds them do the jackpot!
ADD_JACKPOT($points);
- }
+ } // END - if
+
+ // Free the result
+ SQL_FREERESULT($result);
// Delete category selections as well...
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
if (EXT_IS_ACTIVE('rallye')) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE userid=%s",
array(bigintval($uid)), __FUNCTION__, __LINE__);
- }
+ } // END - if
// Now a mail to the user and that's all...
- $msg = LOAD_EMAIL_TEMPLATE("del-user", array('text' => $reason), $uid);
+ $msg = LOAD_EMAIL_TEMPLATE('del-user', array('text' => $reason), $uid);
sendEmail($uid, getMessage('ADMIN_DEL_ACCOUNT'), $msg);
// Ok, delete the account!
// Exclude admin and member's area
if (($mod != 'admin') && ($mod != 'login')) {
// Construct dynamic description
- $DESCR = '{!MAIN_TITLE!} '.trim(getConfig('title_middle')).' '.ADD_DESCR('guest', 'what-'.$wht, true);
+ $DESCR = '{!MAIN_TITLE!} '.trim(getConfig('title_middle')) . ' ' . ADD_DESCR('guest', 'what-'.$wht, true);
// Output it directly
OUTPUT_HTML('<meta name="description" content="' . $DESCR . '" />');
}
// Adds points to the jackpot
-function ADD_JACKPOT($points) {
+function ADD_JACKPOT ($points) {
$result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Create line
}
// Subtracts points from the jackpot
-function SUB_JACKPOT($points) {
+function SUB_JACKPOT ($points) {
// First failed
$ret = '-1';
// Now update all user accounts
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
- array(implode(",", $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
+ array(implode(',', $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
} // END - if
// Free result
$GLOBALS['sqls'][$key] = (string) $value;
}
+// Merge SQLs together
+function MERGE_SQLS ($SQLs) {
+ SET_SQLS(merge_array(GET_SQLS(), $SQLs));
+}
+
// Counter for SQLs array
function COUNT_SQLS () {
// Default is false