// Tracker code enabled? (We don't track users here!
if ((getConfig('beg_pay_mode') != "NONE") && ($pay)) {
// Prepare content for template
+ // @TODO Opps, what is missing here???
$content = array(
);
if ($data['status'] == "CONFIRMED") {
// Set mode depending on how many mails the member has to confirm
$locked = false;
- if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') == "N")) $locked = true;
+ if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true;
// Add points to account
unset($GLOBALS['ref_level']);
}
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
}
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) {
+if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
LIMIT %d", array($DOUBLER_POINTS, $min, getConfig('doubler_max_sent')), __FILE__, __LINE__);
// Do we have entries found?
-if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') == "N"))) {
+if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != "Y"))) {
// Switch to matching SQL resource
$result_load = $result_main;
if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $result_load = $result_total;
default: // Do stuff when extension is loaded
// Do we have a daily-reset-run?
- if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
+ if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($CSS != 1))
{
// Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
$INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH'));
break;
default: // Do stuff when extension is loaded
- if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
+ if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($CSS != 1)) {
// Daily reset was run so let's check if active rallye is activated
if (getConfig('bonus_active') == "Y") {
// Run active rallye
'2','3','4','5','6','7','8','9'
);
- if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
+ if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($CSS != 1)) {
// Daily reset was run so let's check out for expired newsletter orders
$INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'));
}
default: // Do stuff when extension is loaded
// Do we have a daily-reset-run?
- if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
+ if (isBooleanConstantAndTrue('__DAILY_RESET') && (!isBooleanConstantAndTrue('DEBUG_MODE')) && ($CSS != 1)) {
// So let's check for profiles which needs an update
$INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH'));
}
// Was that eval okay?
if (empty($newContent)) {
// Something went wrong!
- die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
+ mxchange_die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
} // END - if
$OUTPUT = $newContent;
} // END - while
$tmpl_file = addslashes($tmpl_file);
// Run code
- $tmpl_file = "\$newContent=html_entity_decode(\"".COMPILE_CODE($tmpl_file)."\");";
+ $tmpl_file = "\$newContent = html_entity_decode(\"".COMPILE_CODE($tmpl_file)."\");";
@eval($tmpl_file);
} elseif (!empty($template)) {
// Template file not found!
- $newContent = TEMPLATE_404.": ".$template."<br />
-".TEMPLATE_CONTENT."
+ $newContent = "{!TEMPLATE_404!}: ".$template."<br />
+{!TEMPLATE_CONTENT!}
<pre>".print_r($content, true)."</pre>
-".TEMPLATE_DATA."
+{!TEMPLATE_DATA!}
<pre>".print_r($DATA, true)."</pre>
<br /><br />";
// Debug mode not active? Then remove the HTML tags
- if (!DEBUG_MODE) $newContent = strip_tags($newContent);
+ if (!isBooleanConstantAndTrue('DEBUG_MODE')) $newContent = strip_tags($newContent);
} else {
// No template name supplied!
- $newContent = NO_TEMPLATE_SUPPLIED;
+ $newContent = getMessage('NO_TEMPLATE_SUPPLIED');
}
// Is there some content?
// No cache instance!
DEBUG_LOG(__FUNCTION__, __LINE__, " No cache instance found.");
return false;
- } elseif ((!isConfigEntrySet('cache_admin_menu')) || (getConfig('cache_admin_menu') == "N")) {
+ } elseif ((!isConfigEntrySet('cache_admin_menu')) || (getConfig('cache_admin_menu') != "Y")) {
// Caching disabled (currently experiemental!)
return false;
}
// Set mode depending on how many mails the member has to confirm
$locked = false;
- if ((getConfig('ref_payout') > 0) && (getConfig('allow_direct_pay') == "N")) $locked = true;
+ if ((getConfig('ref_payout') > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true;
// Is begging rallye active?
if (getConfig('beg_rallye') == "Y") {
global $_CONFIG;
// Shall we add bonus points?
- if (getConfig('bonus_active') == "N") return false;
+ if (getConfig('bonus_active') != "Y") return false;
// Init variables
$SQL = ""; $bonys = 0; $mail = 0; $column = "";
global $_CONFIG;
// Shall we add bonus points?
- if (getConfig('bonus_active') == "N") return;
+ if (getConfig('bonus_active') != "Y") return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
if ((getConfig('bonus_mode') == "UID") && (getConfig('bonus_uid') == "0")) {
// Widthdraw this amount
function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
// Is the sponsor extension installed?
- if (getConfig('wernis_withdraw_active') == "N") {
+ if (getConfig('wernis_withdraw_active') != "Y") {
if (!EXT_IS_ACTIVE("sponsor")) {
// No, abort here
return false;
// Init cache file
$cacheInstance->init("EXTENSIONS");
$cacheInstance->storeExtensionVersion("sql_patches");
- } elseif (getConfig('cache_exts') == "N") {
+ } elseif (getConfig('cache_exts') != "Y") {
// Cache will not be created for extensions
$cacheMode = "skip";
}
// Mail confirmation links
define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS(getConfig('auto_purge'), "auto_purge", "MWD"));
- if (getConfig('auto_purge_active') == "N") {
+ if (getConfig('auto_purge_active') != "Y") {
define('_CFG_AP_ACTIVE_N', " checked=\"checked\"");
define('_CFG_AP_ACTIVE_Y', "");
} else {
define('_CFG_UNCONFIRMED' , getConfig('unconfirmed'));
define('_CFG_MAX_TLENGTH' , getConfig('max_tlength'));
- if (getConfig('test_text') == "N") {
+ if (getConfig('test_text') != "Y") {
define('_CFG_TEST_TEXT_N', " checked=\"checked\"");
define('_CFG_TEST_TEXT_Y', "");
} else {
break;
}
- if (getConfig('test_subj') == "N") {
+ if (getConfig('test_subj') != "Y") {
define('_CFG_TEST_SUBJ_N', " checked=\"checked\"");
define('_CFG_TEST_SUBJ_Y', "");
} else {
define('_CFG_TEST_SUBJ_Y', " checked=\"checked\"");
}
- if (getConfig('url_blacklist') == "N") {
+ if (getConfig('url_blacklist') != "Y") {
define('_CFG_URL_BLIST_N', " checked=\"checked\"");
define('_CFG_URL_BLIST_Y', "");
} else {
define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), "profile_update" , "YM"));
define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , "resend_profile_update", "MWD"));
- if (getConfig('order_multi_page') == "N") {
+ if (getConfig('order_multi_page') != "Y") {
define('_CFG_ORDER_MULTI_N', " checked=\"checked\"");
define('_CFG_ORDER_MULTI_Y', "");
} else {
define('_CFG_ORDER_MULTI_Y', " checked=\"checked\"");
}
- if (getConfig('autosend_active') == "N") {
+ if (getConfig('autosend_active') != "Y") {
define('_CFG_AUTOSEND_ACTIVE_N', " checked=\"checked\"");
define('_CFG_AUTOSEND_ACTIVE_Y', "");
} else {
define('_CFG_AUTOSEND_ACTIVE_Y', " checked=\"checked\"");
}
- if (getConfig('send_prof_update') == "N") {
+ if (getConfig('send_prof_update') != "Y") {
define('_CFG_SEND_UPDATE_N', " checked=\"checked\"");
define('_CFG_SEND_UPDATE_Y', "");
} else {
define('_CFG_SEND_UPDATE_Y', " checked=\"checked\"");
}
- if (getConfig('admin_notify') == "N") {
+ if (getConfig('admin_notify') != "Y") {
define('_CFG_ADMIN_NOTIFY_N', " checked=\"checked\"");
define('_CFG_ADMIN_NOTIFY_Y', "");
} else {
// Load main template
LOAD_TEMPLATE("admin_unlock_emails");
- } elseif ((isset($_POST['lock'])) && (getConfig('url_blacklist') == "N")) {
+ } elseif ((isset($_POST['lock'])) && (getConfig('url_blacklist') != "Y")) {
// URL blacklist not activated
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URL_BLACKLIST_DISABLED'));
} else {
} // END - if
// Check if I shall disable sending mail to newly registered members out about active/begging rallye
+ // @TODO Rewrite this to a single filter
//
// First comes first: begging rallye
if (GET_EXT_VERSION("beg") >= "0.1.7") {
// Okay, shall I disable now?
- if (getConfig('beg_new_mem_notify') == "N") {
+ if (getConfig('beg_new_mem_notify') != "Y") {
$ADD1 .= ", beg_ral_notify, beg_ral_en_notify";
$ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()";
} // END - if
// Second: active rallye
if (GET_EXT_VERSION("bonus") >= "0.7.7") {
// Okay, shall I disable now?
- if (getConfig('bonus_new_mem_notify') == "N") {
+ if (getConfig('bonus_new_mem_notify') != "Y") {
$ADD1 .= ", bonus_ral_notify, bonus_ral_en_notify";
$ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()";
} // END - if
list($blist) = SQL_FETCHROW($result);
// Create redirect-URL
- $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist;
+ $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist;
} // END - if
// Free result
// Free result
SQL_FREERESULT($result);
- // 01 2 21 12 2 23 443 3 3210
- if ((!empty($_POST['data'])) || ((getConfig('order_multi_page') == "N") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
+ // 01 2 21 12 2 23 443 3 3210
+ if ((!empty($_POST['data'])) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
// Pre-output categories
$CAT = "";
foreach ($CATS['id'] as $key => $value) {
// Output rows
define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_rows", true));
-} elseif (getConfig('bonus_active') == "N") {
+} elseif (getConfig('bonus_active') != "Y") {
// Bonus active rallye deactivated
define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_disabled", true));
} elseif ((IS_ADMIN()) && (EXT_VERSION_IS_OLDER("bonus", "0.2.2")) && (EXT_IS_ACTIVE("bonus"))) {
}
// Is the refback system enabled?
-if (getConfig('refback_enabled') == "N") {
+if (getConfig('refback_enabled') != "Y") {
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DISABLED'));
// Abort here
}
// Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') == "N")) return;
+if (($CSS == 1) || (!defined('__DAILY_RESET')) || (getConfig('beg_rallye') != "Y")) return;
//* DEBUG: */ echo basename(__FILE__)."<br />\n";
// Get current month (2 digits)
$whereStatement2 = bigintval(getConfig('beg_ranks'));
// Shall we exclude webmaster's own userid?
- if ((getConfig('beg_include_own') == "N") && (getConfig('beg_uid') > 0)) {
+ if ((getConfig('beg_include_own') != "Y") && (getConfig('beg_uid') > 0)) {
// Exclude it
$whereStatement1 = sprintf(" AND userid != %s", bigintval(getConfig('beg_uid')));
} // END - if
require($INC);
}
-//
-function ADD_MODULE_TITLE($mod) {
+// Returns the title for given module
+function ADD_MODULE_TITLE ($mod) {
global $cacheArray;
- $name = ""; $result = false;
+
+ // Init variables
+ $name = "";
+ $result = false;
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
// Still no luck or empty title?
if (empty($name)) {
// No name found
- $name = sprintf("%s (%s)", LANG_UNKNOWN_MODULE, $mod);
+ $name = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod);
if (SQL_NUMROWS($result) == 0) {
// Add module to database
$dummy = CHECK_MODULE($mod);
}
// Is the module found?
- if ($found) {
+ if ($found === true) {
// Check returned values against current access permissions
//
// Admin access ----- Guest access ----- --- Guest or member? ---
// Add menu description pending on given file name (without path!)
function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
global $NAV_DEPTH;
+
// Use only filename of the file ;)
$file = basename($file);
return $OUT;
}
}
+
//
function ADD_MENU ($MODE, $act, $wht) {
// Init some variables
OUTPUT_HTML("</table>");
}
}
+
// This patched function will reduce many SELECT queries for the specified or current admin login
function IS_ADMIN ($admin="") {
global $cacheArray;
// Use cached string
$valPass = $cacheArray['admin_hash'];
} elseif ((!empty($passCookie)) && (isset($cacheArray['admins']['password'][$admin])) && (!empty($admin))) {
- // Count cache hits
- incrementConfigEntry('cache_hits');
-
// Login data is valid or not?
$valPass = generatePassString($cacheArray['admins']['password'][$admin]);
// Cache it away
$cacheArray['admin_hash'] = $valPass;
+
+ // Count cache hits
+ incrementConfigEntry('cache_hits');
} elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE("cache"))) || (!isset($cacheArray['admins']['password'][$admin]))) {
// Search for admin
$result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
//* DEBUG: */ if (!$ret) echo __LINE__."OK!<br />";
return $ret;
}
-//
-function ADD_MAX_RECEIVE_LIST($MODE, $default="", $return=false)
-{
+
+// Generates a list of "max receiveable emails per day"
+function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
global $_POST;
$OUT = "";
- switch ($MODE)
- {
+ switch ($MODE) {
case "guest":
// Guests (in the registration form) are not allowed to select 0 mails per day.
$result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
+ if (SQL_NUMROWS($result) > 0) {
$OUT = "";
- while (list($value, $comment) = SQL_FETCHROW($result))
- {
+ while (list($value, $comment) = SQL_FETCHROW($result)) {
$OUT .= " <option value=\"".$value."\"";
if ($_POST['max_mails'] == $value) $OUT .= " selected=\"selected\"";
$OUT .= ">".$value." ".PER_DAY;
// Free memory
SQL_FREERESULT($result);
$OUT = LOAD_TEMPLATE("guest_receive_table", true);
- }
- else
- {
+ } else {
// Maybe the admin has to setup some maximum values?
+ debug_report_bug("Nothing is being done here?");
}
break;
case "member":
// Members are allowed to set to zero mails per day (we will change this soon!)
$result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
+ if (SQL_NUMROWS($result) > 0) {
$OUT = "";
- while (list($value, $comment) = SQL_FETCHROW($result))
- {
+ while (list($value, $comment) = SQL_FETCHROW($result)) {
$OUT .= " <option value=\"".$value."\"";
if ($default == $value) $OUT .= " selected=\"selected\"";
$OUT .= ">".$value." ".PER_DAY;
define('__MAX_RECEIVE_OPTIONS', $OUT);
SQL_FREERESULT($result);
$OUT = LOAD_TEMPLATE("member_receive_table", true);
- }
- else
- {
+ } else {
// Maybe the admin has to setup some maximum values?
$OUT = LOAD_TEMPLATE("admin_settings_saved", true, NO_MAX_VALUES);
}
break;
}
- if ($return)
- {
+
+ if ($return) {
// Return generated HTML code
return $OUT;
- }
- else
- {
+ } else {
// Output directly (default)
OUTPUT_HTML($OUT);
}
}
-//
-function SEARCH_EMAIL_USERTAB($email)
-{
- $ret = false;
- $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", array($email), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) $ret = true;
+
+// Checks wether the given email address is used.
+function SEARCH_EMAIL_USERTAB ($email) {
+ // Query the database
+ $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1",
+ array($email), __FILE__, __LINE__);
+
+ // Is the email there?
+ $ret = (SQL_NUMROWS($result) == 1);
+
+ // Free the result
SQL_FREERESULT($result);
+
+ // Return result
return $ret;
}
-//
-function WHAT_IS_VALID($act, $wht, $type="guest")
-{
- if (IS_ADMIN())
- {
+
+// Checks wether 'what' is valid
+// @TODO This cache can be flushed to hard drive
+function WHAT_IS_VALID ($act, $wht, $type="guest") {
+ global $cacheArray;
+
+ // Is admin or cache entry is there?
+ if (IS_ADMIN()) {
// Everything is valid to the admin :-)
- return true;
- }
- else
- {
+ $ret = true;
+ } elseif (isset($cacheArray['what_valid'][$type][$act][$what])) {
+ // Use the cache
+ $ret = $cacheArray['what_valid'][$type][$act][$what];
+
+ // Count the cache hit
+ incrementConfigEntry('cache_hits');
+ } else {
+ // By default is nothing valid
$ret = false;
+
+ // Look in database
$result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND what='%s' AND `locked`='N' LIMIT 1", array($type, $act, $wht), __FILE__, __LINE__);
+
// Is "what" valid?
- if (SQL_NUMROWS($result) == 1) $ret = true;
+ $ret = (SQL_NUMROWS($result) == 1);
+
+ // Free the result
SQL_FREERESULT($result);
- return $ret;
}
+
+ // Cache the entry
+ $cacheArray['what_valid'][$type][$act][$what] = $ret;
+
+ // Return the result
+ return $ret;
}
-//
+
+// Checks wether the current user is a member
function IS_MEMBER () {
global $status, $LAST, $cacheArray;
if (!is_array($LAST)) $LAST = array();
// Return status
return $ret;
}
-//
-function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false)
-{
+
+// Validate the given menu action
+function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
+ // By default nothing is valid
$ret = false;
+
+ // Look in all menus or only unlocked
$ADD = "";
if ((!IS_ADMIN()) && ($MODE != "admin")) $ADD = " AND `locked`='N'";
+
//* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
if (($MODE != "admin") && ($UPDATE)) {
// Update guest or member menu
OR
(last_update=0 AND last_profile_sent=0 AND joined < (UNIX_TIMESTAMP() - %s))
ORDER BY userid", array(getConfig('profile_update'), getConfig('resend_profile_update'), getConfig('profile_update')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
+
+ // Do we have some notifications to sent?
+ if (SQL_NUMROWS($result) > 0) {
// We need to send-out notifications...
- while ($DATA = SQL_FETCHROW($result))
- {
+ while ($DATA = SQL_FETCHROW($result)) {
$DATA[6] = MAKE_DATETIME($DATA[6], "0");
- if (round($DATA[5]) == "0")
- {
+ if (round($DATA[5]) == "0") {
// Has never changed his accont
$DATA[5] = PROFILE_NEVER_CHANGED;
- }
- else
- {
+ } else {
// Has changed his account
$DATA[5] = MAKE_DATETIME($DATA[5], "0");
}
// Update profile data
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
array(bigintval($DATA[0])), __FILE__, __LINE__);
- }
- }
+ } // END - while
+ } // END - if
// Free result
SQL_FREERESULT($result);
}
+
//
?>
foreach ($STYLES as $value) {
// Only include found CSS files (to reduce 404 requests)
$BASE = sprintf("%stheme/%s/css/", constant('PATH'), GET_CURR_THEME());
- $file = $BASE.$value;
+ $FQFN = $BASE.$value;
// Do include only existing files and whose are not empty
- if ((FILE_READABLE($file)) && (filesize($file) > 0)) {
+ if ((FILE_READABLE($FQFN)) && (filesize($FQFN) > 0)) {
switch (getConfig('css_php')) {
case "DIRECT":
OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/theme/".GET_CURR_THEME()."/".$value."\" />");
break;
case "FILE":
- OUTPUT_HTML(READ_FILE($file));
+ OUTPUT_HTML(READ_FILE($FQFN));
break;
- }
- }
- }
+ } // END - switch
+ } // END - if
+ } // END - foreach
} else {
// Now we load all CSS files from css.php!
OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/css.php", false);
if (isBooleanConstantAndTrue('mxchange_installing')) {
// Default theme first
$NEW_THEME = "default";
- if (!empty($_GET['theme'])) $NEW_THEME = SQL_ESCAPE($_GET['theme']);
+ if (!empty($_GET['theme'])) $NEW_THEME = SQL_ESCAPE($_GET['theme']);
if (!empty($_POST['theme'])) $NEW_THEME = SQL_ESCAPE($_POST['theme']);
OUTPUT_HTML("?theme=".$NEW_THEME."&installing=1", false);
- }
+ } // END - if
OUTPUT_HTML("\" />");
}
$template = "mailid_points_done";
// Right code entered add points and remove entry
- if (($ref_pay > 0) && (getConfig('allow_direct_pay') == "N")) {
+ if (($ref_pay > 0) && (getConfig('allow_direct_pay') != "Y")) {
// Don't add points over the referal system
$locked = true;
$template = "mailid_points_locked";
// Secure action/what if present
if (!empty($_GET['action'])) $GLOBALS['action'] = secureString($_GET['action']);
-if (!empty($_GET['what'])) $GLOBALS['what'] = secureString($_GET['what']);
+if (!empty($_GET['what'])) $GLOBALS['what'] = secureString($_GET['what']);
// Secure the module name (very important line!)
$GLOBALS['module'] = secureString($_GET['module']);
SQL_FREERESULT($result);
} elseif (IS_ADMIN()) {
// Admin is there
- $username = _ADMIN;
+ $username = getMessage('_ADMIN');
} else {
// He's a guest, hello there... ;-)
- $username = _GUEST;
+ $username = getMessage('_GUEST');
}
// The header file