From: Roland Häder Date: Sun, 17 Feb 2008 23:21:24 +0000 (+0000) Subject: wernis extension is now alpha code (only listing in admin area is missing), naming... X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=60494e212a67fe360bfbb481eb4928480a6f379b wernis extension is now alpha code (only listing in admin area is missing), naming conventions to several variables applied, minor fixes --- diff --git a/.gitattributes b/.gitattributes index 0c724543c3..5e28c4518f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1140,10 +1140,11 @@ templates/de/html/member/member_unconfirmed_table.tpl -text templates/de/html/member/member_welcome.tpl -text templates/de/html/member/member_welcome_footer.tpl -text templates/de/html/member/member_welcome_header.tpl -text -templates/de/html/member/member_wernis.tpl -text -templates/de/html/member/member_wernis_form.tpl -text templates/de/html/member/member_wernis_mode_choose.tpl -text -templates/de/html/member/member_wernis_row.tpl -text +templates/de/html/member/member_wernis_mode_list.tpl -text +templates/de/html/member/member_wernis_mode_list_row.tpl -text +templates/de/html/member/member_wernis_mode_pay.tpl -text +templates/de/html/member/member_wernis_mode_withdraw.tpl -text templates/de/html/message.tpl -text templates/de/html/metadata.tpl -text templates/de/html/online_now.tpl -text diff --git a/admin.php b/admin.php index 7fcb0e8612..8c26089496 100644 --- a/admin.php +++ b/admin.php @@ -48,13 +48,13 @@ require ("inc/config.php"); if (defined('mxchange_installed') && (mxchange_installed)) { // Simply redirect... :-) - LOAD_URL(URL."/modules.php?module=admin&action=login"); + LOAD_URL("modules.php?module=admin&action=login"); // Redirection should be done here } else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) diff --git a/agb.php b/agb.php index 4c878bc909..a321428bc3 100644 --- a/agb.php +++ b/agb.php @@ -48,13 +48,13 @@ require ("inc/config.php"); if (defined('mxchange_installed') && (mxchange_installed)) { // Simply redirect... :-) - LOAD_URL(URL."/modules.php?module=index&what=agb"); + LOAD_URL("modules.php?module=index&what=agb"); // Redirection should be done here } else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) ?> diff --git a/beg.php b/beg.php index b7bb846df5..712a362f90 100644 --- a/beg.php +++ b/beg.php @@ -94,13 +94,13 @@ if (defined('mxchange_installed') && (mxchange_installed)) { // Multiply configured values with 100000 and divide with 100000 so we can also handle small values // If we need more number behind the decimal dot then we just need to increase all these three // numbers matching to the numbers behind the decimal dot. Simple! ;-) - $POINTS = rand(($CONFIG['beg_points'] * 100000), ($CONFIG['beg_points_max'] * 100000)) / 100000; + $points = rand(($_CONFIG['beg_points'] * 100000), ($_CONFIG['beg_points_max'] * 100000)) / 100000; // Set nickname / userid for the template(s define('__BEG_UID' , $_GET['uid']); define('__BEG_CLICKS', ($clicks + 1)); define('__BEG_BANNER', LOAD_TEMPLATE("beg_banner", true)); - define('__BEG_POINTS', TRANSLATE_COMMA($POINTS)); + define('__BEG_POINTS', TRANSLATE_COMMA($points)); } else { // Other status $uid = "0"; @@ -110,15 +110,15 @@ if (defined('mxchange_installed') && (mxchange_installed)) { // Free memory SQL_FREERESULT($result); - if (($uid > 0) && ($CONFIG['beg_uid'] != $uid)) { + if (($uid > 0) && ($_CONFIG['beg_uid'] != $uid)) { // Update counter $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_clicks=beg_clicks+1 WHERE userid=%d AND status='CONFIRMED' LIMIT 1", array($uid), __FILE__, __LINE__); // Check for last entry for userid w/o IP number - $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $CONFIG['beg_timeout'])." OR (timeout > ".(time() - $CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_beg_ips WHERE (timeout > ".(time() - $_CONFIG['beg_timeout'])." OR (timeout > ".(time() - $_CONFIG['beg_uid_timeout'])." AND userid=%d)) AND remote_ip='%s' LIMIT 1", array($uid, getenv('REMOTE_ADDR')), __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 0) && ($POINTS > 0) && (!$login)) { + if ((SQL_NUMROWS($result) == 0) && ($points > 0) && (!$login)) { // Free memory SQL_FREERESULT($result); @@ -132,28 +132,29 @@ if (defined('mxchange_installed') && (mxchange_installed)) { // Set mode depending on how many mails the member has to confirm $locked = false; - if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == 'N')) $locked = true; + if (($ref_payout > 0) && ($_CONFIG['allow_direct_pay'] == 'N')) $locked = true; // Is begging rallye active? - if ($CONFIG['beg_rallye'] == 'Y') { + if ($_CONFIG['beg_rallye'] == 'Y') { // Add points to rallye account $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%d LIMIT 1", - array($POINTS, $uid), __FILE__, __LINE__); + array($points, $uid), __FILE__, __LINE__); } else { // Add points to account - ADD_POINTS_REFSYSTEM($uid, $POINTS, false, "0", $locked, strtolower($CONFIG['beg_mode'])); + $DEPTH = 0; + ADD_POINTS_REFSYSTEM($uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode'])); } // Subtract begged points from member account if the admin has selected one - if ($CONFIG['beg_uid'] > 0) { + if ($_CONFIG['beg_uid'] > 0) { // Subtract from this account $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", - array($POINTS, bigintval($CONFIG['beg_uid'])), __FILE__, __LINE__); + array($points, bigintval($_CONFIG['beg_uid'])), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); } } @@ -201,21 +202,21 @@ if (defined('mxchange_installed') && (mxchange_installed)) { // Free memory SQL_FREERESULT($result); - } elseif ($uid == $CONFIG['beg_uid']) { + } elseif ($uid == $_CONFIG['beg_uid']) { // Webmaster's ID cannot beg for points! $msg = CODE_BEG_SAME_AS_OWN; } // Reload to index module die("-".$msg."-"); - if ((!empty($msg)) && (!empty($msg))) LOAD_URL(URL."/modules.php?module=index&msg=".$msg); + if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg); } else { // No userid entered - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } } else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) diff --git a/birthday_confirm.php b/birthday_confirm.php index 27729533e4..cd2236573b 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -71,10 +71,11 @@ WHERE b.userid=%d AND b.chk_value='%s' LIMIT 1", { // Set mode depending on how many mails the member has to confirm $locked = false; - if (($ref_payout > 0) && ($CONFIG['allow_direct_pay'] == 'N')) $locked = true; + if (($ref_payout > 0) && ($_CONFIG['allow_direct_pay'] == 'N')) $locked = true; // Add points to account - ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($CONFIG['birthday_mode'])); + $DEPTH = 0; + ADD_POINTS_REFSYSTEM($uid, $GIFT, false, "0", $locked, strtolower($_CONFIG['birthday_mode'])); // Remove entry from table $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%d LIMIT 1", @@ -132,7 +133,7 @@ WHERE b.userid=%d AND b.chk_value='%s' LIMIT 1", else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) ?> diff --git a/click.php b/click.php index 1601300cad..016ba77555 100644 --- a/click.php +++ b/click.php @@ -50,9 +50,9 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET clicks=clicks+1 WHERE id=%d LIMIT 1", array(bigintval($_GET['banner'])), __FILE__, __LINE__); if (SQL_AFFECTEDROWS($link) == 1) { if (!empty($_GET['user'])) { - LOAD_URL(URL."/ref.php?refid=".bigintval($_GET['user'])); + LOAD_URL("ref.php?refid=".bigintval($_GET['user'])); } else { - LOAD_URL(URL."/shop_reseller.php?reseller=".bigintval($_GET['user'])); + LOAD_URL("shop_reseller.php?reseller=".bigintval($_GET['user'])); } } exit(); diff --git a/confirm.php b/confirm.php index 42165299f6..6e44e25308 100644 --- a/confirm.php +++ b/confirm.php @@ -66,7 +66,7 @@ if (defined('mxchange_installed') && (mxchange_installed) && (admin_registered)) else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) ?> diff --git a/doubler.php b/doubler.php index 9d3a4432e6..214641567f 100644 --- a/doubler.php +++ b/doubler.php @@ -77,7 +77,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) $uid = 0; // If no account was found set default refid and status to CONFIRMED - if (empty($GLOBALS['refid'])) { $GLOBALS['refid'] = $CONFIG['def_refid']; $status = "CONFIRMED"; } + if (empty($GLOBALS['refid'])) { $GLOBALS['refid'] = $_CONFIG['def_refid']; $status = "CONFIRMED"; } // Begin with doubler script... if (isset($_POST['ok'])) @@ -114,7 +114,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) $_POST['points'] = bigintval(round(str_replace(",", ".", $_POST['points']))); // Probe for enough points - $probe_points = (($_POST['points'] >= $CONFIG['doubler_min']) && ($_POST['points'] <= $CONFIG['doubler_max'])); + $probe_points = (($_POST['points'] >= $_CONFIG['doubler_min']) && ($_POST['points'] <= $_CONFIG['doubler_max'])); // Check all together if ((!empty($uid)) && ($password == generateHash($_POST['pass'], substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) @@ -123,10 +123,10 @@ if (defined('mxchange_installed') && (mxchange_installed)) $DOUBLER_UID = $uid; // Calulcate points - $POINTS = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); + $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); // So let's continue with probing his points amount - if (($POINTS - $CONFIG['doubler_left'] - $_POST['points'] * $CONFIG['doubler_charge']) >= 0) + if (($points - $_CONFIG['doubler_left'] - $_POST['points'] * $_CONFIG['doubler_charge']) >= 0) { // Enough points are left so let's continue with the doubling process // Create doubling "account" width *DOUBLED* points @@ -145,10 +145,10 @@ if (defined('mxchange_installed') && (mxchange_installed)) } // Add points to "total payed" including charge - $points = $_POST['points'] - $_POST['points'] * $CONFIG['doubler_charge']; + $points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge']; $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config='0' LIMIT 1", array($points), __FILE__, __LINE__); - $CONFIG['doubler_points'] += $points; + $_CONFIG['doubler_points'] += $points; // Destroy cache if (GET_EXT_VERSION("cache") >= "0.1.2") @@ -161,14 +161,14 @@ if (defined('mxchange_installed') && (mxchange_installed)) { // Okay add a refid line and apply refid percents $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_doubler (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s', '0', '%s', '".$_SERVER['REMOTE_ADDR']."', UNIX_TIMESTAMP(), 'N', 'Y')", - array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $CONFIG['doubler_ref'])), __FILE__, __LINE__); + array(bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2 * $_CONFIG['doubler_ref'])), __FILE__, __LINE__); // And that's why we dont't want to you more than one referral level of doubler-points. ^^^ } // Update usage counter $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config='0' LIMIT 1", __FILE__, __LINE__); - $CONFIG['doubler_counter']++; + $_CONFIG['doubler_counter']++; // Set constant define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid'])); @@ -195,12 +195,12 @@ if (defined('mxchange_installed') && (mxchange_installed)) // Account is locked by admin / holiday! define('__ERROR_MSG', DOUBLER_FORM_STATUS_LOCKED); } - elseif ($_POST['points'] < $CONFIG['doubler_min']) + elseif ($_POST['points'] < $_CONFIG['doubler_min']) { // Not enougth points entered define('__ERROR_MSG', DOUBLER_FORM_POINTS_MIN); } - elseif ($_POST['points'] > $CONFIG['doubler_max']) + elseif ($_POST['points'] > $_CONFIG['doubler_max']) { // Too much points entered define('__ERROR_MSG', DOUBLER_FORM_POINTS_MAX); @@ -238,7 +238,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , ""); // Shall I check for points immediately? - if ($CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php"); + if ($_CONFIG['doubler_send_mode'] == "DIRECT") require(PATH."inc/doubler_send.php"); // Output header include(PATH."inc/header.php"); @@ -263,15 +263,15 @@ if (defined('mxchange_installed') && (mxchange_installed)) else { // Transfer default refid to constant - define('__REFID', $CONFIG['def_refid']); + define('__REFID', $_CONFIG['def_refid']); } // Percent values etc. - define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100)); - define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100)); - define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points'])); - define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min'])); - define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max'])); + define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100)); + define('__REF_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_ref'] * 100)); + define('__TOTAL_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_points'])); + define('__MIN_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_min'])); + define('__MAX_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_max'])); // Text "Enter login" if (EXT_IS_ACTIVE("nickname")) @@ -286,7 +286,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) } // Which mail-send-mode did the admin setup? - switch ($CONFIG['doubler_send_mode']) + switch ($_CONFIG['doubler_send_mode']) { case "DIRECT": define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT); @@ -301,10 +301,10 @@ if (defined('mxchange_installed') && (mxchange_installed)) define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", 'Y', 'N', "DESC")); // Generate timemark - define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout'])); + define('__TIMEOUT_MARK', CREATE_FANCY_TIME($_CONFIG['doubler_timeout'])); // Usage counter - define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']); + define('__DOUBLER_COUNTER', $_CONFIG['doubler_counter']); // Points left to doubler define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT())); @@ -318,7 +318,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) diff --git a/inc/autopurge.php b/inc/autopurge.php index aa393cf9b5..2d280c4cbc 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -38,16 +38,16 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) require($INC); } -if (($CONFIG['auto_purge_active'] == 'Y') && ($CONFIG['auto_purge'] > 0)) +if (($_CONFIG['auto_purge_active'] == 'Y') && ($_CONFIG['auto_purge'] > 0)) { // First calculate the timestamp if (function_exists('CREATE_TIME_SELECTIONS')) { - $PURGE = time() - $CONFIG['auto_purge']; + $PURGE = time() - $_CONFIG['auto_purge']; } else { - $PURGE = time() - $CONFIG['auto_purge'] * 24 * 60 * 60; + $PURGE = time() - $_CONFIG['auto_purge'] * 24 * 60 * 60; } // Init variables @@ -162,10 +162,10 @@ WHERE s.timestamp_ordered <= %s ORDER BY s.userid", } // Shall I look for inactive accounts and autopurge inactive accounts? -if ($CONFIG['ap_inactive'] == 'Y') +if ($_CONFIG['ap_inactive'] == 'Y') { // Ok, let's have a look... - $since = bigintval(time() - $CONFIG['ap_in_since']); + $since = bigintval(time() - $_CONFIG['ap_in_since']); $EXCLUDE_LIST = " AND d.userid != c.def_refid"; // Check for more extensions @@ -190,8 +190,8 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); { // Prepare variables and constants... $UIDs = ""; - define('__INACTIVE_SINCE', ($CONFIG['ap_in_since'] / 60 / 60)); - define('__INACTIVE_TIME' , ($CONFIG['ap_in_time'] / 60 / 60)); + define('__INACTIVE_SINCE', ($_CONFIG['ap_in_since'] / 60 / 60)); + define('__INACTIVE_TIME' , ($_CONFIG['ap_in_time'] / 60 / 60)); // Mark found accounts as inactive and send an email while(list($uid, $email, $last) = SQL_FETCHROW($result_inactive)) @@ -231,7 +231,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list // here for e.g. excluding holiday users - $time = bigintval(time() - $CONFIG['ap_in_time']); + $time = bigintval(time() - $_CONFIG['ap_in_time']); $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online FROM "._MYSQL_PREFIX."_user_data AS d, "._MYSQL_PREFIX."_config AS c WHERE status='CONFIRMED' AND joined < %s AND last_online< %s AND ap_notified < %s @@ -260,7 +260,7 @@ ORDER BY userid", $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if ($CONFIG['ap_un_mail'] == 'Y') + if ($_CONFIG['ap_un_mail'] == 'Y') { if (GET_EXT_VERSION("admins") >= "0.4.1") { @@ -279,17 +279,17 @@ ORDER BY userid", } // Shall I auto-purge unconfirmed accounts? -if ($CONFIG['ap_unconfirmed'] == 'Y') +if ($_CONFIG['ap_unconfirmed'] == 'Y') { // Init variables and find unconfirmed accounts which I shall auto-purge - $time = bigintval(time() - $CONFIG['ap_un_time']); + $time = bigintval(time() - $_CONFIG['ap_un_time']); $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' AND joined < %s ORDER BY userid", array($time), __FILE__, __LINE__); if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... $UIDs = ""; - define('__UNCONFIRMED_TIME' , ($CONFIG['ap_un_time'] / 60 / 60)); + define('__UNCONFIRMED_TIME' , ($_CONFIG['ap_un_time'] / 60 / 60)); // Delete inactive accounts while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) @@ -308,7 +308,7 @@ if ($CONFIG['ap_unconfirmed'] == 'Y') $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if ($CONFIG['ap_un_mail'] == 'Y') + if ($_CONFIG['ap_un_mail'] == 'Y') { if (GET_EXT_VERSION("admins") >= "0.4.1") { @@ -327,15 +327,15 @@ if ($CONFIG['ap_unconfirmed'] == 'Y') } // Check version (must be > 0.0) -if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == 'Y')) +if ((GET_EXT_VERSION("task") > "0.0") && ($_CONFIG['ap_tasks'] == 'Y')) { // Purge deleted tasks (no notification to admin) - $since = bigintval(time() - $CONFIG['ap_tasks_time']); + $since = bigintval(time() - $_CONFIG['ap_tasks_time']); $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE status='DELETED' AND task_created <= %s", array($since), __FILE__, __LINE__); $DELETED = SQL_AFFECTEDROWS(); - if (($DELETED > 0) && ($CONFIG['ap_tasks_mail'] == 'Y')) + if (($DELETED > 0) && ($_CONFIG['ap_tasks_mail'] == 'Y')) { // Send out email to admin if (GET_EXT_VERSION("admins") >= "0.4.1") @@ -351,10 +351,10 @@ if ((GET_EXT_VERSION("task") > "0.0") && ($CONFIG['ap_tasks'] == 'Y')) } // Search for mails from deleted members? -if ($CONFIG['ap_del_mails']) +if ($_CONFIG['ap_del_mails']) { // Okay, let's check for them... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $since = bigintval(time() - $_CONFIG['ap_dm_timeout']); $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", array($since), __FILE__, __LINE__); @@ -377,7 +377,7 @@ if ($CONFIG['ap_del_mails']) $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $since = bigintval(time() - $_CONFIG['ap_dm_timeout']); $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", array($since), __FILE__, __LINE__); } @@ -388,7 +388,7 @@ if ($CONFIG['ap_del_mails']) SQL_FREERESULT($result_mails); // Now let's check for stats entries as well - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $since = bigintval(time() - $_CONFIG['ap_dm_timeout']); $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", array($since), __FILE__, __LINE__); @@ -407,7 +407,7 @@ if ($CONFIG['ap_del_mails']) $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... - $since = bigintval(time() - $CONFIG['ap_dm_timeout']); + $since = bigintval(time() - $_CONFIG['ap_dm_timeout']); $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_user_stats WHERE data_type='DELETED' AND timestamp_send <= %s ORDER BY sender", array($since), __FILE__, __LINE__); } @@ -418,7 +418,7 @@ if ($CONFIG['ap_del_mails']) SQL_FREERESULT($result_mails); // Do we have deleted mails and the admin want's to receive a notification - if (($DELETED > 0) && ($CONFIG['ap_dm_notify'] == 'Y')) + if (($DELETED > 0) && ($_CONFIG['ap_dm_notify'] == 'Y')) { // Send out email to admin if (GET_EXT_VERSION("admins") >= "0.4.1") diff --git a/inc/databases.php b/inc/databases.php index fb6ab7ef2f..602ef5a1f7 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -123,7 +123,7 @@ define('CURR_PATCH_LEVEL', "514"); define('_PRIME', 591623); // Calculate with the prime number (for code generation) -define('_ADD', (_PRIME * _PRIME / (pi() * $CONFIG['code_length'] + 1))); +define('_ADD', (_PRIME * _PRIME / (pi() * $_CONFIG['code_length'] + 1))); // ?> diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 03e2d736f2..0fb1a62214 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // SQL queries function SQL_QUERY($sql_string, $F, $L) { - global $link, $CSS, $CONFIG, $OK; + global $link, $CSS, $_CONFIG, $OK; // Run SQL command $result = @mysql_query($sql_string, $link) @@ -50,8 +50,8 @@ function SQL_QUERY($sql_string, $F, $L) ".$sql_string); // Count this query - if (!isset($CONFIG['sql_count'])) $CONFIG['sql_count'] = 0; - $CONFIG['sql_count']++; + if (!isset($_CONFIG['sql_count'])) $_CONFIG['sql_count'] = 0; + $_CONFIG['sql_count']++; // Debug output //* DEBUG: */ print "Query=".$sql_string.", affected=".SQL_AFFECTEDROWS().", numrows=".SQL_NUMROWS($result)."
\n"; @@ -72,15 +72,15 @@ function SQL_QUERY($sql_string, $F, $L) } // Count DB hits - if (!isset($CONFIG['db_hits'])) + if (!isset($_CONFIG['db_hits'])) { // Count in dummy variable - $CONFIG['db_hits'] = 0; + $_CONFIG['db_hits'] = 0; } else { // Count to config array - $CONFIG['db_hits']++; + $_CONFIG['db_hits']++; } return $result; } @@ -177,12 +177,12 @@ function SQL_SELECT_DB($DB, $link, $F, $L) // SQL close link function SQL_CLOSE($link, $F, $L) { - global $CONFIG, $CACHE, $CFG_CACHE; - if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($CONFIG['db_hits'])) && (isset($CONFIG['cache_hits'])) && (is_object($CACHE))) + global $_CONFIG, $CACHE, $CFG_CACHE; + if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($_CONFIG['db_hits'])) && (isset($_CONFIG['cache_hits'])) && (is_object($CACHE))) { // Update counter for db/cache $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET db_hits=%d, cache_hits=%d WHERE config='0' LIMIT 1", - array(bigintval($CONFIG['db_hits']), bigintval($CONFIG['cache_hits'])), __FILE__, __LINE__); + array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])), __FILE__, __LINE__); // Update cache here if (GET_EXT_VERSION("cache") >= "0.1.2") @@ -190,8 +190,8 @@ function SQL_CLOSE($link, $F, $L) if ($CACHE->cache_file("config", true)) { // Replace data - $CACHE->cache_replace("cache_hits", $CONFIG['cache_hits'], "0", $CFG_CACHE); - $CACHE->cache_replace("db_hits" , $CONFIG['db_hits'] , "0", $CFG_CACHE); + $CACHE->cache_replace("cache_hits", $_CONFIG['cache_hits'], "0", $CFG_CACHE); + $CACHE->cache_replace("db_hits" , $_CONFIG['db_hits'] , "0", $CFG_CACHE); } } } diff --git a/inc/doubler_send.php b/inc/doubler_send.php index cffd353805..7e38020dcf 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -56,7 +56,7 @@ unset($_COOKIE['DOUBLER_UID']); if (empty($DOUBLER_UID)) $DOUBLER_UID = "0"; // Check for doubles which we can pay out -$min = bigintval($CONFIG['doubler_min'] * 2); +$min = bigintval($_CONFIG['doubler_min'] * 2); $result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark FROM "._MYSQL_PREFIX."_doubler AS d LEFT JOIN "._MYSQL_PREFIX."_user_data AS u @@ -71,13 +71,13 @@ LEFT JOIN "._MYSQL_PREFIX."_user_data AS u ON d.userid=u.userid WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N' ORDER BY d.timemark -LIMIT %d", array($DOUBLER_POINTS, $min, $CONFIG['doubler_max_sent']), __FILE__, __LINE__); +LIMIT %d", array($DOUBLER_POINTS, $min, $_CONFIG['doubler_max_sent']), __FILE__, __LINE__); -if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) || ((SQL_NUMROWS($result_main) == $CONFIG['doubler_group_sent']) && ($CONFIG['doubler_sent_all'] == 'N'))) +if (((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == 'Y')) || ((SQL_NUMROWS($result_main) == $_CONFIG['doubler_group_sent']) && ($_CONFIG['doubler_sent_all'] == 'N'))) { // Switch to matching SQL resource $result_load = $result_main; - if ((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) $result_load = $result_total; + if ((SQL_NUMROWS($result_total) > 0) && ($_CONFIG['doubler_sent_all'] == 'Y')) $result_load = $result_total; // At least one account was found while(list($id, $uid, $points, $ip, $time) = SQL_FETCHROW($result_load)) @@ -109,7 +109,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | } // Exclude webmaster from doubling... - if ($uid != $CONFIG['doubler_uid']) + if ($uid != $_CONFIG['doubler_uid']) { // Add points $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth=0 LIMIT 1", @@ -129,7 +129,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | $OK = false; // Check for jackpot inclusion in doubling process - if (($jackpot > 0) && ($jackpot >= $points) && ($CONFIG['doubler_jackpot'] == 'Y')) + if (($jackpot > 0) && ($jackpot >= $points) && ($_CONFIG['doubler_jackpot'] == 'Y')) { // Subtract points from jackpot SUB_JACKPOT($points); @@ -140,11 +140,11 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | } // Exclude also webmaster's ID in taking points from webmaster's account - if (($user > 0) && ($user >= $points) && (!$OK) && ($CONFIG['doubler_uid'] > 0) && ($uid != $CONFIG['doubler_uid'])) + if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid'])) { // Add points to used points $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1", - array($points, $CONFIG['doubler_uid']), __FILE__, __LINE__); + array($points, $_CONFIG['doubler_uid']), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") @@ -172,7 +172,7 @@ if (((SQL_NUMROWS($result_total) > 0) && ($CONFIG['doubler_sent_all'] == 'Y')) | } // Update variables to prevent errors - $CONFIG['doubler_used'] += $points; + $_CONFIG['doubler_used'] += $points; $DOUBLER_POINTS -= $points; // Prepare array diff --git a/inc/extensions.php b/inc/extensions.php index 7f43bbac09..6aee0ca33c 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function EXTENSION_REGISTER($ext_name, $id, $dry_run=false) { - global $NOTES, $CONFIG, $INC_POOL; + global $NOTES, $_CONFIG, $INC_POOL; // We want to register an extension and registration status is by default "failed" (= false) $EXT_LOAD_MODE = "register"; $ret = false; $SQLs = array(); $INC_POOL = array(); @@ -65,7 +65,7 @@ function EXTENSION_REGISTER($ext_name, $id, $dry_run=false) foreach ($EXT_VER_HISTORY as $EXT_VER) { require($file); - if (((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) + if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) { if (!empty($UPDATE_NOTES)) { @@ -265,7 +265,7 @@ function EXTENSION_RUN_SQLS($id, $EXT_LOAD_MODE) // function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false) { - global $EXTENSIONS, $CONFIG; + global $EXTENSIONS, $_CONFIG; // Extensions are all inactive during installation if ((!mxchange_installed) || (mxchange_installing) || (empty($ext_name))) return false; @@ -283,7 +283,7 @@ function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false) $active = $EXTENSIONS['ext_active'][$ext_name]; // Count cache hits - if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; + if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++; } else { @@ -321,7 +321,7 @@ function EXT_IS_ACTIVE ($ext_name, $ignore_admin=false, $ignore_cache=false) } // Get version from extensions function GET_EXT_VERSION ($ext_name) { - global $EXTENSIONS, $CONFIG, $CACHE; + global $EXTENSIONS, $_CONFIG, $CACHE; $ret = false; // Extensions are all inactive during installation @@ -333,7 +333,7 @@ function GET_EXT_VERSION ($ext_name) { $ret = $EXTENSIONS['ext_version'][$ext_name]; // Count cache hits - if (isset($CONFIG['cache_hits'])) $CONFIG['cache_hits']++; else $CONFIG['cache_hits'] = 1; + if (isset($_CONFIG['cache_hits'])) $_CONFIG['cache_hits']++; else $_CONFIG['cache_hits'] = 1; } elseif (!is_object($CACHE)) { // Load from database $result = SQL_QUERY_ESC("SELECT ext_version FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1", @@ -350,7 +350,7 @@ function GET_EXT_VERSION ($ext_name) { function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) { // This shall never do a non-admin user! - global $CACHE, $CONFIG, $NOTES; $SQLs = array(); + global $CACHE, $_CONFIG, $NOTES; $SQLs = array(); if ((!IS_ADMIN()) || (empty($ext))) return false; // Load extension in update mode @@ -382,7 +382,7 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) include(PATH."inc/extensions/".$file); // Add notes - if ($CONFIG['verbose_sql'] == 'Y') + if ($_CONFIG['verbose_sql'] == 'Y') { $EXT_VER = $EXT_VER_HISTORY[$idx]; if (!empty($UPDATE_NOTES)) @@ -464,11 +464,11 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) // function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $dashed="", $switch=false, $WIDTH="480") { - global $CONFIG; + global $_CONFIG; $S = false; $SW = 2; $i = 1; $OUT = ""; - if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y')) + if ((is_array($SQLs)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y')) { $OUT = "
@@ -495,7 +495,7 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $ } } - if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y')) + if ((!$S) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y')) { // No addional SQL commands to run $OUT .= " @@ -516,14 +516,14 @@ function EXTENSION_VERBOSE_TABLE($SQLs, $title=ADMIN_SQLS_EXECUTED_ON_REMOVAL, $ function GET_EXT_NAME($id) { $ret = ""; - global $EXTENSIONS, $CONFIG; + global $EXTENSIONS, $_CONFIG; if (!empty($EXTENSIONS['ext_id'][$id])) { // Load from cache $ret = $EXTENSIONS['ext_id'][$id]; // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { @@ -539,14 +539,14 @@ function GET_EXT_NAME($id) function GET_EXT_ID($name) { $ret = "0"; - global $EXTENSIONS, $CONFIG; + global $EXTENSIONS, $_CONFIG; if ((isset($EXTENSIONS['ext_id'])) && (is_array($EXTENSIONS['ext_id']))) { // Load from cache $ret = array_search($name, $EXTENSIONS['ext_id']); // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index d85309ce5e..9aac290652 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -123,7 +123,7 @@ case "update": // Update an extension default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - $CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today + $_CONFIG['active_limit'] = $DUMMY['active_limit']; // Only display X most active users for today unset($DUMMY); break; } diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index ea4952da78..d2ea55227b 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -258,20 +258,20 @@ case "update": // Update an extension default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - // Transfer all to the $CONFIG array... - $CONFIG['ap_inactive'] = $DUMMY['autopurge_inactive']; // Autopurge inactive accounts (yes/no) - $CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no) - $CONFIG['ap_tasks'] = $DUMMY['autopurge_tasks']; // Autopurge out-dated tasks (yes/no) - $CONFIG['ap_in_mail'] = $DUMMY['ap_in_notify']; // Send email to admin when purging inactive accounts (yes/no) - $CONFIG['ap_un_mail'] = $DUMMY['ap_un_notify']; // Send email to admin when purging unconfirmed accounts (yes/no) - $CONFIG['ap_tasks_mail'] = $DUMMY['ap_tasks_notify']; // Send email to admin when purging out-dated tasks (yes/no) - $CONFIG['ap_in_since'] = $DUMMY['ap_inactive_since']; // Timeout for confirmed accounts when they become inactive (seconds) - $CONFIG['ap_in_time'] = $DUMMY['ap_inactive_time']; // Timeout for inactive accounts when they are automatically deleted (seconds) - $CONFIG['ap_un_time'] = $DUMMY['ap_unconfirmed_time']; // Timeout for unconfirmed accounts when they are automatically deleted (seconds) - $CONFIG['ap_tasks_time'] = $DUMMY['ap_tasks_time']; // Timeout for out-dated tasks - $CONFIG['ap_del_mails'] = $DUMMY['ap_del_mails']; // Autopurge mails from deleted users? - $CONFIG['ap_dm_notify'] = $DUMMY['ap_dm_notify']; // Send email to admin when purging mails from deleted users (yes/no) - $CONFIG['ap_dm_timeout'] = $DUMMY['ap_dm_timeout']; // Timeout for mails from deleted users + // Transfer all to the $_CONFIG array... + $_CONFIG['ap_inactive'] = $DUMMY['autopurge_inactive']; // Autopurge inactive accounts (yes/no) + $_CONFIG['ap_unconfirmed'] = $DUMMY['autopurge_unconfirmed']; // Autopurge unconfirmed accounts (yes/no) + $_CONFIG['ap_tasks'] = $DUMMY['autopurge_tasks']; // Autopurge out-dated tasks (yes/no) + $_CONFIG['ap_in_mail'] = $DUMMY['ap_in_notify']; // Send email to admin when purging inactive accounts (yes/no) + $_CONFIG['ap_un_mail'] = $DUMMY['ap_un_notify']; // Send email to admin when purging unconfirmed accounts (yes/no) + $_CONFIG['ap_tasks_mail'] = $DUMMY['ap_tasks_notify']; // Send email to admin when purging out-dated tasks (yes/no) + $_CONFIG['ap_in_since'] = $DUMMY['ap_inactive_since']; // Timeout for confirmed accounts when they become inactive (seconds) + $_CONFIG['ap_in_time'] = $DUMMY['ap_inactive_time']; // Timeout for inactive accounts when they are automatically deleted (seconds) + $_CONFIG['ap_un_time'] = $DUMMY['ap_unconfirmed_time']; // Timeout for unconfirmed accounts when they are automatically deleted (seconds) + $_CONFIG['ap_tasks_time'] = $DUMMY['ap_tasks_time']; // Timeout for out-dated tasks + $_CONFIG['ap_del_mails'] = $DUMMY['ap_del_mails']; // Autopurge mails from deleted users? + $_CONFIG['ap_dm_notify'] = $DUMMY['ap_dm_notify']; // Send email to admin when purging mails from deleted users (yes/no) + $_CONFIG['ap_dm_timeout'] = $DUMMY['ap_dm_timeout']; // Timeout for mails from deleted users // Save some RAM... unset($DUMMY); diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index cc1763b2d0..2da0c3fbc3 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -260,34 +260,34 @@ case "update": // Update an extension default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - $CONFIG['beg_timeout'] = $DUMMY['beg_timeout']; // Global timeout - $CONFIG['beg_uid_timeout'] = $DUMMY['beg_uid_timeout']; // Timeout for one userid - $CONFIG['beg_ip_timeout'] = $DUMMY['beg_ip_timeout']; // Timeout for one IP number - $CONFIG['beg_points'] = $DUMMY['beg_points']; // Minimum beggable points - $CONFIG['beg_points_max'] = $DUMMY['beg_points_max']; // Maximum beggable points - $CONFIG['beg_uid'] = $DUMMY['beg_uid']; // Account to subtract begged points from - $CONFIG['beg_mode'] = $DUMMY['beg_mode']; // Payment mode: direct or over referral system? - $CONFIG['beg_month'] = $DUMMY['beg_month']; // Current month - $CONFIG['beg_ranks'] = $DUMMY['beg_ranks']; // Maximum member who will win - $CONFIG['beg_active'] = $DUMMY['beg_active']; // Only active members can win? - $CONFIG['beg_rallye'] = $DUMMY['beg_rallye']; // Is the begging rallye activated? - $CONFIG['beg_ral_en_notify'] = $DUMMY['beg_ral_en_notify']; // Notify members on enabled rallye? - $CONFIG['beg_ral_di_notify'] = $DUMMY['beg_ral_di_notify']; // Notify members on disabled rallye? - $CONFIG['beg_notify_bonus'] = $DUMMY['beg_notify_bonus']; // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification! - $CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye? - $CONFIG['beg_notify_wait'] = $DUMMY['beg_notify_wait']; // Time to wait in seconds for bonus mails - $CONFIG['beg_include_own'] = $DUMMY['beg_include_own']; // Include webmaster's own userid in rallye? + $_CONFIG['beg_timeout'] = $DUMMY['beg_timeout']; // Global timeout + $_CONFIG['beg_uid_timeout'] = $DUMMY['beg_uid_timeout']; // Timeout for one userid + $_CONFIG['beg_ip_timeout'] = $DUMMY['beg_ip_timeout']; // Timeout for one IP number + $_CONFIG['beg_points'] = $DUMMY['beg_points']; // Minimum beggable points + $_CONFIG['beg_points_max'] = $DUMMY['beg_points_max']; // Maximum beggable points + $_CONFIG['beg_uid'] = $DUMMY['beg_uid']; // Account to subtract begged points from + $_CONFIG['beg_mode'] = $DUMMY['beg_mode']; // Payment mode: direct or over referral system? + $_CONFIG['beg_month'] = $DUMMY['beg_month']; // Current month + $_CONFIG['beg_ranks'] = $DUMMY['beg_ranks']; // Maximum member who will win + $_CONFIG['beg_active'] = $DUMMY['beg_active']; // Only active members can win? + $_CONFIG['beg_rallye'] = $DUMMY['beg_rallye']; // Is the begging rallye activated? + $_CONFIG['beg_ral_en_notify'] = $DUMMY['beg_ral_en_notify']; // Notify members on enabled rallye? + $_CONFIG['beg_ral_di_notify'] = $DUMMY['beg_ral_di_notify']; // Notify members on disabled rallye? + $_CONFIG['beg_notify_bonus'] = $DUMMY['beg_notify_bonus']; // When points are > 0 and bonus extension is installed, a bonus mail with this amount of points will be send instead of an enable-notification! + $_CONFIG['beg_new_mem_notify'] = $DUMMY['beg_new_mem_notify']; // Notify members on disabled rallye? + $_CONFIG['beg_notify_wait'] = $DUMMY['beg_notify_wait']; // Time to wait in seconds for bonus mails + $_CONFIG['beg_include_own'] = $DUMMY['beg_include_own']; // Include webmaster's own userid in rallye? unset($DUMMY); // Remove old entries - $OLD = $CONFIG['beg_timeout']; - if ($CONFIG['beg_uid_timeout'] > $OLD) $OLD = $CONFIG['beg_uid_timeout']; + $OLD = $_CONFIG['beg_timeout']; + if ($_CONFIG['beg_uid_timeout'] > $OLD) $OLD = $_CONFIG['beg_uid_timeout']; $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__); if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) { // Daily reset was run so let's check if begging rallye is active - if ($CONFIG['beg_rallye'] == 'Y') + if ($_CONFIG['beg_rallye'] == 'Y') { // Check for our winers $INC_POOL[] = PATH."inc/monthly/monthly_beg.php"; @@ -300,7 +300,7 @@ default: // Do stuff when extension is loaded } // Check for beg rallye is active and send mails out - if (($CONFIG['beg_rallye'] == 'Y') && ($CONFIG['beg_new_mem_notify'] == 'Y')) + if (($_CONFIG['beg_rallye'] == 'Y') && ($_CONFIG['beg_new_mem_notify'] == 'Y')) { // Include file for sending out mails $INC_POOL[] = PATH."inc/mails/beg_mails.php"; diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 42cf1e4969..b28aab7e28 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -186,14 +186,14 @@ default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); // Copy config to main array - $CONFIG['birthday_points'] = $DUMMY['birthday_points']; - $CONFIG['birthday_mode'] = $DUMMY['birthday_mode']; - $CONFIG['birthday_active'] = $DUMMY['birthday_active']; + $_CONFIG['birthday_points'] = $DUMMY['birthday_points']; + $_CONFIG['birthday_mode'] = $DUMMY['birthday_mode']; + $_CONFIG['birthday_active'] = $DUMMY['birthday_active']; // Save some RAM... unset($DUMMY); - if ((defined('__DAILY_RESET')) && ($CONFIG['birthday_points'] > 0)) + if ((defined('__DAILY_RESET')) && ($_CONFIG['birthday_points'] > 0)) { // Daily reset was run and we shall pay points so we start checking for members who // has a birthday for today diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index db04202913..14f17fa307 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -541,40 +541,40 @@ WHERE last_online < ".$mark." ORDER BY userid"; default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - $CONFIG['login_bonus'] = $DUMMY['login_bonus']; // Bonus points for successfull logins - $CONFIG['turbo_bonus'] = $DUMMY['turbo_bonus']; // Bonus points for the fastest clicker, No. 1 - $CONFIG['bonus_rates'] = $DUMMY['turbo_rates']; // Points for clicker no. 2 to x - $CONFIG['bonus_ranks'] = $DUMMY['bonus_ranks']; // Total ranks who can win - $CONFIG['login_timeout'] = $DUMMY['login_timeout']; // Time in seconds between two logins - $CONFIG['bonus_month'] = $DUMMY['last_bonus_month']; // Last month where click-bonus are "paid" - $CONFIG['bonus_mode'] = $DUMMY['bonus_mode']; // Mode for adding points for login/click bonus - $CONFIG['bonus_uid'] = $DUMMY['bonus_uid']; // Member account to take points from - $CONFIG['bonus_lines'] = $DUMMY['bonus_lines']; // Number of lines to display in show_bonus.php - $CONFIG['bonus_timeout'] = $DUMMY['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo - $CONFIG['bonus_order'] = $DUMMY['bonus_order']; // Bonus points for ordering mails - $CONFIG['bonus_ref'] = $DUMMY['bonus_ref']; // Bonus points for "making" a referral - $CONFIG['bonus_stats'] = $DUMMY['bonus_stats']; // Bonus points for 100% clickrate in mail stats - $CONFIG['bonus_active'] = $DUMMY['bonus_active']; // De/activate bonus active rallye - $CONFIG['bonus_order_yn'] = $DUMMY['bonus_order_yn']; // Include order bonus in analysis? - $CONFIG['bonus_ref_yn'] = $DUMMY['bonus_ref_yn']; // Include referral bonus in analysis? - $CONFIG['bonus_stats_yn'] = $DUMMY['bonus_stats_yn']; // Include statistics bonus in analysis? - $CONFIG['bonus_login_yn'] = $DUMMY['bonus_login_yn']; // Include login bonus in analysis? - $CONFIG['bonus_click_yn'] = $DUMMY['bonus_click_yn']; // Include "mailid" bonus in analysis? - $CONFIG['bonus_en_notify'] = $DUMMY['bonus_en_notify']; // Notify members about enabled active rallye? - $CONFIG['bonus_di_notify'] = $DUMMY['bonus_di_notify']; // Notify members about disabled active rallye? - $CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye? - $CONFIG['bonus_notify_points'] = $DUMMY['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable! - $CONFIG['bonus_notify_wait'] = $DUMMY['bonus_notify_wait']; // Time to wait in seconds for bonus mails - $CONFIG['bonus_include_own'] = $DUMMY['bonus_include_own']; // Include webmaster's own userid in active rallye? + $_CONFIG['login_bonus'] = $DUMMY['login_bonus']; // Bonus points for successfull logins + $_CONFIG['turbo_bonus'] = $DUMMY['turbo_bonus']; // Bonus points for the fastest clicker, No. 1 + $_CONFIG['bonus_rates'] = $DUMMY['turbo_rates']; // Points for clicker no. 2 to x + $_CONFIG['bonus_ranks'] = $DUMMY['bonus_ranks']; // Total ranks who can win + $_CONFIG['login_timeout'] = $DUMMY['login_timeout']; // Time in seconds between two logins + $_CONFIG['bonus_month'] = $DUMMY['last_bonus_month']; // Last month where click-bonus are "paid" + $_CONFIG['bonus_mode'] = $DUMMY['bonus_mode']; // Mode for adding points for login/click bonus + $_CONFIG['bonus_uid'] = $DUMMY['bonus_uid']; // Member account to take points from + $_CONFIG['bonus_lines'] = $DUMMY['bonus_lines']; // Number of lines to display in show_bonus.php + $_CONFIG['bonus_timeout'] = $DUMMY['bonus_timeout']; // Auto-Purge timeout for bonus lines in mxchange_bonus_turbo + $_CONFIG['bonus_order'] = $DUMMY['bonus_order']; // Bonus points for ordering mails + $_CONFIG['bonus_ref'] = $DUMMY['bonus_ref']; // Bonus points for "making" a referral + $_CONFIG['bonus_stats'] = $DUMMY['bonus_stats']; // Bonus points for 100% clickrate in mail stats + $_CONFIG['bonus_active'] = $DUMMY['bonus_active']; // De/activate bonus active rallye + $_CONFIG['bonus_order_yn'] = $DUMMY['bonus_order_yn']; // Include order bonus in analysis? + $_CONFIG['bonus_ref_yn'] = $DUMMY['bonus_ref_yn']; // Include referral bonus in analysis? + $_CONFIG['bonus_stats_yn'] = $DUMMY['bonus_stats_yn']; // Include statistics bonus in analysis? + $_CONFIG['bonus_login_yn'] = $DUMMY['bonus_login_yn']; // Include login bonus in analysis? + $_CONFIG['bonus_click_yn'] = $DUMMY['bonus_click_yn']; // Include "mailid" bonus in analysis? + $_CONFIG['bonus_en_notify'] = $DUMMY['bonus_en_notify']; // Notify members about enabled active rallye? + $_CONFIG['bonus_di_notify'] = $DUMMY['bonus_di_notify']; // Notify members about disabled active rallye? + $_CONFIG['bonus_new_mem_notify'] = $DUMMY['bonus_new_mem_notify']; // Notify members about disabled active rallye? + $_CONFIG['bonus_notify_points'] = $DUMMY['bonus_notify_points']; // Bonus points for the enable-notification mail? 0 = disable! + $_CONFIG['bonus_notify_wait'] = $DUMMY['bonus_notify_wait']; // Time to wait in seconds for bonus mails + $_CONFIG['bonus_include_own'] = $DUMMY['bonus_include_own']; // Include webmaster's own userid in active rallye? unset($DUMMY); if (defined('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) { // Daily reset was run so let's check if active rallye is activated - if ($CONFIG['bonus_active'] == 'Y') + if ($_CONFIG['bonus_active'] == 'Y') { // Run active rallye - if($CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php"; + if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = PATH."inc/stats_bonus.php"; $INC_POOL[] = PATH."inc/monthly/monthly_bonus.php"; } else @@ -585,7 +585,7 @@ default: // Do stuff when extension is loaded } // Check for bonus rallye is active and send mails out - if (($CONFIG['bonus_active'] == 'Y') && ($CONFIG['bonus_new_mem_notify'] == 'Y')) + if (($_CONFIG['bonus_active'] == 'Y') && ($_CONFIG['bonus_new_mem_notify'] == 'Y')) { // Include file for sending out mails $INC_POOL[] = PATH."inc/mails/bonus_mails.php"; diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 7921f89e2d..99d4cd47a6 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -187,25 +187,25 @@ default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); // Load config and destroy dummy array - $CONFIG['cache_update'] = $DUMMY['cache_update']; // Last time the cache files are been re-created - $CONFIG['cache_path'] = $DUMMY['cache_path']; // Relative path for the cache files to 'inc/' - $CONFIG['cache_tested'] = $DUMMY['cache_tested']; // Says if cache path is tested or not - $CONFIG['db_hits'] = $DUMMY['db_hits']; // Counted hits on the database (all!) - $CONFIG['cache_hits'] = $DUMMY['cache_hits']; // Counted hits on the cache arrays in memory - $CONFIG['cache_admins'] = $DUMMY['cache_admins']; // Is the table '_admins' cacheable? - $CONFIG['cache_acls'] = $DUMMY['cache_acls']; // Is the table '_admins_acls' cacheable? - $CONFIG['cache_exts'] = $DUMMY['cache_exts']; // Is the table '_extensions' cacheable? - $CONFIG['cache_config'] = $DUMMY['cache_config']; // Is the table '_config' cacheable? - $CONFIG['cache_modreg'] = $DUMMY['cache_modreg']; // Is the table '_mod_reg' cacheable? - $CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable? - $CONFIG['cache_refsys'] = $DUMMY['cache_refsys']; // Is the table '_refsystem' cacheable? + $_CONFIG['cache_update'] = $DUMMY['cache_update']; // Last time the cache files are been re-created + $_CONFIG['cache_path'] = $DUMMY['cache_path']; // Relative path for the cache files to 'inc/' + $_CONFIG['cache_tested'] = $DUMMY['cache_tested']; // Says if cache path is tested or not + $_CONFIG['db_hits'] = $DUMMY['db_hits']; // Counted hits on the database (all!) + $_CONFIG['cache_hits'] = $DUMMY['cache_hits']; // Counted hits on the cache arrays in memory + $_CONFIG['cache_admins'] = $DUMMY['cache_admins']; // Is the table '_admins' cacheable? + $_CONFIG['cache_acls'] = $DUMMY['cache_acls']; // Is the table '_admins_acls' cacheable? + $_CONFIG['cache_exts'] = $DUMMY['cache_exts']; // Is the table '_extensions' cacheable? + $_CONFIG['cache_config'] = $DUMMY['cache_config']; // Is the table '_config' cacheable? + $_CONFIG['cache_modreg'] = $DUMMY['cache_modreg']; // Is the table '_mod_reg' cacheable? + $_CONFIG['cache_refdepth'] = $DUMMY['cache_refdepth']; // Is the table '_refdepths' cacheable? + $_CONFIG['cache_refsys'] = $DUMMY['cache_refsys']; // Is the table '_refsystem' cacheable? unset($DUMMY); // Create instance on class if ($CACHE_FILE != "init") { // Initialize cache system only when it's needed - $CACHE = new mxchange_cache($CONFIG['cache_update'], PATH."inc/".$CONFIG['cache_path'], $CONFIG['cache_tested']); + $CACHE = new mxchange_cache($_CONFIG['cache_update'], PATH."inc/".$_CONFIG['cache_path'], $_CONFIG['cache_tested']); if ($CACHE->ret != "done") { // Failed to initialize cache sustem diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 6cb45a143d..58402cb588 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -240,28 +240,28 @@ WHERE d.completed='N'"; default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - $CONFIG['doubler_charge'] = $DUMMY['doubler_charge']; - $CONFIG['doubler_jackpot'] = $DUMMY['doubler_jackpot']; - $CONFIG['doubler_own'] = $DUMMY['doubler_own']; - $CONFIG['doubler_uid'] = $DUMMY['doubler_uid']; - $CONFIG['doubler_points'] = $DUMMY['doubler_points']; - $CONFIG['doubler_used'] = $DUMMY['doubler_used']; - $CONFIG['doubler_send_mode'] = $DUMMY['doubler_send_mode']; - $CONFIG['doubler_timeout'] = $DUMMY['doubler_timeout']; - $CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new']; - $CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay']; - $CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old']; - $CONFIG['doubler_ref'] = $DUMMY['doubler_ref']; - $CONFIG['doubler_min'] = $DUMMY['doubler_min']; - $CONFIG['doubler_max'] = $DUMMY['doubler_max']; - $CONFIG['doubler_left'] = $DUMMY['doubler_left']; - $CONFIG['doubler_counter'] = $DUMMY['doubler_counter']; - $CONFIG['doubler_max_sent'] = $DUMMY['doubler_max_sent']; - $CONFIG['doubler_group_sent'] = $DUMMY['doubler_group_sent']; - $CONFIG['doubler_sent_all'] = $DUMMY['doubler_sent_all']; + $_CONFIG['doubler_charge'] = $DUMMY['doubler_charge']; + $_CONFIG['doubler_jackpot'] = $DUMMY['doubler_jackpot']; + $_CONFIG['doubler_own'] = $DUMMY['doubler_own']; + $_CONFIG['doubler_uid'] = $DUMMY['doubler_uid']; + $_CONFIG['doubler_points'] = $DUMMY['doubler_points']; + $_CONFIG['doubler_used'] = $DUMMY['doubler_used']; + $_CONFIG['doubler_send_mode'] = $DUMMY['doubler_send_mode']; + $_CONFIG['doubler_timeout'] = $DUMMY['doubler_timeout']; + $_CONFIG['doubler_display_new'] = $DUMMY['doubler_display_new']; + $_CONFIG['doubler_display_pay'] = $DUMMY['doubler_display_pay']; + $_CONFIG['doubler_display_old'] = $DUMMY['doubler_display_old']; + $_CONFIG['doubler_ref'] = $DUMMY['doubler_ref']; + $_CONFIG['doubler_min'] = $DUMMY['doubler_min']; + $_CONFIG['doubler_max'] = $DUMMY['doubler_max']; + $_CONFIG['doubler_left'] = $DUMMY['doubler_left']; + $_CONFIG['doubler_counter'] = $DUMMY['doubler_counter']; + $_CONFIG['doubler_max_sent'] = $DUMMY['doubler_max_sent']; + $_CONFIG['doubler_group_sent'] = $DUMMY['doubler_group_sent']; + $_CONFIG['doubler_sent_all'] = $DUMMY['doubler_sent_all']; unset($DUMMY); - if ((defined('__DAILY_RESET')) && ($CONFIG['doubler_send_mode'] == "RESET")) + if ((defined('__DAILY_RESET')) && ($_CONFIG['doubler_send_mode'] == "RESET")) { // So let's check for points $INC_POOL[] = PATH."inc/doubler_send.php"; diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 12b148373a..121d196a74 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -226,13 +226,13 @@ case "update": // Update an extension default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); // Copy data to config array - $CONFIG['holiday_max'] = $DUMMY['holiday_max']; // Maximum days for holiday - $CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds - $CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday + $_CONFIG['holiday_max'] = $DUMMY['holiday_max']; // Maximum days for holiday + $_CONFIG['holiday_lock'] = $DUMMY['holiday_lock']; // Lock deactivation in member area for X seconds + $_CONFIG['holiday_mode'] = $DUMMY['holiday_mode']; // Mode for activating holiday unset($DUMMY); // Do we have a daily-reset-run? - if (((defined('__DAILY_RESET')) && ($CONFIG['holiday_mode'] == "RESET")) || ($CONFIG['holiday_mode'] == "DIRECT")) + if (((defined('__DAILY_RESET')) && ($_CONFIG['holiday_mode'] == "RESET")) || ($_CONFIG['holiday_mode'] == "DIRECT")) { // Ok, let's check for finished holidays and unlock those accounts $INC_POOL[] = PATH."inc/reset/reset_holiday.php"; diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index defda69374..0640332e3d 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -111,7 +111,7 @@ case "update": // Update an extension default: // Do stuff when extension is loaded $DUMMY = LOAD_CONFIG("0"); - $CONFIG['maintenance'] = $DUMMY['maintenance']; + $_CONFIG['maintenance'] = $DUMMY['maintenance']; unset($DUMMY); break; } diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index f8fa3e0d58..0ba2e0c321 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -130,8 +130,8 @@ Bitte stellen Sie diesen derzeit manuell unter Misc Options" - if (empty($CONFIG['max_comma'])) $CONFIG['max_comma'] = "3"; - if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); + if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3"; + if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']); if ($cut) { // Remove trailing zeros $dot = str_replace(".", "x", $dotted); @@ -518,16 +530,16 @@ function TRANSLATE_COMMA($dotted, $cut=true) if ($pos > 0) { if ($cut) { // Cut x numbers behind comma - $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1))); + $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1))); } else { // Replace comma with dot $dotted = str_replace(".", ",", $dotted); } } elseif (!$cut) { if (empty($pos)) { - $dotted = "0,".str_repeat("0", $CONFIG['max_comma']); + $dotted = "0,".str_repeat("0", $_CONFIG['max_comma']); } else { - $dotted .= ",".str_repeat("0", $CONFIG['max_comma']); + $dotted .= ",".str_repeat("0", $_CONFIG['max_comma']); } } break; @@ -535,9 +547,9 @@ function TRANSLATE_COMMA($dotted, $cut=true) default: if (!$cut) { if ($pos > 0) { - $dotted = substr($dotted, 0, ($pos + $CONFIG['max_comma'] + 1)); + $dotted = substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1)); } else { - $dotted .= ".".str_repeat("0", $CONFIG['max_comma']); + $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']); } } break; @@ -664,13 +676,13 @@ function GET_LANGUAGE() // function SET_LANGUAGE($lang) { - global $CONFIG; + global $_CONFIG; // Accept only first 2 chars! $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); // Set cookie - @setcookie("mx_lang", $lang, (time() + $CONFIG['online_timeout']), COOKIE_PATH); + @setcookie("mx_lang", $lang, (time() + $_CONFIG['online_timeout']), COOKIE_PATH); // Set array $_COOKIE['mx_lang'] = $lang; @@ -678,7 +690,7 @@ function SET_LANGUAGE($lang) // function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") { - global $DATA, $CONFIG, $REPLACER; + global $DATA, $_CONFIG, $REPLACER; // Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!) $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER; @@ -699,7 +711,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") } // Expiration in a nice output format - if ($CONFIG['auto_purge'] == 0) + if ($_CONFIG['auto_purge'] == 0) { // Will never expire! $EXPIRATION = MAIL_WILL_NEVER_EXPIRE; @@ -707,19 +719,19 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") elseif (function_exists('CREATE_FANCY_TIME')) { // Create nice date string - $EXPIRATION = CREATE_FANCY_TIME($CONFIG['auto_purge']); + $EXPIRATION = CREATE_FANCY_TIME($_CONFIG['auto_purge']); } else { // Display days only - $EXPIRATION = round($CONFIG['auto_purge']/60/60/24)." "._DAYS; + $EXPIRATION = round($_CONFIG['auto_purge']/60/60/24)." "._DAYS; } switch ($template) { case "bonus-mail": // Load data for the bonus mail $BONUSID = $DATA[0]; $content = $DATA[2]; - $POINTS = TRANSLATE_COMMA($DATA[4]); + $points = TRANSLATE_COMMA($DATA[4]); $TIME = $DATA[5]; $TARGET_URL = $DATA[8]; $CATEGORY = GET_CATEGORY($DATA[9]); @@ -734,7 +746,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") case "order-admin": case "order-member": - $BLOCKS = $CONFIG['max_send']; + $BLOCKS = $_CONFIG['max_send']; $SUBJECT = $DATA[0]; $content = $DATA[1]; $PAYMENT = GET_PAYMENT($DATA[3]); @@ -756,13 +768,13 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") break; case "confirm-member": - $POINTS = $CONFIG['points_register']; + $points = $_CONFIG['points_register']; break; case "confirm-referral": $PERCENT = $DATA[0]; $LEVEL = $DATA[1]; - $POINTS = $DATA[2]; + $points = $DATA[2]; $REFID = $DATA[3]; break; @@ -771,7 +783,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") $CATEGORY = GET_CATEGORY($DATA[9]); $TIME = GET_PAY_POINTS($DATA[5], "time"); $TARGET_URL = $DATA[7]; - $POINTS = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment")); + $points = TRANSLATE_COMMA(GET_PAY_POINTS($DATA[5], "payment")); // Warning! This ID has changed from 10 to 11! $MAILID = $DATA[11]; @@ -791,11 +803,11 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") case "back-admin": case "back-member": - $POINTS = TRANSLATE_COMMA($DATA[10]); + $points = TRANSLATE_COMMA($DATA[10]); break; case "add-points": - $POINTS = $_POST['points']; + $points = $_POST['points']; break; case "guest_request_confirm": @@ -929,6 +941,12 @@ function MAKE_TIME($H, $M, $S, $stamp) } // function LOAD_URL($URL, $addUrlData=true) { + // Check if http(s):// is there + if ((substr($URL, 0, 7) != "http://") && (substr($URL, 0, 8) != "https://")) { + // Make all URLs full-qualified + $URL = URL."/".$URL; + } + // Compile out URI codes $URL = COMPILE_CODE($URL); @@ -1191,13 +1209,13 @@ function TRANSLATE_YESNO($yn) // function GEN_RANDOM_CODE($length, $code, $uid, $DATA="") { - global $CONFIG; + global $_CONFIG; // Build server string $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php"); // Build key string - $keys = SITE_KEY.":".DATE_KEY.":".$CONFIG['secret_key'].":".$CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $CONFIG['patch_ctime']).":".$CONFIG['master_salt']; + $keys = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']).":".$_CONFIG['master_salt']; // Build string from misc data $data = $code.":".$uid.":".$DATA; @@ -1214,13 +1232,13 @@ function GEN_RANDOM_CODE($length, $code, $uid, $DATA="") $a = $code + _ADD - 1; // Generate hash with master salt from modula of number with the prime number and other data - $saltedHash = generateHash(($a % _PRIME).":".$server.":".$keys.":".$data.":".date("d-m-Y (l-F-T)", time()).":".$a, $CONFIG['master_salt']); + $saltedHash = generateHash(($a % _PRIME).":".$server.":".$keys.":".$data.":".date("d-m-Y (l-F-T)", time()).":".$a, $_CONFIG['master_salt']); // Create number from hash - $rcode = hexdec(substr($saltedHash, strlen($CONFIG['master_salt']), 9)) / abs(_MAX - $a + sqrt(_ADD)) / pi(); + $rcode = hexdec(substr($saltedHash, strlen($_CONFIG['master_salt']), 9)) / abs(_MAX - $a + sqrt(_ADD)) / pi(); // At least 10 numbers shall be secure enought! - $len = $CONFIG['code_length']; + $len = $_CONFIG['code_length']; if ($len == 0) $len = 10; // Cut off requested counts of number @@ -1238,8 +1256,8 @@ function bigintval($num) // Insert the code in $img_code into jpeg or PNG image function GENERATE_IMAGE($img_code, $header=true) { - global $CONFIG; - if ((strlen($img_code) > 6) || (empty($img_code)) || ($CONFIG['code_length'] == 0)) + global $_CONFIG; + if ((strlen($img_code) > 6) || (empty($img_code)) || ($_CONFIG['code_length'] == 0)) { // Stop execution of function here because of over-sized code length return; @@ -1250,7 +1268,7 @@ function GENERATE_IMAGE($img_code, $header=true) return "\n"; } - switch ($CONFIG['img_type']) + switch ($_CONFIG['img_type']) { case "jpg": // Loads JPEG image @@ -1290,10 +1308,10 @@ function GENERATE_IMAGE($img_code, $header=true) imagestring($image, 5, 14, 2, $img_code, $text_color); // Return to browser - header ("Content-Type: image/".$CONFIG['img_type']); + header ("Content-Type: image/".$_CONFIG['img_type']); // Output image with matching image factory - switch ($CONFIG['img_type']) + switch ($_CONFIG['img_type']) { case "jpg": imagejpeg($image); break; case "png": imagepng($image); break; @@ -1815,7 +1833,7 @@ function CREATE_EMAIL_LINK($email, $table="admins") { } // Generate a hash for extra-security for all passwords function generateHash($plainText, $salt = "") { - global $CONFIG, $_SERVER; + global $_CONFIG, $_SERVER; // Is the required extension "sql_patches" there? if ((GET_EXT_VERSION("sql_patches") < "0.3.6") || (GET_EXT_VERSION("sql_patches") == "")) { @@ -1829,7 +1847,7 @@ function generateHash($plainText, $salt = "") { $server = $_SERVER['PHP_SELF'].":".getenv('HTTP_USER_AGENT').":".getenv('SERVER_SOFTWARE').":".getenv('REMOTE_ADDR').":".":".filemtime(PATH."inc/databases.php"); // Build key string - $keys = SITE_KEY.":".DATE_KEY.":".$CONFIG['secret_key'].":".$CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $CONFIG['patch_ctime']).":".$CONFIG['master_salt']; + $keys = SITE_KEY.":".DATE_KEY.":".$_CONFIG['secret_key'].":".$_CONFIG['file_hash'].":".date("d-m-Y (l-F-T)", $_CONFIG['patch_ctime']).":".$_CONFIG['master_salt']; // Additional data $data = $plainText.":".uniqid(rand(), true).":".time(); @@ -1846,12 +1864,12 @@ function generateHash($plainText, $salt = "") { //* DEBUG: */ echo "Descrambled=".$sha1b." (".strlen($sha1b).")
"; // Generate the password salt string - $salt = substr($sha1, 0, $CONFIG['salt_length']); + $salt = substr($sha1, 0, $_CONFIG['salt_length']); //* DEBUG: */ echo $salt." (".strlen($salt).")
"; } else { - $salt = substr($salt, 0, $CONFIG['salt_length']); + $salt = substr($salt, 0, $_CONFIG['salt_length']); } // Return hash @@ -1859,7 +1877,7 @@ function generateHash($plainText, $salt = "") { } // function scrambleString($str) { - global $CONFIG; + global $_CONFIG; // Init $scrambled = ""; @@ -1870,7 +1888,7 @@ function scrambleString($str) { return $str; } elseif (strlen($str) == 40) { // From database - $scrambleNums = explode(":", $CONFIG['pass_scramble']); + $scrambleNums = explode(":", $_CONFIG['pass_scramble']); } else { // Generate new numbers $scrambleNums = explode(":", genScrambleString(strlen($str))); @@ -1893,12 +1911,12 @@ function scrambleString($str) { // function descrambleString($str) { - global $CONFIG; + global $_CONFIG; // Scramble only 40 chars long strings if (strlen($str) != 40) return $str; // Load numbers from config - $scrambleNums = explode(":", $CONFIG['pass_scramble']); + $scrambleNums = explode(":", $_CONFIG['pass_scramble']); // Validate numbers if (count($scrambleNums) != 40) return $str; @@ -1944,7 +1962,7 @@ function genScrambleString($len) { // normally be stored in cookies function ADD_URL_DATA($URL) { - global $_GET, $CONFIG; + global $_CONFIG; $ADD = ""; // Determine URL binder @@ -1956,9 +1974,9 @@ function ADD_URL_DATA($URL) if ((!empty($_GET['refid'])) && (strpos($URL, "refid=") == 0)) { // Cookie found in URL $ADD .= $BIND."refid=".bigintval($_GET['refid']); - } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['def_refid'] > 0)) { + } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['def_refid'] > 0)) { // Not found! So let's set default here - $ADD .= $BIND."refid=".$CONFIG['def_refid']; + $ADD .= $BIND."refid=".$_CONFIG['def_refid']; } // Is there already added data? Then change the binder @@ -1979,16 +1997,16 @@ function ADD_URL_DATA($URL) } // function generatePassString($passHash) { - global $CONFIG; + global $_CONFIG; $ret = "*FAILED*"; // Is a secret key and master salt already initialized? - if ((!empty($CONFIG['secret_key'])) && (!empty($CONFIG['master_salt']))) { + if ((!empty($_CONFIG['secret_key'])) && (!empty($_CONFIG['master_salt']))) { // Only calculate when the secret key is generated $newHash = ""; $start = 9; for ($idx = 0; $idx < 10; $idx++) { $part1 = hexdec(substr($passHash, $start, 4)); - $part2 = hexdec(substr($CONFIG['secret_key'], $start, 4)); + $part2 = hexdec(substr($_CONFIG['secret_key'], $start, 4)); $mod = dechex($idx); if ($part1 > $part2) { $mod = dechex(sqrt(($part1 - $part2) * _PRIME / pi())); @@ -2002,7 +2020,7 @@ function generatePassString($passHash) { $newHash .= $mod; } //* DEBUG: */ die($passHash."
".$newHash." (".strlen($newHash).")"); - $ret = generateHash($newHash, $CONFIG['master_salt']); + $ret = generateHash($newHash, $_CONFIG['master_salt']); } // Return result @@ -2037,7 +2055,7 @@ function mxchange_die ($msg) { // Display parsing time and number of SQL queries in footer function DISPLAY_PARSING_TIME_FOOTER() { - global $startTime, $CONFIG; + global $startTime, $_CONFIG; $endTime = microtime(true); // Is the timer started? @@ -2056,8 +2074,8 @@ function DISPLAY_PARSING_TIME_FOOTER() { // Prepare output $content = array( 'runtime' => $runTime, - 'numSQLs' => ($CONFIG['sql_count'] + 1), - 'numTemplates' => ($CONFIG['num_templates'] + 1) + 'numSQLs' => ($_CONFIG['sql_count'] + 1), + 'numTemplates' => ($_CONFIG['num_templates'] + 1) ); // Load the template diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 9a77b2d3cf..e5584c7474 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -42,7 +42,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) if (GET_EXT_VERSION("sql_patches") < "0.3.6") return false; // Check if there is no scrambling string -if (empty($CONFIG['pass_scramble'])) +if (empty($_CONFIG['pass_scramble'])) { // Generate 40 chars long scramble string $scrambleString = genScrambleString(40); @@ -52,12 +52,12 @@ if (empty($CONFIG['pass_scramble'])) array($scrambleString), __FILE__, __LINE__); // Also remember it in config - $CONFIG['pass_scramble'] = $scrambleString; + $_CONFIG['pass_scramble'] = $scrambleString; unset($scrambleString); } // Check if there is no master salt string -if (empty($CONFIG['master_salt'])) +if (empty($_CONFIG['master_salt'])) { // Generate the master salt which is the first chars minus 40 chars of this random hash // We do an extra scrambling here... @@ -68,11 +68,11 @@ if (empty($CONFIG['master_salt'])) array($masterSalt), __FILE__, __LINE__); // Also remember it in config - $CONFIG['master_salt'] = $masterSalt; + $_CONFIG['master_salt'] = $masterSalt; unset($masterSalt); } -if (empty($CONFIG['file_hash'])) +if (empty($_CONFIG['file_hash'])) { // Create filename from hashed random string $file_hash = generateHash(GEN_PASS(rand(128, 256))); @@ -116,8 +116,8 @@ if (empty($CONFIG['file_hash'])) } // Also update configuration - $CONFIG['secret_key'] = $secretKey; unset($secretKey); - $CONFIG['file_hash'] = $file_hash; unset($file_hash); + $_CONFIG['secret_key'] = $secretKey; unset($secretKey); + $_CONFIG['file_hash'] = $file_hash; unset($file_hash); } } diff --git a/inc/header.php b/inc/header.php index 422219de40..cee6e091ab 100644 --- a/inc/header.php +++ b/inc/header.php @@ -49,21 +49,21 @@ if (($header != "1") && ($header != "2")) { $TITLE = ""; // Add title decorations? (left) - if ((count($CONFIG) > 1) && (is_resource($link)) && ($db) !== false) { - if (($CONFIG['title_decoration'] == 'Y') && (trim(!empty($CONFIG['title_left'])))) $TITLE .= trim($CONFIG['title_left'])." "; + if ((count($_CONFIG) > 1) && (is_resource($link)) && ($db) !== false) { + if (($_CONFIG['title_decoration'] == 'Y') && (trim(!empty($_CONFIG['title_left'])))) $TITLE .= trim($_CONFIG['title_left'])." "; $TITLE .= MAIN_TITLE; // Add title of module? (middle decoration will also be added!) - if (($CONFIG['title_mod_show'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']); + if (($_CONFIG['title_mod_show'] == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".ADD_MODULE_TITLE($GLOBALS['module']); // Add title from what file $MODE = ""; if ($GLOBALS['module'] == "login") $MODE = "member"; elseif ($GLOBALS['module'] == "index") $MODE = "guest"; - if ((!empty($MODE)) && (isset($CONFIG['title_what_show'])) && ($CONFIG['title_what_show'] == 'Y')) $TITLE .= " ".trim($CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']); + if ((!empty($MODE)) && (isset($_CONFIG['title_what_show'])) && ($_CONFIG['title_what_show'] == 'Y')) $TITLE .= " ".trim($_CONFIG['title_middle'])." ".GET_MOD_DESCR($MODE, $GLOBALS['what']); // Add title decorations? (right) - if (($CONFIG['title_decoration'] == 'Y') && (!empty($CONFIG['title_right']))) $TITLE .= " ".trim($CONFIG['title_right']); + if (($_CONFIG['title_decoration'] == 'Y') && (!empty($_CONFIG['title_right']))) $TITLE .= " ".trim($_CONFIG['title_right']); // Remember title in constant for the template define('__PAGE_TITLE', html_entity_decode($TITLE)); diff --git a/inc/language.php b/inc/language.php index 4790793a23..89f7bba9ea 100644 --- a/inc/language.php +++ b/inc/language.php @@ -45,7 +45,7 @@ $file = sprintf(PATH."inc/language/%s.php", $mx_lang); if (!file_exists($file)) { // Switch to default (DO NOT CHANGE!!!) - @setcookie("mx_lang", "de", (time() + $CONFIG['online_timeout']), COOKIE_PATH); + @setcookie("mx_lang", "de", (time() + $_CONFIG['online_timeout']), COOKIE_PATH); $mx_lang = "de"; $file = sprintf(PATH."inc/language/%s.php", $mx_lang); } diff --git a/inc/language/wernis_de.php b/inc/language/wernis_de.php index 5ba4027ee6..a44a05c241 100644 --- a/inc/language/wernis_de.php +++ b/inc/language/wernis_de.php @@ -45,10 +45,19 @@ define('WERNIS_ADMIN_MIN_AMOUNT', "Minimumguthaben von {!POINTS!} für Ausza define('WERNIS_ADMIN_API_ID', "WDS66-API-ID (api_id=x)"); define('WERNIS_ADMIN_API_MD5', "WDS66-API-Key (api_md5=xxxxx; 32-stellig)"); define('WERNIS_ADMIN_API_URL', "Basis-URL der API-Skripte"); -define('WERNIS_ADMIN_CONFIG_NOTE', "
Hier können Sie schon für 5,00€=25.000 Abfragen ein API-Account beantragen (dazu ist ein kostenloses {!POINTS!}-Account dennoch nötig!)"); -define('MEMBER_WERNIS_MODE_CHOOSE', "Möchten Sie {!POINTS!} zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder {!POINTS!} hier einzahlen?"); -define('MEMBER_WERNIS_MODE_WITHDRAW', "{!POINTS!} einzahlen"); +define('WERNIS_ADMIN_REFID', "Ihre Referral-ID bei WDS66-Portal (= Ihr Username!)"); +define('WERNIS_ADMIN_CONFIG_NOTE', "Hier können Sie schon für 5,00€=25.000 Abfragen ein API-Account beantragen (dazu ist ein kostenloses {!POINTS!}-Account dennoch nötig!) Geben Sie immer Ihren Usernamen von WDS66-Hauptaccount ein und überprüfen Sie diesen mehrmals! Er wird zum Überweisen von {!POINTS!}/Wernis benötigt."); +define('MEMBER_WERNIS_MODE_CHOOSE', "Möchten Sie {!POINTS!} zu Ihrem WDS66-Hauptaccount ausbezahlt bekommen oder Wernis hier einzahlen?"); +define('MEMBER_WERNIS_MODE_CHOOSE2', "Hier klicken um neue Überweisung zu starten..."); +define('MEMBER_WERNIS_MODE_WITHDRAW', "Wernis einzahlen"); define('MEMBER_WERNIS_MODE_PAYOUT', "{!POINTS!} auszahlen"); +define('WERNIS_STATUS_UNKNWOWN', "Wernis-Typ %s unbekannt."); +define('WERNIS_STATUS_WITHDRAW', "Einzahlung von WDS66"); +define('WERNIS_STATUS_PAYOUT', "Auszahlung an WDS66"); +define('WERNIS_TIMESTAMP', "Buchungszeitmarke"); +define('WERNIS_ACCOUNT', "WDS66-Hauptaccount"); +define('WERNIS_TOTAL_WERNIS', "Gesamt überwiesen"); +define('WERNIS_MEMBER_LIST_WERNIS', "Überweisungsliste von/an WDS66-Hauptaccount"); // API messages define('WERNIS_API_REQUEST_DATA_INVALID', "Interner Fehler: Abfragedaten sind defekt!"); @@ -56,10 +65,45 @@ define('WERNIS_API_REQUEST_DATA_MISSING', "Interner Fehler: Abfragedaten sind ni define('WERNIS_API_REQUEST_ERROR', "Abfragefehler: %s"); define('WERNIS_API_REQUEST_FAILED', "Unbekannter Fehler %s von API erhalten! Bitte im [Forum melden], den Fehlercode nennen und wie es dazu gekommen ist."); define('WERNIS_API_REQUEST_FAILED_AUTH', "Authorisierung an API fehlgeschlagen! Bitte API-ID und Key überprüfen. [Hier] direkt zum Export-Account. Sie benötigen Ihren Usernamen und Passwort!"); +define('WERNIS_API_REQUEST_FAILED_USER', "Useraccount nicht gefunden oder Wernis-Passwort ist ungültig!"); +define('WERNIS_API_REQUEST_FAILED_OWN', "Überweisung an eigenes Account nicht möglich."); +define('WERNIS_API_REQUEST_FAILED_AMOUNT', "Konto weist nicht genügend Deckung auf."); +define('WERNIS_API_REQUEST_FAILED_API_AMOUNT', "API-Konto weist nicht genügend Deckung auf."); +define('WERNIS_API_PURPOSE_WITHDRAW', "Einzahlung auf {!TITLE!} ({!URL!})"); +define('WERNIS_API_PURPOSE_PAYOUT', "Auszahlung von {!TITLE!} ({!URL!})"); // Error messages define('WERNIS_ERROR_STATUS', "Fehler-Status %s erhalten."); define('WERNIS_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!"); +// Member messages +define('WERNIS_MEMBER_NO_ACCOUNT', "Noch kein WDS66-Account? Hier entlang!"); +define('WERNIS_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten müssen."); +define('WERNIS_MEMBER_MIN_AMOUNT_PAYOUT', "Sie haben nicht genügend {!POINTS!} zum Auszahlen! Mindestens: %s {!POINTS!}."); +define('WERNIS_MEMBER_WITHDRAW_TITLE', "Wernis bei {!TITLE!} einzahlen:"); +define('WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT', "{!POINTS!} hier im Account:"); +define('WERNIS_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Wernis-Guthaben:"); +define('WERNIS_MEMBER_WITHDRAW_SUBMIT', "{!POINTS!} jetzt einzahlen"); +define('WERNIS_MEMBER_WITHDRAW_NOTE', "Ihr Wernis-Passwort wird bei {!TITLE!} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Ihr WDS66-Konto sollte ausreichend Deckung aufweisen!"); +define('WERNIS_MEMBER_PAYOUT_TITLE', "Wernis auf Ihr WDS66-Hauptaccount auszahlen"); +define('WERNIS_MEMBER_PAYOUT_POINTS', "Auszahlfähiges {!POINTS!}-Guthaben"); +define('WERNIS_MEMBER_PAYOUT_MIN_POINTS', "Mindestens auszuzahlendes {!POINTS!}-Guthaben"); +define('WERNIS_MEMBER_PAYOUT_SUBMIT', "Auszahlung durchführen"); +define('WERNIS_MEMBER_PAYOUT_NOTE', "Ihr Wernis-Passwort wird bei {!TITLE!} nicht gespeichert. Bitte bei Wernis-Betrag nur gerade Beträge eingeben! Überprüfen Sie vor dem Absenden Ihren WDS66-Usernamen."); +define('WERNIS_MEMBER_WDS66_ID', "Username bei WDS66-Portal: [Vergessen?]"); +define('WERNIS_MEMBER_WDS66_PASSWORD', "Wernis-Passwort (nicht Accountpasswort!): [Vergessen?]"); +define('WERNIS_MEMBER_WDS66_AMOUNT', "Zu überweisenden Betrag eingeben:"); +define('WERNIS_MEMBER_MODE_INVALID', "Ungültiger Modus %s erkannt! Bitte links im Menü fortfahren."); +define('WERNIS_MEMBER_EMPTY_USERNAME', "Sie haben Ihren WDS66-Usernamen nicht eingegeben."); +define('WERNIS_MEMBER_EMPTY_PASSWORD', "Sieh haben kein Wernis-Passwort eingegeben."); +define('WERNIS_MEMBER_EMPTY_AMOUNT', "Sie haben keine zu überweisende Betrag angegeben."); +define('WERNIS_MEMBER_INVALID_USERNAME', "Bitte nur Zahlen für den WDS66-Usernamen eingeben!"); +define('WERNIS_MEMBER_INVALID_AMOUNT', "Bitte nur Zahlen für den zu überweisenden Betrag eingeben!"); +define('WERNIS_MEMBER_AMOUNT_SMALLER_MIN', "Bitte geben Sie mindestens %s {!POINTS!} an!"); +define('WERNIS_MEMBER_WITHDRAW_FAILED', "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: %s."); +define('WERNIS_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {!TITLE!} Konto erfolgreich abgeschlossen. :-)"); +define('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie können nicht %s {!POINTS!} auszahlen, da Sie nur %s übrig haben."); +define('WERNIS_MEMBER_STATUS', "Überweisungsart"); + // ?> diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index eb79a8c705..b9ce4dd971 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function ADMINS_CHECK_ACL($act, $wht) { - global $ADMINS, $ADMINS_ACLS, $CONFIG, $CACHE; + global $ADMINS, $ADMINS_ACLS, $_CONFIG, $CACHE; // If action is login or logout allow allways! $default = "allow"; if (($act == "login") || ($act == "logout")) return true; @@ -54,7 +54,7 @@ function ADMINS_CHECK_ACL($act, $wht) $default = $ADMINS['def_acl'][$_COOKIE['admin_login']]; // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } elseif (!is_object($CACHE)) { // Load from database $result = SQL_QUERY_ESC("SELECT default_acl FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1", @@ -109,7 +109,7 @@ function ADMINS_CHECK_ACL($act, $wht) if ($lines == 1) { // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; break; } } diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 95ff13f09c..c52b7a9bbd 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -40,10 +40,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // This function must be run *BEFORE* a link is removed from table 'mxchange_user_links' ! function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) { - global $CONFIG; + global $_CONFIG; // Shall we add bonus points? - if ($CONFIG['bonus_active'] == 'N') return; + if ($_CONFIG['bonus_active'] == 'N') return; // Select SQL command $SQL = ""; @@ -69,12 +69,12 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) { // First rank! $rank = 1; - $points = $CONFIG['turbo_bonus']; + $points = $_CONFIG['turbo_bonus']; } else { // Anything else so let's explode all entered rank points - $test = explode(";", $CONFIG['bonus_rates']); + $test = explode(";", $_CONFIG['bonus_rates']); if (!empty($test[$rank - 2])) { // Level found @@ -95,16 +95,16 @@ function BONUS_ADD_TURBO_POINTS($mid, $uid, $type) $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_bonus_turbo (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '".$rank."', '".$points."', UNIX_TIMESTAMP())", array(bigintval($uid), bigintval($mail), bigintval($bonus)), __FILE__, __LINE__); - if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($CONFIG['bonus_mode'] != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points); + if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($_CONFIG['bonus_mode'] != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points); } // function BONUS_MAKE_RANK_ROWS($data, $type, $uid) { - global $CONFIG; + global $_CONFIG; $self = false; $OUT = ""; // How many ranks do we have? - $ranks = sizeof(explode(";", $CONFIG['bonus_rates'])) + 1; + $ranks = sizeof(explode(";", $_CONFIG['bonus_rates'])) + 1; // Load current user's data $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s AND userid=%d LIMIT 1", @@ -128,7 +128,7 @@ function BONUS_MAKE_RANK_ROWS($data, $type, $uid) // Load rankings $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_bonus_turbo WHERE %s=%s ORDER BY level LIMIT %s", - array($type, $data, $CONFIG['bonus_lines']), __FILE__, __LINE__); + array($type, $data, $_CONFIG['bonus_lines']), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start generating the ranking list @@ -183,44 +183,44 @@ function BONUS_MAKE_RANK_ROWS($data, $type, $uid) // function BONUS_POINTS_HANDLER($MODE) { - global $CONFIG; + global $_CONFIG; // Shall we add bonus points? - if ($CONFIG['bonus_active'] == 'N') return; + if ($_CONFIG['bonus_active'] == 'N') return; // Switch to jackpot-mode when no UID is supplied but userid-mode is selected - if (($CONFIG['bonus_mode'] == "UID") && ($CONFIG['bonus_uid'] == "0")) $CONFIG['bonus_mode'] = "JACKPOT"; + if (($_CONFIG['bonus_mode'] == "UID") && ($_CONFIG['bonus_uid'] == "0")) $_CONFIG['bonus_mode'] = "JACKPOT"; if ($MODE == "login_bonus") { // Login bonus detected - $POINTS = $CONFIG['login_bonus']; + $points = $_CONFIG['login_bonus']; } else { // Direct points supplied - $POINTS = $MODE; + $points = $MODE; } // Subtract points from... - switch ($CONFIG['bonus_mode']) + switch ($_CONFIG['bonus_mode']) { case "JACKPOT": // ... jackpot - if ((SUB_JACKPOT($POINTS) == -1) && ($CONFIG['bonus_uid'] > 0)) + if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0)) { // Check points amount first... - $TOTAL = GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_data", "used_points"); - if ($TOTAL >= $POINTS) + $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points"); + if ($TOTAL >= $points) { // Subtract points from userid's account $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", - array(bigintval($POINTS), bigintval($CONFIG['bonus_uid'])), __FILE__, __LINE__); + array(bigintval($points), bigintval($_CONFIG['bonus_uid'])), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); } } } @@ -228,24 +228,24 @@ function BONUS_POINTS_HANDLER($MODE) case "UID": // ... userid's account // Check his amount first - $TOTAL = GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($CONFIG['bonus_uid'], "user_data", "used_points"); - if ($TOTAL >= $POINTS) + $TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points"); + if ($TOTAL >= $points) { // Subtract points from userid's account $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid=%d LIMIT 1", - array(bigintval($POINTS), bigintval($CONFIG['bonus_uid'])), __FILE__, __LINE__); + array(bigintval($points), bigintval($_CONFIG['bonus_uid'])), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); } } else { // Try to subtract from jackpot - $DUMMY = SUB_JACKPOT($POINTS); + $DUMMY = SUB_JACKPOT($points); } break; } @@ -253,9 +253,9 @@ function BONUS_POINTS_HANDLER($MODE) // function BONUS_PURGE_EXPIRED_TURBO_BONUS() { - global $CONFIG; + global $_CONFIG; // Remove entries - $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $CONFIG['bonus_timeout']), __FILE__, __LINE__); + $result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_bonus_turbo WHERE timemark < ".(time() - $_CONFIG['bonus_timeout']), __FILE__, __LINE__); $DELETED = SQL_AFFECTEDROWS($result); if ($DELETED > 0) { diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index d6d3d23431..e437c510ba 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC") { - global $CONFIG; + global $_CONFIG; if (empty($cnt)) $cnt = "0"; $ADD = ""; $DT_MODE = "0"; if ($uid > 0) @@ -60,17 +60,17 @@ function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC") if (($done == 'Y') && ($sort == "ASC")) { // Already payed out points (latest payouts first) - $limit = $CONFIG['doubler_display_old']; + $limit = $_CONFIG['doubler_display_old']; } elseif ($sort == "ASC") { // List entries which will receive their payout soon - $limit = $CONFIG['doubler_display_pay']; + $limit = $_CONFIG['doubler_display_pay']; } elseif ($sort == "DESC") { // Newest entries - $limit = $CONFIG['doubler_display_new']; + $limit = $_CONFIG['doubler_display_new']; } // List entries @@ -126,17 +126,17 @@ LIMIT ".$limit, __FILE__, __LINE__); // function DOUBLER_GET_TOTAL_POINTS_LEFT() { - global $CONFIG; + global $_CONFIG; // Initialize variables $points = "0"; - if ($CONFIG['doubler_own'] == 'Y') + if ($_CONFIG['doubler_own'] == 'Y') { // Take points from doubler's own account - $points += $CONFIG['doubler_points'] - $CONFIG['doubler_used']; + $points += $_CONFIG['doubler_points'] - $_CONFIG['doubler_used']; } - if ($CONFIG['doubler_jackpot'] == 'Y') + if ($_CONFIG['doubler_jackpot'] == 'Y') { // Load jackpot $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__); @@ -146,10 +146,10 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() if (!empty($jackpot)) $points += $jackpot; } - if ($CONFIG['doubler_uid'] > 0) + if ($_CONFIG['doubler_uid'] > 0) { // Get user's points - $user = GET_TOTAL_DATA($CONFIG['doubler_uid'], "user_points", "points"); + $user = GET_TOTAL_DATA($_CONFIG['doubler_uid'], "user_points", "points"); $points += $user; } diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index e1697c7b6a..8b8f8ba03d 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -38,17 +38,17 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) require($INC); } // -function PAYOUT_OUTPUT_PAYOUT_LIST($POINTS) +function PAYOUT_OUTPUT_PAYOUT_LIST($points) { // Replace german decimal comma with CPU's decimal dot - $POINTS = strval(str_replace(",", ".", $POINTS)); - if ($POINTS > 0) + $points = strval(str_replace(",", ".", $points)); + if ($points > 0) { // Pay this out! $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points FROM "._MYSQL_PREFIX."_payout_types WHERE %s >= min_points -ORDER BY type", array($POINTS), __FILE__, __LINE__); +ORDER BY type", array($points), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { OUTPUT_HTML("
@@ -58,10 +58,10 @@ ORDER BY type", array($POINTS), __FILE__, __LINE__); while (list($id, $type, $rate, $mpoi) = SQL_FETCHROW($result)) { $type = COMPILE_CODE($type); - if ($POINTS >= $mpoi) + if ($points >= $mpoi) { // Ok we found one - $P = $POINTS * $rate - 0.5; + $P = $points * $rate - 0.5; OUTPUT_HTML("
  • ".PAYOUT_IN.": ".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")
  • "); } } diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 799c896f7a..4496e31e25 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -42,7 +42,7 @@ function RALLYE_AUTOSTART_RALLYES($result) { // Global data array for LOAD_EMAIL_TEMPLATE() $DATA = array(); - global $DATA, $CONFIG; + global $DATA, $_CONFIG; // Load all rallyes (usally we have only one rallye active per time! list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); @@ -110,7 +110,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p LEFT JOIN "._MYSQL_PREFIX."_user_data AS d ON p.userid=d.userid WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d", - array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); + array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); list($cpoints) = SQL_FETCHROW($result_ref); SQL_FREERESULT($result_ref); @@ -201,8 +201,8 @@ function RALLYE_ADD_PRICES($rallye,$mode="email") // function RALLYE_ADD_TOPUSERS($rallye,$default=0) { - global $CONFIG; - $since = (time() - $CONFIG['ap_in_since']); + global $_CONFIG; + $since = (time() - $_CONFIG['ap_in_since']); // First check how many prices are set $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_rallye_prices WHERE rallye_id=%d ORDER BY price_level", @@ -234,7 +234,7 @@ WHERE u.rallye_id=%d AND r.counter > 0 ORDER BY u.refs DESC", LEFT JOIN "._MYSQL_PREFIX."_user_data AS d ON p.userid=d.userid WHERE d.userid=%d AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s AND d.last_online >= %s -LIMIT 1", array(bigintval($uid), $CONFIG['ref_payout'], $since), __FILE__, __LINE__); +LIMIT 1", array(bigintval($uid), $_CONFIG['ref_payout'], $since), __FILE__, __LINE__); list($refpoints) = SQL_FETCHROW($result_ref); SQL_FREERESULT($result_ref); @@ -338,10 +338,10 @@ VALUES ('%s', '%s', '0')", // function RALLYE_EXPIRE_RALLYES($result) { - global $DATA, $CONFIG; + global $DATA, $_CONFIG; // Latest online time - $since = (time() - $CONFIG['ap_in_since']); + $since = (time() - $_CONFIG['ap_in_since']); // Load rallye data list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); @@ -539,10 +539,10 @@ function RALLYE_LOAD_PRICES_ARRAY($rallye) // function RALLYE_LOAD_USERS_ARRAY($rallye) { - global $CONFIG; + global $_CONFIG; // Fix zero points to 0.00000 - if ($CONFIG['ref_payout'] == "0") $CONFIG['ref_payout'] = "0.00000"; + if ($_CONFIG['ref_payout'] == "0") $_CONFIG['ref_payout'] = "0.00000"; // Init multi array $users = array( @@ -565,7 +565,7 @@ FROM "._MYSQL_PREFIX."_user_points AS p LEFT JOIN "._MYSQL_PREFIX."_user_data AS d ON p.userid=d.userid WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%d", - array($CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); + array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__); list($refpoints) = SQL_FETCHROW($result_ref); SQL_FREERESULT($result_ref); @@ -673,7 +673,7 @@ function RALLYE_LIST_WINNERS($rallye,$default=0) // function RALLYE_DELETE_EXPIRED_RALLYES() { - global $DATA, $CONFIG; + global $DATA, $_CONFIG; // Check for expired rallyes $EXPIRE = time() - ONE_DAY * 3; // The hard-coded value... $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time FROM "._MYSQL_PREFIX."_rallye_data WHERE end_time <= %s AND expired='Y'", @@ -770,7 +770,7 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="") // function RALLYE_GET_REFCOUNT($uid, $old=0) { - global $REF_SYSTEM, $REF_DEPTHS, $CONFIG; + global $REF_SYSTEM, $REF_DEPTHS, $_CONFIG; // Check current refs if (GET_EXT_VERSION("cache") >= "0.1.2") { @@ -807,7 +807,7 @@ function RALLYE_GET_REFCOUNT($uid, $old=0) if ($cnt > 0) { // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; // Remove old refs //* DEBUG: */ echo "+".$cnt."/".$old."+
    "; diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 317bcea87b..4e6e52f4c4 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -108,7 +108,7 @@ function REGISTER_OUTPUT_REQUIRE_CHECK(&$array) // function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { - global $_POST, $CONFIG; + global $_POST, $_CONFIG; $OUT = ""; // Guests are mostly not interested in how many members has @@ -134,7 +134,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) 'id' => $id, ); - if (($_POST['cat'][$id] == 'Y') || (($CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id])))) + if (($_POST['cat'][$id] == 'Y') || (($_CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id])))) { $content['def_y'] = " checked"; } diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 14343603a5..e282612b4b 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -41,10 +41,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function REWRITE_LINKS($HTML) { - global $_GET, $CONFIG; + global $_CONFIG; // Skip rewriting for the admin area (which search engine may enter here???) - if (ereg($GLOBALS['module'], $CONFIG['rewrite_skipped_mods'])) return $HTML; + if (ereg($GLOBALS['module'], $_CONFIG['rewrite_skipped_mods'])) return $HTML; // Strip slashes with double-backslashes for the preg_replace() function $URL = str_replace("/", "\\/", URL); diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 730812bf89..1afe82a27c 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -46,7 +46,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { - global $_COOKIE, $CONFIG; + global $_COOKIE, $_CONFIG; // Init variables/arrays $EXTRAS = ""; $OUT = ""; $SQLs = array(); $WHATs = array(); $DESCRs = array(); $TITLEs = array(); @@ -271,7 +271,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) if (EXT_IS_ACTIVE("autopurge")) { // Start finding them... - $since = (time() - $CONFIG['ap_in_since']); + $since = (time() - $_CONFIG['ap_in_since']); $EXCLUDE_LIST = " AND d.userid != c.def_refid"; // Check for more extensions @@ -336,11 +336,11 @@ ORDER BY d.userid"; if (GET_EXT_VERSION("bonus") >= "0.6.9") { // Add more bonus points here $USE = "(0"; - if ($CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; - if ($CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; - if ($CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; - if ($CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; - if ($CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; + if ($_CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; + if ($_CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; + if ($_CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; + if ($_CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; + if ($_CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; $USE .= ")"; } else { // Old version ??? @@ -349,10 +349,10 @@ ORDER BY d.userid"; // Autopurge installed? $LAST = ""; $ONLINE = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == 'Y') && ($CONFIG['ap_in_since'] > 0)) { + if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= "; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } $SQLs[] = "SELECT ".$USE." AS active_bonus FROM "._MYSQL_PREFIX."_user_data @@ -368,10 +368,10 @@ ORDER BY active_bonus DESC, userid"; // Autopurge installed? $LAST = ""; $ONLINE = ""; - if ((EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_inactive'] == 'Y') && ($CONFIG['ap_in_since'] > 0)) { + if ((EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_inactive'] == 'Y') && ($_CONFIG['ap_in_since'] > 0)) { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= "; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index cf44c26d78..533dded260 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -40,7 +40,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) function alpha($sortby, $colspan, $return=false) { - global $CONFIG; + global $_CONFIG; if (empty($_GET['offset'])) $_GET['offset'] = "0"; $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset']; if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']); @@ -63,7 +63,7 @@ function alpha($sortby, $colspan, $return=false) if (!empty($_GET['mode'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['mode']); $OUT .= "&letter=".$ltr."&sortby=".$sortby.$ADD."\">".$ltr.""; } - if ((($counter / $CONFIG['user_alpha']) == round($counter / $CONFIG['user_alpha'])) && ($counter > 0)) + if ((($counter / $_CONFIG['user_alpha']) == round($counter / $_CONFIG['user_alpha'])) && ($counter > 0)) { $OUT .= " ]
    [ "; } diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index ea3840079e..812fbf20ec 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -45,7 +45,7 @@ function WERNIS_STATUS_MESSAGE ($msg, $status) { } // Get the status message -function WERNIS_ERROR_MESSAGE () { +function GET_WERNIS_ERROR_MESSAGE () { global $WERNIS; if (isset($WERNIS['message'])) { // Use raw message @@ -59,9 +59,24 @@ function WERNIS_ERROR_MESSAGE () { } } +// Get the status code +function GET_WERNIS_ERROR_CODE () { + global $WERNIS; + if (isset($WERNIS['status'])) { + // Use raw message + return $WERNIS['status']; + } elseif (isset($WERNIS['status'])) { + // Fall-back to status + return sprintf(WERNIS_ERROR_STATUS, $WERNIS['status']); + } else { + // Something bad happend + return WERNIS_UNKNOWN_ERROR; + } +} + // Sends out a request to the API and returns it's result function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { - global $CONFIG; + global $_CONFIG; // Is the requestData an array? if (!is_array($requestData)) { @@ -73,7 +88,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // Is the API id and MD5 hash there? - if ((empty($CONFIG['wernis_api_id'])) || (empty($CONFIG['wernis_api_md5']))) { + if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) { // Abort here... return array( 'status' => "failed_general", @@ -82,7 +97,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // Construct the request string - $requestString = $CONFIG['wernis_api_url'] . $scriptName."?api_id=".$CONFIG['wernis_api_id']."&api_key=".$CONFIG['wernis_api_md5']; + $requestString = $_CONFIG['wernis_api_url'] . $scriptName."?api_id=".$_CONFIG['wernis_api_id']."&api_key=".$_CONFIG['wernis_api_md5']; foreach ($requestData as $key=>$value) { $requestString .= "&".$key."=".$value; } @@ -125,6 +140,34 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { ); break; + case "USER": // Missing account or invalid password + $return = array( + 'status' => "user_failed", + 'message' => WERNIS_API_REQUEST_FAILED_USER + ); + break; + + case "OWN": // Transfer to own account + $return = array( + 'status' => "own_failed", + 'message' => WERNIS_API_REQUEST_FAILED_OWN + ); + break; + + case "AMOUNT": // Amount is depleted + $return = array( + 'status' => "amount_failed", + 'message' => WERNIS_API_REQUEST_FAILED_AMOUNT + ); + break; + + case "AMOUNT-SEND": // API amount is depleted + $return = array( + 'status' => "api_amount_failed", + 'message' => WERNIS_API_REQUEST_FAILED_API_AMOUNT + ); + break; + default: // Unknown error (maybe new?) $return = array( 'status' => "request_failed", @@ -147,7 +190,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { // Tests the function by calling balance.php on the API function WERNIS_TEST_API () { // Get config first - global $CONFIG; + global $_CONFIG; $result = false; // Return the result from the lower functions @@ -165,5 +208,92 @@ function WERNIS_TEST_API () { return $result; } +// Widthdraw this amount +function WERNIS_EXECUTE_WITHDRAW($userId, $userMd5, $amount) { + global $_CONFIG; + $result = false; + + // Prepare the purpose + $eval = "\$purpose = \"".COMPILE_CODE(WERNIS_API_PURPOSE_WITHDRAW)."\";"; + eval($eval); + + // Prepare the request data + $requestData = array( + 'sub_request' => "receive", + 't_uid' => bigintval($userId), + 't_md5' => $userMd5, + 'r_uid' => $_CONFIG['wernis_refid'], + 'amount' => bigintval($amount), + 'purpose' => urlencode(base64_encode($purpose)) + ); + + // Return the result from the lower functions + $return = WERNIS_SEND_REQUEST("book.php", $requestData); + + if ($return['status'] == "OK") { + // All fine! + $result = true; + } else { + // Status failture text + WERNIS_STATUS_MESSAGE($return['message'], $return['status']); + } + + // Return result + return $result; +} + + +// Payout this amount +function WERNIS_EXECUTE_PAYOUT($userId, $userMd5, $amount) { + global $_CONFIG; + $result = false; + + // Prepare the purpose + $eval = "\$purpose = \"".COMPILE_CODE(WERNIS_API_PURPOSE_PAYOUT)."\";"; + eval($eval); + + // Prepare the request data + $requestData = array( + 'sub_request' => "send", + 't_uid' => bigintval($userId), + 't_md5' => $userMd5, + 'r_uid' => $_CONFIG['wernis_refid'], + 'amount' => bigintval($amount), + 'purpose' => urlencode(base64_encode($purpose)) + ); + + // Return the result from the lower functions + $return = WERNIS_SEND_REQUEST("book.php", $requestData); + + if ($return['status'] == "OK") { + // All fine! + $result = true; + } else { + // Status failture text + WERNIS_STATUS_MESSAGE($return['message'], $return['status']); + } + + // Return result + return $result; +} + +// Translate the status IN/OUT +function WERNIS_TRANSFER_STATUS($status) { + // Default status + $return = sprintf(WERNIS_STATUS_UNKNWOWN, $status); + switch ($status) { + case "IN": // Withdraw + $return = WERNIS_STATUS_WITHDRAW; + break; + + case "OUT": // Payout + $return = WERNIS_STATUS_PAYOUT; + break; + } + + // Return the status + return $return; +} + // ?> diff --git a/inc/load_cache.php b/inc/load_cache.php index 3cca36147f..d31cf3a766 100644 --- a/inc/load_cache.php +++ b/inc/load_cache.php @@ -98,7 +98,7 @@ if (($CACHE->cache_file("admins", true) == true)) { $CACHE->cache_destroy(); unset($ADMINS); } -} elseif (($CONFIG['cache_admins'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { +} elseif (($_CONFIG['cache_admins'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file $CACHE->cache_init("ADMINS"); @@ -163,7 +163,7 @@ if ($CACHE->cache_file("mod_reg", true) == true) { unset($MODULES['has_menu'][$key]); } } -} elseif (($CONFIG['cache_modreg'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { +} elseif (($_CONFIG['cache_modreg'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $CACHE->cache_init("MODULES"); @@ -210,7 +210,7 @@ if ($CACHE->cache_file("config", true) == true) { $CACHE->cache_destroy(); unset($CFG_CACHE); } -} elseif (($CONFIG['cache_config'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { +} elseif (($_CONFIG['cache_config'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $CACHE->cache_init("CONFIG"); @@ -249,7 +249,7 @@ if ($CACHE->cache_file("refsystem", true) == true) { $CACHE->cache_destroy(); unset($REF_SYSTEM); } -} elseif (($CONFIG['cache_refsys'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { +} elseif (($_CONFIG['cache_refsys'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $CACHE->cache_init("REFSYSTEM"); @@ -288,7 +288,7 @@ if ($CACHE->cache_file("refdepths", true) == true) { $CACHE->cache_destroy(); unset($REF_DEPTHS); } -} elseif (($CONFIG['cache_refdepth'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { +} elseif (($_CONFIG['cache_refdepth'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $CACHE->cache_init("REFDEPTHS"); @@ -331,7 +331,7 @@ if (GET_EXT_VERSION("admins") >= "0.3") { unset($ADMINS_ACLS); } } - } elseif (($CONFIG['cache_acls'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { + } elseif (($_CONFIG['cache_acls'] == 'Y') && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $CACHE->cache_init("ADMINS_ACLS"); diff --git a/inc/load_extensions.php b/inc/load_extensions.php index f919b7d80d..8c469bd3c0 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -75,7 +75,7 @@ if (EXT_IS_ACTIVE("cache")) } // Do not recreate cache file when it's switched off! - if (($CACHE_FILE == "init") && ($CONFIG['cache_exts'] == 'N')) $CACHE_FILE = "skip"; + if (($CACHE_FILE == "init") && ($_CONFIG['cache_exts'] == 'N')) $CACHE_FILE = "skip"; // Load language if ($CACHE_FILE == "load") include(PATH."inc/language/cache_".GET_LANGUAGE().".php"); @@ -308,9 +308,9 @@ SQL_FREERESULT($res_ext_crt); /** * Commented out... * - *foreach ($CONFIG as $k=>$v) + *foreach ($_CONFIG as $k=>$v) *{ - * $CONFIG[$k] = COMPILE_CODE($v); + * $_CONFIG[$k] = COMPILE_CODE($v); *} */ diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 9363f83e57..7bbd91f4f4 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -47,15 +47,15 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) if ($CSS == 1) return; // Create timemark from saved month -$mark = mktime(0, 0, 0, $CONFIG['beg_month'], date("d", time()), date('Y', time())); +$mark = mktime(0, 0, 0, $_CONFIG['beg_month'], date("d", time()), date('Y', time())); $SQL = ""; $MODE = ""; // Shall I sent activation or deactivation mail? $SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (beg_ral_notify "; -switch ($CONFIG['beg_rallye']) +switch ($_CONFIG['beg_rallye']) { case 'Y': // Begging rallye is activated - if ($CONFIG['beg_ral_en_notify'] == 'Y') + if ($_CONFIG['beg_ral_en_notify'] == 'Y') { // Okay, let's check for member accounts $SQL .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)"; @@ -69,7 +69,7 @@ case 'Y': // Begging rallye is activated break; case 'N': // Begging rallye is deactivated - if ($CONFIG['beg_ral_di_notify'] == 'Y') + if ($_CONFIG['beg_ral_di_notify'] == 'Y') { // Okay, let's check for member accounts $SQL .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify"; @@ -89,10 +89,10 @@ if (!empty($SQL)) $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; // Prepare data for the template - define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'])); - define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points_max'])); - define('__BEG_MAX_WINNERS', round($CONFIG['beg_ranks'])); - if ($CONFIG['beg_ip_timeout'] == 0) + define('__BEG_MIN_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'])); + define('__BEG_MAX_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points_max'])); + define('__BEG_MAX_WINNERS', round($_CONFIG['beg_ranks'])); + if ($_CONFIG['beg_ip_timeout'] == 0) { // No IP locking setuped! define('__BEG_IP_LOCKER', BEG_NO_LIMITATION); @@ -100,7 +100,7 @@ if (!empty($SQL)) else { // Create timemark - define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($CONFIG['beg_ip_timeout'])); + define('__BEG_IP_LOCKER', CREATE_FANCY_TIME($_CONFIG['beg_ip_timeout'])); } // Check for accounts to be notified @@ -108,7 +108,7 @@ if (!empty($SQL)) if (SQL_NUMROWS($result_main) > 0) { // Normal notification mails or bonus mails? - $MAIL_MODE = (($CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); + $MAIL_MODE = (($_CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); // Generate subject line $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;"; @@ -152,8 +152,8 @@ VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', $SUBJECT, $MSG, $RECEIVER, - $CONFIG['beg_notify_bonus'], - $CONFIG['beg_notify_wait'], + $_CONFIG['beg_notify_bonus'], + $_CONFIG['beg_notify_wait'], URL."/modules.php?module=index&what=login", 0, SELECTION_COUNT(explode(";", $RECEIVER)), diff --git a/inc/mails/birthday_mails.php b/inc/mails/birthday_mails.php index ec8317a926..597d728844 100644 --- a/inc/mails/birthday_mails.php +++ b/inc/mails/birthday_mails.php @@ -53,10 +53,10 @@ $YEAR = date('Y', time()); // Shall I include only active members? $ADD = "%s"; $VALUE = ""; -if (($CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($CONFIG['ap_in_since'] > 0) && ($CONFIG['ap_inactive'] == 'Y')) +if (($_CONFIG['birthday_active']) && (EXT_IS_ACTIVE("autopurge")) && ($_CONFIG['ap_in_since'] > 0) && ($_CONFIG['ap_inactive'] == 'Y')) { $ADD = " AND last_online >= %d"; - $VALUE = bigintval(time() - $CONFIG['ap_in_since']); + $VALUE = bigintval(time() - $_CONFIG['ap_in_since']); } // Only confirmed members shall receive birthday mails... @@ -78,12 +78,12 @@ if (SQL_NUMROWS($result_birthday) > 0) // Simply subtract both values and you got the age... :) $AGE = $NOW - $BD; - if ($CONFIG['birthday_points'] > 0) + if ($_CONFIG['birthday_points'] > 0) { // Prepare array for loading template $content = array( 'age' => $AGE, - 'points' => $CONFIG['birthday_points'], + 'points' => $_CONFIG['birthday_points'], 'check' => "", ); for ($idx = 0; $idx < 4; $idx++) @@ -93,7 +93,7 @@ if (SQL_NUMROWS($result_birthday) > 0) // Insert row into database $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_birthday (userid, points, chk_value) VALUES ('%s', '%s', '%s' )", - array(bigintval($uid), $CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); + array(bigintval($uid), $_CONFIG['birthday_points'], $content['check']), __FILE__, __LINE__); // Load email template with confirmation link $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($uid)); diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 1c4cb97331..6736810104 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -47,15 +47,15 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) if ($CSS == 1) return; // Create timemark from saved month -$mark = mktime(0, 0, 0, $CONFIG['bonus_month'], date("d", time()), date('Y', time())); +$mark = mktime(0, 0, 0, $_CONFIG['bonus_month'], date("d", time()), date('Y', time())); $SQL = ""; $MODE = ""; // Shall I sent activation or deactivation mail? $SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (bonus_ral_notify "; -switch ($CONFIG['bonus_active']) +switch ($_CONFIG['bonus_active']) { case 'Y': // Active rallye is activated - if ($CONFIG['bonus_en_notify'] == 'Y') + if ($_CONFIG['bonus_en_notify'] == 'Y') { // Okay, let's check for member accounts $SQL .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; @@ -69,7 +69,7 @@ case 'Y': // Active rallye is activated break; case 'N': // Active rallye is deactivated - if ($CONFIG['bonus_di_notify'] == 'Y') + if ($_CONFIG['bonus_di_notify'] == 'Y') { // Okay, let's check for member accounts $SQL .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; @@ -89,7 +89,7 @@ if (!empty($SQL)) $SQL .= ") AND status='CONFIRMED' ORDER BY last_online ASC"; // Normal notification mails or bonus mails? - $MAIL_MODE = (($CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); + $MAIL_MODE = (($_CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus"))); // Generate subject line $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;"; @@ -137,8 +137,8 @@ VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', $SUBJECT, $MSG, $RECEIVER, - $CONFIG['bonus_notify_points'], - $CONFIG['bonus_notify_wait'], + $_CONFIG['bonus_notify_points'], + $_CONFIG['bonus_notify_wait'], URL."/modules.php?module=index&what=login", 0, SELECTION_COUNT(explode(";", $RECEIVER)), diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 55b9a3becd..b5b6b02582 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -42,7 +42,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) if ((empty($GLOBALS['action'])) && ($check == "admin_only")) { // Redirect to right URL - LOAD_URL(URL."/modules.php?module=admin&action=login"); + LOAD_URL("modules.php?module=admin&action=login"); } // Load include file @@ -352,7 +352,7 @@ if (!admin_registered) } // When type of admin menu is not set fallback to old menu system - if (empty($CONFIG['admin_menu'])) $CONFIG['admin_menu'] = "OLD"; + if (empty($_CONFIG['admin_menu'])) $_CONFIG['admin_menu'] = "OLD"; // Check for version and switch between old menu system and new "intelligent menu system" if ((ADMIN_CHECK_MENU_MODE() == "NEW") && (file_exists(PATH."inc/modules/admin/la_sys-inc.php"))) diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index e389d58b88..c10b309168 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -45,12 +45,12 @@ OUTPUT_HTML("

    "); if (!empty($_POST['no'])) { // Do not logout now - LOAD_URL(URL."/modules.php?module=admin"); + LOAD_URL("modules.php?module=admin"); } elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) { // Redirect to logout link - LOAD_URL(URL."/modules.php?module=admin&logout=1"); + LOAD_URL("modules.php?module=admin&logout=1"); } else { diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index db3e3b30d3..9e2e39a423 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -64,14 +64,14 @@ function REGISTER_ADMIN ($user, $md5) // Only be executed on login procedure! function CHECK_ADMIN_LOGIN ($admin_login, $password) { - global $ADMINS, $CONFIG, $CACHE; + global $ADMINS, $_CONFIG, $CACHE; $ret = "404"; $pass = ""; if (!empty($ADMINS['aid'][$admin_login])) { // Get password from cache $pass = $ADMINS['password'][$admin_login]; $ret = "pass"; - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { @@ -129,14 +129,14 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) // Only be executed on cookie checking function CHECK_ADMIN_COOKIES ($admin_login, $password) { - global $ADMINS, $CONFIG; + global $ADMINS, $_CONFIG; $ret = "404"; $pass = ""; if (!empty($ADMINS['aid'][$admin_login])) { // Get password from cache $pass = $ADMINS['password'][$admin_login]; $ret = "pass"; - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { @@ -225,7 +225,7 @@ function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0) // function ADMIN_DO_ACTION($wht) { - global $menuDesription, $menuTitle, $CONFIG, $EXTENSIONS, $link, $DATA; + global $menuDesription, $menuTitle, $_CONFIG, $EXTENSIONS, $link, $DATA; //* DEBUG: */ echo __LINE__."*".$wht."/".$GLOBALS['module']."/".$GLOBALS['action']."/".$GLOBALS['what']."*
    \n"; if (EXT_IS_ACTIVE("cache")) { @@ -522,9 +522,9 @@ function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") return $OUT; } // -function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $translateComma = array(), $alwaysAdd=false) +function ADMIN_SAVE_SETTINGS (&$POST, $tableName="_config", $whereStatement="config=0", $translateComma = array(), $alwaysAdd=false) { - global $CONFIG, $CFG_CACHE, $CACHE; + global $_CONFIG, $CFG_CACHE, $CACHE; $DATA = array(); $skip = false; $TEST2 = ""; foreach ($POST as $id=>$val) { @@ -579,7 +579,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran } // Update current configuration - $CONFIG[$id] = $val; + $_CONFIG[$id] = $val; } } } @@ -587,10 +587,10 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran // Check if entry does exist $result = false; if (!$alwaysAdd) { - if (!empty($WHERE)) { - $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$TABLE." WHERE ".$WHERE." LIMIT 1", __FILE__, __LINE__); + if (!empty($whereStatement)) { + $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$tableName." WHERE ".$whereStatement." LIMIT 1", __FILE__, __LINE__); } else { - $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$TABLE." LIMIT 1", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX.$tableName." LIMIT 1", __FILE__, __LINE__); } } @@ -599,7 +599,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran $DATA_UPDATE = implode(", ", $DATA); // Generate SQL string - $SQL = "UPDATE "._MYSQL_PREFIX.$TABLE." SET ".$DATA_UPDATE." WHERE ".$WHERE." LIMIT 1"; + $SQL = "UPDATE "._MYSQL_PREFIX.$tableName." SET ".$DATA_UPDATE." WHERE ".$whereStatement." LIMIT 1"; } else { // Add Line (does only work with auto_increment! $KEYs = array(); $VALUEs = array(); @@ -614,7 +614,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran $VALUEs = implode(", ", $VALUEs); // Generate SQL string - $SQL = "INSERT INTO "._MYSQL_PREFIX.$TABLE." (".$KEYs.") VALUES(".$VALUEs.")"; + $SQL = "INSERT INTO "._MYSQL_PREFIX.$tableName." (".$KEYs.") VALUES(".$VALUEs.")"; } // Free memory @@ -624,7 +624,7 @@ function ADMIN_SAVE_SETTINGS (&$POST, $TABLE="_config", $WHERE="config=0", $tran $result = SQL_QUERY($SQL, __FILE__, __LINE__); // Is the config table updated and the cache extension installed? - if ((GET_EXT_VERSION("cache") >= "0.1.2") && ($TABLE == "_config")) { + if ((GET_EXT_VERSION("cache") >= "0.1.2") && ($tableName == "_config")) { // Remove it here... if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy(); unset($CFG_CACHE); @@ -679,17 +679,17 @@ function ADMIN_USER_PROFILE_LINK($uid, $title="", $wht="list_user") // function ADMIN_CHECK_MENU_MODE() { - global $CONFIG, $ADMINS, $_COOKIE; + global $_CONFIG, $ADMINS, $_COOKIE; // Set the global mode as the mode for all admins - $MODE = $CONFIG['admin_menu']; $ADMIN = $MODE; + $MODE = $_CONFIG['admin_menu']; $ADMIN = $MODE; // Check individual settings of current admin if (isset($ADMINS['la_mode'][$_COOKIE['admin_login']])) { // Load from cache $ADMIN = $ADMINS['la_mode'][$_COOKIE['admin_login']]; - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } elseif (GET_EXT_VERSION("admins") >= "0.6.7") { @@ -714,7 +714,7 @@ function ADMIN_CHECK_MENU_MODE() } // Change activation status function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { - global $CONFIG; + global $_CONFIG; $cnt = 0; $newStatus = 'Y'; if ((is_array($IDs)) && (count($IDs) > 0)) { // "Walk" all through and count them @@ -756,7 +756,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") { } // Delete rows by given ID numbers function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $row, $columns = array(), $filterFunctions = array(), $deleteNow=false, $idRow="id") { - global $CONFIG; + global $_CONFIG; $OUT = ""; $SW = 2; if ((is_array($IDs)) && (count($IDs) > 0)) { // "Walk" through all entries and count them diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 2b1556bafc..3568b70afb 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -170,7 +170,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", // function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) { - global $CONFIG, $NOTES; + global $_CONFIG, $NOTES; if ((isset($_POST['assign'])) && (count($_POST['task']) > 0)) { // Assign / do tasks @@ -217,7 +217,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) $title = TASK_NO_TITLE; // Shall I list SQL commands assigned to an extension installation or update task? - if (((GET_EXT_VERSION("sql_patches") != "") && ($CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) + if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) { $ext_name = substr($subj, 1, strpos($subj, ":") - 1); if ($type == "EXTENSION") @@ -258,7 +258,7 @@ function OUTPUT_SELECTED_TASKS($_POST, $result_tasks) // Add SQLs to a table if (empty($SQLs)) $SQLs = array(); if (empty($title)) $title = ""; - if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && ($CONFIG['verbose_sql'] == 'Y')) { + if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && ($_CONFIG['verbose_sql'] == 'Y')) { // Add verbose SQL table $text .= EXTENSION_VERBOSE_TABLE($SQLs, $title, " class=\"admin_table top2 left2 right2\"", true, "100%")."
    \n"; } diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index 2d08ad826b..1f831ca13b 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -76,7 +76,7 @@ VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", if (!empty($id)) { // Reload to prices... - LOAD_URL(URL."/modules.php?module=admin&what=config_rallye_prices&rallye=".$id); + LOAD_URL("modules.php?module=admin&what=config_rallye_prices&rallye=".$id); } else { diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 724d2ae12b..34ed0fc551 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -48,7 +48,7 @@ if (isset($_POST['edit'])) { // Add option for userlog $ADMINS = ADD_OPTION_LINES("admins", "id", "login", "", "email"); - $SW = 2; $ROWS = ""; + $SW = 2; $rowNameS = ""; foreach ($_POST['sel'] as $template=>$sel) { // First of all load data from DB @@ -92,10 +92,10 @@ if (isset($_POST['edit'])) $content['content'] = $OUT; // Start outputing line - $ROWS .= LOAD_TEMPLATE("admin_admins_mails_edit_row", true, $content); + $rowNameS .= LOAD_TEMPLATE("admin_admins_mails_edit_row", true, $content); $SW = 3 - $SW; } - define('__ADMINS_ROWS', $ROWS); + define('__ADMINS_ROWS', $rowNameS); // Edit checked entries LOAD_TEMPLATE("admin_admins_mails_edit"); diff --git a/inc/modules/admin/what-autopurge.php b/inc/modules/admin/what-autopurge.php index 5ff646d568..01c61e81ef 100644 --- a/inc/modules/admin/what-autopurge.php +++ b/inc/modules/admin/what-autopurge.php @@ -47,19 +47,19 @@ if (isset($_POST['ok'])) else { // Setup constants for the template - switch ($CONFIG['ap_inactive']) + switch ($_CONFIG['ap_inactive']) { case 'Y': define('__YES_IN', " checked"); define('__NO_IN', ""); break; case 'N': define('__YES_IN', ""); define('__NO_IN', " checked"); break; } - switch ($CONFIG['ap_unconfirmed']) + switch ($_CONFIG['ap_unconfirmed']) { case 'Y': define('__YES_UN', " checked"); define('__NO_UN', ""); break; case 'N': define('__YES_UN', ""); define('__NO_UN', " checked"); break; } - define('__AP_IN_SINCE', $CONFIG['ap_in_since']); - define('__AP_IN_TIME' , $CONFIG['ap_in_time']); - define('__AP_UN_TIME' , $CONFIG['ap_un_time']); + define('__AP_IN_SINCE', $_CONFIG['ap_in_since']); + define('__AP_IN_TIME' , $_CONFIG['ap_in_time']); + define('__AP_UN_TIME' , $_CONFIG['ap_un_time']); // Output template LOAD_TEMPLATE("admin_config_autopurge"); diff --git a/inc/modules/admin/what-cache_stats.php b/inc/modules/admin/what-cache_stats.php index 69a6948105..b22172c7de 100644 --- a/inc/modules/admin/what-cache_stats.php +++ b/inc/modules/admin/what-cache_stats.php @@ -42,11 +42,11 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) ADD_DESCR("admin", basename(__FILE__)); // Prepare data for the template -define('__DB_HITS' , $CONFIG['db_hits']); -$HITS = str_repeat(" ", abs(strlen($CONFIG['db_hits']) - strlen($CONFIG['cache_hits']))).$CONFIG['cache_hits']; +define('__DB_HITS' , $_CONFIG['db_hits']); +$HITS = str_repeat(" ", abs(strlen($_CONFIG['db_hits']) - strlen($_CONFIG['cache_hits']))).$_CONFIG['cache_hits']; define('__CACHE_HITS', $HITS); -define('__TOTAL_HITS', ($CONFIG['db_hits'] + $CONFIG['cache_hits'])); -define('__CACHE_PERC', TRANSLATE_COMMA(($CONFIG['cache_hits'] / __TOTAL_HITS * 100))); +define('__TOTAL_HITS', ($_CONFIG['db_hits'] + $_CONFIG['cache_hits'])); +define('__CACHE_PERC', TRANSLATE_COMMA(($_CONFIG['cache_hits'] / __TOTAL_HITS * 100))); // Load template LOAD_TEMPLATE("admin_cache_stats"); diff --git a/inc/modules/admin/what-config_active.php b/inc/modules/admin/what-config_active.php index ccfc154765..3a19f15666 100644 --- a/inc/modules/admin/what-config_active.php +++ b/inc/modules/admin/what-config_active.php @@ -45,7 +45,7 @@ if (isset($_POST['ok'])) { ADMIN_SAVE_SETTINGS($_POST); } else { // Minimum mails / active - define('__LIMIT_VALUE', $CONFIG['active_limit']); + define('__LIMIT_VALUE', $_CONFIG['active_limit']); // Load template LOAD_TEMPLATE("admin_config_active"); diff --git a/inc/modules/admin/what-config_admin.php b/inc/modules/admin/what-config_admin.php index 2997e4f758..4dc5753bbd 100644 --- a/inc/modules/admin/what-config_admin.php +++ b/inc/modules/admin/what-config_admin.php @@ -48,7 +48,7 @@ if (isset($_POST['ok'])) else { // Prepare data for the template - switch ($CONFIG['admin_menu']) + switch ($_CONFIG['admin_menu']) { case "NEW": define('__ADMIN_MENU_NEW', " checked"); diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index 044e9b7e5d..83a0cd2565 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -48,27 +48,27 @@ if (isset($_POST['ok'])) else { // Output de-/activation selections - define('__AP_INACTIVE_SELECTION' , ADD_SELECTION("yn", $CONFIG['ap_inactive'] , "autopurge_inactive")); - define('__AP_UNCONFIRMED_SELECTION', ADD_SELECTION("yn", $CONFIG['ap_unconfirmed'], "autopurge_unconfirmed")); - define('__AP_TASKS_SELECTION' , ADD_SELECTION("yn", $CONFIG['ap_tasks'] , "autopurge_tasks")); - define('__AP_DEL_MAILS_SELECTION' , ADD_SELECTION("yn", $CONFIG['ap_del_mails'] , "ap_del_mails")); + define('__AP_INACTIVE_SELECTION' , ADD_SELECTION("yn", $_CONFIG['ap_inactive'] , "autopurge_inactive")); + define('__AP_UNCONFIRMED_SELECTION', ADD_SELECTION("yn", $_CONFIG['ap_unconfirmed'], "autopurge_unconfirmed")); + define('__AP_TASKS_SELECTION' , ADD_SELECTION("yn", $_CONFIG['ap_tasks'] , "autopurge_tasks")); + define('__AP_DEL_MAILS_SELECTION' , ADD_SELECTION("yn", $_CONFIG['ap_del_mails'] , "ap_del_mails")); // Output notification selections - define('__AP_NOTIFY_INACTIVE' , ADD_SELECTION("yn", $CONFIG['ap_in_mail'] , "ap_in_notify")); - define('__AP_NOTIFY_UNCONFIRMED' , ADD_SELECTION("yn", $CONFIG['ap_un_mail'] , "ap_un_notify")); - define('__AP_NOTIFY_TASKS' , ADD_SELECTION("yn", $CONFIG['ap_tasks_mail'] , "ap_tasks_notify")); - define('__AP_NOTIFY_DEL_MAILS' , ADD_SELECTION("yn", $CONFIG['ap_dm_notify'] , "ap_dm_notify")); + define('__AP_NOTIFY_INACTIVE' , ADD_SELECTION("yn", $_CONFIG['ap_in_mail'] , "ap_in_notify")); + define('__AP_NOTIFY_UNCONFIRMED' , ADD_SELECTION("yn", $_CONFIG['ap_un_mail'] , "ap_un_notify")); + define('__AP_NOTIFY_TASKS' , ADD_SELECTION("yn", $_CONFIG['ap_tasks_mail'] , "ap_tasks_notify")); + define('__AP_NOTIFY_DEL_MAILS' , ADD_SELECTION("yn", $_CONFIG['ap_dm_notify'] , "ap_dm_notify")); // Output time selection boxes - define('__AP_IN_SINCE' , CREATE_TIME_SELECTIONS($CONFIG['ap_in_since'] , "ap_inactive_since" , "MWDh")); - define('__AP_IN_TIME' , CREATE_TIME_SELECTIONS($CONFIG['ap_in_time'] , "ap_inactive_time" , "MWDh")); - define('__AP_UN_TIME' , CREATE_TIME_SELECTIONS($CONFIG['ap_un_time'] , "ap_unconfirmed_time", "MWDh")); - define('__AP_TASK_TIME' , CREATE_TIME_SELECTIONS($CONFIG['ap_tasks_time'], "ap_tasks_time" , "MWDh")); - define('__AP_DEL_MAILS_TIME', CREATE_TIME_SELECTIONS($CONFIG['ap_dm_timeout'], "ap_dm_timeout" , "MWDh")); + define('__AP_IN_SINCE' , CREATE_TIME_SELECTIONS($_CONFIG['ap_in_since'] , "ap_inactive_since" , "MWDh")); + define('__AP_IN_TIME' , CREATE_TIME_SELECTIONS($_CONFIG['ap_in_time'] , "ap_inactive_time" , "MWDh")); + define('__AP_UN_TIME' , CREATE_TIME_SELECTIONS($_CONFIG['ap_un_time'] , "ap_unconfirmed_time", "MWDh")); + define('__AP_TASK_TIME' , CREATE_TIME_SELECTIONS($_CONFIG['ap_tasks_time'], "ap_tasks_time" , "MWDh")); + define('__AP_DEL_MAILS_TIME', CREATE_TIME_SELECTIONS($_CONFIG['ap_dm_timeout'], "ap_dm_timeout" , "MWDh")); // Mail confirmation links - define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($CONFIG['auto_purge'], "auto_purge", "MWD")); - if ($CONFIG['auto_purge_active'] == 'N') + define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($_CONFIG['auto_purge'], "auto_purge", "MWD")); + if ($_CONFIG['auto_purge_active'] == 'N') { define('_CFG_AP_ACTIVE_N', " checked"); define('_CFG_AP_ACTIVE_Y', ""); diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index df66f24230..ede30105ac 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -52,12 +52,12 @@ if (isset($_POST['ok'])) ADMIN_SAVE_SETTINGS($_POST); // Remember new settings - $CONFIG['beg_rallye'] = $_POST['beg_rallye']; - $CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify']; - $CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify']; + $_CONFIG['beg_rallye'] = $_POST['beg_rallye']; + $_CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify']; + $_CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify']; // Include sending out mails - if ((($CONFIG['beg_rallye'] == 'Y') && ($CONFIG['beg_ral_en_notify'] == 'Y')) || (($CONFIG['beg_rallye'] == 'N') && ($CONFIG['beg_ral_di_notify'] == 'Y'))) + if ((($_CONFIG['beg_rallye'] == 'Y') && ($_CONFIG['beg_ral_en_notify'] == 'Y')) || (($_CONFIG['beg_rallye'] == 'N') && ($_CONFIG['beg_ral_di_notify'] == 'Y'))) { include(PATH."inc/mails/beg_mails.php"); } @@ -65,17 +65,17 @@ if (isset($_POST['ok'])) else { // Prepare constants for the template - define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'] , false)); - define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($CONFIG['beg_points_max'] , false)); - define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($CONFIG['beg_notify_bonus'], false)); - define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_timeout'] , "beg_timeout" , "Dhm")); - define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm")); - define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm")); - define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" )); - define('__BEG_RANKS', $CONFIG['beg_ranks']); + define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'] , false)); + define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($_CONFIG['beg_points_max'] , false)); + define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($_CONFIG['beg_notify_bonus'], false)); + define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_timeout'] , "beg_timeout" , "Dhm")); + define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($_CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm")); + define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm")); + define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($_CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" )); + define('__BEG_RANKS', $_CONFIG['beg_ranks']); // Activate / Deactivate beg rallye (Y/N) - switch ($CONFIG['beg_rallye']) + switch ($_CONFIG['beg_rallye']) { case 'Y': define('__BEG_RALLYE_Y', " checked"); @@ -87,7 +87,7 @@ if (isset($_POST['ok'])) define('__BEG_RALLYE_N', " checked"); break; } - switch ($CONFIG['beg_active']) + switch ($_CONFIG['beg_active']) { case 'Y': define('__BEG_ACTIVE_Y', " checked"); @@ -99,7 +99,7 @@ if (isset($_POST['ok'])) define('__BEG_ACTIVE_N', " checked"); break; } - switch ($CONFIG['beg_mode']) + switch ($_CONFIG['beg_mode']) { case "DIRECT": define('__BEG_MODE_DIRECT', " checked"); @@ -111,7 +111,7 @@ if (isset($_POST['ok'])) define('__BEG_MODE_REF' , " checked"); break; } - switch ($CONFIG['beg_ral_en_notify']) + switch ($_CONFIG['beg_ral_en_notify']) { case 'Y': define('__BEG_RAL_EN_NOTIFY_Y', " checked"); @@ -123,7 +123,7 @@ if (isset($_POST['ok'])) define('__BEG_RAL_EN_NOTIFY_N', " checked"); break; } - switch ($CONFIG['beg_ral_di_notify']) + switch ($_CONFIG['beg_ral_di_notify']) { case 'Y': define('__BEG_RAL_DI_NOTIFY_Y', " checked"); @@ -135,7 +135,7 @@ if (isset($_POST['ok'])) define('__BEG_RAL_DI_NOTIFY_N', " checked"); break; } - switch ($CONFIG['beg_new_mem_notify']) + switch ($_CONFIG['beg_new_mem_notify']) { case 'Y': define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked"); @@ -147,7 +147,7 @@ if (isset($_POST['ok'])) define('__BEG_NEW_MEMBER_NOTIFY_N', " checked"); break; } - switch ($CONFIG['beg_include_own']) + switch ($_CONFIG['beg_include_own']) { case 'Y': define('__BEG_INCLUDE_OWN_Y', " checked"); @@ -161,7 +161,7 @@ if (isset($_POST['ok'])) } // Add data to constant __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['beg_uid']); + ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['beg_uid']); // Load form template LOAD_TEMPLATE("admin_config_beg"); diff --git a/inc/modules/admin/what-config_birthday.php b/inc/modules/admin/what-config_birthday.php index 60ff7ee34a..34eb07ade0 100644 --- a/inc/modules/admin/what-config_birthday.php +++ b/inc/modules/admin/what-config_birthday.php @@ -48,8 +48,8 @@ if (isset($_POST['ok'])) else { // Prepare data for the template - define('__POINTS_VALUE', $CONFIG['birthday_points']); - switch ($CONFIG['birthday_active']) + define('__POINTS_VALUE', $_CONFIG['birthday_points']); + switch ($_CONFIG['birthday_active']) { case 'Y': define('__BIRTHDAY_ACTIVE_Y', " checked"); @@ -61,7 +61,7 @@ if (isset($_POST['ok'])) define('__BIRTHDAY_ACTIVE_N', " checked"); break; } - switch ($CONFIG['birthday_mode']) + switch ($_CONFIG['birthday_mode']) { case "DIRECT": define('__BIRTHDAY_MODE_DIRECT', " checked"); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 5c351478a5..b0b5bc1616 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -60,18 +60,18 @@ if (isset($_POST['ok'])) unset($_POST['rate']); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (empty($_POST['turbo_rates'])) $_POST['turbo_rates'] = "".round($CONFIG['turbo_bonus'] / 2).";".round($CONFIG['turbo_bonus'] / 4).""; + if (empty($_POST['turbo_rates'])) $_POST['turbo_rates'] = "".round($_CONFIG['turbo_bonus'] / 2).";".round($_CONFIG['turbo_bonus'] / 4).""; // Save data ADMIN_SAVE_SETTINGS($_POST); // Remember new settings - $CONFIG['bonus_active'] = $_POST['bonus_active']; - $CONFIG['bonus_en_notify'] = $_POST['bonus_en_notify']; - $CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify']; + $_CONFIG['bonus_active'] = $_POST['bonus_active']; + $_CONFIG['bonus_en_notify'] = $_POST['bonus_en_notify']; + $_CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify']; // Include sending out mails - if ((($CONFIG['bonus_active'] == 'Y') && ($CONFIG['bonus_en_notify'] == 'Y')) || (($CONFIG['bonus_active'] == 'N') && ($CONFIG['bonus_di_notify'] == 'Y'))) + if ((($_CONFIG['bonus_active'] == 'Y') && ($_CONFIG['bonus_en_notify'] == 'Y')) || (($_CONFIG['bonus_active'] == 'N') && ($_CONFIG['bonus_di_notify'] == 'Y'))) { include(PATH."inc/mails/bonus_mails.php"); } @@ -79,23 +79,23 @@ if (isset($_POST['ok'])) else { // Prepare contants for the template - define('__LOGIN_VALUE' , TRANSLATE_COMMA($CONFIG['login_bonus'] , false)); - define('__TURBO_VALUE' , TRANSLATE_COMMA($CONFIG['turbo_bonus'] , false)); - define('__ORDER_VALUE' , TRANSLATE_COMMA($CONFIG['bonus_order'] , false)); - define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['bonus_ref'] , false)); - define('__STATS_VALUE' , TRANSLATE_COMMA($CONFIG['bonus_stats'] , false)); - define('__NOTIFY_VALUE', TRANSLATE_COMMA($CONFIG['bonus_notify_points'], false)); - define('__TRANKS_VALUE', $CONFIG['bonus_ranks']); - define('__TLINES_VALUE', $CONFIG['bonus_lines']); + define('__LOGIN_VALUE' , TRANSLATE_COMMA($_CONFIG['login_bonus'] , false)); + define('__TURBO_VALUE' , TRANSLATE_COMMA($_CONFIG['turbo_bonus'] , false)); + define('__ORDER_VALUE' , TRANSLATE_COMMA($_CONFIG['bonus_order'] , false)); + define('__REF_VALUE' , TRANSLATE_COMMA($_CONFIG['bonus_ref'] , false)); + define('__STATS_VALUE' , TRANSLATE_COMMA($_CONFIG['bonus_stats'] , false)); + define('__NOTIFY_VALUE', TRANSLATE_COMMA($_CONFIG['bonus_notify_points'], false)); + define('__TRANKS_VALUE', $_CONFIG['bonus_ranks']); + define('__TLINES_VALUE', $_CONFIG['bonus_lines']); // Transfer options to template __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['bonus_uid']); + ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['bonus_uid']); // Initialize array for the points list - $RANKS = explode(";", $CONFIG['bonus_rates']); + $RANKS = explode(";", $_CONFIG['bonus_rates']); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (empty($CONFIG['bonus_rates'])) $RANKS = array(round($CONFIG['turbo_bonus'] / 2), round($CONFIG['turbo_bonus'] / 4)); + if (empty($_CONFIG['bonus_rates'])) $RANKS = array(round($_CONFIG['turbo_bonus'] / 2), round($_CONFIG['turbo_bonus'] / 4)); // Generate list $OUT = "
      \n"; @@ -114,12 +114,12 @@ if (isset($_POST['ok'])) $OUT .= "
    \n"; define('__TRATES_LIST', $OUT); - define('__LOGIN_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['login_timeout'] , "login_timeout" , "WDh")); - define('__BONUS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['bonus_timeout'] , "bonus_timeout" , "WDh")); - define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['bonus_notify_wait'], "bonus_notify_wait", "ms" )); + define('__LOGIN_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['login_timeout'] , "login_timeout" , "WDh")); + define('__BONUS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['bonus_timeout'] , "bonus_timeout" , "WDh")); + define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($_CONFIG['bonus_notify_wait'], "bonus_notify_wait", "ms" )); // Activate / Deactivate bonus active rallye (Y/N) - switch ($CONFIG['bonus_active']) + switch ($_CONFIG['bonus_active']) { case 'Y': define('__BONUS_ACTIVE_Y', " checked"); @@ -132,7 +132,7 @@ if (isset($_POST['ok'])) break; } // Other bonus to de-/activate - switch ($CONFIG['bonus_login_yn']) + switch ($_CONFIG['bonus_login_yn']) { case 'Y': define('__BONUS_LOGIN_Y', " checked"); @@ -144,7 +144,7 @@ if (isset($_POST['ok'])) define('__BONUS_LOGIN_N', " checked"); break; } - switch ($CONFIG['bonus_stats_yn']) + switch ($_CONFIG['bonus_stats_yn']) { case 'Y': define('__BONUS_STATS_Y', " checked"); @@ -156,7 +156,7 @@ if (isset($_POST['ok'])) define('__BONUS_STATS_N', " checked"); break; } - switch ($CONFIG['bonus_order_yn']) + switch ($_CONFIG['bonus_order_yn']) { case 'Y': define('__BONUS_ORDER_Y', " checked"); @@ -168,7 +168,7 @@ if (isset($_POST['ok'])) define('__BONUS_ORDER_N', " checked"); break; } - switch ($CONFIG['bonus_ref_yn']) + switch ($_CONFIG['bonus_ref_yn']) { case 'Y': define('__BONUS_REF_Y', " checked"); @@ -180,7 +180,7 @@ if (isset($_POST['ok'])) define('__BONUS_REF_N', " checked"); break; } - switch ($CONFIG['bonus_click_yn']) + switch ($_CONFIG['bonus_click_yn']) { case 'Y': define('__BONUS_CLICK_Y', " checked"); @@ -192,7 +192,7 @@ if (isset($_POST['ok'])) define('__BONUS_CLICK_N', " checked"); break; } - switch ($CONFIG['bonus_en_notify']) + switch ($_CONFIG['bonus_en_notify']) { case 'Y': define('__BONUS_EN_NOTIFY_Y', " checked"); @@ -204,7 +204,7 @@ if (isset($_POST['ok'])) define('__BONUS_EN_NOTIFY_N', " checked"); break; } - switch ($CONFIG['bonus_di_notify']) + switch ($_CONFIG['bonus_di_notify']) { case 'Y': define('__BONUS_DI_NOTIFY_Y', " checked"); @@ -216,7 +216,7 @@ if (isset($_POST['ok'])) define('__BONUS_DI_NOTIFY_N', " checked"); break; } - switch ($CONFIG['bonus_new_mem_notify']) + switch ($_CONFIG['bonus_new_mem_notify']) { case 'Y': define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked"); @@ -228,7 +228,7 @@ if (isset($_POST['ok'])) define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked"); break; } - switch ($CONFIG['bonus_include_own']) + switch ($_CONFIG['bonus_include_own']) { case 'Y': define('__BONUS_INCLUDE_OWN_Y', " checked"); diff --git a/inc/modules/admin/what-config_cache.php b/inc/modules/admin/what-config_cache.php index 3de2ab0479..9b1851bdd7 100644 --- a/inc/modules/admin/what-config_cache.php +++ b/inc/modules/admin/what-config_cache.php @@ -46,7 +46,7 @@ if (isset($_POST['ok'])) $_POST['cache_tested'] = 'N'; // Check if path has been changed - if ($_POST['cache_path'] != $CONFIG['cache_path']) + if ($_POST['cache_path'] != $_CONFIG['cache_path']) { // Okay, cache path has been altered so we have to test it again! $_POST['cache_tested'] = 'Y'; @@ -88,42 +88,42 @@ if (isset($_POST['ok'])) else { // Prepare data - switch ($CONFIG['cache_admins']) + switch ($_CONFIG['cache_admins']) { case 'Y': define('__ADMINS_Y', " checked"); define('__ADMINS_N', ""); break; case 'N': define('__ADMINS_Y', ""); define('__ADMINS_N', " checked"); break; } - switch ($CONFIG['cache_acls']) + switch ($_CONFIG['cache_acls']) { case 'Y': define('__ACLS_Y', " checked"); define('__ACLS_N', ""); break; case 'N': define('__ACLS_Y', ""); define('__ACLS_N', " checked"); break; } - switch ($CONFIG['cache_exts']) + switch ($_CONFIG['cache_exts']) { case 'Y': define('__EXTS_Y', " checked"); define('__EXTS_N', ""); break; case 'N': define('__EXTS_Y', ""); define('__EXTS_N', " checked"); break; } - switch ($CONFIG['cache_config']) + switch ($_CONFIG['cache_config']) { case 'Y': define('__CONFIG_Y', " checked"); define('__CONFIG_N', ""); break; case 'N': define('__CONFIG_Y', ""); define('__CONFIG_N', " checked"); break; } - switch ($CONFIG['cache_modreg']) + switch ($_CONFIG['cache_modreg']) { case 'Y': define('__MODREG_Y', " checked"); define('__MODREG_N', ""); break; case 'N': define('__MODREG_Y', ""); define('__MODREG_N', " checked"); break; } - switch ($CONFIG['cache_refdepth']) + switch ($_CONFIG['cache_refdepth']) { case 'Y': define('__REFDEPTH_Y', " checked"); define('__REFDEPTH_N', ""); break; case 'N': define('__REFDEPTH_Y', ""); define('__REFDEPTH_N', " checked"); break; } - switch ($CONFIG['cache_refsys']) + switch ($_CONFIG['cache_refsys']) { case 'Y': define('__REFSYS_Y', " checked"); define('__REFSYS_N', ""); break; case 'N': define('__REFSYS_Y', ""); define('__REFSYS_N', " checked"); break; } - define('__PATH', $CONFIG['cache_path']); + define('__PATH', $_CONFIG['cache_path']); // Load template LOAD_TEMPLATE("admin_config_cache"); diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index 09c95b1337..e835bbd9fe 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -56,22 +56,22 @@ if (isset($_POST['ok'])) { // Prepare data for the template // - Charge rate - define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($CONFIG['doubler_charge'] * 100), false)); + define('__DOUBLER_CHARGE', TRANSLATE_COMMA(($_CONFIG['doubler_charge'] * 100), false)); // - Referral rate - define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($CONFIG['doubler_ref'] * 100), false)); + define('__DOUBLER_REFERRAL', TRANSLATE_COMMA(($_CONFIG['doubler_ref'] * 100), false)); // - Minimum points to double - define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($CONFIG['doubler_min'], false)); + define('__DOUBLER_MINIMUM', TRANSLATE_COMMA($_CONFIG['doubler_min'], false)); // - Maximum points to double - define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($CONFIG['doubler_max'], false)); + define('__DOUBLER_MAXIMUM', TRANSLATE_COMMA($_CONFIG['doubler_max'], false)); // - Points left on users account after doubling - define('__DOUBLER_LEFT', TRANSLATE_COMMA($CONFIG['doubler_left'], false)); + define('__DOUBLER_LEFT', TRANSLATE_COMMA($_CONFIG['doubler_left'], false)); // - Max payouts to check per click/reset - define('__DOUBLER_MAX_SENT', $CONFIG['doubler_max_sent']); + define('__DOUBLER_MAX_SENT', $_CONFIG['doubler_max_sent']); // - Group sending - define('__DOUBLER_GROUP_SENT', $CONFIG['doubler_group_sent']); + define('__DOUBLER_GROUP_SENT', $_CONFIG['doubler_group_sent']); // Take points from jackpot (Y/N) - switch ($CONFIG['doubler_jackpot']) + switch ($_CONFIG['doubler_jackpot']) { case 'Y': define('__DOUBLER_JACKPOT_Y', " checked"); @@ -85,7 +85,7 @@ if (isset($_POST['ok'])) } // Take points from own account (Y/N) - switch ($CONFIG['doubler_own']) + switch ($_CONFIG['doubler_own']) { case 'Y': define('__DOUBLER_OWN_Y', " checked"); @@ -99,7 +99,7 @@ if (isset($_POST['ok'])) } // Mail send mode - switch ($CONFIG['doubler_send_mode']) + switch ($_CONFIG['doubler_send_mode']) { case "DIRECT": define('__DOUBLER_SEND_DIRECT', " checked"); @@ -113,7 +113,7 @@ if (isset($_POST['ok'])) } // Take points from own account (Y/N) - switch ($CONFIG['doubler_sent_all']) + switch ($_CONFIG['doubler_sent_all']) { case 'Y': define('__DOUBLER_SENT_ALL_Y', " checked"); @@ -127,15 +127,15 @@ if (isset($_POST['ok'])) } // Transfer options (!!!) to __MEMBER_SELECTION - ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['doubler_uid']); + ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['doubler_uid']); // Number of rows to display (option lines!!!) - define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_new'])); - define('__DOUBLER_DISPLAY_PAY', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_pay'])); - define('__DOUBLER_DISPLAY_OLD', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $CONFIG['doubler_display_old'])); + define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_new'])); + define('__DOUBLER_DISPLAY_PAY', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_pay'])); + define('__DOUBLER_DISPLAY_OLD', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_old'])); // Timeout selection box or input box? - define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['doubler_timeout'] , "doubler_timeout" , "WDh")); + define('__DOUBLER_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['doubler_timeout'] , "doubler_timeout" , "WDh")); // Load template LOAD_TEMPLATE("admin_config_doubler"); diff --git a/inc/modules/admin/what-config_extensions.php b/inc/modules/admin/what-config_extensions.php index e941a3b276..c65d3d2eee 100644 --- a/inc/modules/admin/what-config_extensions.php +++ b/inc/modules/admin/what-config_extensions.php @@ -48,7 +48,7 @@ if (isset($_POST['ok'])) else { // Prepare data - switch ($CONFIG['verbose_sql']) + switch ($_CONFIG['verbose_sql']) { case 'Y': define('__VERBOSE_Y', " checked"); define('__VERBOSE_N', ""); break; case 'N': define('__VERBOSE_Y', ""); define('__VERBOSE_N', " checked"); break; diff --git a/inc/modules/admin/what-config_holiday.php b/inc/modules/admin/what-config_holiday.php index e903b6265c..b11db022dc 100644 --- a/inc/modules/admin/what-config_holiday.php +++ b/inc/modules/admin/what-config_holiday.php @@ -48,9 +48,9 @@ if (isset($_POST['ok'])) else { // Prepare constants for the template - define('__MAX_VALUE', $CONFIG['holiday_max']); - define('__LOCKED' , CREATE_TIME_SELECTIONS($CONFIG['holiday_lock'] , "holiday_lock" , "WDh")); - switch ($CONFIG['holiday_mode']) + define('__MAX_VALUE', $_CONFIG['holiday_max']); + define('__LOCKED' , CREATE_TIME_SELECTIONS($_CONFIG['holiday_lock'] , "holiday_lock" , "WDh")); + switch ($_CONFIG['holiday_mode']) { case "RESET": define('__RESET_DEFAULT' , " checked"); diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index e606232a75..6ce223e313 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -60,9 +60,9 @@ case "settings": // Settings related to the index page { // Prepare data for the template $content = array_fill(-1, 60, ""); - $content[$CONFIG['index_delay']] = " selected=\"selected\""; + $content[$_CONFIG['index_delay']] = " selected=\"selected\""; - define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['index_cookie'], "index_cookie", "YMWD")); + define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['index_cookie'], "index_cookie", "YMWD")); LOAD_TEMPLATE("admin_config_home_settings", false, $content); } break; @@ -72,7 +72,7 @@ case "target": // Set which what-file will be placed in home-page (only modules. { // Set new home $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET index_home='%s' WHERE config='0' LIMIT 1", array($_GET['home']), __FILE__, __LINE__); - $CONFIG['index_home'] = $_GET['home']; + $_CONFIG['index_home'] = $_GET['home']; } // Load all what menu points @@ -85,7 +85,7 @@ case "target": // Set which what-file will be placed in home-page (only modules. while (list($id, $wht, $wtitle) = SQL_FETCHROW($result)) { $LINK = ""._IS_NEW_HOME.""; - if ($wht == $CONFIG['index_home']) + if ($wht == $_CONFIG['index_home']) { // Is current home $LINK = ""._IS_CURRENT_HOME.""; diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 6dfdbcd66b..d7c7f82132 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -77,10 +77,10 @@ if (isset($_POST['ok'])) else { // Start of this exchange - if ($CONFIG['mt_start'] > 0) + if ($_CONFIG['mt_start'] > 0) { // Only show start - define('__MT_START', "".MAKE_DATETIME($CONFIG['mt_start'], "3").""); + define('__MT_START', "".MAKE_DATETIME($_CONFIG['mt_start'], "3").""); } else { @@ -93,7 +93,7 @@ if (isset($_POST['ok'])) } // Next stage of this MT - define('__MT_STAGE', $CONFIG['mt_stage']); + define('__MT_STAGE', $_CONFIG['mt_stage']); // Load template LOAD_TEMPLATE("admin_config_mediadata"); diff --git a/inc/modules/admin/what-config_newsletter.php b/inc/modules/admin/what-config_newsletter.php index 9abc620029..f169c3b279 100644 --- a/inc/modules/admin/what-config_newsletter.php +++ b/inc/modules/admin/what-config_newsletter.php @@ -51,7 +51,7 @@ if (isset($_POST['ok'])) else { // Prepare contants for the template - define('__CHARGE_VALUE' , TRANSLATE_COMMA($CONFIG['nl_charge'], false)); + define('__CHARGE_VALUE' , TRANSLATE_COMMA($_CONFIG['nl_charge'], false)); // Prepare constants and load template LOAD_TEMPLATE("admin_config_newsletter", false); diff --git a/inc/modules/admin/what-config_order.php b/inc/modules/admin/what-config_order.php index f8b8da5112..239c30cc70 100644 --- a/inc/modules/admin/what-config_order.php +++ b/inc/modules/admin/what-config_order.php @@ -48,7 +48,7 @@ if (isset($_POST['ok'])) else { // Prepare constants for the template - switch ($CONFIG['order_max']) + switch ($_CONFIG['order_max']) { case "ORDER": define('__ORDER_DEFAULT', " checked"); @@ -62,10 +62,10 @@ if (isset($_POST['ok'])) } // Minimum mails / order - define('__MIN_VALUE', $CONFIG['order_min']); + define('__MIN_VALUE', $_CONFIG['order_min']); // Sorting mode (ascending / descending) - switch ($CONFIG['order_mode']) + switch ($_CONFIG['order_mode']) { case "ASC": define('__ASC_DEFAULT' , " selected=\"selected\""); @@ -79,7 +79,7 @@ if (isset($_POST['ok'])) } // Selection list - define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($CONFIG['order_select'])); + define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($_CONFIG['order_select'])); // Load template LOAD_TEMPLATE("admin_config_order"); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index eb64e61a1b..91ddaec216 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -84,35 +84,35 @@ if (isset($_POST['ok'])) } else { - // Transfer config data into constants for the template (DO NOT set $CONFIG as global in LOAD_TEMPLATE!!!) - define('_CFG_UNCONFIRMED' , $CONFIG['unconfirmed']); - define('_CFG_MAX_TLENGTH' , $CONFIG['max_tlength']); - define('_CFG_CODE_LENGTH' , $CONFIG['code_length']); - define('_CFG_ACT_SYSTEM' , $CONFIG['activate_xchange']); - define('_CFG_MAX_SEND' , $CONFIG['max_send']); - define('_CFG_REJECT_URL' , $CONFIG['reject_url']); + // Transfer config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!) + define('_CFG_UNCONFIRMED' , $_CONFIG['unconfirmed']); + define('_CFG_MAX_TLENGTH' , $_CONFIG['max_tlength']); + define('_CFG_CODE_LENGTH' , $_CONFIG['code_length']); + define('_CFG_ACT_SYSTEM' , $_CONFIG['activate_xchange']); + define('_CFG_MAX_SEND' , $_CONFIG['max_send']); + define('_CFG_REJECT_URL' , $_CONFIG['reject_url']); // Is there the pro-version function avaiable to create selection boxes instead of input boxes? if (function_exists('CREATE_TIME_SELECTIONS')) { // Only pro versions: time selection boxes - define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['online_timeout'], "ip_timeout" , "ms")); - define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS($CONFIG['url_tlock'] , "url_tlock" , "WDh")); - define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS($CONFIG['profile_lock'] , "profile_lock" , "WDh")); - define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($CONFIG['profile_update'], "profile_update" , "YM")); - define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($CONFIG['resend_profile_update'] , "resend_profile_update", "MWD")); + define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['online_timeout'], "ip_timeout" , "ms")); + define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS($_CONFIG['url_tlock'] , "url_tlock" , "WDh")); + define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS($_CONFIG['profile_lock'] , "profile_lock" , "WDh")); + define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($_CONFIG['profile_update'], "profile_update" , "YM")); + define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($_CONFIG['resend_profile_update'] , "resend_profile_update", "MWD")); } else { // Normal input boxes - define('_CFG_ONLINE_TIMEOUT', " (".SECS.")"); - define('_CFG_URL_TLOCK' , " (".SECS.")"); - define('_CFG_PROFILE_LOCK' , " (".SECS.")"); - define('_CFG_PROFILE_UPDATE', " (".SECS.")"); - define('_CFG_PROF_REUPDATE' , " (".SECS.")"); + define('_CFG_ONLINE_TIMEOUT', " (".SECS.")"); + define('_CFG_URL_TLOCK' , " (".SECS.")"); + define('_CFG_PROFILE_LOCK' , " (".SECS.")"); + define('_CFG_PROFILE_UPDATE', " (".SECS.")"); + define('_CFG_PROF_REUPDATE' , " (".SECS.")"); } - if ($CONFIG['test_text'] == 'N') + if ($_CONFIG['test_text'] == 'N') { define('_CFG_TEST_TEXT_N', " checked"); define('_CFG_TEST_TEXT_Y', ""); @@ -122,7 +122,7 @@ if (isset($_POST['ok'])) define('_CFG_TEST_TEXT_N', ""); define('_CFG_TEST_TEXT_Y', " checked"); } - if ($CONFIG['test_subj'] == 'N') + if ($_CONFIG['test_subj'] == 'N') { define('_CFG_TEST_SUBJ_N', " checked"); define('_CFG_TEST_SUBJ_Y', ""); @@ -132,7 +132,7 @@ if (isset($_POST['ok'])) define('_CFG_TEST_SUBJ_N', ""); define('_CFG_TEST_SUBJ_Y', " checked"); } - if ($CONFIG['url_blacklist'] == 'N') + if ($_CONFIG['url_blacklist'] == 'N') { define('_CFG_URL_BLIST_N', " checked"); define('_CFG_URL_BLIST_Y', ""); @@ -142,7 +142,7 @@ if (isset($_POST['ok'])) define('_CFG_URL_BLIST_N', ""); define('_CFG_URL_BLIST_Y', " checked"); } - if ($CONFIG['order_multi_page'] == 'N') + if ($_CONFIG['order_multi_page'] == 'N') { define('_CFG_ORDER_MULTI_N', " checked"); define('_CFG_ORDER_MULTI_Y', ""); @@ -152,7 +152,7 @@ if (isset($_POST['ok'])) define('_CFG_ORDER_MULTI_N', ""); define('_CFG_ORDER_MULTI_Y', " checked"); } - if ($CONFIG['autosend_active'] == 'N') + if ($_CONFIG['autosend_active'] == 'N') { define('_CFG_AUTOSEND_ACTIVE_N', " checked"); define('_CFG_AUTOSEND_ACTIVE_Y', ""); @@ -162,7 +162,7 @@ if (isset($_POST['ok'])) define('_CFG_AUTOSEND_ACTIVE_N', ""); define('_CFG_AUTOSEND_ACTIVE_Y', " checked"); } - if ($CONFIG['send_prof_update'] == 'N') + if ($_CONFIG['send_prof_update'] == 'N') { define('_CFG_SEND_UPDATE_N', " checked"); define('_CFG_SEND_UPDATE_Y', ""); @@ -172,7 +172,7 @@ if (isset($_POST['ok'])) define('_CFG_SEND_UPDATE_N', ""); define('_CFG_SEND_UPDATE_Y', " checked"); } - if ($CONFIG['admin_notify'] == 'N') + if ($_CONFIG['admin_notify'] == 'N') { define('_CFG_ADMIN_NOTIFY_N', " checked"); define('_CFG_ADMIN_NOTIFY_Y', ""); @@ -182,7 +182,7 @@ if (isset($_POST['ok'])) define('_CFG_ADMIN_NOTIFY_N', ""); define('_CFG_ADMIN_NOTIFY_Y', " checked"); } - if ($CONFIG['css_php'] == "DIRECT") + if ($_CONFIG['css_php'] == "DIRECT") { define('_CFG_CSS_PHP_DIRECT', " checked"); define('_CFG_CSS_PHP_FILE', ""); @@ -192,28 +192,28 @@ if (isset($_POST['ok'])) define('_CFG_CSS_PHP_DIRECT', ""); define('_CFG_CSS_PHP_FILE', " checked"); } - if ($CONFIG['guest_menu'] == 'Y') { + if ($_CONFIG['guest_menu'] == 'Y') { define('_CFG_GUEST_MENU_ACTIVE', " checked"); define('_CFG_GUEST_MENU_INACTIVE', ""); } else { define('_CFG_GUEST_MENU_ACTIVE', ""); define('_CFG_GUEST_MENU_INACTIVE', " checked"); } - if ($CONFIG['member_menu'] == 'Y') { + if ($_CONFIG['member_menu'] == 'Y') { define('_CFG_MEMBER_MENU_ACTIVE', " checked"); define('_CFG_MEMBER_MENU_INACTIVE', ""); } else { define('_CFG_MEMBER_MENU_ACTIVE', ""); define('_CFG_MEMBER_MENU_INACTIVE', " checked"); } - if ($CONFIG['youre_here'] == 'Y') { + if ($_CONFIG['youre_here'] == 'Y') { define('_CFG_YOURE_HERE_ACTIVE', " checked"); define('_CFG_YOURE_HERE_INACTIVE', ""); } else { define('_CFG_YOURE_HERE_ACTIVE', ""); define('_CFG_YOURE_HERE_INACTIVE', " checked"); } - if ($CONFIG['show_timings'] == 'Y') { + if ($_CONFIG['show_timings'] == 'Y') { define('_CFG_FOOTER_STATS_Y', " checked"); define('_CFG_FOOTER_STATS_N', ""); } else { @@ -224,7 +224,7 @@ if (isset($_POST['ok'])) for ($i = 0; $i <= 5; $i++) { $eval = "define('_COMMA_DEF_".$i."', \"\");"; - if ($CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");"; + if ($_CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");"; eval($eval); } diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index a0171fc02d..8930f895b5 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -129,13 +129,13 @@ WHERE config='0' LIMIT 1", $_POST['reg_points_mode'], $REF ); - if (($CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0)) + if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0)) { // Update account's ref_payout for "must-confirm" $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%d - mails_confirmed) WHERE mails_confirmed < %d", $REF, $REF); } - elseif (($CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0)) + elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0)) { // Update account's ref_payout for "not-must-confirm" $SQL[] = "UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=0 WHERE ref_payout > 0"; @@ -185,7 +185,7 @@ WHERE mails_confirmed < %d", $REF, $REF); { // Setup some settings like direct pay and so on // Including new add-mode for one-time referral bonus - switch ($CONFIG['allow_direct_pay']) + switch ($_CONFIG['allow_direct_pay']) { case 'Y': define('__DIRECT_Y', " checked"); @@ -199,14 +199,14 @@ WHERE mails_confirmed < %d", $REF, $REF); } // One-time referral bonus add-mode - switch ($CONFIG['reg_points_mode']) + switch ($_CONFIG['reg_points_mode']) { case "ref" : define('__MODE_REF', " checked"); define('__MODE_DIRECT', ""); break; case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked"); break; } // Referral payout value - define('__REF_PAYOUT', round($CONFIG['ref_payout'])); + define('__REF_PAYOUT', round($_CONFIG['ref_payout'])); // Load template LOAD_TEMPLATE("admin_config_point_settings"); @@ -309,8 +309,8 @@ WHERE mails_confirmed < %d", $REF, $REF); elseif ($_GET['sub'] == "points") { // First points for registration and other fixed points including new add-mode for one-time referral bonus... - define('P_REG_VALUE', $CONFIG['points_register']); - define('P_REF_VALUE', $CONFIG['points_ref']); + define('P_REG_VALUE', $_CONFIG['points_register']); + define('P_REF_VALUE', $_CONFIG['points_ref']); // Load templates LOAD_TEMPLATE("admin_config_sub_points"); diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index 16d8b3fbcc..1ecb724d86 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -48,9 +48,9 @@ if (isset($_POST['ok'])) else { // Prepare contants for the template - ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['def_refid']); + ADD_MEMBER_SELECTION_BOX(false, true, true, $_CONFIG['def_refid']); - switch ($CONFIG['refid_target']) + switch ($_CONFIG['refid_target']) { case "index": define('__DEF_RT_INDEX', " selected=\"selected\""); define('__DEF_RT_REGISTER', ""); break; case "register": define('__DEF_RT_INDEX', ""); define('__DEF_RT_REGISTER', " selected=\"selected\""); break; diff --git a/inc/modules/admin/what-config_reg.php b/inc/modules/admin/what-config_reg.php index a7ae62d1f9..116980dc4f 100644 --- a/inc/modules/admin/what-config_reg.php +++ b/inc/modules/admin/what-config_reg.php @@ -62,12 +62,12 @@ if (isset($_POST['ok'])) else { // Remember stuff in constants - define('LEAST_CATS_VALUE' , $CONFIG['least_cats']); - define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $CONFIG['display_refid'], "display_refid")); - define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout'], "ip_timeout", "Dhm")); - define('__CFG_DBL_EMAIL' , ADD_SELECTION("yn", $CONFIG['check_double_email'], "check_double_email")); - define('__CFG_DBL_PASS' , ADD_SELECTION("yn", $CONFIG['check_double_pass'] , "check_double_pass")); - define('__REF_PAYOUT' , $CONFIG['ref_payout']); + define('LEAST_CATS_VALUE' , $_CONFIG['least_cats']); + define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $_CONFIG['display_refid'], "display_refid")); + define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['ip_timeout'], "ip_timeout", "Dhm")); + define('__CFG_DBL_EMAIL' , ADD_SELECTION("yn", $_CONFIG['check_double_email'], "check_double_email")); + define('__CFG_DBL_PASS' , ADD_SELECTION("yn", $_CONFIG['check_double_pass'] , "check_double_pass")); + define('__REF_PAYOUT' , $_CONFIG['ref_payout']); // Load normal template LOAD_TEMPLATE("admin_config_reg"); diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index e87b9668b2..bcf85c5381 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -56,12 +56,12 @@ if (isset($_POST['ok'])) else { // Remember stuff in constants - define('LEAST_CATS_VALUE' , round($CONFIG['least_cats'])); - define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $CONFIG['display_refid'] , "display_refid")); - define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['ip_timeout'] , "ip_timeout", "Dhm")); - define('__CFG_DBL_EMAIL' , ADD_SELECTION("yn", $CONFIG['check_double_email'] , "check_double_email")); - define('__CFG_DBL_PASS' , ADD_SELECTION("yn", $CONFIG['check_double_pass'] , "check_double_pass")); - define('__CFG_CAT_DEFAULT' , ADD_SELECTION("yn", $CONFIG['register_default'], "register_default")); + define('LEAST_CATS_VALUE' , round($_CONFIG['least_cats'])); + define('__CFG_SHOW_REFID' , ADD_SELECTION("yn", $_CONFIG['display_refid'] , "display_refid")); + define('__TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['ip_timeout'] , "ip_timeout", "Dhm")); + define('__CFG_DBL_EMAIL' , ADD_SELECTION("yn", $_CONFIG['check_double_email'] , "check_double_email")); + define('__CFG_DBL_PASS' , ADD_SELECTION("yn", $_CONFIG['check_double_pass'] , "check_double_pass")); + define('__CFG_CAT_DEFAULT' , ADD_SELECTION("yn", $_CONFIG['register_default'], "register_default")); // Load normal template LOAD_TEMPLATE("admin_config_register2"); diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index a1e728b2fd..8fa8a3a52a 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -72,7 +72,7 @@ if (isset($_POST['ok'])) if (empty($title)) $title = "---"; // Already registered module? - if (ereg($mod, $CONFIG['rewrite_skipped_mods'])) + if (ereg($mod, $_CONFIG['rewrite_skipped_mods'])) { // Found $y = " checked"; diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index 2ad3c4bf37..07011ba80f 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -54,7 +54,7 @@ if (isset($_POST['ok'])) unset($_POST['salt_length']); // Redirect to logout link - LOAD_URL(URL."/modules.php?module=admin&logout=1"); + LOAD_URL("modules.php?module=admin&logout=1"); } // Save settings @@ -63,10 +63,10 @@ if (isset($_POST['ok'])) else { // Remember stuff in constants - define('__PASS_LEN' , $CONFIG['pass_len']); + define('__PASS_LEN' , $_CONFIG['pass_len']); // Password-salt length - define('__SALT_LENGTH', $CONFIG['salt_length']); + define('__SALT_LENGTH', $_CONFIG['salt_length']); // Load template LOAD_TEMPLATE("admin_config_secure"); diff --git a/inc/modules/admin/what-config_stats.php b/inc/modules/admin/what-config_stats.php index 7caf135647..155a72ccbb 100644 --- a/inc/modules/admin/what-config_stats.php +++ b/inc/modules/admin/what-config_stats.php @@ -48,7 +48,7 @@ if (isset($_POST['ok'])) else { // Guest stats - switch (strtolower($CONFIG['guest_stats'])) + switch (strtolower($_CONFIG['guest_stats'])) { case "members": define('__MEMBERS_RADIO', " checked selected"); @@ -70,7 +70,7 @@ if (isset($_POST['ok'])) } // Max stats entries per page - define('__STATS_LIMIT', $CONFIG['stats_limit']); + define('__STATS_LIMIT', $_CONFIG['stats_limit']); // Load template LOAD_TEMPLATE("admin_config_stats"); diff --git a/inc/modules/admin/what-config_title.php b/inc/modules/admin/what-config_title.php index 68bac70883..322be77bf3 100644 --- a/inc/modules/admin/what-config_title.php +++ b/inc/modules/admin/what-config_title.php @@ -48,12 +48,12 @@ if (isset($_POST['ok'])) else { // Remember config data in constants for the template - define('__CFG_TITLE_LEFT' , $CONFIG['title_left']); - define('__CFG_TITLE_MIDDLE' , $CONFIG['title_middle']); - define('__CFG_TITLE_RIGHT' , $CONFIG['title_right']); - define('__CFG_TITLE_DECOS' , ADD_SELECTION("yn", $CONFIG['title_decoration'], "enable_title_deco")); - define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $CONFIG['title_mod_show'] , "enable_mod_title" )); - define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $CONFIG['title_what_show'] , "enable_what_title")); + define('__CFG_TITLE_LEFT' , $_CONFIG['title_left']); + define('__CFG_TITLE_MIDDLE' , $_CONFIG['title_middle']); + define('__CFG_TITLE_RIGHT' , $_CONFIG['title_right']); + define('__CFG_TITLE_DECOS' , ADD_SELECTION("yn", $_CONFIG['title_decoration'], "enable_title_deco")); + define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $_CONFIG['title_mod_show'] , "enable_mod_title" )); + define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $_CONFIG['title_what_show'] , "enable_what_title")); // Load template LOAD_TEMPLATE("admin_config_title"); diff --git a/inc/modules/admin/what-config_top10.php b/inc/modules/admin/what-config_top10.php index da7d1e63d2..507f8a1a51 100644 --- a/inc/modules/admin/what-config_top10.php +++ b/inc/modules/admin/what-config_top10.php @@ -48,7 +48,7 @@ if (isset($_POST['ok'])) else { // Prepare constants for the template - define('__MAX_VALUE', $CONFIG['top10_max']); + define('__MAX_VALUE', $_CONFIG['top10_max']); // Load form template LOAD_TEMPLATE("admin_config_top10"); diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index d6dee9d65b..8368e7060e 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -47,20 +47,20 @@ if (isset($_POST['ok'])) } // Prepare constants for template -define('__TRANS_MAX_VALUE' , $CONFIG['transfer_max']); -define('__TRANS_BALANCE_VALUE', $CONFIG['transfer_balance']); -define('__TRANS_CODE_VALUE' , $CONFIG['transfer_code']); +define('__TRANS_MAX_VALUE' , $_CONFIG['transfer_max']); +define('__TRANS_BALANCE_VALUE', $_CONFIG['transfer_balance']); +define('__TRANS_CODE_VALUE' , $_CONFIG['transfer_code']); // Autppurge expired transfer entries? -switch ($CONFIG['ap_inactive']) +switch ($_CONFIG['ap_inactive']) { case 'Y': define('__YES_AP', " selected=\"selected\""); define('__NO_AP', ""); break; case 'N': define('__YES_AP', ""); define('__NO_AP', " selected=\"selected\""); break; } // Time selection box -define('__TRANS_AGE_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['transfer_age'], "transfer_age", "MWDh")); -define('__TRANS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['transfer_timeout'], "transfer_timeout", "MWDh")); +define('__TRANS_AGE_SELECTION' , CREATE_TIME_SELECTIONS($_CONFIG['transfer_age'], "transfer_age", "MWDh")); +define('__TRANS_TIMEOUT_SELECTION', CREATE_TIME_SELECTIONS($_CONFIG['transfer_timeout'], "transfer_timeout", "MWDh")); // Load template LOAD_TEMPLATE("admin_config_transfer"); diff --git a/inc/modules/admin/what-config_user.php b/inc/modules/admin/what-config_user.php index 7cd3c431e7..dd108a8f46 100644 --- a/inc/modules/admin/what-config_user.php +++ b/inc/modules/admin/what-config_user.php @@ -48,8 +48,8 @@ if (isset($_POST['ok'])) else { // Prepare constants for the template - define('__LIMIT_VALUE', $CONFIG['user_limit']); - define('__ALPHA_VALUE', $CONFIG['user_alpha']); + define('__LIMIT_VALUE', $_CONFIG['user_limit']); + define('__ALPHA_VALUE', $_CONFIG['user_alpha']); // Load form template LOAD_TEMPLATE("admin_config_user"); diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index c4b247a405..5df7fb6ad7 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -41,8 +41,8 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) ADD_DESCR("admin", basename(__FILE__)); if (isset($_POST['ok'])) { - // First merge temporary the new API data into config - $CONFIG = array_merge($CONFIG, $_POST); + // First merge temporarily the new API data into the current config + $_CONFIG = array_merge($_CONFIG, $_POST); // Let's test the API first (hold your horses here, cowboy! Thanks. :) ) if (WERNIS_TEST_API()) { @@ -50,15 +50,16 @@ if (isset($_POST['ok'])) { ADMIN_SAVE_SETTINGS($_POST); } else { // Failed to test the API! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_ERROR_MESSAGE()); + LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); } } else { // Prepare data for template output $content = array( - 'min_amount' => $CONFIG['wernis_min_amount'], - 'api_id' => $CONFIG['wernis_api_id'], - 'api_md5' => $CONFIG['wernis_api_md5'], - 'api_url' => $CONFIG['wernis_api_url'] + 'min_amount' => bigintval($_CONFIG['wernis_min_amount']), + 'api_id' => bigintval($_CONFIG['wernis_api_id']), + 'api_md5' => $_CONFIG['wernis_api_md5'], + 'api_url' => $_CONFIG['wernis_api_url'], + 'refid' => bigintval($_CONFIG['wernis_refid']) ); // Load template diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 9799da4fb5..ba3d9e9c09 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -67,7 +67,7 @@ if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'] elseif (!empty($_POST['no'])) { // Do not delete him... - LOAD_URL(URL."/modules.php?module=admin&what=list_user&u_id=".$_GET['u_id']); + LOAD_URL("modules.php?module=admin&what=list_user&u_id=".$_GET['u_id']); } elseif (empty($_GET['u_id'])) { diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 1de43e9441..7e822c5dd8 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -54,7 +54,7 @@ $result_normal = SQL_QUERY($SQL, __FILE__, __LINE__); // Set offset an current page to default values if (empty($_GET['page'])) $_GET['page'] = "1"; -if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['mails_page']; +if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['mails_page']; // Add limitation to SQL string $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset']; @@ -63,7 +63,7 @@ $SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET $result = SQL_QUERY($SQL, __FILE__, __LINE__); // Calculate pages -$PAGES = round(SQL_NUMROWS($result_normal) / $CONFIG['mails_page'] + 0.5); +$PAGES = round(SQL_NUMROWS($result_normal) / $_CONFIG['mails_page'] + 0.5); SQL_FREERESULT($result_normal); if (SQL_NUMROWS($result) > 0) @@ -73,8 +73,8 @@ if (SQL_NUMROWS($result) > 0) // Add navigation table rows if ($PAGES > 1) { - define('__TOP_EMAIL_NAV' , ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], true , "3", true)); - define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3", true)); + define('__TOP_EMAIL_NAV' , ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], true , "3", true)); + define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3", true)); } else { diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 1b30be74b6..b27e002184 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -98,7 +98,7 @@ $result_normal = SQL_QUERY($SQL, __FILE__, __LINE__); // Set offset an current page to default values if (empty($_GET['page'])) $_GET['page'] = "1"; -if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['mails_page']; +if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['mails_page']; // Add limitation to SQL string if (empty($_GET['mid'])) @@ -118,7 +118,7 @@ $result_list = SQL_QUERY($SQL, __FILE__, __LINE__); if ((!empty($SQL2)) && ($WHO == _ALL)) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__); // Calculate pages -$PAGES = round(SQL_NUMROWS($result_normal) / $CONFIG['mails_page'] + 0.3); +$PAGES = round(SQL_NUMROWS($result_normal) / $_CONFIG['mails_page'] + 0.3); SQL_FREERESULT($result_normal); $MAIL = false; @@ -134,7 +134,7 @@ if (SQL_NUMROWS($result_list) > 0)
    "); // Add navigation (with change box and colspan=3) - if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3"); + if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3"); while ($pool = SQL_FETCHROW($result_list)) { @@ -224,7 +224,7 @@ if (SQL_NUMROWS($result_list) > 0) SQL_FREERESULT($result_list); // Add navigation (without change box but with colspan=3) - if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3"); + if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3"); // Output footer OUTPUT_HTML("
    @@ -251,10 +251,10 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) "); // Calculate pages - $PAGES = round(SQL_NUMROWS($result_bonus) / $CONFIG['mails_page'] + 0.5); + $PAGES = round(SQL_NUMROWS($result_bonus) / $_CONFIG['mails_page'] + 0.5); // Add navigation (with change box and colspan=3) - if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], true, "3"); + if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], true, "3"); // List emails while ($bonus = SQL_FETCHROW($result_bonus)) @@ -330,7 +330,7 @@ if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) } // Add navigation (without change box but with colspan=3) - if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3"); + if ($PAGES > 1) ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3"); // Output footer OUTPUT_HTML(" diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index bd283a93da..36c06cf9c7 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -163,7 +163,7 @@ if (!empty($_GET['reg_ext'])) { // Free the result SQL_FREERESULT($result); - if ($CONFIG['verbose_sql']) { + if ($_CONFIG['verbose_sql']) { // Load SQL commands in remove mode $EXT_LOAD_MODE = "remove"; $file = sprintf(PATH."inc/extensions/ext-%s.php", $ext_name); diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index dbd63e5dee..a66eff4229 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -41,7 +41,7 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) ADD_DESCR("admin", basename(__FILE__)); // Ok, let's have a look... -$since = bigintval(time() - $CONFIG['ap_in_since']); +$since = bigintval(time() - $_CONFIG['ap_in_since']); $EXCLUDE_LIST = " AND d.userid != c.def_refid"; // Check for more extensions diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index dd3ad3dfb2..cbb750f414 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -40,7 +40,7 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -if ($CONFIG['beg_rallye'] == 'Y') +if ($_CONFIG['beg_rallye'] == 'Y') { // Shall I withdraw now? if (isset($_POST['withdraw'])) @@ -60,7 +60,7 @@ if ($CONFIG['beg_rallye'] == 'Y') { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= %s"; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } // Check if at least one is in the active rallye @@ -78,7 +78,7 @@ ORDER BY beg_points DESC, last_online DESC, userid", { // Generate array fore the dynamic template $WIN1 = ""; $WIN2 = ""; - if ($cnt <= $CONFIG['beg_ranks']) + if ($cnt <= $_CONFIG['beg_ranks']) { // Maybe he can win his active beg? $WIN1 = ""; @@ -106,7 +106,7 @@ ORDER BY beg_points DESC, last_online DESC, userid", define('__TOTAL', TRANSLATE_COMMA($total)); // Check if we need to display form or not with manuel withdraw - if ($CONFIG['beg_month'] == date("m", time())) + if ($_CONFIG['beg_month'] == date("m", time())) { // Load form define('__BEG_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_beg_form", true)); @@ -118,7 +118,7 @@ ORDER BY beg_points DESC, last_online DESC, userid", } // Prepare constant for timemark - define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $CONFIG['ap_in_since'], "2")); + define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $_CONFIG['ap_in_since'], "2")); // Load final template LOAD_TEMPLATE("admin_list_beg"); diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 66038f6020..cfb0d79e68 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -40,7 +40,7 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -if ($CONFIG['bonus_active'] == 'Y') +if ($_CONFIG['bonus_active'] == 'Y') { // Shall I withdraw now? if (isset($_POST['withdraw'])) @@ -58,11 +58,11 @@ if ($CONFIG['bonus_active'] == 'Y') { // Add more bonus points here $USE = "(0"; - if ($CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; - if ($CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; - if ($CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; - if ($CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; - if ($CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; + if ($_CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; + if ($_CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; + if ($_CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; + if ($_CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; + if ($_CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; $USE .= ")"; } else @@ -77,7 +77,7 @@ if ($CONFIG['bonus_active'] == 'Y') { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= %s"; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } // Check if at least one is in the active rallye @@ -95,7 +95,7 @@ ORDER BY active_bonus DESC, last_online DESC, userid", { // Generate array fore the dynamic template $WIN1 = ""; $WIN2 = ""; - if ($cnt <= $CONFIG['bonus_ranks']) + if ($cnt <= $_CONFIG['bonus_ranks']) { // Maybe he can win his active bonus? $WIN1 = ""; @@ -123,7 +123,7 @@ ORDER BY active_bonus DESC, last_online DESC, userid", define('__TOTAL', TRANSLATE_COMMA($total)); // Check if we need to display form or not with manuel withdraw - if ($CONFIG['bonus_month'] == date("m", time())) + if ($_CONFIG['bonus_month'] == date("m", time())) { // Load form define('__BONUS_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_bonus_form", true)); @@ -135,7 +135,7 @@ ORDER BY active_bonus DESC, last_online DESC, userid", } // Prepare constant for timemark - define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $CONFIG['ap_in_since'], "2")); + define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - $_CONFIG['ap_in_since'], "2")); // Load final template LOAD_TEMPLATE("admin_list_bonus"); diff --git a/inc/modules/admin/what-list_norefs.php b/inc/modules/admin/what-list_norefs.php index e034b3bf50..d751a994e0 100644 --- a/inc/modules/admin/what-list_norefs.php +++ b/inc/modules/admin/what-list_norefs.php @@ -56,21 +56,21 @@ if (empty($_GET['page'])) { $_GET['page'] = "1"; } // Set base URL $BASE = " 0) 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 { diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 3a4fccd5cb..3d8601cf28 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -40,33 +40,33 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -$WHERE = ""; +$whereStatement = ""; if (empty($_GET['type'])) $_GET['type'] = "your"; switch ($_GET['type']) { case "your": // List only your own open (new) tasks - $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type != 'EXTENSION_UPDATE'"; + $whereStatement = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type != 'EXTENSION_UPDATE'"; break; case "updates": // List only updates assigned to you - $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type = 'EXTENSION_UPDATE'"; + $whereStatement = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type = 'EXTENSION_UPDATE'"; break; case "solved": // List only solved tasks assigned to you - $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='SOLVED'"; + $whereStatement = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='SOLVED'"; break; case "unassigned": // List unassigned (but not deleted) tasks - $WHERE = "assigned_admin='0' AND status != 'DELETED'"; + $whereStatement = "assigned_admin='0' AND status != 'DELETED'"; break; case "deleted": // List all deleted - $WHERE = "status='DELETED'"; + $whereStatement = "status='DELETED'"; break; case "closed": // List all closed - $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='CLOSED'"; + $whereStatement = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='CLOSED'"; break; default: // Unknown type @@ -74,7 +74,7 @@ default: // Unknown type break; } -if (!empty($WHERE)) +if (!empty($whereStatement)) { $SEL = 0; if (isset($_POST['task'])) $SEL = SELECTION_COUNT($_POST['task']); @@ -90,7 +90,7 @@ if (!empty($WHERE)) // Start listing tasks matching selected filter $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system -WHERE ".$WHERE." +WHERE ".$whereStatement." ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __LINE__); if (($SEL > 0) && (!IS_DEMO())) { @@ -125,7 +125,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L } // Update query - $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system WHERE ".$WHERE." ORDER BY subject, task_created DESC", __FILE__, __LINE__); + $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system WHERE ".$whereStatement." ORDER BY subject, task_created DESC", __FILE__, __LINE__); } // There are uncompleted jobs! diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index f964aef935..95dd630334 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -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 { diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index e5dde00cc9..2935c41363 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -43,7 +43,7 @@ ADD_DESCR("admin", basename(__FILE__)); if (isset($_POST['ok'])) { // De- or activate maintenance mode - switch ($CONFIG['maintenance']) + switch ($_CONFIG['maintenance']) { case 'Y': $target_mode = 'N'; @@ -65,7 +65,7 @@ if (isset($_POST['ok'])) } else { - switch ($CONFIG['maintenance']) + switch ($_CONFIG['maintenance']) { case 'Y': // Maintenance mode is active define('ADMIN_MAINTENANCE_MODE', ADMIN_MAINTENANCE_MODE_IS_ACTIVE); diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index 5445bec1fc..ab8dbfaee6 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -43,8 +43,8 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); -$WHERE = " WHERE visible='Y'"; -if (is_admin()) $WHERE = ""; +$whereStatement = " WHERE visible='Y'"; +if (is_admin()) $whereStatement = ""; $EXT_HTML = EXT_IS_ACTIVE("html_mail"); if (empty($_GET['mode'])) $_GET['mode'] = "select"; @@ -69,13 +69,13 @@ if (isset($_POST['ok'])) { // Only include HTML receivers $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", - array($cat, $CONFIG['order_select'], $CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__); + array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__); } else { // Include all $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s", - array($cat, $CONFIG['order_select'], $CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__); + array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], bigintval($_POST['receiver'])), __FILE__, __LINE__); } if ((SQL_NUMROWS($result) == $_POST['receiver']) && ($_POST['receiver'] > 0)) { @@ -143,7 +143,7 @@ VALUES ('%s', '%s', '%s', '%s', '%s', 'NEW', UNIX_TIMESTAMP(), '%s', '%s', '%s', LOAD_URL($URL); } } else { - $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__); if (SQL_NUMROWS($result) > 0) { $MORE = ""; diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 84adf4995b..296edebe02 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -82,14 +82,14 @@ if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) SQL_FREERESULT($result); // Check for bonus extension version >= 0.4.4 for the order bonus - if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($CONFIG['bonus_active'] == 'Y')) + if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == 'Y')) { // Add points directly - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_order=bonus_order+".$CONFIG['bonus_order']." WHERE userid=%d LIMIT 1", + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_order=bonus_order+".$_CONFIG['bonus_order']." WHERE userid=%d LIMIT 1", array(bigintval($DATA[2])), __FILE__, __LINE__); // Subtract bonus points from system - BONUS_POINTS_HANDLER($CONFIG['bonus_order']); + BONUS_POINTS_HANDLER($_CONFIG['bonus_order']); } // Load email template @@ -228,7 +228,7 @@ if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) // Prepare rejection URL $REJECT = "http://"; - if (GET_EXT_VERSION("other") >= "0.1.6") $REJECT = $CONFIG['reject_url']; + if (GET_EXT_VERSION("other") >= "0.1.6") $REJECT = $_CONFIG['reject_url']; define('__REJECT_URL', $REJECT); // Load main template diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index db13edb06c..c2c31ac2eb 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -96,11 +96,11 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2])) for ($idx = 0; $idx < $max; $idx++) { // List only newer patches - $TEST = substr(str_replace("\n", "", $response[$idx * 5 + 2]), 0, strlen($CONFIG['patch_level'])); + $TEST = substr(str_replace("\n", "", $response[$idx * 5 + 2]), 0, strlen($_CONFIG['patch_level'])); // I have removed the addional test for the stored timemark in database or you cannot find // new updates on my server when you haven't installed it before I upload a patch... :-( - if (bigintval($TEST) > bigintval($CONFIG['patch_level'])) + if (bigintval($TEST) > bigintval($_CONFIG['patch_level'])) { // Copy every data from the response array $PATCHES['fname'][] = str_replace("\n", "", $response[$idx * 5 + 2]); diff --git a/inc/modules/admin/what-user_online.php b/inc/modules/admin/what-user_online.php index 502a538e9e..2812aa8656 100644 --- a/inc/modules/admin/what-user_online.php +++ b/inc/modules/admin/what-user_online.php @@ -122,7 +122,7 @@ if (SQL_NUMROWS($result) > 0) } OUTPUT_HTML(" - ".ONLINE_TIMEOUT_IS_1.CREATE_FANCY_TIME($CONFIG['online_timeout']).ONLINE_TIMEOUT_IS_2." + ".ONLINE_TIMEOUT_IS_1.CREATE_FANCY_TIME($_CONFIG['online_timeout']).ONLINE_TIMEOUT_IS_2." "); diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index ef39806ce3..6e2533d6b3 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -115,7 +115,7 @@ if (EXT_IS_ACTIVE("online", true)) SQL_FREERESULT($result); // Load footer template - define('__FANCY_ONLINE_TIMEOUT', CREATE_FANCY_TIME($CONFIG['online_timeout'])); + define('__FANCY_ONLINE_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['online_timeout'])); LOAD_TEMPLATE("admin_online_footer"); } } diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 05522c4247..f17aad35c5 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -55,12 +55,12 @@ if (!empty($GLOBALS['userid']) && !empty($_COOKIE['u_hash']) && !empty($_COOKIE[ $_COOKIE['mxchange_theme'] = $NewTheme; $bonus = false; - if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && ($CONFIG['bonus_login_yn'] == 'N') && ($CONFIG['bonus_login_yn'] == 'Y')) { + if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && ($_CONFIG['bonus_login_yn'] == 'N') && ($_CONFIG['bonus_login_yn'] == 'Y')) { // Update last login $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET last_login=UNIX_TIMESTAMP() WHERE userid=%d AND last_login < (UNIX_TIMESTAMP() - %d) -LIMIT 1", array($GLOBALS['userid'], $CONFIG['login_timeout']), +LIMIT 1", array($GLOBALS['userid'], $_CONFIG['login_timeout']), __FILE__, __LINE__); if (SQL_AFFECTEDROWS($link) == 1) $bonus = true; } @@ -68,7 +68,7 @@ LIMIT 1", array($GLOBALS['userid'], $CONFIG['login_timeout']), // Output message with added points OUTPUT_HTML(" ".BONUS_LOGIN_BONUS_ADDED_1." - ".TRANSLATE_COMMA($CONFIG['login_bonus'])." ".POINTS." + ".TRANSLATE_COMMA($_CONFIG['login_bonus'])." ".POINTS." ".BONUS_LOGIN_BONUS_ADDED_2." "); } diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 0b42976a8d..a66a557a8d 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -65,7 +65,7 @@ if (!empty($_GET['order'])) else { // Matching line not found! - LOAD_URL(URL."/modules.php?module=index&what=login"); + LOAD_URL("modules.php?module=index&what=login"); } // Free memory @@ -74,7 +74,7 @@ if (!empty($_GET['order'])) else { // He is no longer logged in - LOAD_URL(URL."/modules.php?module=index&what=login"); + LOAD_URL("modules.php?module=index&what=login"); } } @@ -118,7 +118,7 @@ if ((!empty($_POST['url'])) || (!empty($_GET['url'])) || (!empty($_GET['frame']) else { // Go away... - LOAD_URL(URL."/modules.php?module=login"); + LOAD_URL("modules.php?module=login"); } // ?> diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 9a0f5ee478..d621a1a7c2 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -49,13 +49,13 @@ $result_admins = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_ad // Total visitors online $total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins); -if ($CONFIG['mad_counter'] < $total) +if ($_CONFIG['mad_counter'] < $total) { // Update counter - $CONFIG['mad_counter'] = $total; - $CONFIG['last_mad'] = time(); + $_CONFIG['mad_counter'] = $total; + $_CONFIG['last_mad'] = time(); $result_mad = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET mad_timestamp=%d, mad_count='%s' WHERE config='0' LIMIT 1", - array($CONFIG['last_mad'], $CONFIG['mad_counter']), __FILE__, __LINE__); + array($_CONFIG['last_mad'], $_CONFIG['mad_counter']), __FILE__, __LINE__); // Destroy cache } @@ -71,7 +71,7 @@ LOAD_TEMPLATE("online_now"); if (EXT_IS_ACTIVE("active")) { // Add link to "we were active today" page - LOAD_TEMPLATE("guest_menu_bottom", false, "".$CONFIG['middot'].GUEST_ACTIVE_LINK.""); + LOAD_TEMPLATE("guest_menu_bottom", false, "".$_CONFIG['middot'].GUEST_ACTIVE_LINK.""); } // diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 54e124eb47..6027284df2 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -39,9 +39,9 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // Load all active designs (or all if admin) -$WHERE = ""; $OUT = ""; -if (!IS_ADMIN()) $WHERE = " WHERE theme_active='Y'"; -$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$WHERE, __FILE__, __LINE__); +$whereStatement = ""; $OUT = ""; +if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; +$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index c9d0db929c..99838f8d9c 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -57,7 +57,7 @@ $result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", last_online FROM "._MYSQL_PREFIX."_user_data WHERE last_online >= %s AND status='CONFIRMED' ORDER BY last_online DESC LIMIT %s", - array($START, $CONFIG['active_limit']), __FILE__, __LINE__); + array($START, $_CONFIG['active_limit']), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index 887c393f1e..0340496b2b 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -44,22 +44,22 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { ADD_DESCR("guest", basename(__FILE__)); // Prepare constants -define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'])); -define('__BEG_POINTS_MAX', TRANSLATE_COMMA($CONFIG['beg_points_max'])); +define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'])); +define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['beg_points_max'])); if ($GLOBALS['refid'] > 0) { // Take referral ID from URL/Cookie define('__BEG_UID' , $ref); } else { // Take default referral ID - define('__BEG_UID' , $CONFIG['def_refid']); + define('__BEG_UID' , $_CONFIG['def_refid']); } if (function_exists('CREATE_FANCY_TIME')) { - define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($CONFIG['beg_timeout'])); - define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($CONFIG['beg_uid_timeout'])); + define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($_CONFIG['beg_timeout'])); + define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['beg_uid_timeout'])); } else { - define('__BEG_TIMEOUT ' , round($CONFIG['beg_timeout'] / 60)." ".MINUTES); - define('__BEG_UID_TIMEOUT', round($CONFIG['beg_uid_timeout'] / 60)." ".MINUTES); + define('__BEG_TIMEOUT ' , round($_CONFIG['beg_timeout'] / 60)." ".MINUTES); + define('__BEG_UID_TIMEOUT', round($_CONFIG['beg_uid_timeout'] / 60)." ".MINUTES); } // Load final template diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 2f0f114206..3c20c0156d 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -56,7 +56,7 @@ if (!empty($_GET['hash'])) // Unlock his account (but only when it is on UNCONFIRMED!) $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED', ref_payout='%s' WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1", - array($CONFIG['ref_payout'], $_GET['hash']), __FILE__, __LINE__); + array($_CONFIG['ref_payout'], $_GET['hash']), __FILE__, __LINE__); if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) { $msg = LOAD_EMAIL_TEMPLATE("confirm-member", "", bigintval($uid)); @@ -79,7 +79,7 @@ if (!empty($_GET['hash'])) unset($DEPTH); // Shall I "pay" the referral points imidiately? - if ($CONFIG['ref_payout'] == "0") + if ($_CONFIG['ref_payout'] == "0") { // Yes, "pay" it now $locked = false; @@ -91,18 +91,19 @@ if (!empty($_GET['hash'])) } // If version matches add ref bonus to refid's account - if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($CONFIG['bonus_active'] == 'Y')) + if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == 'Y')) { // Add points (directly only!) $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_ref=bonus_ref+%s WHERE userid=%d LIMIT 1", - array($CONFIG['bonus_ref'], bigintval($rid)), __FILE__, __LINE__); + array($_CONFIG['bonus_ref'], bigintval($rid)), __FILE__, __LINE__); // Subtract points from system - BONUS_POINTS_HANDLER($CONFIG['bonus_ref']); + BONUS_POINTS_HANDLER($_CONFIG['bonus_ref']); } // Add one-time referral bonus over referral system or directly - ADD_POINTS_REFSYSTEM($rid, $CONFIG['points_ref'], true, bigintval($uid), $locked, $CONFIG['reg_points_mode']); + $DEPTH = 0; + ADD_POINTS_REFSYSTEM($rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']); } } @@ -118,7 +119,7 @@ if (!empty($_GET['hash'])) $_COOKIE['lead_uid'] = bigintval($uid); // Lead-Code mode enabled - LOAD_URL(URL."/lead-confirm.php"); + LOAD_URL("lead-confirm.php"); } else { define('__CONFIRM_MSG', GUEST_CONFIRMED_DONE); define('__UID', bigintval($uid)); @@ -130,7 +131,7 @@ if (!empty($_GET['hash'])) $_COOKIE['lead_uid'] = bigintval($uid); // Lead-Code mode enabled - LOAD_URL(URL."/lead-confirm.php"); + LOAD_URL("lead-confirm.php"); } else { // Nobody was found unter this hash key... or our new member want's to confirm twice? define('__CONFIRM_MSG', GUEST_CONFIRMED_TWICE); diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index ceabf29cd0..a37f04a8a6 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -47,20 +47,20 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) ADD_DESCR("guest", basename(__FILE__)); // Percent values etc. -define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100)); -define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100)); -define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points'])); -define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min'])); -define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max'])); +define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100)); +define('__REF_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_ref'] * 100)); +define('__TOTAL_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_points'])); +define('__MIN_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_min'])); +define('__MAX_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_max'])); // Transfer referral ID define('__REFID', $GLOBALS['refid']); // Usage counter -define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']); +define('__DOUBLER_COUNTER', $_CONFIG['doubler_counter']); // Which mail-send-mode did the admin setup? -switch ($CONFIG['doubler_send_mode']) +switch ($_CONFIG['doubler_send_mode']) { case "DIRECT": define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT); @@ -78,7 +78,7 @@ define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", 'Y', 'N', "DESC") define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE()); // Generate timemark -define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout'])); +define('__TIMEOUT_MARK', CREATE_FANCY_TIME($_CONFIG['doubler_timeout'])); // Points left to double define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT()); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index d2aada3110..75527e51ba 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -152,14 +152,14 @@ if (IS_LOGGED_IN()) // Probe for last online timemark $probe = time() - $online; if (!empty($login)) $probe = time() - $login; - if ((GET_EXT_VERSION("bonus") >= "0.2.2") && ($probe >= $CONFIG['login_timeout'])) + if ((GET_EXT_VERSION("bonus") >= "0.2.2") && ($probe >= $_CONFIG['login_timeout'])) { // Add login bonus to user's account - $ADD = ", login_bonus=login_bonus+'".$CONFIG['login_bonus']."'"; + $ADD = ", login_bonus=login_bonus+'".$_CONFIG['login_bonus']."'"; $BONUS = true; // Subtract login bonus from userid's account or jackpot - if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($CONFIG['bonus_mode'] != "ADD")) BONUS_POINTS_HANDLER('login_bonus'); + if ((GET_EXT_VERSION("bonus") >= "0.3.5") && ($_CONFIG['bonus_mode'] != "ADD")) BONUS_POINTS_HANDLER('login_bonus'); } @@ -321,7 +321,7 @@ if (IS_LOGGED_IN()) } // Load URL - LOAD_URL(URL."/modules.php?module=".$GLOBALS['module']."&what=login&login=".$MSG); + LOAD_URL("modules.php?module=".$GLOBALS['module']."&what=login&login=".$MSG); } } else diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 1dccf93bc1..994a48fab8 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -60,13 +60,13 @@ define('user_locked' , round(GET_TOTAL_DATA("LOCKED" , "user_data", "use define('user_count' , (user_confirmed + user_unconfirmed + user_locked)); // Start of this exchange -define('__MT_START', MAKE_DATETIME($CONFIG['mt_start'], "3")); +define('__MT_START', MAKE_DATETIME($_CONFIG['mt_start'], "3")); // Projected number of members -define('__MT_STAGE', $CONFIG['mt_stage']); +define('__MT_STAGE', $_CONFIG['mt_stage']); // Project timestamp when number of members are reached -$PROJECTED = round((time() - $CONFIG['mt_start']) / user_count * $CONFIG['mt_stage'] + $CONFIG['mt_start']); +$PROJECTED = round((time() - $_CONFIG['mt_start']) / user_count * $_CONFIG['mt_stage'] + $_CONFIG['mt_start']); $YEAR = date('Y', $PROJECTED); $MONTH = date("m", $PROJECTED); $DAY = date("d", $PROJECTED); $TEST = mktime(0, 0, 0, $MONTH, $DAY, $YEAR); if ($TEST > time()) @@ -184,9 +184,9 @@ define('__REF_CLICKS', $clicks); // // Initialize Variables -$OUT_EXTRA = ""; $ROWS_EXTRA = 2; -$OUT_POINTS = ""; $ROWS_POINTS = 2; -$OUT_USER = ""; $ROWS_USER = 6; +$OUT_EXTRA = ""; $rowNameS_EXTRA = 2; +$OUT_POINTS = ""; $rowNameS_POINTS = 2; +$OUT_USER = ""; $rowNameS_USER = 6; $OUT_SPECIAL = ""; // We don't need row count here if (EXT_IS_ACTIVE("beg")) @@ -201,7 +201,7 @@ if (EXT_IS_ACTIVE("beg")) 'value' => $extra ); $OUT_EXTRA .= LOAD_TEMPLATE("mediadata_extra_row", true, $content); - $ROWS_EXTRA++; + $rowNameS_EXTRA++; } if (EXT_IS_ACTIVE("doubler")) { @@ -262,7 +262,7 @@ WHERE d.holiday_active='Y'", 'value' => $holiday ); $OUT_USER .= LOAD_TEMPLATE("mediadata_extra_row", true, $content); - $ROWS_USER++; + $rowNameS_USER++; } if (EXT_IS_ACTIVE("transfer")) @@ -315,13 +315,13 @@ define('__EXTRA_MEDIADATA' , $OUT_EXTRA); define('__POINTS_MEDIADATA' , $OUT_POINTS); define('__USER_MEDIADATA' , $OUT_USER); define('__SPECIAL_MEDIADATA', $OUT_SPECIAL); -define('__ROWSPAN_EXTRA' , $ROWS_EXTRA); -define('__ROWSPAN_POINTS' , $ROWS_POINTS); -define('__ROWSPAN_USER' , $ROWS_USER); +define('__ROWSPAN_EXTRA' , $rowNameS_EXTRA); +define('__ROWSPAN_POINTS' , $rowNameS_POINTS); +define('__ROWSPAN_USER' , $rowNameS_USER); // Patch level and it's timespamp -define('__PATCH_LEVEL', $CONFIG['patch_level']); -define('__PATCH_CTIME', MAKE_DATETIME($CONFIG['patch_ctime'], "2")); +define('__PATCH_LEVEL', $_CONFIG['patch_level']); +define('__PATCH_CTIME', MAKE_DATETIME($_CONFIG['patch_ctime'], "2")); // Load template OPEN_TABLE("100%", "guest_content", "center", "top"); diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 9537fe5090..7303c4895d 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -51,7 +51,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) ADD_DESCR("guest", basename(__FILE__)); OPEN_TABLE("100%", "guest_content_align", ""); -global $CONFIG, $DATA; +global $_CONFIG, $DATA; // Initialize variables $FAILED = false; $SHORT_PASS = false; $cats = 0; $IP_TIMEOUT = false; @@ -122,7 +122,7 @@ if (isset($_POST['ok'])) $FAILED = true; } // Is the password long enouth? - if ((strlen($_POST['pass1']) < $CONFIG['pass_len']) && (!$FAILED) && (!IS_ADMIN())) + if ((strlen($_POST['pass1']) < $_CONFIG['pass_len']) && (!$FAILED) && (!IS_ADMIN())) { $SHORT_PASS = true; $FAILED = true; @@ -135,13 +135,13 @@ if (isset($_POST['ok'])) { if ($answer == 'Y') $cats++; } - if ($cats < $CONFIG['least_cats']) + if ($cats < $_CONFIG['least_cats']) { // ... nope! $FAILED = true; } } - if (($_POST['addy'] != "!") && ($CONFIG['check_double_email'] == 'Y') && (!IS_ADMIN())) + if (($_POST['addy'] != "!") && ($_CONFIG['check_double_email'] == 'Y') && (!IS_ADMIN())) { // Does the email address already exists in our database? $CHK = SEARCH_EMAIL_USERTAB($_POST['addy']); @@ -149,7 +149,7 @@ if (isset($_POST['ok'])) } // Check his IP number - $to = bigintval(time() - $CONFIG['ip_timeout']); + $to = bigintval(time() - $_CONFIG['ip_timeout']); $result = SQL_QUERY_ESC("SELECT joined, last_update FROM "._MYSQL_PREFIX."_user_data WHERE REMOTE_ADDR='%s' AND (joined > %s OR last_update > %s) LIMIT 1", array(getenv('REMOTE_ADDR'), $to, $to), __FILE__, __LINE__); if ((SQL_NUMROWS($result) == 1) && (!IS_ADMIN())) @@ -166,8 +166,8 @@ if (isset($_POST['ok'])) if (SQL_NUMROWS($result) == 0) { // Not found so we set your refid! - $_POST['refid'] = $CONFIG['def_refid']; - @setcookie("refid", $CONFIG['def_refid'], (time() + $CONFIG['online_timeout']), COOKIE_PATH); + $_POST['refid'] = $_CONFIG['def_refid']; + @setcookie("refid", $_CONFIG['def_refid'], (time() + $_CONFIG['online_timeout']), COOKIE_PATH); } // Free memory @@ -198,7 +198,7 @@ if ((isset($_POST['ok'])) && (!$FAILED)) if (GET_EXT_VERSION("beg") >= "0.1.7") { // Okay, shall I disable now? - if ($CONFIG['beg_new_mem_notify'] == 'N') + if ($_CONFIG['beg_new_mem_notify'] == 'N') { $ADD1 .= ", beg_ral_notify, beg_ral_en_notify"; $ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()"; @@ -209,7 +209,7 @@ if ((isset($_POST['ok'])) && (!$FAILED)) if (GET_EXT_VERSION("bonus") >= "0.7.7") { // Okay, shall I disable now? - if ($CONFIG['bonus_new_mem_notify'] == 'N') + if ($_CONFIG['bonus_new_mem_notify'] == 'N') { $ADD1 .= ", bonus_ral_notify, bonus_ral_en_notify"; $ADD2 .= ", UNIX_TIMESTAMP(), UNIX_TIMESTAMP()"; @@ -272,14 +272,14 @@ array( { // Add only when the line was not found (maybe some more secure?) $locked = "points"; - if ($CONFIG['ref_payout'] > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails! + if ($_CONFIG['ref_payout'] > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails! $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, ".$locked.") VALUES(%d, 0, '%s')", - array(bigintval($userid), $CONFIG['points_register']), __FILE__, __LINE__); + array(bigintval($userid), $_CONFIG['points_register']), __FILE__, __LINE__); // Update mediadata as well if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($locked == "points")) { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $CONFIG['points_register']); + MEDIA_UPDATE_ENTRY(array("total_points"), "add", $_CONFIG['points_register']); } } @@ -393,15 +393,15 @@ array( } if ($SHORT_PASS) { - OUTPUT_HTML("".SHORT_PASS.": ".$CONFIG['pass_len']."

    "); + OUTPUT_HTML("".SHORT_PASS.": ".$_CONFIG['pass_len']."

    "); } if ($IP_TIMEOUT) { OUTPUT_HTML("".REMOTE_ADDR_TIMEOUT."

    "); } - if ((!empty($cats)) && ($cats < $CONFIG['least_cats'])) + if ((!empty($cats)) && ($cats < $_CONFIG['least_cats'])) { - OUTPUT_HTML("".CATS_LEAST.": ".$CONFIG['least_cats']."

    "); + OUTPUT_HTML("".CATS_LEAST.": ".$_CONFIG['least_cats']."

    "); } // Generate birthday selection @@ -430,7 +430,7 @@ array( // Nope, disable it if (GET_EXT_VERSION("sql_patches") != "") { // Use default refid - $GLOBALS['refid'] = $CONFIG['def_refid']; + $GLOBALS['refid'] = $_CONFIG['def_refid']; } else { // Set zero $GLOBALS['refid'] = 0; @@ -438,7 +438,7 @@ array( } // Shall I display the refid or shall I make it editable? - if ($CONFIG['display_refid'] == 'Y') { + if ($_CONFIG['display_refid'] == 'Y') { // Load template to enter it define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid'])); } else { @@ -450,7 +450,7 @@ array( define('REGISTER_HEADER_CONTENT', LOAD_TEMPLATE("register_header", true)); // Please select at least x categories - define('LEAST_CATS_VALUE', $CONFIG['least_cats']); + define('LEAST_CATS_VALUE', $_CONFIG['least_cats']); // Other values define('__SURNAME', $_POST['surname']); define('__FAMILY', $_POST['family_name']); @@ -463,9 +463,9 @@ array( { // New variant, good! $OUT = ""; define('__COUNTRY_CONTENT', $OUT); } diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 7278e3bb97..3fa8d6f720 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -41,15 +41,15 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) ADD_DESCR("guest", basename(__FILE__)); // Derterminate which stats we want and set mode and title for the link below stats block -if (!isset($_GET['mode'])) $_GET['mode'] = strtolower($CONFIG['guest_stats']); +if (!isset($_GET['mode'])) $_GET['mode'] = strtolower($_CONFIG['guest_stats']); switch ($_GET['mode']) { - case "members": $CONFIG['guest_stats'] = "MEMBERS"; $lmode = "modules"; $ltitle = GUEST_STATS_MODULES; break; - case "modules": $CONFIG['guest_stats'] = "MODULES"; $lmode = "members"; $ltitle = GUEST_STATS_MEMBERS; break; + case "members": $_CONFIG['guest_stats'] = "MEMBERS"; $lmode = "modules"; $ltitle = GUEST_STATS_MODULES; break; + case "modules": $_CONFIG['guest_stats'] = "MODULES"; $lmode = "members"; $ltitle = GUEST_STATS_MEMBERS; break; } OPEN_TABLE("100%", "guest_content", "center", "top"); -switch ($CONFIG['guest_stats']) +switch ($_CONFIG['guest_stats']) { case "MEMBERS": // Statistics about your members // Members yesterday / today online diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index 9360b69548..996324f3fe 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -52,7 +52,7 @@ if (EXT_IS_ACTIVE("nickname")) $ADD = "nickname"; $result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", total_logins, last_online FROM "._MYSQL_PREFIX."_user_data WHERE total_logins>0 AND status='CONFIRMED' ORDER BY total_logins DESC LIMIT %s", - array($CONFIG['top10_max']), __FILE__, __LINE__); + array($_CONFIG['top10_max']), __FILE__, __LINE__); $OUT = ""; $SW = 2; $cnt = 1; while(list($uid, $nick, $logins, $last) = SQL_FETCHROW($result)) @@ -77,10 +77,10 @@ while(list($uid, $nick, $logins, $last) = SQL_FETCHROW($result)) // Switch colors and count one up $SW = 3 - $SW; $cnt++; } -if ($cnt < $CONFIG['top10_max']) +if ($cnt < $_CONFIG['top10_max']) { // Add more "blank" rows - for ($i = $cnt; $i <= $CONFIG['top10_max']; $i++) + for ($i = $cnt; $i <= $_CONFIG['top10_max']; $i++) { // Prepare data for template $content = array( @@ -104,7 +104,7 @@ WHERE p.points > 0 AND d.status='CONFIRMED' GROUP BY p.userid ORDER BY tpoints DESC, d.last_online DESC LIMIT %s", - array($CONFIG['top10_max']), __FILE__, __LINE__); + array($_CONFIG['top10_max']), __FILE__, __LINE__); $OUT = ""; $SW = 2; $cnt = 1; while(list($uid, $nick, $points, $last) = SQL_FETCHROW($result)) @@ -128,10 +128,10 @@ while(list($uid, $nick, $points, $last) = SQL_FETCHROW($result)) // Switch colors and count one up $SW = 3 - $SW; $cnt++; } -if ($cnt < $CONFIG['top10_max']) +if ($cnt < $_CONFIG['top10_max']) { // Add more "blank" rows - for ($i = $cnt; $i <= $CONFIG['top10_max']; $i++) + for ($i = $cnt; $i <= $_CONFIG['top10_max']; $i++) { // Prepare data for template $content = array( @@ -155,7 +155,7 @@ WHERE r.counter > 0 AND d.status='CONFIRMED' GROUP BY r.userid ORDER BY refs DESC, d.last_online DESC LIMIT %s", - array($CONFIG['top10_max']), __FILE__, __LINE__); + array($_CONFIG['top10_max']), __FILE__, __LINE__); $OUT = ""; $SW = 2; $cnt = 1; while(list($uid, $nick, $refs, $last) = SQL_FETCHROW($result)) @@ -180,10 +180,10 @@ while(list($uid, $nick, $refs, $last) = SQL_FETCHROW($result)) // Switch colors and count one up $SW = 3 - $SW; $cnt++; } -if ($cnt < $CONFIG['top10_max']) +if ($cnt < $_CONFIG['top10_max']) { // Add more "blank" rows - for ($i = $cnt; $i <= $CONFIG['top10_max']; $i++) + for ($i = $cnt; $i <= $_CONFIG['top10_max']; $i++) { // Prepare data for template $content = array( @@ -199,7 +199,7 @@ if ($cnt < $CONFIG['top10_max']) define('__TOP_REFERRAL_ROWS', $OUT); // Remember other values in constants -define('__TOP10_MAX', $CONFIG['top10_max']); +define('__TOP10_MAX', $_CONFIG['top10_max']); // Load final template LOAD_TEMPLATE("guest_top10"); diff --git a/inc/modules/index.php b/inc/modules/index.php index 24290647b8..30a8b1ce8e 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { require($INC); } elseif (!EXT_IS_ACTIVE("sql_patches", true)) { // The extension "sql_patches" *MUST* be activated or you have lot's of problems! - LOAD_URL(URL."/modules.php?module=admin"); + LOAD_URL("modules.php?module=admin"); } // Load adverstising template @@ -72,7 +72,7 @@ if (!empty($_GET['msg'])) { LOAD_TEMPLATE("guest_menu_td"); // When no what value is provided take the "home" value -if (empty($GLOBALS['what'])) $GLOBALS['what'] = $CONFIG['index_home']; +if (empty($GLOBALS['what'])) $GLOBALS['what'] = $_CONFIG['index_home']; // Adding the main content module here if (empty($GLOBALS['action'])) @@ -87,7 +87,7 @@ if (empty($GLOBALS['action'])) } // Add the guest's menu here... -if (($CONFIG['guest_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) +if (($_CONFIG['guest_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) { // Show only when guest menu is active ADD_MENU("guest", $act, $GLOBALS['what']); @@ -105,10 +105,10 @@ if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_A else { // Invalid module specified or not found... - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } -if (($CONFIG['guest_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) +if (($_CONFIG['guest_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) { // TDs between content and LOAD_TEMPLATE("guest_content_footer"); diff --git a/inc/modules/loader.php b/inc/modules/loader.php index a75bdbd597..96e1bc8a3a 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -52,13 +52,13 @@ if (!empty($_GET['url'])) else { // URL invalid - LOAD_URL(URL."/index.php"); + LOAD_URL("index.php"); } } else { // Invalid or no URL entered! - LOAD_URL(URL."/index.php"); + LOAD_URL("index.php"); } // ?> diff --git a/inc/modules/login.php b/inc/modules/login.php index 79bf0066ca..b692e3e2cf 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -92,7 +92,7 @@ if (empty($GLOBALS['action'])) } // Add the member's menu here... -if (($CONFIG['member_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) +if (($_CONFIG['member_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) { ADD_MENU("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']); } @@ -112,7 +112,7 @@ if ((file_exists($INC_ACTION)) && (is_readable($INC_ACTION)) && (VALIDATE_MENU_A LOAD_URL("modules.php?module=login"); } -if (($CONFIG['member_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) +if (($_CONFIG['member_menu'] == 'Y') || (!EXT_IS_ACTIVE("sql_patches", true))) { OUTPUT_HTML("
    diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index f302e6dae8..03de3d9d03 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index dc3fdf32dd..71f304155e 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index e84cc7836d..2feb671d59 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index 7b2df51b08..440503f750 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index a62393aa56..fa47565ce4 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 76ea1db568..171e581eb0 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index 6c4b85723e..a9fb0e72f8 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index 618e1fef4e..e556417d09 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ($BLOCK_MODE) { diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index 5304394aa1..c9cba3d7fa 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -39,13 +39,13 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Load all active designs (or all if admin) -$WHERE = ""; $OUT = ""; -if (!IS_ADMIN()) $WHERE = " WHERE theme_active='Y'"; -$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$WHERE, __FILE__, __LINE__); +$whereStatement = ""; $OUT = ""; +if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; +$result_themes = SQL_QUERY("SELECT theme_path FROM "._MYSQL_PREFIX."_themes".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index e57fa9d2cf..fda9652096 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index e57fa9d2cf..fda9652096 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index e57fa9d2cf..fda9652096 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index e57fa9d2cf..fda9652096 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index e57fa9d2cf..fda9652096 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 871de0c38e..98fb7e21c5 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { @@ -74,18 +74,18 @@ if (empty($uid)) { $uid = $GLOBALS['userid']; $nickname = false; } // Prepare constants define('__BEG_UID' , $uid); define('__BEG_CLICKS' , $clicks); -define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'])); -define('__BEG_POINTS_MAX', TRANSLATE_COMMA($CONFIG['beg_points_max'])); +define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points'])); +define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['beg_points_max'])); if (function_exists('CREATE_FANCY_TIME')) { - define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($CONFIG['beg_timeout'])); - define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($CONFIG['beg_uid_timeout'])); + define('__BEG_TIMEOUT' , CREATE_FANCY_TIME($_CONFIG['beg_timeout'])); + define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME($_CONFIG['beg_uid_timeout'])); } else { - define('__BEG_TIMEOUT ' , round($CONFIG['beg_timeout'] / 60)." ".MINUTES); - define('__BEG_UID_TIMEOUT', round($CONFIG['beg_uid_timeout'] / 60)." ".MINUTES); + define('__BEG_TIMEOUT ' , round($_CONFIG['beg_timeout'] / 60)." ".MINUTES); + define('__BEG_UID_TIMEOUT', round($_CONFIG['beg_uid_timeout'] / 60)." ".MINUTES); } // Load template diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 67bbd992eb..07534dab6e 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php[5~?module=index"); + LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { @@ -57,14 +57,14 @@ if (EXT_IS_ACTIVE("autopurge")) { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= %s"; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } // Let's check if there are some points left we can "pay"... $result = SQL_QUERY_ESC("SELECT userid, beg_points AS beg, last_online FROM "._MYSQL_PREFIX."_user_data WHERE beg_points > 0 AND status='CONFIRMED'".$LAST." ORDER BY beg_points DESC, last_online DESC, userid LIMIT %s", - array($ONLINE, $CONFIG['beg_ranks']), __FILE__, __LINE__); + array($ONLINE, $_CONFIG['beg_ranks']), __FILE__, __LINE__); // Reset temporary variable and check for users $OUT = ""; diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index d6acff68c9..48fbd70980 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php[5~?module=index"); + LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) { @@ -55,11 +55,11 @@ if (GET_EXT_VERSION("bonus") >= "0.6.9") { // Add more bonus points here $USE = "(0"; - if ($CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; - if ($CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; - if ($CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; - if ($CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; - if ($CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; + if ($_CONFIG['bonus_click_yn'] == 'Y') $USE .= " + turbo_bonus"; + if ($_CONFIG['bonus_login_yn'] == 'Y') $USE .= " + login_bonus"; + if ($_CONFIG['bonus_order_yn'] == 'Y') $USE .= " + bonus_order"; + if ($_CONFIG['bonus_stats_yn'] == 'Y') $USE .= " + bonus_stats"; + if ($_CONFIG['bonus_ref_yn'] == 'Y') $USE .= " + bonus_ref"; $USE .= ")"; } else @@ -74,14 +74,14 @@ if (EXT_IS_ACTIVE("autopurge")) { // Use last online timestamp to keep inactive members away from here $LAST = " AND last_online >= %s"; - $ONLINE = bigintval(time() - $CONFIG['ap_in_since']); + $ONLINE = bigintval(time() - $_CONFIG['ap_in_since']); } // Let's check if there are some points left we can "pay"... $result = SQL_QUERY_ESC("SELECT userid, ".$USE." AS active_bonus, last_online FROM "._MYSQL_PREFIX."_user_data WHERE ".$USE." > 0 AND status='CONFIRMED'".$LAST." ORDER BY active_bonus DESC, last_online DESC, userid LIMIT %s", - array($ONLINE, $CONFIG['bonus_ranks']), __FILE__, __LINE__); + array($ONLINE, $_CONFIG['bonus_ranks']), __FILE__, __LINE__); // Reset temporary variable and check for users $OUT = ""; diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 659673b732..622735c3ee 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -39,17 +39,17 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } 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) @@ -62,7 +62,7 @@ if ($cats > 0) { if ($joined == 'N') $cnt++; } - if (($cats - $cnt) < $CONFIG['least_cats']) + if (($cats - $cnt) < $_CONFIG['least_cats']) { unset($_POST['ok']); $LEAST = true; @@ -108,7 +108,7 @@ if ($cats > 0) 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)); diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index b665764ef2..62f3359a79 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php[5~?module=index"); + LOAD_URL("modules.php[5~?module=index"); } elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { @@ -51,11 +51,11 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) ADD_DESCR("member", basename(__FILE__)); // Percent values etc. -define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['doubler_charge'] * 100)); -define('__REF_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_ref'] * 100)); -define('__TOTAL_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_points'])); -define('__MIN_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_min'])); -define('__MAX_VALUE' , TRANSLATE_COMMA($CONFIG['doubler_max'])); +define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['doubler_charge'] * 100)); +define('__REF_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_ref'] * 100)); +define('__TOTAL_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_points'])); +define('__MIN_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_min'])); +define('__MAX_VALUE' , TRANSLATE_COMMA($_CONFIG['doubler_max'])); // Transfer referral ID if (EXT_IS_ACTIVE("nickname")) @@ -81,10 +81,10 @@ if (EXT_IS_ACTIVE("nickname")) } // Usage counter -define('__DOUBLER_COUNTER', $CONFIG['doubler_counter']); +define('__DOUBLER_COUNTER', $_CONFIG['doubler_counter']); // Which mail-send-mode did the admin setup? -switch ($CONFIG['doubler_send_mode']) +switch ($_CONFIG['doubler_send_mode']) { case "DIRECT": define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT); @@ -105,7 +105,7 @@ define('__DOUBLER_PAYOUT_NEXT', DOUBLER_GENERATE_TABLE($GLOBALS['userid'])); define('__DOUBLER_PAYOUT_REF', DOUBLER_GENERATE_TABLE($GLOBALS['userid'], 'N', 'Y', "DESC")); // Generate timemark -define('__TIMEOUT_MARK', CREATE_FANCY_TIME($CONFIG['doubler_timeout'])); +define('__TIMEOUT_MARK', CREATE_FANCY_TIME($_CONFIG['doubler_timeout'])); // Points left to double define('__LEFT_VALUE', DOUBLER_GET_TOTAL_POINTS_LEFT()); diff --git a/inc/modules/member/what-guest.php b/inc/modules/member/what-guest.php index d6f565ef92..dd688be9bf 100644 --- a/inc/modules/member/what-guest.php +++ b/inc/modules/member/what-guest.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 6b58f029af..46d0028d3f 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) { @@ -66,13 +66,13 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) if (empty($stamp1)) $stamp1 = 0; if (empty($stamp2)) $stamp2 = 0; - if ((($stamp1 + $CONFIG['holiday_lock']) > time()) || (($stamp2 + $CONFIG['holiday_lock']) > time())) + if ((($stamp1 + $_CONFIG['holiday_lock']) > time()) || (($stamp2 + $_CONFIG['holiday_lock']) > time())) { // Mail order is to close away! unset($_POST['ok']); unset($_POST['stop']); - if (($stamp1 + $CONFIG['holiday_lock']) > time()) + if (($stamp1 + $_CONFIG['holiday_lock']) > time()) { // Mail found in pool $stamp = $stamp1; @@ -101,7 +101,7 @@ if (isset($_POST['ok'])) // Test both values $TEST = $END - $START; - if (($TEST < 0) || ($TEST > (ONE_DAY * $CONFIG['holiday_max'])) || ($START < time()) || ($END < time())) + if (($TEST < 0) || ($TEST > (ONE_DAY * $_CONFIG['holiday_max'])) || ($START < time()) || ($END < time())) { // Time test failed unset($_POST['ok']); @@ -159,7 +159,7 @@ WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); list($active, $locked) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if (($active == 'Y') && (($locked + $CONFIG['holiday_lock']) < time())) + if (($active == 'Y') && (($locked + $_CONFIG['holiday_lock']) < time())) { // Load data $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM "._MYSQL_PREFIX."_user_holidays @@ -220,7 +220,7 @@ WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); SQL_FREERESULT($result); // Check for lock - if (($locked + $CONFIG['holiday_lock']) < time()) + if (($locked + $_CONFIG['holiday_lock']) < time()) { // User can deactivate his holiday request switch ($active) @@ -252,7 +252,7 @@ WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET holiday_active='N' WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); - LOAD_URL(URL."/modules.php?module=login&what=holiday"); + LOAD_URL("modules.php?module=login&what=holiday"); return; } break; @@ -264,9 +264,9 @@ WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); define('_START_YEAR' , ADD_SELECTION("year" , date('Y', (time() + ONE_DAY)), "start")); // Calcualte ending date - $D = date("d", time() + ONE_DAY + (ONE_DAY * $CONFIG['holiday_max'])); - $M = date("m", time() + ONE_DAY + (ONE_DAY * $CONFIG['holiday_max'])); - $Y = date('Y', time() + ONE_DAY + (ONE_DAY * $CONFIG['holiday_max'])); + $D = date("d", time() + ONE_DAY + (ONE_DAY * $_CONFIG['holiday_max'])); + $M = date("m", time() + ONE_DAY + (ONE_DAY * $_CONFIG['holiday_max'])); + $Y = date('Y', time() + ONE_DAY + (ONE_DAY * $_CONFIG['holiday_max'])); // Ending day define('_END_DAY' , ADD_SELECTION("day" , $D, "end")); @@ -274,7 +274,7 @@ WHERE userid=%d LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); define('_END_YEAR' , ADD_SELECTION("year" , $Y, "end")); // Copy value from configuration - define('__HOLIDAY_MAX', $CONFIG['holiday_max']); + define('__HOLIDAY_MAX', $_CONFIG['holiday_max']); // Output form LOAD_TEMPLATE("member_holiday_form"); diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 57a4cb8359..9aecde027e 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index de2afdfe2b..26c468efc4 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Base URL for redirection (both cases) diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 1c51e6e49a..70f63e3478 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) { @@ -82,10 +82,10 @@ case "show": // Show his data $DATA[13] = MAKE_DATETIME($DATA[13], "0"); // How far is last change on his profile away from now? - if ((($DATA[13] + $CONFIG['profile_lock']) > time()) && (!IS_ADMIN()) && ($CONFIG['profile_lock'] > 0)) + if ((($DATA[13] + $_CONFIG['profile_lock']) > time()) && (!IS_ADMIN()) && ($_CONFIG['profile_lock'] > 0)) { // You cannot change your account - define('CHANGE', "".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + $CONFIG['profile_lock'], "0").MEMBER_PROFILE_LOCKED_2.""); + define('CHANGE', "".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + $_CONFIG['profile_lock'], "0").MEMBER_PROFILE_LOCKED_2.""); } else { @@ -128,12 +128,12 @@ FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", $DATA = SQL_FETCHROW($result); SQL_FREERESULT($result); - $DATA[13] = $DATA[12] + $CONFIG['profile_lock']; + $DATA[13] = $DATA[12] + $_CONFIG['profile_lock']; // How far is last change on his profile away from now? - if (($DATA[13] > time()) && (!IS_ADMIN()) && ($CONFIG['profile_lock'] > 0)) + if (($DATA[13] > time()) && (!IS_ADMIN()) && ($_CONFIG['profile_lock'] > 0)) { - $DATA[13] = MAKE_DATETIME($DATA[13] + $CONFIG['profile_lock'], "0"); + $DATA[13] = MAKE_DATETIME($DATA[13] + $_CONFIG['profile_lock'], "0"); // You cannot change your account LOAD_TEMPLATE("member_mydata_locked"); } @@ -184,9 +184,9 @@ FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", { // Generate selection box $OUT = ""; define('__COUNTRY_CONTENT', $OUT); } @@ -207,12 +207,12 @@ case "save": // Save entered data array(UID_VALUE), __FILE__, __LINE__); $DATA = SQL_FETCHROW($result); SQL_FREERESULT($result); - $DATA[3] = $DATA[2] + $CONFIG['profile_lock']; + $DATA[3] = $DATA[2] + $_CONFIG['profile_lock']; // How far is last change on his profile away from now? - if (($DATA[3] > time()) && (!IS_ADMIN()) && ($CONFIG['profile_lock'] > 0)) + if (($DATA[3] > time()) && (!IS_ADMIN()) && ($_CONFIG['profile_lock'] > 0)) { - $DATA[3] = MAKE_DATETIME($DATA[3] + $CONFIG['profile_lock'], "0"); + $DATA[3] = MAKE_DATETIME($DATA[3] + $_CONFIG['profile_lock'], "0"); // You cannot change your account LOAD_TEMPLATE("member_mydata_locked"); } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index de1bcdb994..20f9efed24 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) { @@ -57,7 +57,7 @@ list($status, $until, $span) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Remember charge value -define('__CHARGE_VALUE', TRANSLATE_COMMA($CONFIG['nl_charge'])); +define('__CHARGE_VALUE', TRANSLATE_COMMA($_CONFIG['nl_charge'])); if ((isset($_POST['ok'])) && ($status == 'Y') && ($span == "0")) { diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index b817a4bdf4..5459df4780 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index c1ccf0f0db..752a316304 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { @@ -51,14 +51,14 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) ADD_DESCR("member", basename(__FILE__)); $URL = ""; $id = 0; -$WHERE = " WHERE visible='Y'"; +$whereStatement = " WHERE visible='Y'"; // Set undefined array elements if (empty($_GET['msg'])) $_GET['msg'] = ""; if (empty($_POST['zip'])) $_POST['zip'] = ""; if (empty($_POST['html'])) $_POST['html'] = ""; if (empty($_POST['receiver'])) $_POST['receiver'] = ""; -if (is_admin()) $WHERE = ""; +if (is_admin()) $whereStatement = ""; // Add slashes to every value foreach($_POST as $key=>$value) @@ -68,7 +68,7 @@ foreach($_POST as $key=>$value) } // Minimum mails / order -define('__MIN_VALUE', $CONFIG['order_min']); +define('__MIN_VALUE', $_CONFIG['order_min']); // Count unconfirmed mails $result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE userid=%d", @@ -95,7 +95,7 @@ SQL_FREERESULT($result_mmails); if ($HOLIDAY == $DMY) $HOLIDAY='N'; $ALLOWED = $MAXI - $ORDERS; -if ($CONFIG['order_max'] == "MAX") $ALLOWED = $MAXI; +if ($_CONFIG['order_max'] == "MAX") $ALLOWED = $MAXI; // Check HTML extension $HTML_EXT = EXT_IS_ACTIVE("html_mail"); @@ -135,7 +135,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) // // First we would like to store the data and get it's pool position back... $result = SQL_QUERY_ESC("SELECT id, data_type FROM "._MYSQL_PREFIX."_pool WHERE sender=%d AND url='%s' AND timestamp > %d LIMIT 1", - array($GLOBALS['userid'], $_POST['url'], bigintval(time() - $CONFIG['url_tlock'])), __FILE__, __LINE__); + array($GLOBALS['userid'], $_POST['url'], bigintval(time() - $_CONFIG['url_tlock'])), __FILE__, __LINE__); $type = "TEMP"; $id = "0"; if (SQL_NUMROWS($result) == 1) @@ -148,7 +148,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) // No entry found, so we need to check out the stats table as well... :) // We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters $URL = ""; - if ($CONFIG['test_text'] == 'Y') + if ($_CONFIG['test_text'] == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) if ((strpos(strtolower($_POST['text']), "https://") > -1) || (strpos(strtolower($_POST['text']), "http://") > -1) || (strpos(strtolower($_POST['text']), "www") > -1)) @@ -157,14 +157,14 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) $URL = URL."/modules.php?module=login&what=order&msg=".CODE_URL_FOUND; } $TEST = str_replace("\n", "", str_replace("\r", "", addslashes($_POST['text']))); - if (strlen($TEST) > $CONFIG['max_tlength']) + if (strlen($TEST) > $_CONFIG['max_tlength']) { // Text is too long! $URL = URL."/modules.php?module=login&what=order&msg=".CODE_OVERLENGTH; } } // Shall I test the subject line against URLs? - if ($CONFIG['test_subj'] == 'Y') + if ($_CONFIG['test_subj'] == 'Y') { // Check the subject line for issues $_POST['subject'] = str_replace("\\", "[nl]", substr($_POST['subject'], 0, 200)); @@ -175,7 +175,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) } } // And shall I check that his URL is not in the black list? - if ($CONFIG['url_blacklist'] == 'Y') + if ($_CONFIG['url_blacklist'] == 'Y') { // Ok, I do that for you know... $result = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1", @@ -189,7 +189,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) $URL = URL."/modules.php?module=login&what=order&msg=".CODE_BLIST_URL."&blist=".$blist; } } - if (($_POST['receiver'] < $CONFIG['order_min']) && (!IS_ADMIN())) + if (($_POST['receiver'] < $_CONFIG['order_min']) && (!IS_ADMIN())) { // Less than allowed receivers entered! $URL = URL."/modules.php?module=login&what=order&msg=".CODE_MORE_RECEIVERS3; @@ -229,7 +229,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3")) { // Check if category and number of receivers is okay $ADD = ""; - if (($CONFIG['order_multi_page'] == 'Y') && (!empty($_POST['zip']))) $ADD = "AND d.zip LIKE '".bigintval($_POST['zip'])."{PER}'"; + if (($_CONFIG['order_multi_page'] == 'Y') && (!empty($_POST['zip']))) $ADD = "AND d.zip LIKE '".bigintval($_POST['zip'])."{PER}'"; // Check for userids $result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM "._MYSQL_PREFIX."_user_cats AS c @@ -241,8 +241,8 @@ ORDER BY d.%s %s", array( bigintval($_POST['cat']), $GLOBALS['userid'], - $CONFIG['order_select'], - $CONFIG['order_mode'], + $_CONFIG['order_select'], + $_CONFIG['order_mode'], ), __FILE__, __LINE__); // Do we enougth receivers left? @@ -446,15 +446,15 @@ array( // Not enougth receivers selected $URL = URL."/modules.php?module=login&what=order&msg=".CODE_MORE_RECEIVERS1; } - elseif (($ALLOWED == 0) && ($CONFIG['order_max'] == "ORDER")) + elseif (($ALLOWED == 0) && ($_CONFIG['order_max'] == "ORDER")) { // No more mail orders allowed LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_ORDER_ALLOWED_EXHAUSTED); } - elseif (($links < $CONFIG['unconfirmed']) && ($mmails == "1")) + elseif (($links < $_CONFIG['unconfirmed']) && ($mmails == "1")) { // Display order form - $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$WHERE." ORDER BY sort", __FILE__, __LINE__); + $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__); if (SQL_NUMROWS($result_cats) > 0) { if ($TOTAL > 0) @@ -515,7 +515,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $result_ver = SQL_QUERY_ESC("SELECT zip FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d".$HTML." AND receive_mails > 0 AND status='CONFIRMED' LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && ($CONFIG['order_multi_page'] == 'Y')) + if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && ($_CONFIG['order_multi_page'] == 'Y')) { list($zip) = SQL_FETCHROW($result_ver); SQL_FREERESULT($result_ver); @@ -563,13 +563,13 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); SQL_FREERESULT($result); // Calculate hours... - $STD = round($CONFIG['url_tlock'] / 60 / 60); + $STD = round($_CONFIG['url_tlock'] / 60 / 60); // Minutes... - $MIN = round(($CONFIG['url_tlock'] - $STD * 60 * 60) / 60); + $MIN = round(($_CONFIG['url_tlock'] - $STD * 60 * 60) / 60); // And seconds - $SEC = $CONFIG['url_tlock'] - $STD * 60 * 60 - $MIN * 60; + $SEC = $_CONFIG['url_tlock'] - $STD * 60 * 60 - $MIN * 60; // Finally contruct the message $MSG = MEMBER_URL_TIME_LOCK."
    ".CONFIG_URL_TLOCK." ".$STD." ". @@ -615,7 +615,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); break; case CODE_MORE_RECEIVERS3: - $MSG = MEMBER_ENTER_MORE_MIN_RECEIVERS_1.$CONFIG['order_min'].MEMBER_ENTER_MORE_MIN_RECEIVERS_2; + $MSG = MEMBER_ENTER_MORE_MIN_RECEIVERS_1.$_CONFIG['order_min'].MEMBER_ENTER_MORE_MIN_RECEIVERS_2; break; case CODE_INVALID_URL: @@ -648,7 +648,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $TOTAL = TRANSLATE_COMMA($TOTAL); // Check how many mail orders he has placed today and how many he's allowed to send - switch ($CONFIG['order_max']) + switch ($_CONFIG['order_max']) { case "MAX": // He is allowed to send as much as possible define('ORDER_MAX_VALUE', ORDER_ALLOED_MAX); @@ -688,7 +688,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); } // 01 2 21 12 2 23 443 3 3210 - if ((!empty($_POST['data'])) || (($CONFIG['order_multi_page'] == 'N') && ((!IS_ADMIN()) && (!$HTML_EXT)))) + if ((!empty($_POST['data'])) || (($_CONFIG['order_multi_page'] == 'N') && ((!IS_ADMIN()) && (!$HTML_EXT)))) { // Pre-output categories $CAT = ""; @@ -751,7 +751,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); if ($HTML_EXT) { // Add some content when html extension is active - if (($CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) $ADD = " \n"; + if (($_CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) $ADD = " \n"; define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_intro", true)); } else @@ -760,7 +760,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); define('MEMBER_HTML_EXTENSION', ""); } // Do we want ZIP code or not? - if (($CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) + if (($_CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) { // Yes $content = array( @@ -805,7 +805,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); else { // Please confirm some mails first! - LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_LINKS_LEFT_1.$links.MEMBER_LINKS_LEFT_2.$CONFIG['unconfirmed'].MEMBER_LINKS_LEFT_3); + LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_LINKS_LEFT_1.$links.MEMBER_LINKS_LEFT_2.$_CONFIG['unconfirmed'].MEMBER_LINKS_LEFT_3); } if (!empty($URL)) diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index d85b830aca..c7eb1fbaf6 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -38,7 +38,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { require($INC); } elseif (!IS_LOGGED_IN()) { // Not logged in - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) { // Extension "payout" is not active ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "payout"); @@ -57,9 +57,9 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); if (SQL_NUMROWS($result_points) == 1) { - list($POINTS) = SQL_FETCHROW($result_points); + list($points) = SQL_FETCHROW($result_points); SQL_FREERESULT($result_points); - $TPTS += $POINTS; + $TPTS += $points; } } diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 141344d8e1..bebd685edf 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point @@ -70,14 +70,14 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) $result_points = SQL_QUERY_ESC("SELECT points, locked_points FROM "._MYSQL_PREFIX."_user_points WHERE userid=%d AND ref_depth=%d LIMIT 1", array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__); if (SQL_NUMROWS($result_points) == 1) { - list($POINTS, $LOCKED) = SQL_FETCHROW($result_points); + list($points, $LOCKED) = SQL_FETCHROW($result_points); SQL_FREERESULT($result_points); // Also count locked points - $TPTS += $POINTS; $TLOCK += $LOCKED; + $TPTS += $points; $TLOCK += $LOCKED; } else { - $POINTS = "0.00000"; $LOCKED = "0.00000"; + $points = "0.00000"; $LOCKED = "0.00000"; } // Load referral counts @@ -97,7 +97,7 @@ while (list($lvl, $per) = SQL_FETCHROW($result_depths)) $content = array( 'lvl' => $lvl, 'per' => $per, - 'points' => TRANSLATE_COMMA($POINTS), + 'points' => TRANSLATE_COMMA($points), 'refs' => $REFS, ); @@ -151,10 +151,10 @@ define('__TREF_VALUE' , $TREF); define('__TLOCK_VALUE', TRANSLATE_COMMA($TLOCK)); // Fixes a bug when there is no bonus extension installed -if (GET_EXT_VERSION("bonus") < "0.4.4") $CONFIG['bonus_active'] = "X"; +if (GET_EXT_VERSION("bonus") < "0.4.4") $_CONFIG['bonus_active'] = "X"; // Display login bonus and turbo-click bonus -if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && ($CONFIG['bonus_active'] == 'Y')) +if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && ($_CONFIG['bonus_active'] == 'Y')) { $ADD = ", 0, 0, 0"; if (GET_EXT_VERSION("bonus") >= "0.4.4") $ADD = ", bonus_ref, bonus_order, bonus_stats"; @@ -185,7 +185,7 @@ if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && ($CONFI // Output rows define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_rows", true)); } - elseif ($CONFIG['bonus_active'] == 'N') + elseif ($_CONFIG['bonus_active'] == 'N') { // Bonus active rallye deactivated define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_disabled", true)); diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 6a95c086fe..6185904b43 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index d79060ef56..4cc8f5a57e 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point @@ -80,8 +80,8 @@ if (EXT_IS_ACTIVE("nickname")) // Clicks on your reflink OUTPUT_HTML(YOUR_REFCLICKS.": ".$c." ".CLICKS."

    "); -$WHERE = " WHERE visible='Y'"; -if (IS_ADMIN()) $WHERE = ""; +$whereStatement = " WHERE visible='Y'"; +if (IS_ADMIN()) $whereStatement = ""; $result = SQL_QUERY("SELECT id, url, alternate, counter, clicks FROM "._MYSQL_PREFIX."_refbanner", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) diff --git a/inc/modules/member/what-stats.php b/inc/modules/member/what-stats.php index f71f622608..5ffeb58d6d 100644 --- a/inc/modules/member/what-stats.php +++ b/inc/modules/member/what-stats.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 5a6dd3f375..6a723d1ed8 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index fe74c42d26..7404646cd7 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 5274b2b08d..ced8ed41a7 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) { @@ -80,15 +80,15 @@ case "new": // Start new transfer SQL_FREERESULT($result); // Remember maximum value for template - define('__TRANSFER_MAX_VALUE', round($total - $used - $CONFIG['transfer_balance'] - 0.5)); + define('__TRANSFER_MAX_VALUE', round($total - $used - $_CONFIG['transfer_balance'] - 0.5)); if (isset($_POST['ok'])) { // Add new transfer - if ($CONFIG['transfer_code'] > 0) + if ($_CONFIG['transfer_code'] > 0) { // Check for code - $code = GEN_RANDOM_CODE($CONFIG['transfer_code'], $_POST['code_chk'], $GLOBALS['userid'], __TRANSFER_MAX_VALUE); + $code = GEN_RANDOM_CODE($_CONFIG['transfer_code'], $_POST['code_chk'], $GLOBALS['userid'], __TRANSFER_MAX_VALUE); $valid_code = ($code == $_POST['code']); } else @@ -187,11 +187,11 @@ case "new": // Start new transfer define('__TRANSFER_REASON', $_POST['reason']); if (function_exists('CREATE_FANCY_TIME')) { - define('__TRANSFER_EXPIRES', CREATE_FANCY_TIME($CONFIG['transfer_age'])); + define('__TRANSFER_EXPIRES', CREATE_FANCY_TIME($_CONFIG['transfer_age'])); } else { - define('__TRANSFER_EXPIRES', round($CONFIG['transfer_age']/60/60/24)." ".DAYS); + define('__TRANSFER_EXPIRES', round($_CONFIG['transfer_age']/60/60/24)." ".DAYS); } // Generate tranafer id @@ -328,10 +328,10 @@ case "new": // Start new transfer define('__TRANSFER_USERID_SELECTION', $OUT); // Generate Code - if ($CONFIG['transfer_code'] > 0) + if ($_CONFIG['transfer_code'] > 0) { $rand = rand(0, 99999); - $code = GEN_RANDOM_CODE($CONFIG['transfer_code'], $rand, $GLOBALS['userid'], __TRANSFER_MAX_VALUE); + $code = GEN_RANDOM_CODE($_CONFIG['transfer_code'], $rand, $GLOBALS['userid'], __TRANSFER_MAX_VALUE); $img = GENERATE_IMAGE($code, false); define('__TRANSFER_IMAGE_INPUT', " ".$img); } @@ -363,14 +363,14 @@ case "list_out": // List only outgoing transactions switch ($MODE) { case "list_in": - $SQL = "SELECT trans_id, from_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%d ORDER BY time_trans DESC LIMIT ".$CONFIG['transfer_max']; + $SQL = "SELECT trans_id, from_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%d ORDER BY time_trans DESC LIMIT ".$_CONFIG['transfer_max']; $NOTHING = TRANSFER_NO_INCOMING_TRANSFERS; define('__TRANSFER_SUM', TRANSFER_TOTAL_INCOMING); define('__TRANSFER_TITLE', TRANSFER_LIST_INCOMING); break; case "list_out": - $SQL = "SELECT trans_id, to_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%d ORDER BY time_trans DESC LIMIT ".$CONFIG['transfer_max']; + $SQL = "SELECT trans_id, to_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%d ORDER BY time_trans DESC LIMIT ".$_CONFIG['transfer_max']; $NOTHING = TRANSFER_NO_OUTGOING_TRANSFERS; define('__TRANSFER_SUM', TRANSFER_TOTAL_OUTGOING); define('__TRANSFER_TITLE', TRANSFER_LIST_OUTGOING); @@ -448,7 +448,7 @@ KEY(party_uid) // Let's begin with the incoming list $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_in WHERE userid=%d ORDER BY id LIMIT %s", -array($GLOBALS['userid'], $CONFIG['transfer_max']), __FILE__, __LINE__); +array($GLOBALS['userid'], $_CONFIG['transfer_max']), __FILE__, __LINE__); while ($DATA = SQL_FETCHROW($result)) { $DATA[] = "IN"; @@ -461,7 +461,7 @@ array($GLOBALS['userid'], $CONFIG['transfer_max']), __FILE__, __LINE__); // As the last table transfer data from outgoing table to temporary $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE userid=%d ORDER BY id LIMIT %s", -array($GLOBALS['userid'], $CONFIG['transfer_max']), __FILE__, __LINE__); +array($GLOBALS['userid'], $_CONFIG['transfer_max']), __FILE__, __LINE__); while ($DATA = SQL_FETCHROW($result)) { $DATA[] = "OUT"; @@ -606,7 +606,7 @@ case "": // Overview page } // Check for latest out-transfers - $result = SQL_QUERY_ESC("SELECT time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans > ".(time() - $CONFIG['transfer_timeout'])." AND userid=%d ORDER BY time_trans DESC LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT time_trans FROM "._MYSQL_PREFIX."_user_transfers_out WHERE time_trans > ".(time() - $_CONFIG['transfer_timeout'])." AND userid=%d ORDER BY time_trans DESC LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Load template diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index 4f97b689c8..0e53bcb920 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-welcome.php b/inc/modules/member/what-welcome.php index 50250d2b7a..a008e48709 100644 --- a/inc/modules/member/what-welcome.php +++ b/inc/modules/member/what-welcome.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } elseif (!IS_LOGGED_IN()) { - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Add description as navigation point diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 02be8e2703..c2a1d8bcae 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { require($INC); } elseif (!IS_LOGGED_IN()) { // User is not logged in - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { // Extension "wernis" is not activated ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); @@ -47,11 +47,276 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // Add description as navigation point ADD_DESCR("member", basename(__FILE__)); +// Check if the admin has entered the data +if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) { + // Something important is missing... + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_API_DATA_MISSING); + return; +} + +// Init the content array and points +$content = array(); $points = false; + // Is the mode set (withdraw or payout) -if (!isset($_GET['mode'])) { +if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) { // Let the user choose what he wants to do - LOAD_TEMPLATE("member_wernis_mode_choose"); + $content['refid'] = bigintval($_CONFIG['wernis_refid']); + + // Get WDS66 id + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array($GLOBALS['userid']), __FILE__, __LINE__); + + // Are there some entries? + if (SQL_NUMROWS($result) == 1) { + // Fetch ID + list($content['wds66_id']) = SQL_FETCHROW($result); + } + + // Free result + SQL_FREERESULT($result); + + // Is there an ID? + if ((!empty($content['wds66_id'])) && (!isset($_GET['mode']))) { + // Then use an other "mode" + $_GET['mode'] = "list"; + + // And load all rows! + $result = SQL_QUERY_ESC("SELECT `id`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type` FROM "._MYSQL_PREFIX."_user_wernis WHERE `userid` = %d ORDER BY `wernis_timestamp` DESC", + array($GLOBALS['userid']), __FILE__, __LINE__); + + // Load all rows + $content['rows'] = ""; $SW = 2; + while ($data = SQL_FETCHARRAY($result)) { + // Prepare data for output + $rowContent = array( + 'stamp' => MAKE_DATETIME($data['wernis_timestamp'], "2"), + 'points' => TRANSLATE_COMMA($data['wernis_amount']), + 'acc' => bigintval($data['wernis_account']), + 'status' => WERNIS_TRANSFER_STATUS($data['wernis_type']), + 'sw' => $SW, + ); + + // Load row template + $content['rows'] .= LOAD_TEMPLATE("member_wernis_mode_list_row", true, $rowContent); + $SW = 3 - $SW; + } + + // Free result + SQL_FREERESULT($result); + } else { + // Mode chooser! ;-) + $_GET['mode'] = "choose"; + } +} elseif ($_GET['mode'] == "pay") { + // Get total points and check if the user can request a payout + $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points"); + + // No dots here... + $points = explode(".", $points); + $points = bigintval($points[0]); + + // Is this enougth for a payout? + if ($points < $_CONFIG['wernis_min_amount']) { + // No, then abort here + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MIN_AMOUNT_PAYOUT, TRANSLATE_COMMA($_CONFIG['wernis_min_amount']))); + return; + } + + // Add points to content array + $content['points'] = $points; + $content['min_points'] = TRANSLATE_COMMA($_CONFIG['wernis_min_amount']); + + // Get WDS66 id + $content['wds66_id'] = ""; + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array($GLOBALS['userid']), __FILE__, __LINE__); + + // Are there some entries? + if (SQL_NUMROWS($result) == 1) { + // Fetch ID + list($content['wds66_id']) = SQL_FETCHROW($result); + } + + // Free result + SQL_FREERESULT($result); +} elseif ($_GET['mode'] == "withdraw") { + // Get total points for just displaying them + $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points"); + + // Prepare data for the template + $content['points'] = TRANSLATE_COMMA($points); + $content['min_points'] = TRANSLATE_COMMA($_CONFIG['wernis_min_amount']); + $content['wds66_id'] = ""; + + // Get WDS66 id + $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", + array($GLOBALS['userid']), __FILE__, __LINE__); + + // Are there some entries? + if (SQL_NUMROWS($result) == 1) { + // Fetch ID + list($content['wds66_id']) = SQL_FETCHROW($result); + } + + // Free result + SQL_FREERESULT($result); +} else { + // Invalid mode! + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode']))); + return; } +// Is the formular sent? +if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { + // Check input data depending on the mode and execute the requested mode + switch ($_GET['mode']) { + case "withdraw": // Widthdraws WDS66 -> This exchange + // Is the user ID and password set? + if (empty($_POST['wds66_id'])) { + // Nothing entered in WDS66 user ID + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME); + OUTPUT_HTML("
    "); + } elseif (empty($_POST['wds66_password'])) { + // Nothing entered in WDS66 password + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD); + OUTPUT_HTML("
    "); + } elseif (empty($_POST['amount'])) { + // Nothing entered in amount + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT); + OUTPUT_HTML("
    "); + } elseif ($_POST['wds66_id'] != bigintval($_POST['wds66_id'])) { + // Only numbers in account ID! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME); + OUTPUT_HTML("
    "); + } elseif ($_POST['amount'] != bigintval($_POST['amount'])) { + // Only numbers in amount! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT); + OUTPUT_HTML("
    "); + } elseif ($_POST['amount'] < $_CONFIG['wernis_min_amount']) { + // Not enougth entered! + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_amount']))); + OUTPUT_HTML("
    "); + } else { + // All is fine here so do the withdraw + $success = WERNIS_EXECUTE_WITHDRAW($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']); + if ($success) { + // Default is locked! + $locked = true; + + // Shall I "pay" the referral points imidiately? + if ($_CONFIG['ref_payout'] == "0") { + // Yes, "pay" it now + $locked = false; + } + + // Add it to this amount + $DEPTH = 0; + ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, $locked, "direct"); + + // Register this wernis movement + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`) VALUES(%d, %d, %d, UNIX_TIMESTAMP(), 'IN')", + array($GLOBALS['userid'], bigintval($_POST['wds66_id']), bigintval($_POST['amount'])), __FILE__, __LINE__); + + // Update the user data as well.. + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%d WHERE userid=%d LIMIT 1", + array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__); + + // All done! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_WITHDRAW_DONE); + return; + } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed")) { + // Wrong login data + LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); + OUTPUT_HTML("
    "); + } else { + // Something went wrong + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE())); + OUTPUT_HTML("
    "); + } + } + break; + + case "pay": // Payout this exchange -> WDS66 + // Is the user ID and password set? + if (empty($_POST['wds66_id'])) { + // Nothing entered in WDS66 user ID + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME); + OUTPUT_HTML("
    "); + } elseif (empty($_POST['wds66_password'])) { + // Nothing entered in WDS66 password + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD); + OUTPUT_HTML("
    "); + } elseif (empty($_POST['amount'])) { + // Nothing entered in amount + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT); + OUTPUT_HTML("
    "); + } elseif ($_POST['wds66_id'] != bigintval($_POST['wds66_id'])) { + // Only numbers in account ID! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME); + OUTPUT_HTML("
    "); + } elseif ($_POST['amount'] != bigintval($_POST['amount'])) { + // Only numbers in amount! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT); + OUTPUT_HTML("
    "); + } elseif ($_POST['amount'] < $_CONFIG['wernis_min_amount']) { + // Not enougth entered! + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_amount']))); + OUTPUT_HTML("
    "); + } elseif ($_POST['amount'] > $points) { + // Not enougth points left! + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval($_POST['amount']), bigintval($points))); + OUTPUT_HTML("
    "); + } else { + // All is fine here so do the withdraw + $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']); + if ($success) { + // Default is locked! + $locked = true; + + // Shall I "pay" the referral points imidiately? + if ($_CONFIG['ref_payout'] == "0") { + // Yes, "pay" it now + $locked = false; + } + + // Remove the points from the account + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `points_used` = `points_used` + %d WHERE userid=%d LIMIT 1", + array(bigintval($_POST['amount']), $GLOBALS['userid']), __FILE__, __LINE__); + + // Register this wernis movement + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_wernis (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`) VALUES(%d, %d, %d, UNIX_TIMESTAMP(), 'OUT')", + array($GLOBALS['userid'], bigintval($_POST['wds66_id']), bigintval($_POST['amount'])), __FILE__, __LINE__); + + // Update the user data as well.. + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%d WHERE userid=%d LIMIT 1", + array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__); + + // All done! + LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_WITHDRAW_DONE); + return; + } elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed") || (GET_WERNIS_ERROR_CODE() == "api_amount_failed")) { + // Wrong login data + LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); + OUTPUT_HTML("
    "); + } else { + // Something went wrong + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE())); + OUTPUT_HTML("
    "); + } + } + break; + + default: // Invalid mode! + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode']))); + return; + } +} + +// Prepare mode for template name +$mode = sprintf("member_wernis_mode_%s", SQL_ESCAPE($_GET['mode'])); + +// Load the template +LOAD_TEMPLATE($mode, false, $content); + // ?> diff --git a/inc/modules/order.php b/inc/modules/order.php index 5d17312571..4b7259f2e1 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -58,7 +58,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) if (empty($URL)) { // Is the auto-send mechanism active or inactive? - if ($CONFIG['autosend_active'] == 'Y') + if ($_CONFIG['autosend_active'] == 'Y') { // Auto-send is active define('ADMIN_AUTOSEND', COMPILE_CODE(ADMIN_AUTOSEND_ACTIVE)); @@ -101,7 +101,7 @@ if (empty($URL)) // Update used points $ADD = ""; - if ($CONFIG['order_max'] == "ORDER") $ADD = ", mail_orders=mail_orders+1"; + if ($_CONFIG['order_max'] == "ORDER") $ADD = ", mail_orders=mail_orders+1"; $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s".$ADD." WHERE userid=%d LIMIT 1", array($USED, $GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index cee4c48d63..c0ff859804 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -50,30 +50,30 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; $curr = date("m", time()); // Check if month is done -if (($curr != $CONFIG['beg_month']) && ($CONFIG['beg_month'] > 0) && ($CONFIG['beg_ranks'] > 0) && ($CSS != 1)) +if (($curr != $_CONFIG['beg_month']) && ($_CONFIG['beg_month'] > 0) && ($_CONFIG['beg_ranks'] > 0) && ($CSS != 1)) { // Extension "autopurge" is inactive or purging of inactive accounts is deactivated - $WHERE1 = ""; - $WHERE2 = 0; - $WHERE3 = bigintval($CONFIG['beg_ranks']); + $whereStatement1 = ""; + $whereStatement2 = 0; + $whereStatement3 = bigintval($_CONFIG['beg_ranks']); // Let's check if there are some points left we can "pay"... if (EXT_IS_ACTIVE("autopurge")) { // Use last online stamp only when autopurge for inactive members is activated - if (($CONFIG['ap_in_since'] > 0) && ($CONFIG['beg_active'] == 'Y')) + if (($_CONFIG['ap_in_since'] > 0) && ($_CONFIG['beg_active'] == 'Y')) { // Okay, include last online timestamp - $WHERE1 = "AND last_online >="; - $WHERE2 = bigintval(time() - $CONFIG['ap_in_since']); - $WHERE3 = bigintval($CONFIG['beg_ranks']); + $whereStatement1 = "AND last_online >="; + $whereStatement2 = bigintval(time() - $_CONFIG['ap_in_since']); + $whereStatement3 = bigintval($_CONFIG['beg_ranks']); } } // SQL string to check for accounts $result_main = SQL_QUERY_ESC("SELECT userid, email, beg_points -FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ".$WHERE1." %s AND beg_points > 0 ORDER BY beg_points DESC, userid LIMIT %s", - array($WHERE2, $WHERE3), __FILE__, __LINE__); +FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ".$whereStatement1." %s AND beg_points > 0 ORDER BY beg_points DESC, userid LIMIT %s", + array($whereStatement2, $whereStatement3), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { @@ -115,7 +115,7 @@ SET points=points+%s WHERE ref_depth=0 AND userid=%d LIMIT 1", SQL_FREERESULT($result_main); // Finally update database and config array - $CONFIG['beg_month'] = $curr; + $_CONFIG['beg_month'] = $curr; $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET beg_month='%s' WHERE config='0' LIMIT 1", array($curr), __FILE__, __LINE__); diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index d877e5e6f9..689b1462a4 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -49,41 +49,41 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; // Get current month (2 digits) $curr = date("m", time()); -if (($curr != $CONFIG['bonus_month']) && ($CONFIG['bonus_ranks'] > 0) && ($CSS != 1)) +if (($curr != $_CONFIG['bonus_month']) && ($_CONFIG['bonus_ranks'] > 0) && ($CSS != 1)) { // Extension "autopurge" is inactive or purging of inactive accounts is deactivated - $WHERE1 = "WHERE status='CONFIRMED'"; - $WHERE2 = 0; - $WHERE3 = bigintval($CONFIG['bonus_ranks']); + $whereStatement1 = "WHERE status='CONFIRMED'"; + $whereStatement2 = 0; + $whereStatement3 = bigintval($_CONFIG['bonus_ranks']); // Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...) if (EXT_IS_ACTIVE("autopurge")) { // Use last online stamp only when autopurge for inactive members is activated - if ($CONFIG['ap_in_since'] > 0) + if ($_CONFIG['ap_in_since'] > 0) { // Okay, include last online timestamp - $WHERE1 = "WHERE status='CONFIRMED' AND last_online >="; - $WHERE2 = bigintval(time() - $CONFIG['ap_in_since']); - $WHERE3 = bigintval($CONFIG['bonus_ranks']); + $whereStatement1 = "WHERE status='CONFIRMED' AND last_online >="; + $whereStatement2 = bigintval(time() - $_CONFIG['ap_in_since']); + $whereStatement3 = bigintval($_CONFIG['bonus_ranks']); } } // Add more bonus points here $ADD = " AND (0"; - if ($CONFIG['bonus_click_yn'] == 'Y') $ADD .= " + turbo_bonus"; - if ($CONFIG['bonus_login_yn'] == 'Y') $ADD .= " + login_bonus"; - if ($CONFIG['bonus_order_yn'] == 'Y') $ADD .= " + bonus_order"; - if ($CONFIG['bonus_stats_yn'] == 'Y') $ADD .= " + bonus_stats"; - if ($CONFIG['bonus_ref_yn'] == 'Y') $ADD .= " + bonus_ref"; + if ($_CONFIG['bonus_click_yn'] == 'Y') $ADD .= " + turbo_bonus"; + if ($_CONFIG['bonus_login_yn'] == 'Y') $ADD .= " + login_bonus"; + if ($_CONFIG['bonus_order_yn'] == 'Y') $ADD .= " + bonus_order"; + if ($_CONFIG['bonus_stats_yn'] == 'Y') $ADD .= " + bonus_stats"; + if ($_CONFIG['bonus_ref_yn'] == 'Y') $ADD .= " + bonus_ref"; $ADD .= ") > 0"; // SQL string to check for accounts $result_main = SQL_QUERY_ESC("SELECT userid, email, (turbo_bonus + login_bonus + bonus_order + bonus_stats + bonus_ref) AS active_bonus FROM "._MYSQL_PREFIX."_user_data -".$WHERE1." %s".$ADD." +".$whereStatement1." %s".$ADD." ORDER BY active_bonus DESC, userid LIMIT %s", - array($WHERE2, $WHERE3), __FILE__, __LINE__); + array($whereStatement2, $whereStatement3), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { @@ -128,7 +128,7 @@ SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0", __ SQL_FREERESULT($result_main); // Finally update database and config array - $CONFIG['bonus_month'] = $curr; + $_CONFIG['bonus_month'] = $curr; $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='%s' WHERE config='0' LIMIT 1", array($curr), __FILE__, __LINE__); diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index 0ada8ed09f..262fc2da82 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -49,7 +49,7 @@ if (($CSS == 1) || (!defined('__DAILY_RESET'))) return; // Get current month (2 digits) $curr = date("m", time()); -if ($CONFIG['nl_month'] != $curr) +if ($_CONFIG['nl_month'] != $curr) { // Check for unsubscribed members $result = SQL_QUERY("SELECT userid, nl_until FROM "._MYSQL_PREFIX."_user_data WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__); diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index d75d6dacc8..2ce61d8c16 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -78,7 +78,7 @@ if ((!mxchange_installing) && (mxchange_installed)) } // Init configuration arrays - $CONFIG = array( + $_CONFIG = array( 'code_length' => 0 ); $EXT_CSS_FILES = array(); @@ -111,7 +111,7 @@ if ((!mxchange_installing) && (mxchange_installed)) } // Load the configuration - $CONFIG = array_merge($CONFIG, SQL_FETCHARRAY($result)); + $_CONFIG = array_merge($_CONFIG, SQL_FETCHARRAY($result)); // Initialize include-file-pool $INC_POOL = array(); @@ -120,7 +120,7 @@ if ((!mxchange_installing) && (mxchange_installed)) require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database // Run daily reset - if ((date("d", $CONFIG['last_update']) != date("d", time()) || (DEBUG_MODE == true)) && (!mxchange_installing) && (mxchange_installed) && (admin_registered) && (!isset($_GET['register'])) && ($CSS != 1)) { + if ((date("d", $_CONFIG['last_update']) != date("d", time()) || (DEBUG_MODE == true)) && (!mxchange_installing) && (mxchange_installed) && (admin_registered) && (!isset($_GET['register'])) && ($CSS != 1)) { // Do daily things in external PHP file but only when script is completely setup $INC_POOL[] = PATH."inc/reset/reset_daily.php"; @@ -178,7 +178,7 @@ if ((!mxchange_installing) && (mxchange_installed)) } elseif (($GLOBALS['module'] == "index") || ($GLOBALS['module'] == "login")) { // Set 'what' value to 'welcome' in guest and member menu $GLOBALS['what'] = "welcome"; - if (!empty($CONFIG['index_home'])) $GLOBALS['what'] = $CONFIG['index_home']; + if (!empty($_CONFIG['index_home'])) $GLOBALS['what'] = $_CONFIG['index_home']; } else { // Anything else like begging link $GLOBALS['what'] = ""; @@ -193,7 +193,7 @@ if ((!mxchange_installing) && (mxchange_installed)) $dummy = CHECK_MODULE($GLOBALS['module']); if ($dummy == "done") COUNT_MODULE($GLOBALS['module']); unset($dummy); - if ($CONFIG['activate_xchange'] > 0) activateExchange(); + if ($_CONFIG['activate_xchange'] > 0) activateExchange(); } else { // If you will read following error message you probably need to contact me (webmaster@mxchange.org) // and download the sql-upgrades extension from my server. Please ask me which SQL file(s) you need to @@ -222,7 +222,7 @@ if ((!mxchange_installing) && (mxchange_installed)) /////////////////////////////////////////////////// // Set CONFIG array - $CONFIG = array( + $_CONFIG = array( 'code_length' => 0 ); @@ -240,7 +240,7 @@ if ((!mxchange_installing) && (mxchange_installed)) $installPhp = basename($_SERVER['PHP_SELF']); if (($installPhp != "install.php") && ($CSS != "1") && ($CSS != -1)) { // Redirect to the installation system - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Double-check installation mode diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index ac4ee4c582..92292cfeaf 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -41,7 +41,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) // function ADD_MODULE_TITLE($mod) { - global $MODULES, $CONFIG; + global $MODULES, $_CONFIG; $name = ""; $result = false; // Load title if (!mxchange_installing) @@ -52,7 +52,7 @@ function ADD_MODULE_TITLE($mod) $name = $MODULES['title'][$mod]; // Update cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { @@ -82,7 +82,7 @@ function ADD_MODULE_TITLE($mod) // Check validity of a given module name (no file extension) function CHECK_MODULE($mod) { // We need them now here... - global $MODULES, $CONFIG, $CACHE; + global $MODULES, $_CONFIG, $CACHE; // Filter module name (names with low chars and underlines are fine!) $mod = preg_replace("/[^a-z_]/", "", $mod); @@ -118,7 +118,7 @@ function CHECK_MODULE($mod) { $mem = $MODULES['mem_only'][$mod_chk]; // Update cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; $found = true; } else { // No, then we have to update it! @@ -177,17 +177,14 @@ function CHECK_MODULE($mod) { } // Destroy cache here - if (GET_EXT_VERSION("cache") >= "0.1.2") - { + if (GET_EXT_VERSION("cache") >= "0.1.2") { if ($CACHE->cache_file("mod_reg", true)) $CACHE->cache_destroy(); unset($MODULES); } // And reload data $ret = CHECK_MODULE($mod_chk); - } - else - { + } else { // Module not found we don't add it to the database $ret = "404"; } @@ -199,7 +196,7 @@ function CHECK_MODULE($mod) { // Add menu description pending on given file name (without path!) function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) { - global $DEPTH, $CONFIG; + global $DEPTH, $_CONFIG; $LINK_ADD = ""; $OUT = ""; $AND = ""; // First we have to do some analysis... if (ereg("action-", $file)) { @@ -272,7 +269,7 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) if ($return) { // Return title return $ret; - } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && ($CONFIG['youre_here'] == 'Y')) || ((IS_ADMIN()) && ($MOD_CHECK == "admin"))) { + } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && ($_CONFIG['youre_here'] == 'Y')) || ((IS_ADMIN()) && ($MOD_CHECK == "admin"))) { // Output HTML code $OUT = $prefix."".$ret."\n"; //* DEBUG: */ echo __LINE__."*".$type."/".$GLOBALS['what']."*
    \n"; @@ -294,7 +291,7 @@ function ADD_DESCR($ACC_LVL, $file, $return = false, $output = true) } // function ADD_MENU($MODE, $act, $wht) { - global $CONFIG; + global $_CONFIG; if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) return CODE_MENU_NOT_VALID; $main_cnt = 0; $AND = ""; $main_action = ""; $sub_what = ""; if (!IS_ADMIN()) @@ -342,7 +339,7 @@ function ADD_MENU($MODE, $act, $wht) { } // Menu title - $content .= $CONFIG['middot'].$sub_title; + $content .= $_CONFIG['middot'].$sub_title; if ($test) { $content .= ""; @@ -392,7 +389,7 @@ function ADD_MENU($MODE, $act, $wht) { // This patched function will reduce many SELECT queries for the specified or current admin login function IS_ADMIN($admin="") { - global $_COOKIE, $ADMINS, $CONFIG; + global $_COOKIE, $ADMINS, $_CONFIG; $ret = false; $passCookie = ""; $valPass = ""; //* DEBUG: */ echo __LINE__."ADMIN:".$admin."
    "; @@ -407,7 +404,7 @@ function IS_ADMIN($admin="") if ((!empty($passCookie)) && (isset($ADMINS['password'][$admin])) && (!empty($admin))) { // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; // Login data is valid or not? $valPass = generatePassString($ADMINS['password'][$admin]); @@ -735,7 +732,7 @@ function GET_MOD_DESCR($MODE, $wht) // function SEND_MODE_MAILS($mod, $modes) { - global $CONFIG, $DATA; + global $_CONFIG, $DATA; // Load hash $result_main = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d AND status='CONFIRMED' LIMIT 1", @@ -797,7 +794,7 @@ function SEND_MODE_MAILS($mod, $modes) // Load template $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, $GLOBALS['userid']); - if ($CONFIG['admin_notify'] == 'Y') { + if ($_CONFIG['admin_notify'] == 'Y') { // The admin needs to be notified about a profile change $msg_admin = "admin_mydata_notify"; $sub_adm = ADMIN_CHANGED_DATA; @@ -846,7 +843,7 @@ function SEND_MODE_MAILS($mod, $modes) } else { SEND_ADMIN_EMAILS($sub_adm, LOAD_EMAIL_TEMPLATE($msg_admin, $content, $GLOBALS['userid'])); } - } elseif ($CONFIG['admin_notify'] == 'Y') { + } elseif ($_CONFIG['admin_notify'] == 'Y') { // Cannot send mails to admin! $content = CANNOT_SEND_ADMIN_MAILS; } else { @@ -969,10 +966,11 @@ function GET_PAYMENT ($pid, $full=false) return $ret; } // -function GET_PAY_POINTS($pid, $DATA="price") +function GET_PAY_POINTS($pid, $lookFor="price") { $ret = "-1"; - $result = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_payments WHERE id=%d LIMIT 1", array($DATA, $pid), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_payments WHERE id=%d LIMIT 1", + array($lookFor, $pid), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Payment type found... :-) @@ -994,15 +992,15 @@ function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fal if ($stats_id > 0) { // Only when we got a real stats ID continue searching for the entry - $type = "NORMAL"; $ROW = "stats_id"; - if ($bonus) { $type = "BONUS"; $ROW = "bonus_id"; } + $type = "NORMAL"; $rowName = "stats_id"; + if ($bonus) { $type = "BONUS"; $rowName = "bonus_id"; } $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE %s='%s' AND userid=%d AND link_type='%s' LIMIT 1", - array($ROW, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); + array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // No, so we add one! $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s', '%s', '%s')", - array($ROW, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); + array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__); $ret = "done"; } else @@ -1019,27 +1017,25 @@ function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fal return $ret; } // -function GET_TOTAL_DATA($search, $TABLE, $DATA, $WHERE="userid", $ONLY_ROWS=false) +function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid", $onlyRows=false) { $ret = "0"; - if ($ONLY_ROWS) - { + if ($onlyRows) { // Count rows $result = SQL_QUERY_ESC("SELECT COUNT(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'", - array($DATA, $TABLE, $WHERE, $search), __FILE__, __LINE__); - } - else - { + array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); + } else { // Add all rows $result = SQL_QUERY_ESC("SELECT SUM(%s) FROM "._MYSQL_PREFIX."_%s WHERE %s='%s'", - array($DATA, $TABLE, $WHERE, $search), __FILE__, __LINE__); + array($lookFor, $tableName, $whereStatement, $search), __FILE__, __LINE__); } + // Load row list($ret) = SQL_FETCHROW($result); - //* DEBUG: */ echo __LINE__."*".$DATA."/".$search."/".$TABLE."/".$ret."*
    \n"; + //* DEBUG: */ echo __LINE__."*".$DATA."/".$search."/".$tableName."/".$ret."*
    \n"; SQL_FREERESULT($result); if (empty($ret)) { - if (($DATA == "counter") || ($DATA == "id")) { + if (($lookFor == "counter") || ($lookFor == "id")) { $ret = "0"; } else { $ret = "0.00000"; @@ -1061,7 +1057,7 @@ function GET_TOTAL_DATA($search, $TABLE, $DATA, $WHERE="userid", $ONLY_ROWS=fals */ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") { - global $DEPTH, $_GET, $CONFIG, $DATA, $link; + global $DEPTH, $_CONFIG, $DATA, $link; // When $uid = 0 add points to jackpot if ($uid == "0") @@ -1179,7 +1175,7 @@ function UPDATE_REF_COUNTER($uid) // function UPDATE_ONLINE_LIST($SID, $mod, $act, $wht) { - global $_COOKIE, $_SERVER, $link, $_GET, $CONFIG; + global $link, $_CONFIG; // Do not update online list when extension is deactivated if (!EXT_IS_ACTIVE("online", true)) return; @@ -1243,7 +1239,7 @@ WHERE sid='%s' LIMIT 1", } // Purge old entries - $TIMEOUT = time() - $CONFIG['online_timeout']; + $TIMEOUT = time() - $_CONFIG['online_timeout']; $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_online WHERE timestamp <= %d", array($TIMEOUT), __FILE__, __LINE__); } @@ -1387,9 +1383,9 @@ function ADD_OPTION_LINES($table, $id, $name, $default="",$special="",$where="") } // Aiut function activateExchange() { - global $CONFIG; + global $_CONFIG; $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__); - if (SQL_NUMROWS($result) >= $CONFIG['activate_xchange']) + if (SQL_NUMROWS($result) >= $_CONFIG['activate_xchange']) { // Free memory SQL_FREERESULT($result); @@ -1413,7 +1409,7 @@ function activateExchange() { // function DELETE_USER_ACCOUNT($uid, $reason) { - $POINTS = 0; + $points = 0; $result = SQL_QUERY_ESC("SELECT (SUM(p.points) - d.used_points) AS points FROM "._MYSQL_PREFIX."_user_points AS p LEFT JOIN "._MYSQL_PREFIX."_user_data AS d @@ -1422,7 +1418,7 @@ WHERE p.userid=%d", array(bigintval($uid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Save his points to add them to the jackpot - list($POINTS) = SQL_FETCHROW($result); + list($points) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Delete points entries as well @@ -1432,11 +1428,11 @@ WHERE p.userid=%d", array(bigintval($uid)), __FILE__, __LINE__); if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $POINTS); + MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points); } // Now, when we have all his points adds them do the jackpot! - ADD_JACKPOT($POINTS); + ADD_JACKPOT($points); } // Delete category selections as well... @@ -1460,11 +1456,11 @@ WHERE p.userid=%d", array(bigintval($uid)), __FILE__, __LINE__); // function META_DESCRIPTION($mod, $wht) { - global $CONFIG, $DEPTH; + global $_CONFIG, $DEPTH; if (($mod != "admin") && ($mod != "login")) { // Exclude admin and member's area - $DESCR = MAIN_TITLE." ".trim($CONFIG['title_middle'])." ".ADD_DESCR("guest", "what-".$wht, true); + $DESCR = MAIN_TITLE." ".trim($_CONFIG['title_middle'])." ".ADD_DESCR("guest", "what-".$wht, true); unset($DEPTH); OUTPUT_HTML(""); } @@ -1526,7 +1522,7 @@ function IS_DEMO() // function LOAD_CONFIG($no="0") { - global $CFG_CACHE, $CONFIG; + global $CFG_CACHE, $_CONFIG; $CFG_DUMMY = false; // Check for cache extension, cache-array and if the requested configuration is in cache if ((is_array($CFG_CACHE)) && (isset($CFG_CACHE['config'][$no]))) @@ -1539,7 +1535,7 @@ function LOAD_CONFIG($no="0") } // Count cache hits - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } else { @@ -1580,7 +1576,7 @@ function GET_WHAT($MOD_CHECK) // function MODULE_HAS_MENU($mod) { - global $EXTENSIONS, $MODULES, $CONFIG; + global $EXTENSIONS, $MODULES, $_CONFIG; // All is false by default $ret = false; @@ -1590,13 +1586,13 @@ function MODULE_HAS_MENU($mod) { // Check module cache and count hit if ($MODULES['has_menu'][$mod] == 'Y') $ret = true; - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } elseif (isset($EXTENSIONS['ext_menu'][$mod])) { // Check cache and count hit if ($EXTENSIONS['ext_menu'][$mod] == 'Y') $ret = true; - $CONFIG['cache_hits']++; + $_CONFIG['cache_hits']++; } } if ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ($ret === false)) diff --git a/inc/patch-system.php b/inc/patch-system.php index 04b0099342..1e26908232 100644 --- a/inc/patch-system.php +++ b/inc/patch-system.php @@ -39,13 +39,13 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // Check for patch level differences between databases and current hard-coded -if (CURR_PATCH_LEVEL > $CONFIG['patch_level']) +if (CURR_PATCH_LEVEL > $_CONFIG['patch_level']) { // Update database and CONFIG array $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET patch_level='".CURR_PATCH_LEVEL."', patch_ctime=UNIX_TIMESTAMP() WHERE config='0' LIMIT 1", __FILE__, __LINE__); - $CONFIG['patch_level'] = CURR_PATCH_LEVEL; - $CONFIG['patch_ctime'] = time(); + $_CONFIG['patch_level'] = CURR_PATCH_LEVEL; + $_CONFIG['patch_ctime'] = time(); // Destroy cache if (GET_EXT_VERSION("cache") >= "0.1.2") @@ -53,8 +53,8 @@ if (CURR_PATCH_LEVEL > $CONFIG['patch_level']) if ($CACHE->cache_file("config", true)) { // Replace data - $CACHE->cache_replace("patch_level", $CONFIG['patch_level'], "0", $CFG_CACHE); - $CACHE->cache_replace("patch_ctime", $CONFIG['patch_ctime'], "0", $CFG_CACHE); + $CACHE->cache_replace("patch_level", $_CONFIG['patch_level'], "0", $CFG_CACHE); + $CACHE->cache_replace("patch_ctime", $_CONFIG['patch_ctime'], "0", $CFG_CACHE); } } } diff --git a/inc/pool-update.php b/inc/pool-update.php index fc71a8ae81..9949cc9e16 100644 --- a/inc/pool-update.php +++ b/inc/pool-update.php @@ -54,7 +54,7 @@ if ($HTML_EXT) } // Reset variables -$cnt = "0"; $cnt2 = "0"; $LAST_SENT_ID = "0"; $cnt_back = array("0"); $POINTS_BACK = array("0"); +$cnt = "0"; $cnt2 = "0"; $LAST_SENT_ID = "0"; $cnt_back = array("0"); $points_BACK = array("0"); if (SQL_NUMROWS($result_main) > 0) { while ($DATA = SQL_FETCHROW($result_main)) @@ -179,8 +179,8 @@ if (SQL_NUMROWS($result_main) > 0) } } - // Do we have reached the maximum to send mails? || ($CONFIG['max_send'] >= $cnt) - //* DEBUG: */ echo "*L:".__LINE__."/".$cnt.">=".$DATA[8]."/".$CONFIG['max_send'].">=".$cnt."/".$LAST_SENT_ID."!=".$DATA[0]."*
    "; + // Do we have reached the maximum to send mails? || ($_CONFIG['max_send'] >= $cnt) + //* DEBUG: */ echo "*L:".__LINE__."/".$cnt.">=".$DATA[8]."/".$_CONFIG['max_send'].">=".$cnt."/".$LAST_SENT_ID."!=".$DATA[0]."*
    "; if ((($cnt >= $DATA[8])) && ($LAST_SENT_ID != $DATA[0])) { // Yes we do, so we notify admin and sender about fully sent mail! @@ -232,7 +232,7 @@ if (SQL_NUMROWS($result_main) > 0) break; } // Do we have send maximum mails? - elseif (($cnt >= $CONFIG['max_send']) || ($cnt2 >= $CONFIG['max_send'])) + elseif (($cnt >= $_CONFIG['max_send']) || ($cnt2 >= $_CONFIG['max_send'])) { // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered) $ADD = ""; @@ -258,20 +258,20 @@ if (SQL_NUMROWS($result_main) > 0) if ($uid > 0) { // User does not exists, pay points back - $POINTS = GET_PAY_POINTS($DATA[5]); + $points = GET_PAY_POINTS($DATA[5]); $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%d AND ref_depth=0 LIMIT 1", - array($POINTS, bigintval($DATA[1])), __FILE__, __LINE__); + array($points, bigintval($DATA[1])), __FILE__, __LINE__); // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - //* DEBUG: */ echo "*MEDIA/L:".__LINE__."/".$POINTS."*
    "; - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $POINTS); + //* DEBUG: */ echo "*MEDIA/L:".__LINE__."/".$points."*
    "; + MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points); } // Add points together and remove user - $POINTS_BACK[$DATA[1]] += $POINTS; + $points_BACK[$DATA[1]] += $points; } $cnt_back[$DATA[1]]++; } @@ -285,9 +285,9 @@ if (SQL_NUMROWS($result_main) > 0) } } } - if ((sizeof($POINTS_BACK) > 0) && (!empty($POINTS_BACK[0]))) + if ((sizeof($points_BACK) > 0) && (!empty($points_BACK[0]))) { - foreach ($POINTS_BACK as $uid=>$PB) + foreach ($points_BACK as $uid=>$PB) { // Add points only when we have points left to add and a valid user ID if (($PB > 0) && ($uid > 0)) @@ -331,7 +331,7 @@ if (SQL_NUMROWS($result_main) > 0) SQL_FREERESULT($result_main); // Only send bonus mail when bonus extension is active and maximum send-mails is not reached -if ((EXT_IS_ACTIVE("bonus") && ($cnt < $CONFIG['max_send']))) +if ((EXT_IS_ACTIVE("bonus") && ($cnt < $_CONFIG['max_send']))) { // Do we need to send out bonus mails? if ($HTML_EXT) @@ -412,7 +412,7 @@ if ((EXT_IS_ACTIVE("bonus") && ($cnt < $CONFIG['max_send']))) } // Do we have send maximum mails? - if (($cnt >= $CONFIG['max_send']) || (SELECTION_COUNT($DUMMY) == 0)) + if (($cnt >= $_CONFIG['max_send']) || (SELECTION_COUNT($DUMMY) == 0)) { // Yes, we have //* DEBUG: */ echo "*EXIT/L:".__LINE__."
    "; @@ -452,7 +452,7 @@ if ((EXT_IS_ACTIVE("bonus") && ($cnt < $CONFIG['max_send']))) MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), "add", 1); } } - elseif ($cnt >= $CONFIG['max_send']) + elseif ($cnt >= $_CONFIG['max_send']) { // Update bonus pool $result_done = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_bonus SET data_type='NEW', target_send=%d, receivers='%s' WHERE id=%d LIMIT 1", diff --git a/inc/profile-updte.php b/inc/profile-updte.php index 759219abb1..79aa02feaa 100644 --- a/inc/profile-updte.php +++ b/inc/profile-updte.php @@ -39,11 +39,11 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) require($INC); } -if (($CONFIG['send_prof_update'] == 'Y') && ($CONFIG['profile_update'] > 0) && ($CONFIG['resend_profile_update'])) +if (($_CONFIG['send_prof_update'] == 'Y') && ($_CONFIG['profile_update'] > 0) && ($_CONFIG['resend_profile_update'])) { // Ok, we shall send update notifications... - $TIMEOUT = bigintval(time() - $CONFIG['profile_update']); - $TIMEOUT2 = bigintval(time() - $CONFIG['resend_profile_update']); + $TIMEOUT = bigintval(time() - $_CONFIG['profile_update']); + $TIMEOUT2 = bigintval(time() - $_CONFIG['resend_profile_update']); // Load personal data 0 1 2 3 4 5 6 $result = SQL_QUERY_ESC("SELECT userid, email, sex, surname, family, last_update, joined diff --git a/inc/reset/reset_daily.php b/inc/reset/reset_daily.php index ab015cec00..c3b99df313 100644 --- a/inc/reset/reset_daily.php +++ b/inc/reset/reset_daily.php @@ -85,7 +85,7 @@ WHERE userid=%d AND ref_depth=%d LIMIT 1", SQL_FREERESULT($result_daily); // Save config value for later references -$CONFIG['last_update'] = time(); +$_CONFIG['last_update'] = time(); // Update database $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET last_update=UNIX_TIMESTAMP() diff --git a/inc/reset/reset_holiday.php b/inc/reset/reset_holiday.php index 68604f8289..d0e7c45d99 100644 --- a/inc/reset/reset_holiday.php +++ b/inc/reset/reset_holiday.php @@ -44,7 +44,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // Do not execute when script is in CSS mode or no daily reset -if (($CSS == 1) || ((!defined('__DAILY_RESET')) && ($CONFIG['holiday_mode'] == "RESET"))) return; +if (($CSS == 1) || ((!defined('__DAILY_RESET')) && ($_CONFIG['holiday_mode'] == "RESET"))) return; // Check for holidays we need to enable and send email to user $result_main = SQL_QUERY("SELECT userid, holiday_activated FROM "._MYSQL_PREFIX."_user_data diff --git a/inc/session.php b/inc/session.php index 1d5a04c60b..49d7c98625 100644 --- a/inc/session.php +++ b/inc/session.php @@ -58,10 +58,10 @@ if (empty($PHPSESSID)) { } // Store PHPSESSID -@setcookie("PHPSESSID", $PHPSESSID, (time() + $CONFIG['online_timeout']), COOKIE_PATH); +@setcookie("PHPSESSID", $PHPSESSID, (time() + $_CONFIG['online_timeout']), COOKIE_PATH); // Store language code in cookie -@setcookie("mx_lang", $mx_lang, (time() + $CONFIG['online_timeout']), COOKIE_PATH); +@setcookie("mx_lang", $mx_lang, (time() + $_CONFIG['online_timeout']), COOKIE_PATH); // Check if refid is set if ((!empty($_GET['user'])) && ($CLICK == 1) && ($_SERVER['PHP_SELF'] == "click.php")) { @@ -83,16 +83,16 @@ if (!empty($_POST['refid'])) { $GLOBALS['refid'] = bigintval($_COOKIE['refid']); } elseif (GET_EXT_VERSION("sql_patches") != "") { // Set default refid as refid in URL - $GLOBALS['refid'] = $CONFIG['def_refid']; + $GLOBALS['refid'] = $_CONFIG['def_refid']; } else { // No default ID when sql_patches is not installed $GLOBALS['refid'] = 0; } // Set cookie when default refid > 0 -if (empty($_COOKIE['refid']) || (!empty($GLOBALS['refid'])) || (($_COOKIE['refid'] == "0") && ($CONFIG['def_refid'] > 0))) { +if (empty($_COOKIE['refid']) || (!empty($GLOBALS['refid'])) || (($_COOKIE['refid'] == "0") && ($_CONFIG['def_refid'] > 0))) { // Set cookie - @setcookie("refid", $GLOBALS['refid'], (time() + $CONFIG['online_timeout']), COOKIE_PATH); + @setcookie("refid", $GLOBALS['refid'], (time() + $_CONFIG['online_timeout']), COOKIE_PATH); } // Test cookies if index.php or modules.php is loaded diff --git a/inc/stats_bonus.php b/inc/stats_bonus.php index f7d664e963..05baaceaed 100644 --- a/inc/stats_bonus.php +++ b/inc/stats_bonus.php @@ -47,14 +47,14 @@ ORDER BY userid", __FILE__, __LINE__); if (SQL_NUMROWS($result_bonus) > 0) { // Remember stats bonus in constant - define('__STATS_BONUS', TRANSLATE_COMMA($CONFIG['bonus_stats'])); + define('__STATS_BONUS', TRANSLATE_COMMA($_CONFIG['bonus_stats'])); // We found some mail orders... while(list($id, $uid, $subj, $stamp, $clicks, $url) = SQL_FETCHROW($result_bonus)) { // Add points $result_points = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_stats=bonus_stats+%s WHERE userid=%d LIMIT 1", - array($CONFIG['bonus_stats'], bigintval($uid)), __FILE__, __LINE__); + array($_CONFIG['bonus_stats'], bigintval($uid)), __FILE__, __LINE__); // Prepare array $content = array( @@ -74,7 +74,7 @@ if (SQL_NUMROWS($result_bonus) > 0) } // Handle bonus points - BONUS_POINTS_HANDLER($CONFIG['bonus_stats']); + BONUS_POINTS_HANDLER($_CONFIG['bonus_stats']); } // Free memory diff --git a/inc/stylesheet.php b/inc/stylesheet.php index 38e4e7cd8e..9c3a67dd9e 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -47,10 +47,10 @@ $STYLES = array( if ((basename($_SERVER['PHP_SELF']) == "install.php") || (!mxchange_installed) || (isset($_GET['installing']))) $STYLES[] = "install.css"; // When no CSS output-mode is set, set it to file-output -if (empty($CONFIG['css_php'])) $CONFIG['css_php'] = "FILE"; +if (empty($_CONFIG['css_php'])) $_CONFIG['css_php'] = "FILE"; // Output CSS files or content or link to css.php ? -if (($CSS == "1") || ($CONFIG['css_php'] == "DIRECT")) +if (($CSS == "1") || ($_CONFIG['css_php'] == "DIRECT")) { // Load CSS files if (is_array($EXT_CSS_FILES)) @@ -76,7 +76,7 @@ if (($CSS == "1") || ($CONFIG['css_php'] == "DIRECT")) // Do include only existing files and whose are not empty if ((file_exists($file)) && (filesize($file) > 0)) { - switch ($CONFIG['css_php']) + switch ($_CONFIG['css_php']) { case "DIRECT": OUTPUT_HTML(""); diff --git a/inc/theme-manager.php b/inc/theme-manager.php index 8e573ff37a..c188a19663 100644 --- a/inc/theme-manager.php +++ b/inc/theme-manager.php @@ -39,44 +39,38 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // -function GET_CURR_THEME() -{ - global $_COOKIE, $INC_POOL, $CONFIG, $_GET, $_POST, $CSS; +function GET_CURR_THEME() { + global $INC_POOL, $_CONFIG, $CSS; + // The default theme is 'default'... ;-) $ret = "default"; // Load default theme if not empty from configuration - if (!empty($CONFIG['default_theme'])) $ret = $CONFIG['default_theme']; + if (!empty($_CONFIG['default_theme'])) $ret = $_CONFIG['default_theme']; - if (empty($_COOKIE['mxchange_theme'])) - { + if (empty($_COOKIE['mxchange_theme'])) { // Set default theme @setcookie("mxchange_theme", $ret, (time() + 60*60*24*365), COOKIE_PATH); - } - elseif ((!empty($_COOKIE['mxchange_theme'])) && (GET_EXT_VERSION("sql_patches") >= "0.1.4")) - { + } elseif ((!empty($_COOKIE['mxchange_theme'])) && (GET_EXT_VERSION("sql_patches") >= "0.1.4")) { // Get theme from cookie $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1", array($_COOKIE['mxchange_theme']), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Design is valid! $ret = $_COOKIE['mxchange_theme']; } // Free memory SQL_FREERESULT($result); - } - elseif ((!mxchange_installed) && ((mxchange_installing) || ($CSS == true)) && ((!empty($_GET['theme'])) || (!empty($_POST['theme'])))) - { + } elseif ((!mxchange_installed) && ((mxchange_installing) || ($CSS == true)) && ((!empty($_GET['theme'])) || (!empty($_POST['theme'])))) { + // Prepare FQFN for checking + $theme = sprintf("%stheme/%s/theme.php", PATH, $_GET['theme']); + // Installation mode active - if ((!empty($_GET['theme'])) && (file_exists(PATH."theme/".$_GET['theme']."/theme.php"))) - { + if ((!empty($_GET['theme'])) && (file_exists($theme)) && (is_readable($theme))) { // Set cookie from URL data @setcookie("mxchange_theme", $_GET['theme'], (time() + 60*60*24*365), COOKIE_PATH); $_COOKIE['mxchange_theme'] = $_GET['theme']; - } - elseif (file_exists(PATH."theme/".$_POST['theme']."/theme.php")) - { + } elseif (file_exists(PATH."theme/".$_POST['theme']."/theme.php")) { // Set cookie from posted data @setcookie("mxchange_theme", $_POST['theme'], (time() + 60*60*24*365), COOKIE_PATH); $_COOKIE['mxchange_theme'] = $_POST['theme']; @@ -84,16 +78,16 @@ function GET_CURR_THEME() // Set return value $ret = $_COOKIE['mxchange_theme']; - } - else - { + } else { // Invalid design, reset cookie @setcookie("mxchange_theme", $ret, (time() + 60*60*24*365), COOKIE_PATH); } // Add (maybe) found theme.php file to inclusion list - $theme = PATH."theme/".$ret."/theme.php"; - if (@file_exists($theme)) $INC_POOL[] = $theme; + $theme = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($ret)); + + // Try to load the requested include file + if ((@file_exists($theme)) && (is_readable($theme))) $INC_POOL[] = $theme; // Return theme value return $ret; diff --git a/index.php b/index.php index 336226c6ab..07097cf45b 100644 --- a/index.php +++ b/index.php @@ -51,15 +51,15 @@ if (defined('mxchange_installed') && (mxchange_installed)) { require(PATH."inc/header.php"); // Fix missing array elements here - if (!isset($CONFIG['index_delay'])) $CONFIG['index_delay'] = 0; - if (!isset($CONFIG['index_cookie'])) $CONFIG['index_cookie'] = 0; + if (!isset($_CONFIG['index_delay'])) $_CONFIG['index_delay'] = 0; + if (!isset($_CONFIG['index_cookie'])) $_CONFIG['index_cookie'] = 0; // Check for cookies - if ((empty($_COOKIE['visited'])) || ($CONFIG['index_delay'] == 0) || ($CONFIG['index_cookie'] == 0)) { + if ((empty($_COOKIE['visited'])) || ($_CONFIG['index_delay'] == 0) || ($_CONFIG['index_cookie'] == 0)) { // Is the index page configured for redirect pr not? - if ($CONFIG['index_cookie'] > 0) { + if ($_CONFIG['index_cookie'] > 0) { // Set cookie and remeber it for specified time - @setcookie("visited", "true", (time() + $CONFIG['index_cookie']), COOKIE_PATH); + @setcookie("visited", "true", (time() + $_CONFIG['index_cookie']), COOKIE_PATH); } elseif (!empty($_COOKIE['visited'])) { // Remove cookie when admin set 0 in setup @setcookie("visited", "", (time() - 3600), COOKIE_PATH); @@ -69,15 +69,15 @@ if (defined('mxchange_installed') && (mxchange_installed)) { LOAD_TEMPLATE("index", false, ADD_URL_DATA("")); // Shall I insert an automated forward? - if ($CONFIG['index_delay'] > 0) { + if ($_CONFIG['index_delay'] > 0) { // This will be a JavaScript-redirect! - define('__DELAY_VALUE', ($CONFIG['index_delay'] * 1000 + 500)); + define('__DELAY_VALUE', ($_CONFIG['index_delay'] * 1000 + 500)); define('__MOD_VALUE' , ADD_URL_DATA("index")); LOAD_TEMPLATE("index_forward"); } } else { // Redirect to main page - LOAD_URL(URL."/modules.php?module=index"); + LOAD_URL("modules.php?module=index"); } // Footer diff --git a/install.php b/install.php index 7b0c6b857c..ca7e6335e1 100644 --- a/install.php +++ b/install.php @@ -67,7 +67,7 @@ require (PATH."inc/header.php"); // Reload page to page=welcome when it is not specified if (!isset($_GET['page'])) { - LOAD_URL(URL."/install.php?page=welcome"); + LOAD_URL("install.php?page=welcome"); } // Already installed? diff --git a/login.php b/login.php index 8c2c0c9dbc..7804c8c711 100644 --- a/login.php +++ b/login.php @@ -48,13 +48,13 @@ require ("inc/config.php"); if (defined('mxchange_installed') && (mxchange_installed)) { // Simply redirect... :-) - LOAD_URL(URL."/modules.php?module=index&what=login"); + LOAD_URL("modules.php?module=index&what=login"); // Redirection should be done here } else { // You have to configure first! - LOAD_URL(URL."install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) ?> diff --git a/mailid.php b/mailid.php index 68192d26c8..3c851cab1d 100644 --- a/mailid.php +++ b/mailid.php @@ -200,7 +200,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) // Error code is set? if (!empty($msg)) { - LOAD_URL(URL."/modules.php?module=index&msg=".$msg); + LOAD_URL("modules.php?module=index&msg=".$msg); } require_once(PATH."inc/footer.php"); diff --git a/mailid_top.php b/mailid_top.php index d406287c96..eb1ed8657a 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -162,7 +162,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) if (!empty($code)) { // Generate code - $img_code = GEN_RANDOM_CODE($CONFIG['code_length'], $code, $url_uid, $DATA); + $img_code = GEN_RANDOM_CODE($_CONFIG['code_length'], $code, $url_uid, $DATA); } switch ($mode) @@ -212,7 +212,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) if (bigintval($_POST['gfx_check']) == $img_code) { // Right code entered add points and remove entry - if (($ref_pay > 0) && ($CONFIG['allow_direct_pay'] == 'N')) + if (($ref_pay > 0) && ($_CONFIG['allow_direct_pay'] == 'N')) { // Don't add points over the referral system $locked = true; @@ -230,16 +230,17 @@ if (defined('mxchange_installed') && (mxchange_installed)) array($url_uid), __FILE__, __LINE__); // Add points + $DEPTH = 0; ADD_POINTS_REFSYSTEM($url_uid, $payment, false, "0", $locked); // Shall I add bonus points for "turbo clickers" ? if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (function_exists('BONUS_ADD_TURBO_POINTS'))) { // Is an active-rallye running and this is not a notification mail? - if (($CONFIG['bonus_active'] == 'Y') && ($notify == 'N')) + if (($_CONFIG['bonus_active'] == 'Y') && ($notify == 'N')) { // Shall I exclude the webmaster's own userid from the active-rallye? - if (((($CONFIG['bonus_uid'] == $url_uid) && ($CONFIG['bonus_include_own'] == 'Y')) || ($CONFIG['bonus_uid'] != $url_uid)) && ($CONFIG['def_refid'] != $url_uid)) + if (((($_CONFIG['bonus_uid'] == $url_uid) && ($_CONFIG['bonus_include_own'] == 'Y')) || ($_CONFIG['bonus_uid'] != $url_uid)) && ($_CONFIG['def_refid'] != $url_uid)) { // Add points and remember ranking are done in this function.... BONUS_ADD_TURBO_POINTS($DATA, $url_uid, $type); @@ -270,7 +271,8 @@ if (defined('mxchange_installed') && (mxchange_installed)) else { // Wrong image code! So add points to sender's account - ADD_POINTS_REFSYSTEM($sender, $payment); + $DEPTH = 0; + ADD_POINTS_REFSYSTEM($sender, $payment, false, 0, false, "direct"); // Remove link from table $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE id=%d LIMIT 1", @@ -294,7 +296,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) define('_TYPE_VALUE', $type); define('_DATA_VALUE', $DATA); define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true)); - if ($CONFIG['code_length'] > 0) + if ($_CONFIG['code_length'] > 0) { // Generate Code define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid)); diff --git a/modules.php b/modules.php index 1019638b45..e85392bba4 100644 --- a/modules.php +++ b/modules.php @@ -94,7 +94,7 @@ include (PATH."inc/header.php"); // Modules are by default not valid! $MOD_VALID = false; $check = "failed"; -if ((!empty($CONFIG['maintenance'])) && ($CONFIG['maintenance'] == 'Y') && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) +if ((!empty($_CONFIG['maintenance'])) && ($_CONFIG['maintenance'] == 'Y') && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) { // Maintain mode is active and you are no admin ADD_FATAL(LANG_DOWN_MAINTAINCE); diff --git a/ref.php b/ref.php index d3fdc56e33..26e6087fe1 100644 --- a/ref.php +++ b/ref.php @@ -48,7 +48,7 @@ require ("inc/config.php"); if (defined('mxchange_installed') && (mxchange_installed)) { // Base URL for redirection - switch ($CONFIG['refid_target']) + switch ($_CONFIG['refid_target']) { case "register": $URL = URL."/modules.php?module=index&what=register&refid="; @@ -96,7 +96,7 @@ if (defined('mxchange_installed') && (mxchange_installed)) else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) diff --git a/show_bonus.php b/show_bonus.php index caafa19b66..7ebf85b159 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -122,7 +122,7 @@ WHERE d.status='CONFIRMED' AND d.userid=%d AND b.".$t."='%s' LIMIT 1", define('__BONUS_FOOTER', LOAD_TEMPLATE("show_bonus_footer", true)); // Total ranks who can win - define('__BONUS_TOTAL_RANKS', $CONFIG['bonus_ranks']); + define('__BONUS_TOTAL_RANKS', $_CONFIG['bonus_ranks']); // Load final template LOAD_TEMPLATE("show_bonus"); @@ -133,7 +133,7 @@ WHERE d.status='CONFIRMED' AND d.userid=%d AND b.".$t."='%s' LIMIT 1", else { // You have to configure first! - LOAD_URL(URL."/install.php"); + LOAD_URL("install.php"); } // Really all done here... ;-) ?> diff --git a/templates/de/html/admin/admin_config_wernis.tpl b/templates/de/html/admin/admin_config_wernis.tpl index 32511bce83..bc6a11a1e4 100644 --- a/templates/de/html/admin/admin_config_wernis.tpl +++ b/templates/de/html/admin/admin_config_wernis.tpl @@ -49,6 +49,16 @@ class="admin_normal" value="$content[api_url]" size="25" maxlength="255" /> + +   + + + {--WERNIS_ADMIN_REFID--}: +   + +   diff --git a/templates/de/html/member/member_payout_form.tpl b/templates/de/html/member/member_payout_form.tpl index 066e930b8f..d89a371945 100644 --- a/templates/de/html/member/member_payout_form.tpl +++ b/templates/de/html/member/member_payout_form.tpl @@ -1,8 +1,5 @@ -
    - + +
    diff --git a/templates/de/html/member/member_wernis.tpl b/templates/de/html/member/member_wernis.tpl deleted file mode 100644 index 3aa203deea..0000000000 --- a/templates/de/html/member/member_wernis.tpl +++ /dev/null @@ -1,17 +0,0 @@ -
    {--PAYOUT_NOW_TITLE--}
    - - - - - - - - - - {--__WERNIS_ROWS--} - - - -
    - {--WERNIS_MEMBER_LIST_WERNIS--}:
    {--WERNIS_TOTAL_WERNIS--}{--WERNIS_TARGET_ACCOUNT2--}{--WERNIS_TIMESTAMP--}{--WERNIS_MEMBER_STATUS--}
    diff --git a/templates/de/html/member/member_wernis_form.tpl b/templates/de/html/member/member_wernis_form.tpl deleted file mode 100644 index ab3ac9b3b1..0000000000 --- a/templates/de/html/member/member_wernis_form.tpl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {--WERNIS_NOW_TITLE--}
     
    {--WERNIS_MAX_WERNIS--}: {--WERNIS_MAX_VALUE!}
    {--WERNIS_WANT_WERNIS--}: 
    {--WERNIS_TARGET_ACCOUNT--}: 
    {--WERNIS_OPTIONAL_PASSWORD--}: 
     
    -
    - -
    {--WERNIS_MEMBER_NOTE--}
    -
    -{--WERNIS_REMEMBER_TERMS--} -
    diff --git a/templates/de/html/member/member_wernis_mode_choose.tpl b/templates/de/html/member/member_wernis_mode_choose.tpl index 7fbeda6bdc..a822250045 100644 --- a/templates/de/html/member/member_wernis_mode_choose.tpl +++ b/templates/de/html/member/member_wernis_mode_choose.tpl @@ -1,19 +1,18 @@ - +
    - - + +
    {--MEMBER_WERNIS_MODE_CHOOSE--}
    -
    {--MEMBER_WERNIS_MODE_WITHDRAW--}
    -
    -
    {--MEMBER_WERNIS_MODE_PAYOUT--}
    -
    +
    {--MEMBER_WERNIS_MODE_WITHDRAW--}
    +
    +
    {--MEMBER_WERNIS_MODE_PAYOUT--}
    +
    + +

    + {--WERNIS_MEMBER_NO_ACCOUNT--} +

    diff --git a/templates/de/html/member/member_wernis_mode_list.tpl b/templates/de/html/member/member_wernis_mode_list.tpl new file mode 100644 index 0000000000..4eca22651d --- /dev/null +++ b/templates/de/html/member/member_wernis_mode_list.tpl @@ -0,0 +1,20 @@ + + + + + + + + + + + $content[rows] + + + +
    + {--WERNIS_MEMBER_LIST_WERNIS--} +
    {--WERNIS_TOTAL_WERNIS--}{--WERNIS_ACCOUNT--}{--WERNIS_TIMESTAMP--}{--WERNIS_MEMBER_STATUS--}
    diff --git a/templates/de/html/member/member_wernis_mode_list_row.tpl b/templates/de/html/member/member_wernis_mode_list_row.tpl new file mode 100644 index 0000000000..24ad219252 --- /dev/null +++ b/templates/de/html/member/member_wernis_mode_list_row.tpl @@ -0,0 +1,6 @@ + + $content[points] {!POINTS!} + $content[acc] + $content[stamp] + $content[status] + diff --git a/templates/de/html/member/member_wernis_mode_pay.tpl b/templates/de/html/member/member_wernis_mode_pay.tpl new file mode 100644 index 0000000000..a351d0a754 --- /dev/null +++ b/templates/de/html/member/member_wernis_mode_pay.tpl @@ -0,0 +1,47 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {--WERNIS_MEMBER_PAYOUT_TITLE--}
    {--WERNIS_MEMBER_PAYOUT_POINTS--} $content[points] {!POINTS!}
    {--WERNIS_MEMBER_PAYOUT_MIN_POINTS--} $content[min_points] {!POINTS!}
     
    {--WERNIS_MEMBER_WDS66_ID--} 
    {--WERNIS_MEMBER_WDS66_PASSWORD--} 
    {--WERNIS_MEMBER_WDS66_AMOUNT--} 
     
    +
    + {--WERNIS_MEMBER_PAYOUT_NOTE--} +
    diff --git a/templates/de/html/member/member_wernis_mode_withdraw.tpl b/templates/de/html/member/member_wernis_mode_withdraw.tpl new file mode 100644 index 0000000000..e6816291be --- /dev/null +++ b/templates/de/html/member/member_wernis_mode_withdraw.tpl @@ -0,0 +1,47 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {--WERNIS_MEMBER_WITHDRAW_TITLE--}
    {--WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT--} $content[points] {!POINTS!}
    {--WERNIS_MEMBER_WITHDRAW_MIN_POINTS--} $content[min_points] {!POINTS!}
     
    {--WERNIS_MEMBER_WDS66_ID--} 
    {--WERNIS_MEMBER_WDS66_PASSWORD--} 
    {--WERNIS_MEMBER_WDS66_AMOUNT--} 
     
    +
    + {--WERNIS_MEMBER_WITHDRAW_NOTE--} +
    diff --git a/templates/de/html/member/member_wernis_row.tpl b/templates/de/html/member/member_wernis_row.tpl deleted file mode 100644 index 05b21a845d..0000000000 --- a/templates/de/html/member/member_wernis_row.tpl +++ /dev/null @@ -1,6 +0,0 @@ - - $content[points] - $content[acc] - $content[stamp] - $content[status] -