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
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... ;-)
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... ;-)
?>
// 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";
// 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);
// 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);
}
}
// 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... ;-)
{
// 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",
else
{
// You have to configure first!
- LOAD_URL(URL."/install.php");
+ LOAD_URL("install.php");
}
// Really all done here... ;-)
?>
$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();
else
{
// You have to configure first!
- LOAD_URL(URL."/install.php");
+ LOAD_URL("install.php");
}
// Really all done here... ;-)
?>
$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']))
$_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))
$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
}
// 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")
{
// 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']));
// 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);
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");
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"))
}
// 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);
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()));
else
{
// You have to configure first!
- LOAD_URL(URL."/install.php");
+ LOAD_URL("install.php");
}
// Really all done here... ;-)
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
}
// 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
{
// 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))
// 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
$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")
{
}
// 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))
$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")
{
}
// 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")
}
// 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__);
$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__);
}
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__);
$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__);
}
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")
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)));
//
?>
// 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)
".$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=<em>".$sql_string."</em>, affected=<b>".SQL_AFFECTEDROWS()."</b>, numrows=<b>".SQL_NUMROWS($result)."</b><br />\n";
}
// 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;
}
// 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")
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);
}
}
}
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
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))
}
// 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",
$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);
}
// 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")
}
// Update variables to prevent errors
- $CONFIG['doubler_used'] += $points;
+ $_CONFIG['doubler_used'] += $points;
$DOUBLER_POINTS -= $points;
// Prepare array
//
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();
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))
{
//
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;
$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
{
}
// 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
$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",
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
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))
//
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 = "<DIV align=\"center\">
<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"".$WIDTH."\" align=\"center\"".$dashed.">
}
}
- 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 .= "<TR>
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
{
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
{
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;
}
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);
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";
}
// 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";
$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
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
}
// 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";
$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
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";
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";
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['maintenance'] = $DUMMY['maintenance'];
+ $_CONFIG['maintenance'] = $DUMMY['maintenance'];
unset($DUMMY);
break;
}
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['mt_start'] = $DUMMY['mt_start'];
- $CONFIG['mt_stage'] = $DUMMY['mt_stage'];
+ $_CONFIG['mt_start'] = $DUMMY['mt_start'];
+ $_CONFIG['mt_stage'] = $DUMMY['mt_stage'];
unset($DUMMY);
break;
}
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['nl_charge'] = $DUMMY['nl_charge']; // Charge for your members to switch off the newsletter
- $CONFIG['nl_month'] = $DUMMY['nl_month']; // Last month of check interval
+ $_CONFIG['nl_charge'] = $DUMMY['nl_charge']; // Charge for your members to switch off the newsletter
+ $_CONFIG['nl_month'] = $DUMMY['nl_month']; // Last month of check interval
unset($DUMMY);
// URL ends which are used to indentify the end of an URL or email link
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['order_min'] = $DUMMY['order_min']; // Order at least X mails
- $CONFIG['order_max'] = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive
- $CONFIG['order_select'] = $DUMMY['order_select']; // Sorting mode for selecting users while looking some up for mail delivery
- $CONFIG['order_mode'] = $DUMMY['order_mode']; // Ascending or descending sort order for above
+ $_CONFIG['order_min'] = $DUMMY['order_min']; // Order at least X mails
+ $_CONFIG['order_max'] = $DUMMY['order_max_full']; // Ordering mode: as much as possible or as much as the user want's to receive
+ $_CONFIG['order_select'] = $DUMMY['order_select']; // Sorting mode for selecting users while looking some up for mail delivery
+ $_CONFIG['order_mode'] = $DUMMY['order_mode']; // Ascending or descending sort order for above
unset($DUMMY);
// Do daily reset only when installed and extension version is at least 0.1.1
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['max_comma'] = $DUMMY['max_comma']; // Maximum numbers behind commata
- $CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL
+ $_CONFIG['max_comma'] = $DUMMY['max_comma']; // Maximum numbers behind commata
+ $_CONFIG['reject_url'] = $DUMMY['reject_url']; // Default rejection URL
define('__CURRENCY', $DUMMY['currency']); // This is the currency for fees! They shall normally remain in real money currencies...
unset($DUMMY);
break;
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
// Copy data to config array
- $CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection?
+ $_CONFIG['register_default'] = $DUMMY['register_default']; // Is Yes/No the default selection in category selection?
unset($DUMMY);
break;
}
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip'];
+ $_CONFIG['rewrite_skipped_mods'] = $DUMMY['rewrite_skip'];
unset($DUMMY);
break;
}
// When the sql_patches is not installed we cannot load it's configuration... *sigh*
if (GET_EXT_VERSION("sql_patches") != "") {
- $CONFIG['ext_autopurge'] = $DUMMY['ext_autopurge'];
- $CONFIG['mails_page'] = $DUMMY['mails_page'];
- $CONFIG['index_home'] = $DUMMY['index_home'];
- $CONFIG['verbose_sql'] = $DUMMY['verbose_sql'];
- $CONFIG['middot'] = $DUMMY['menu_blur_spacer'];
- $CONFIG['reg_points_mode'] = $DUMMY['reg_points_mode'];
- $CONFIG['index_delay'] = $DUMMY['index_delay'];
- $CONFIG['index_cookie'] = $DUMMY['index_cookie'];
- $CONFIG['def_refid'] = $DUMMY['def_refid'];
- $CONFIG['refid_target'] = $DUMMY['refid_target'];
- $CONFIG['default_theme'] = $DUMMY['default_theme'];
- $CONFIG['title_decoration'] = $DUMMY['enable_title_deco'];
- $CONFIG['title_mod_show'] = $DUMMY['enable_mod_title'];
- $CONFIG['title_what_show'] = $DUMMY['enable_what_title'];
- $CONFIG['title_left'] = $DUMMY['title_left'];
- $CONFIG['title_middle'] = $DUMMY['title_middle'];
- $CONFIG['title_right'] = $DUMMY['title_right'];
- $CONFIG['mad_counter'] = $DUMMY['mad_count'];
- $CONFIG['last_mad'] = $DUMMY['mad_timestamp'];
- $CONFIG['css_php'] = $DUMMY['css_php'];
- $CONFIG['guest_menu'] = $DUMMY['guest_menu'];
- $CONFIG['member_menu'] = $DUMMY['member_menu'];
- $CONFIG['youre_here'] = $DUMMY['youre_here'];
- $CONFIG['img_type'] = $DUMMY['img_type'];
- $CONFIG['stats_limit'] = $DUMMY['stats_limit'];
- $CONFIG['admin_menu'] = $DUMMY['admin_menu'];
- $CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter'];
- $CONFIG['salt_length'] = $DUMMY['salt_length'];
- $CONFIG['pass_scramble'] = trim($DUMMY['pass_scramble']);
- $CONFIG['file_hash'] = trim($DUMMY['file_hash']);
- $CONFIG['master_salt'] = trim($DUMMY['master_salt']);
- $CONFIG['secret_key'] = "";
- $CONFIG['show_timings'] = $DUMMY['show_timings'];
+ $_CONFIG['ext_autopurge'] = $DUMMY['ext_autopurge'];
+ $_CONFIG['mails_page'] = $DUMMY['mails_page'];
+ $_CONFIG['index_home'] = $DUMMY['index_home'];
+ $_CONFIG['verbose_sql'] = $DUMMY['verbose_sql'];
+ $_CONFIG['middot'] = $DUMMY['menu_blur_spacer'];
+ $_CONFIG['reg_points_mode'] = $DUMMY['reg_points_mode'];
+ $_CONFIG['index_delay'] = $DUMMY['index_delay'];
+ $_CONFIG['index_cookie'] = $DUMMY['index_cookie'];
+ $_CONFIG['def_refid'] = $DUMMY['def_refid'];
+ $_CONFIG['refid_target'] = $DUMMY['refid_target'];
+ $_CONFIG['default_theme'] = $DUMMY['default_theme'];
+ $_CONFIG['title_decoration'] = $DUMMY['enable_title_deco'];
+ $_CONFIG['title_mod_show'] = $DUMMY['enable_mod_title'];
+ $_CONFIG['title_what_show'] = $DUMMY['enable_what_title'];
+ $_CONFIG['title_left'] = $DUMMY['title_left'];
+ $_CONFIG['title_middle'] = $DUMMY['title_middle'];
+ $_CONFIG['title_right'] = $DUMMY['title_right'];
+ $_CONFIG['mad_counter'] = $DUMMY['mad_count'];
+ $_CONFIG['last_mad'] = $DUMMY['mad_timestamp'];
+ $_CONFIG['css_php'] = $DUMMY['css_php'];
+ $_CONFIG['guest_menu'] = $DUMMY['guest_menu'];
+ $_CONFIG['member_menu'] = $DUMMY['member_menu'];
+ $_CONFIG['youre_here'] = $DUMMY['youre_here'];
+ $_CONFIG['img_type'] = $DUMMY['img_type'];
+ $_CONFIG['stats_limit'] = $DUMMY['stats_limit'];
+ $_CONFIG['admin_menu'] = $DUMMY['admin_menu'];
+ $_CONFIG['admin_menu_sorter'] = $DUMMY['admin_menu_sorter'];
+ $_CONFIG['salt_length'] = $DUMMY['salt_length'];
+ $_CONFIG['pass_scramble'] = trim($DUMMY['pass_scramble']);
+ $_CONFIG['file_hash'] = trim($DUMMY['file_hash']);
+ $_CONFIG['master_salt'] = trim($DUMMY['master_salt']);
+ $_CONFIG['secret_key'] = "";
+ $_CONFIG['show_timings'] = $DUMMY['show_timings'];
// Read key from secret file
- if ((empty($CONFIG['file_hash'])) || (empty($CONFIG['master_salt'])) || (empty($CONFIG['pass_scramble'])))
+ if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble'])))
{
// Maybe need setup of secret key!
require_once(PATH."inc/gen_sql_patches.php");
}
// Test again
- if ((!empty($CONFIG['file_hash'])) && (!empty($CONFIG['master_salt'])) && (!empty($CONFIG['pass_scramble'])))
+ if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble'])))
{
// File hash fas generated so we can also file the secret file... hopefully.
- if ((file_exists(PATH."inc/.secret/.".$CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$CONFIG['file_hash'])))
+ if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash'])))
{
- $CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$CONFIG['file_hash']));
+ $_CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$_CONFIG['file_hash']));
}
else
{
define('_MAX' , $DUMMY['rand_no']);
} else {
// Set some lame ;-) default settings
- $CONFIG['def_refid'] = 0;
- $CONFIG['title_decoration'] = 'N';
- $CONFIG['title_mod_show'] = 'Y';
- $CONFIG['title_middle'] = "-";
- //$CONFIG['verbose_sql'] = 'N';
+ $_CONFIG['def_refid'] = 0;
+ $_CONFIG['title_decoration'] = 'N';
+ $_CONFIG['title_mod_show'] = 'Y';
+ $_CONFIG['title_middle'] = "-";
+ //$_CONFIG['verbose_sql'] = 'N';
define('MT_WORD' , DEFAULT_MT_WORD );
define('MT_WORD2', DEFAULT_MT_WORD2);
define('POINTS' , DEFAULT_POINTS);
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['top10_max'] = $DUMMY['top10_max'];
+ $_CONFIG['top10_max'] = $DUMMY['top10_max'];
unset($DUMMY);
break;
}
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
// Maximum of listed transfers for out- and in-transfers
- $CONFIG['transfer_max'] = $DUMMY['transfer_max'];
+ $_CONFIG['transfer_max'] = $DUMMY['transfer_max'];
// Age in seconds
- $CONFIG['transfer_age'] = $DUMMY['transfer_age'];
+ $_CONFIG['transfer_age'] = $DUMMY['transfer_age'];
// Lock timeout for member settings
- $CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];
+ $_CONFIG['transfer_timeout'] = $DUMMY['transfer_timeout'];
// Balance after points transfer
- $CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];
+ $_CONFIG['transfer_balance'] = $DUMMY['transfer_balance'];
// Length of touring code
- $CONFIG['transfer_code'] = $DUMMY['transfer_code'];
+ $_CONFIG['transfer_code'] = $DUMMY['transfer_code'];
// Length of touring code
- $CONFIG['ap_transfer'] = $DUMMY['ap_transfer'];
+ $_CONFIG['ap_transfer'] = $DUMMY['ap_transfer'];
unset($DUMMY);
- if ((defined('__DAILY_RESET')) && ($CONFIG['ap_transfer'] == 'Y'))
+ if ((defined('__DAILY_RESET')) && ($_CONFIG['ap_transfer'] == 'Y'))
{
// Automatically remove outdated or not displayed transactions
- TRANSFER_AUTPPURGE($CONFIG['transfer_max'], $CONFIG['transfer_age']);
+ TRANSFER_AUTPPURGE($_CONFIG['transfer_max'], $_CONFIG['transfer_age']);
}
break;
}
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['user_limit'] = $DUMMY['user_limit'];
- $CONFIG['user_alpha'] = $DUMMY['user_alpha'];
+ $_CONFIG['user_limit'] = $DUMMY['user_limit'];
+ $_CONFIG['user_alpha'] = $DUMMY['user_alpha'];
unset($DUMMY);
break;
}
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id bigint(20) not null default '0'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 varchar(32) not null default ''";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url varchar(255) not null default 'http://www.wds66.com/api/'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid varchar(6) not null default ''";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD wernis_userid varchar(6) not null default ''";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', '', '{!POINTS!}-Management', 'Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'config_wernis', 'WDS66-API-Einstellungen', 'Konfiguration zur WDS66-API einstellen.', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'list_wernis', '{!POINTS!}-Anfragen auflisten', 'Listet alle {!POINTS!}-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
default: // Do stuff when extension is loaded
$DUMMY = LOAD_CONFIG("0");
- $CONFIG['wernis_min_amount'] = $DUMMY['wernis_min_amount'];
- $CONFIG['wernis_api_id'] = $DUMMY['wernis_api_id'];
- $CONFIG['wernis_api_md5'] = $DUMMY['wernis_api_md5'];
- $CONFIG['wernis_api_url'] = $DUMMY['wernis_api_url'];
+ $_CONFIG['wernis_min_amount'] = $DUMMY['wernis_min_amount'];
+ $_CONFIG['wernis_api_id'] = $DUMMY['wernis_api_id'];
+ $_CONFIG['wernis_api_md5'] = $DUMMY['wernis_api_md5'];
+ $_CONFIG['wernis_api_url'] = $DUMMY['wernis_api_url'];
+ $_CONFIG['wernis_refid'] = $DUMMY['wernis_refid'];
unset($DUMMY);
break;
}
}
// Shall we display the parsing time and number of queries?
- if ((isset($CONFIG['show_timings'])) && ($CONFIG['show_timings'] == "Y")) {
+ if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y")) {
// Then display it here
DISPLAY_PARSING_TIME_FOOTER();
}
// That's why you don't need any \n at the end of your HTML code... :-)
if (_OB_CACHING == "on") {
// Output into PHP's internal buffer
- echo $HTML;
+ OUTPUT_RAW($HTML);
// That's why you don't need any \n at the end of your HTML code... :-)
if ($NEW_LINE) echo "\n";
case "direct":
// If we are switching from render to direct output rendered code
- if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { echo $OUTPUT; $OUTPUT = ""; }
+ if ((!empty($OUTPUT)) && (_OB_CACHING != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ""; }
// The same as above... ^
- echo $HTML;
+ OUTPUT_RAW($HTML);
if ($NEW_LINE) echo "\n";
break;
}
// Output code here, DO NOT REMOVE! ;-)
- echo $OUTPUT;
- flush();
+ OUTPUT_RAW($OUTPUT);
} elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) {
// Rewrite links when rewrite extension is active
if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
}
// Output code here, DO NOT REMOVE! ;-)
- echo $OUTPUT;
- flush();
+ OUTPUT_RAW($OUTPUT);
}
}
+// Output the raw HTML code
+function OUTPUT_RAW ($HTML) {
+ if ((mxchange_installed) && (basename($_SERVER['PHP_SELF']) != "install.php")) {
+ // Not in install-mode so strip slashes away
+ echo stripslashes($HTML);
+ } else {
+ // Output directly in install-mode
+ echo $HTML;
+ }
+
+ // Flush the output
+ flush();
+}
+
// Add a fatal error message to the queue array
function ADD_FATAL ($message, $extra="")
{
// Load a template file and return it's content (only it's name; do not use ' or ")
function LOAD_TEMPLATE($template, $return=false, $content="") {
// Add more variables which you want to use in your template files
- global $DATA, $CONFIG, $username;
+ global $DATA, $_CONFIG, $username;
// Count the template load
- if (!isset($CONFIG['num_templates'])) $CONFIG['num_templates'] = 0;
- $CONFIG['num_templates']++;
+ if (!isset($_CONFIG['num_templates'])) $_CONFIG['num_templates'] = 0;
+ $_CONFIG['num_templates']++;
// Init some data
$ACTION = SQL_ESCAPE($GLOBALS['action']);
// Generate a password in a specified length or use default password length
function GEN_PASS($LEN = 0) {
- global $CONFIG;
- if ($LEN == 0) $LEN = $CONFIG['pass_len'];
+ global $_CONFIG;
+ if ($LEN == 0) $LEN = $_CONFIG['pass_len'];
// Initialize array with all allowed chars
$ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/");
// Translates the american decimal dot into a german comma
function TRANSLATE_COMMA($dotted, $cut=true)
{
- global $CONFIG;
+ global $_CONFIG;
// Default is 3 you can change this in admin area "Misc -> 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);
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;
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;
//
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;
//
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;
}
// Expiration in a nice output format
- if ($CONFIG['auto_purge'] == 0)
+ if ($_CONFIG['auto_purge'] == 0)
{
// Will never expire!
$EXPIRATION = MAIL_WILL_NEVER_EXPIRE;
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]);
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]);
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;
$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];
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":
}
//
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);
//
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;
$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
// 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;
return "<IMG src=\"".URL."/img.php?code=".$img_code."\">\n";
}
- switch ($CONFIG['img_type'])
+ switch ($_CONFIG['img_type'])
{
case "jpg":
// Loads JPEG image
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;
}
// 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") == "")) {
$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();
//* DEBUG: */ echo "Descrambled=".$sha1b." (".strlen($sha1b).")<br>";
// Generate the password salt string
- $salt = substr($sha1, 0, $CONFIG['salt_length']);
+ $salt = substr($sha1, 0, $_CONFIG['salt_length']);
//* DEBUG: */ echo $salt." (".strlen($salt).")<br />";
}
else
{
- $salt = substr($salt, 0, $CONFIG['salt_length']);
+ $salt = substr($salt, 0, $_CONFIG['salt_length']);
}
// Return hash
}
//
function scrambleString($str) {
- global $CONFIG;
+ global $_CONFIG;
// Init
$scrambled = "";
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)));
//
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;
// normally be stored in cookies
function ADD_URL_DATA($URL)
{
- global $_GET, $CONFIG;
+ global $_CONFIG;
$ADD = "";
// Determine URL binder
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
}
//
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()));
$newHash .= $mod;
}
//* DEBUG: */ die($passHash."<br>".$newHash." (".strlen($newHash).")");
- $ret = generateHash($newHash, $CONFIG['master_salt']);
+ $ret = generateHash($newHash, $_CONFIG['master_salt']);
}
// Return result
// 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?
// 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
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);
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...
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)));
}
// 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);
}
}
$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));
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);
}
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', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> können Sie schon für <strong>5,00€</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> {!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', "<A href=\"http://www.wds66.com/ref.php?refid=10437\" target=\"_blank\">Hier</A> können Sie schon für <strong>5,00€</strong>=<strong>25.000 Abfragen</strong> ein API-Account beantragen (dazu ist ein <strong>kostenloses</strong> {!POINTS!}-Account dennoch nötig!) <strong>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 <u>%s</u> 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!");
define('WERNIS_API_REQUEST_ERROR', "Abfragefehler: <u>%s</u>");
define('WERNIS_API_REQUEST_FAILED', "Unbekannter Fehler <u>%s</u> von API erhalten! Bitte im [<A href=\"http://forum.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Forum\">Forum melden</A>], 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. [<A href=\"http://www.wds66.com/modules.php?module=export\" target=\"_blank\" title=\"Direkt zum WDS66-Exportaccount\">Hier</A>] 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 <u>%s</u> 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: <u>%s</u> {!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: [<A href=\"http://www.wds66.com/modules.php?module=psw_verg\" target=\"_blank\">Vergessen?</A>]");
+define('WERNIS_MEMBER_WDS66_PASSWORD', "Wernis-Passwort (nicht Accountpasswort!): [<A href=\"http://www.wds66.com/modules.php?module=psw_verg\" target=\"_blank\">Vergessen?</A>]");
+define('WERNIS_MEMBER_WDS66_AMOUNT', "Zu überweisenden Betrag eingeben:");
+define('WERNIS_MEMBER_MODE_INVALID', "Ungültiger Modus <u>%s</u> 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 <u>%s</u> {!POINTS!} an!");
+define('WERNIS_MEMBER_WITHDRAW_FAILED', "Die Einzahlung hat nicht geklappt! Rückmeldung für den Support: <em>%s</em>.");
+define('WERNIS_MEMBER_WITHDRAW_DONE', "Einzahlung auf Ihr {!TITLE!} Konto erfolgreich abgeschlossen. :-)");
+define('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED', "Sie können nicht <u>%s</u> {!POINTS!} auszahlen, da Sie nur <u>%s</u> übrig haben.");
+define('WERNIS_MEMBER_STATUS', "Überweisungsart");
+
//
?>
//
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;
$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",
if ($lines == 1)
{
// Count cache hits
- $CONFIG['cache_hits']++;
+ $_CONFIG['cache_hits']++;
break;
}
}
// 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 = "";
{
// 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
$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",
// 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
//
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);
}
}
}
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;
}
//
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)
{
//
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)
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
//
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__);
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;
}
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("<br /><DIV align=\"center\">
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("<LI>".PAYOUT_IN.": <STRONG><A href=\"".URL."/modules.php?module=login&what=payout&payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</A></STRONG></LI>");
}
}
{
// 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);
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);
//
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",
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);
//
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);
//
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(
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);
//
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'",
//
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")
{
if ($cnt > 0)
{
// Count cache hits
- $CONFIG['cache_hits']++;
+ $_CONFIG['cache_hits']++;
// Remove old refs
//* DEBUG: */ echo "+".$cnt."/".$old."+<br />";
//
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
'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";
}
//
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);
//
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();
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
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 ???
// 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
// 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
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']);
if (!empty($_GET['mode'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['mode']);
$OUT .= "&letter=".$ltr."&sortby=".$sortby.$ADD."\">".$ltr."</A>";
}
- 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 .= " ]<br />[ ";
}
}
// Get the status message
-function WERNIS_ERROR_MESSAGE () {
+function GET_WERNIS_ERROR_MESSAGE () {
global $WERNIS;
if (isset($WERNIS['message'])) {
// Use raw 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)) {
}
// 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",
}
// 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;
}
);
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",
// 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
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;
+}
+
//
?>
$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");
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");
$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");
$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");
$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");
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");
}
// 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");
/**
* Commented out...
*
- *foreach ($CONFIG as $k=>$v)
+ *foreach ($_CONFIG as $k=>$v)
*{
- * $CONFIG[$k] = COMPILE_CODE($v);
+ * $_CONFIG[$k] = COMPILE_CODE($v);
*}
*/
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)";
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";
$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);
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
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;";
$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)),
// 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...
// 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++)
// 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));
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)";
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";
$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;";
$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)),
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
}
// 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")))
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
{
// 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
{
// 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
{
//
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']."*<br />\n";
if (EXT_IS_ACTIVE("cache"))
{
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) {
}
// Update current configuration
- $CONFIG[$id] = $val;
+ $_CONFIG[$id] = $val;
}
}
}
// 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__);
}
}
$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();
$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
$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);
//
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")
{
}
// 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
}
// 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
//
function OUTPUT_SELECTED_TASKS($_POST, $result_tasks)
{
- global $CONFIG, $NOTES;
+ global $_CONFIG, $NOTES;
if ((isset($_POST['assign'])) && (count($_POST['task']) > 0))
{
// Assign / do 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")
// 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%")."<br />\n";
}
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
{
{
// 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
$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");
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");
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");
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");
else
{
// Prepare data for the template
- switch ($CONFIG['admin_menu'])
+ switch ($_CONFIG['admin_menu'])
{
case "NEW":
define('__ADMIN_MENU_NEW', " checked");
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', "");
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");
}
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");
define('__BEG_RALLYE_N', " checked");
break;
}
- switch ($CONFIG['beg_active'])
+ switch ($_CONFIG['beg_active'])
{
case 'Y':
define('__BEG_ACTIVE_Y', " checked");
define('__BEG_ACTIVE_N', " checked");
break;
}
- switch ($CONFIG['beg_mode'])
+ switch ($_CONFIG['beg_mode'])
{
case "DIRECT":
define('__BEG_MODE_DIRECT', " checked");
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");
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");
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");
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");
}
// 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");
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");
define('__BIRTHDAY_ACTIVE_N', " checked");
break;
}
- switch ($CONFIG['birthday_mode'])
+ switch ($_CONFIG['birthday_mode'])
{
case "DIRECT":
define('__BIRTHDAY_MODE_DIRECT', " checked");
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");
}
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 = "<OL start=\"2\">\n";
$OUT .= "</OL>\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");
break;
}
// Other bonus to de-/activate
- switch ($CONFIG['bonus_login_yn'])
+ switch ($_CONFIG['bonus_login_yn'])
{
case 'Y':
define('__BONUS_LOGIN_Y', " checked");
define('__BONUS_LOGIN_N', " checked");
break;
}
- switch ($CONFIG['bonus_stats_yn'])
+ switch ($_CONFIG['bonus_stats_yn'])
{
case 'Y':
define('__BONUS_STATS_Y', " checked");
define('__BONUS_STATS_N', " checked");
break;
}
- switch ($CONFIG['bonus_order_yn'])
+ switch ($_CONFIG['bonus_order_yn'])
{
case 'Y':
define('__BONUS_ORDER_Y', " checked");
define('__BONUS_ORDER_N', " checked");
break;
}
- switch ($CONFIG['bonus_ref_yn'])
+ switch ($_CONFIG['bonus_ref_yn'])
{
case 'Y':
define('__BONUS_REF_Y', " checked");
define('__BONUS_REF_N', " checked");
break;
}
- switch ($CONFIG['bonus_click_yn'])
+ switch ($_CONFIG['bonus_click_yn'])
{
case 'Y':
define('__BONUS_CLICK_Y', " checked");
define('__BONUS_CLICK_N', " checked");
break;
}
- switch ($CONFIG['bonus_en_notify'])
+ switch ($_CONFIG['bonus_en_notify'])
{
case 'Y':
define('__BONUS_EN_NOTIFY_Y', " checked");
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");
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");
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");
$_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';
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");
{
// 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");
}
// Take points from own account (Y/N)
- switch ($CONFIG['doubler_own'])
+ switch ($_CONFIG['doubler_own'])
{
case 'Y':
define('__DOUBLER_OWN_Y', " checked");
}
// Mail send mode
- switch ($CONFIG['doubler_send_mode'])
+ switch ($_CONFIG['doubler_send_mode'])
{
case "DIRECT":
define('__DOUBLER_SEND_DIRECT', " checked");
}
// 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");
}
// 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");
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;
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");
{
// 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;
{
// 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
while (list($id, $wht, $wtitle) = SQL_FETCHROW($result))
{
$LINK = "<A href=\"".URL."/modules.php?module=admin&what=config_home&sub=target&home=".$wht."\">"._IS_NEW_HOME."</A>";
- if ($wht == $CONFIG['index_home'])
+ if ($wht == $_CONFIG['index_home'])
{
// Is current home
$LINK = "<STRONG class=\"admin_note\">"._IS_CURRENT_HOME."</STRONG>";
else
{
// Start of this exchange
- if ($CONFIG['mt_start'] > 0)
+ if ($_CONFIG['mt_start'] > 0)
{
// Only show start
- define('__MT_START', "<STRONG>".MAKE_DATETIME($CONFIG['mt_start'], "3")."</STRONG>");
+ define('__MT_START', "<STRONG>".MAKE_DATETIME($_CONFIG['mt_start'], "3")."</STRONG>");
}
else
{
}
// Next stage of this MT
- define('__MT_STAGE', $CONFIG['mt_stage']);
+ define('__MT_STAGE', $_CONFIG['mt_stage']);
// Load template
LOAD_TEMPLATE("admin_config_mediadata");
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);
else
{
// Prepare constants for the template
- switch ($CONFIG['order_max'])
+ switch ($_CONFIG['order_max'])
{
case "ORDER":
define('__ORDER_DEFAULT', " checked");
}
// 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\"");
}
// 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");
}
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', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$CONFIG['online_timeout']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
- define('_CFG_URL_TLOCK' , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$CONFIG['url_tlock'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
- define('_CFG_PROFILE_LOCK' , "<INPUT type=\"text\" name=\"profile_lock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$CONFIG['profile_lock'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
- define('_CFG_PROFILE_UPDATE', "<INPUT type=\"text\" name=\"profile_update\" class=\"admin_normal\" size=\"10\" maxlength=\"255\" value=\"".$CONFIG['profile_update']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
- define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$CONFIG['resend_profile_update'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+ define('_CFG_ONLINE_TIMEOUT', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$_CONFIG['online_timeout']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+ define('_CFG_URL_TLOCK' , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$_CONFIG['url_tlock'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+ define('_CFG_PROFILE_LOCK' , "<INPUT type=\"text\" name=\"profile_lock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$_CONFIG['profile_lock'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+ define('_CFG_PROFILE_UPDATE', "<INPUT type=\"text\" name=\"profile_update\" class=\"admin_normal\" size=\"10\" maxlength=\"255\" value=\"".$_CONFIG['profile_update']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
+ define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".$_CONFIG['resend_profile_update'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
}
- if ($CONFIG['test_text'] == 'N')
+ if ($_CONFIG['test_text'] == 'N')
{
define('_CFG_TEST_TEXT_N', " checked");
define('_CFG_TEST_TEXT_Y', "");
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', "");
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', "");
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', "");
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', "");
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', "");
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', "");
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', "");
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 {
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);
}
$_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";
{
// 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");
}
// 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");
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");
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;
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");
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");
if (empty($title)) $title = "---";
// Already registered module?
- if (ereg($mod, $CONFIG['rewrite_skipped_mods']))
+ if (ereg($mod, $_CONFIG['rewrite_skipped_mods']))
{
// Found
$y = " checked";
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
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");
else
{
// Guest stats
- switch (strtolower($CONFIG['guest_stats']))
+ switch (strtolower($_CONFIG['guest_stats']))
{
case "members":
define('__MEMBERS_RADIO', " checked selected");
}
// Max stats entries per page
- define('__STATS_LIMIT', $CONFIG['stats_limit']);
+ define('__STATS_LIMIT', $_CONFIG['stats_limit']);
// Load template
LOAD_TEMPLATE("admin_config_stats");
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");
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");
}
// 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");
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");
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()) {
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
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']))
{
// 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'];
$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)
// 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
{
// 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']))
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;
</TR>");
// 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))
{
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("</TABLE>
</TD>
</TR>");
// 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))
}
// 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("</TABLE>
// 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);
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
// 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']))
{
// 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
{
// 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 = "<STRONG>";
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));
}
// 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");
// 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']))
{
// 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
{
// 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
{
// 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 = "<STRONG>";
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));
}
// 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");
// Set base URL
$BASE = "<A href=\"".URL."/modules.php?module=admin";
-$WHERE = " WHERE refid='0'";
+$whereStatement = " WHERE refid='0'";
if (($_GET['letter'] != _ALL2) && ($_GET['letter'] != _OTHERS) && (!empty($_GET['letter'])))
{
// List only persons w
- $WHERE = " WHERE refid='0' AND family LIKE '".$_GET['letter']."%'";
+ $whereStatement = " WHERE refid='0' AND family LIKE '".$_GET['letter']."%'";
}
if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family";
-$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'];
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
{
// 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
break;
}
-if (!empty($WHERE))
+if (!empty($whereStatement))
{
$SEL = 0;
if (isset($_POST['task'])) $SEL = SELECTION_COUNT($_POST['task']);
// 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()))
{
}
// 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!
}
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'];
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
{
if (isset($_POST['ok']))
{
// De- or activate maintenance mode
- switch ($CONFIG['maintenance'])
+ switch ($_CONFIG['maintenance'])
{
case 'Y':
$target_mode = 'N';
}
else
{
- switch ($CONFIG['maintenance'])
+ switch ($_CONFIG['maintenance'])
{
case 'Y': // Maintenance mode is active
define('ADMIN_MAINTENANCE_MODE', ADMIN_MAINTENANCE_MODE_IS_ACTIVE);
// 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";
{
// 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))
{
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 = "";
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
// 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
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]);
}
OUTPUT_HTML("<TR>
<TD colspan=\"8\" align=\"center\" class=\"admin_footer\">
- ".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."
</TD>
</TR>
</TABLE>");
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");
}
}
$_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;
}
// Output message with added points
OUTPUT_HTML("<FONT class=\"tiny\">
".BONUS_LOGIN_BONUS_ADDED_1."
- <STRONG>".TRANSLATE_COMMA($CONFIG['login_bonus'])." ".POINTS."</STRONG>
+ <STRONG>".TRANSLATE_COMMA($_CONFIG['login_bonus'])." ".POINTS."</STRONG>
".BONUS_LOGIN_BONUS_ADDED_2."
</FONT>");
}
else
{
// Matching line not found!
- LOAD_URL(URL."/modules.php?module=index&what=login");
+ LOAD_URL("modules.php?module=index&what=login");
}
// Free memory
else
{
// He is no longer logged in
- LOAD_URL(URL."/modules.php?module=index&what=login");
+ LOAD_URL("modules.php?module=index&what=login");
}
}
else
{
// Go away...
- LOAD_URL(URL."/modules.php?module=login");
+ LOAD_URL("modules.php?module=login");
}
//
?>
// 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
}
if (EXT_IS_ACTIVE("active"))
{
// Add link to "we were active today" page
- LOAD_TEMPLATE("guest_menu_bottom", false, "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&what=active\">".$CONFIG['middot'].GUEST_ACTIVE_LINK."</A>");
+ LOAD_TEMPLATE("guest_menu_bottom", false, "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&what=active\">".$_CONFIG['middot'].GUEST_ACTIVE_LINK."</A>");
}
//
}
// 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)
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)
{
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
// 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));
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;
}
// 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']);
}
}
$_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));
$_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);
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);
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());
// 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');
}
}
// 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
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())
//
// 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"))
'value' => $extra
);
$OUT_EXTRA .= LOAD_TEMPLATE("mediadata_extra_row", true, $content);
- $ROWS_EXTRA++;
+ $rowNameS_EXTRA++;
}
if (EXT_IS_ACTIVE("doubler"))
{
'value' => $holiday
);
$OUT_USER .= LOAD_TEMPLATE("mediadata_extra_row", true, $content);
- $ROWS_USER++;
+ $rowNameS_USER++;
}
if (EXT_IS_ACTIVE("transfer"))
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");
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;
$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;
{
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']);
}
// 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()))
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
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()";
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()";
{
// 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']);
}
}
}
if ($SHORT_PASS)
{
- OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".SHORT_PASS.": ".$CONFIG['pass_len']."</SPAN></STRONG><br /><br />");
+ OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".SHORT_PASS.": ".$_CONFIG['pass_len']."</SPAN></STRONG><br /><br />");
}
if ($IP_TIMEOUT)
{
OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".REMOTE_ADDR_TIMEOUT."</SPAN></STRONG><br /><br />");
}
- if ((!empty($cats)) && ($cats < $CONFIG['least_cats']))
+ if ((!empty($cats)) && ($cats < $_CONFIG['least_cats']))
{
- OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".CATS_LEAST.": ".$CONFIG['least_cats']."</SPAN></STRONG><br /><br />");
+ OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".CATS_LEAST.": ".$_CONFIG['least_cats']."</SPAN></STRONG><br /><br />");
}
// Generate birthday selection
// 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;
}
// 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 {
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']);
{
// New variant, good!
$OUT = "<SELECT name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
- $WHERE = "WHERE is_active='Y'";
- if (IS_ADMIN()) $WHERE = "";
- $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $_POST['country_code'], "code", $WHERE);
+ $whereStatement = "WHERE is_active='Y'";
+ if (IS_ADMIN()) $whereStatement = "";
+ $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $_POST['country_code'], "code", $whereStatement);
$OUT .= "</SELECT>";
define('__COUNTRY_CONTENT', $OUT);
}
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
$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))
// 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(
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))
// 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(
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))
// 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(
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");
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
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']))
}
// 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']);
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 </table>
LOAD_TEMPLATE("guest_content_footer");
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");
}
//
?>
}
// 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']);
}
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(" <br /></TD>
</TR>
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ($BLOCK_MODE)
{
}
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)
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN()))
{
// 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
}
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()))
{
{
// 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 = "";
}
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()))
{
{
// 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
{
// 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 = "";
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php[13~?module=index");
+ LOAD_URL("modules.php[13~?module=index");
}
// Add description as navigation point
ADD_DESCR("member", basename(__FILE__));
$UID = $GLOBALS['userid'];
-$WHERE = " WHERE visible='Y'";
-if (IS_ADMIN()) $WHERE = "";
+$whereStatement = " WHERE visible='Y'";
+if (IS_ADMIN()) $whereStatement = "";
-$result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$WHERE." ORDER BY sort", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__);
$cats = SQL_NUMROWS($result);
if ($cats > 0)
{
if ($joined == 'N') $cnt++;
}
- if (($cats - $cnt) < $CONFIG['least_cats'])
+ if (($cats - $cnt) < $_CONFIG['least_cats'])
{
unset($_POST['ok']);
$LEAST = true;
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));
}
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()))
{
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"))
}
// 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);
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());
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN()))
{
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;
// 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']);
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
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)
$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;
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"));
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");
}
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()))
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Base URL for redirection (both cases)
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN()))
{
$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', "<FONT class=\"member_failed\">".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + $CONFIG['profile_lock'], "0").MEMBER_PROFILE_LOCKED_2."</FONT>");
+ define('CHANGE', "<FONT class=\"member_failed\">".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + $_CONFIG['profile_lock'], "0").MEMBER_PROFILE_LOCKED_2."</FONT>");
}
else
{
$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");
}
{
// Generate selection box
$OUT = "<SELECT name=\"country_code\" class=\"member_select\" size=\"1\">\n";
- $WHERE = "WHERE is_active='Y'";
- if (IS_ADMIN()) $WHERE = "";
- $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $DATA[3], "code", $WHERE);
+ $whereStatement = "WHERE is_active='Y'";
+ if (IS_ADMIN()) $whereStatement = "";
+ $OUT .= ADD_OPTION_LINES("countries", "id", "descr", $DATA[3], "code", $whereStatement);
$OUT .= "</SELECT>";
define('__COUNTRY_CONTENT', $OUT);
}
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");
}
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN()))
{
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"))
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN()))
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN()))
{
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)
}
// 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",
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");
//
// 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)
// 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))
$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));
}
}
// 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",
$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;
{
// 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
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?
// 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)
$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);
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."<br />".CONFIG_URL_TLOCK." ".$STD." ".
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:
$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);
}
// 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 = "";
if ($HTML_EXT)
{
// Add some content when html extension is active
- if (($CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) $ADD = "<TR><TD colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </TD></TR>\n";
+ if (($_CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) $ADD = "<TR><TD colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </TD></TR>\n";
define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_intro", true));
}
else
define('MEMBER_HTML_EXTENSION', "<TR><TD colspan=\"2\"><INPUT type=\"hidden\" name=\"html\" value=\"N\"></TD></TR>");
}
// 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(
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))
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");
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;
}
}
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
$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
$content = array(
'lvl' => $lvl,
'per' => $per,
- 'points' => TRANSLATE_COMMA($POINTS),
+ 'points' => TRANSLATE_COMMA($points),
'refs' => $REFS,
);
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";
// 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));
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN()))
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
// Clicks on your reflink
OUTPUT_HTML(YOUR_REFCLICKS.": <STRONG>".$c."</STRONG> ".CLICKS."</FONT><br /><br />");
-$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)
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN()))
{
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN()))
{
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
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
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', "<INPUT type=\"hidden\" name=\"code_chk\" value=\"".$rand."\"><INPUT type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"".__TRANSFER_TO_DISABLED."> ".$img);
}
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);
// 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";
// 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";
}
// 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
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
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");
// 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("<br />");
+ } elseif (empty($_POST['wds66_password'])) {
+ // Nothing entered in WDS66 password
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD);
+ OUTPUT_HTML("<br />");
+ } elseif (empty($_POST['amount'])) {
+ // Nothing entered in amount
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT);
+ OUTPUT_HTML("<br />");
+ } 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("<br />");
+ } elseif ($_POST['amount'] != bigintval($_POST['amount'])) {
+ // Only numbers in amount!
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
+ OUTPUT_HTML("<br />");
+ } 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("<br />");
+ } 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("<br />");
+ } else {
+ // Something went wrong
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+ OUTPUT_HTML("<br />");
+ }
+ }
+ 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("<br />");
+ } elseif (empty($_POST['wds66_password'])) {
+ // Nothing entered in WDS66 password
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD);
+ OUTPUT_HTML("<br />");
+ } elseif (empty($_POST['amount'])) {
+ // Nothing entered in amount
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT);
+ OUTPUT_HTML("<br />");
+ } 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("<br />");
+ } elseif ($_POST['amount'] != bigintval($_POST['amount'])) {
+ // Only numbers in amount!
+ LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
+ OUTPUT_HTML("<br />");
+ } 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("<br />");
+ } 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("<br />");
+ } 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("<br />");
+ } else {
+ // Something went wrong
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE()));
+ OUTPUT_HTML("<br />");
+ }
+ }
+ 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);
+
//
?>
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));
// 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__);
$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)
{
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__);
// 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)
{
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__);
// 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__);
}
// Init configuration arrays
- $CONFIG = array(
+ $_CONFIG = array(
'code_length' => 0
);
$EXT_CSS_FILES = array();
}
// Load the configuration
- $CONFIG = array_merge($CONFIG, SQL_FETCHARRAY($result));
+ $_CONFIG = array_merge($_CONFIG, SQL_FETCHARRAY($result));
// Initialize include-file-pool
$INC_POOL = array();
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";
} 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'] = "";
$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
///////////////////////////////////////////////////
// Set CONFIG array
- $CONFIG = array(
+ $_CONFIG = array(
'code_length' => 0
);
$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
//
function ADD_MODULE_TITLE($mod)
{
- global $MODULES, $CONFIG;
+ global $MODULES, $_CONFIG;
$name = ""; $result = false;
// Load title
if (!mxchange_installing)
$name = $MODULES['title'][$mod];
// Update cache hits
- $CONFIG['cache_hits']++;
+ $_CONFIG['cache_hits']++;
}
else
{
// 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);
$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!
}
// 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";
}
// 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)) {
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."<STRONG><A class=\"you_are_here\" href=\"".URL."/modules.php?module=".$MOD_CHECK."&".$type."=".$search.$LINK_ADD."\">".$ret."</A></STRONG>\n";
//* DEBUG: */ echo __LINE__."*".$type."/".$GLOBALS['what']."*<br />\n";
}
//
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())
}
// Menu title
- $content .= $CONFIG['middot'].$sub_title;
+ $content .= $_CONFIG['middot'].$sub_title;
if ($test) {
$content .= "</A>";
// 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."<br />";
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]);
//
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",
// 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;
} 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 {
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... :-)
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
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."*<br />\n";
+ //* DEBUG: */ echo __LINE__."*".$DATA."/".$search."/".$tableName."/".$ret."*<br />\n";
SQL_FREERESULT($result);
if (empty($ret)) {
- if (($DATA == "counter") || ($DATA == "id")) {
+ if (($lookFor == "counter") || ($lookFor == "id")) {
$ret = "0";
} else {
$ret = "0.00000";
*/
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")
//
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;
}
// 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__);
}
}
// 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);
//
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
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
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...
//
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("<META name=\"description\" content=\"".$DESCR."\">");
}
//
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])))
}
// Count cache hits
- $CONFIG['cache_hits']++;
+ $_CONFIG['cache_hits']++;
}
else
{
//
function MODULE_HAS_MENU($mod)
{
- global $EXTENSIONS, $MODULES, $CONFIG;
+ global $EXTENSIONS, $MODULES, $_CONFIG;
// All is false by default
$ret = false;
{
// 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))
}
// 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")
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);
}
}
}
}
// 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))
}
}
- // 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]."*<br />";
+ // 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]."*<br />";
if ((($cnt >= $DATA[8])) && ($LAST_SENT_ID != $DATA[0]))
{
// Yes we do, so we notify admin and sender about fully sent mail!
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 = "";
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."*<br />";
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $POINTS);
+ //* DEBUG: */ echo "*MEDIA/L:".__LINE__."/".$points."*<br />";
+ 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]]++;
}
}
}
}
- 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))
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)
}
// 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__."<br />";
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",
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
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()
}
// 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
}
// 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")) {
$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
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(
}
// Handle bonus points
- BONUS_POINTS_HANDLER($CONFIG['bonus_stats']);
+ BONUS_POINTS_HANDLER($_CONFIG['bonus_stats']);
}
// Free memory
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))
// 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("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"".URL."/".$BASE."\">");
}
//
-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'];
// 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;
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);
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
// 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?
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... ;-)
?>
// 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");
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)
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;
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);
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",
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));
// 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);
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=";
else
{
// You have to configure first!
- LOAD_URL(URL."/install.php");
+ LOAD_URL("install.php");
}
// Really all done here... ;-)
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");
else
{
// You have to configure first!
- LOAD_URL(URL."/install.php");
+ LOAD_URL("install.php");
}
// Really all done here... ;-)
?>
class="admin_normal" value="$content[api_url]" size="25"
maxlength="255" /></TD>
</TR>
+ <TR>
+ <TD colspan="3" class="seperator" height="5"> </TD>
+ </TR>
+ <TR>
+ <TD width="300" align="right">{--WERNIS_ADMIN_REFID--}:</TD>
+ <TD class="seperator" width="10"> </TD>
+ <TD width="270"><INPUT type="text" name="wernis_refid"
+ class="admin_normal" value="$content[refid]" size="25"
+ maxlength="255" /></TD>
+ </TR>
<TR>
<TD colspan="3" class="bottom2 seperator" height="5"> </TD>
</TR>
-<FORM
- action="{!URL!}/modules.php?module=login&what=payout&payout=$_GET[payout]"
- method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="440"
- class="member_table dashed">
+<FORM action="{!URL!}/modules.php?module=login&what=payout&payout=$_GET[payout]" method="POST" style="margin-bottom: 0px">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
<TR>
<TD colspan="3" align="center" class="member_title2 bottom2"
height="30"><STRONG>{--PAYOUT_NOW_TITLE--}</STRONG></TD>
+++ /dev/null
-<TABLE border="0" cellspacing="0" cellpadding="0" width="680"
- class="member_table dashed" align="center">
- <TR>
- <TD colspan="4" align="center" class="member_title2" height="30">
- <STRONG>{--WERNIS_MEMBER_LIST_WERNIS--}:</STRONG></TD>
- </TR>
- <TR>
- <TD width="180" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TOTAL_WERNIS--}</STRONG></TD>
- <TD width="130" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TARGET_ACCOUNT2--}</STRONG></TD>
- <TD width="150" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TIMESTAMP--}</STRONG></TD>
- <TD width="120" align="center" class="member_title2 bottom2"><STRONG>{--WERNIS_MEMBER_STATUS--}</STRONG></TD>
- </TR>
- {--__WERNIS_ROWS--}
- <TR>
- <TD colspan="4" class="seperator member_footer" height="10"> </TD>
- </TR>
-</TABLE>
+++ /dev/null
-<FORM
- action="{!URL!}/modules.php?module=login&what=wernis&wernis=$_GET[wernis]"
- method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" width="440"
- class="member_table dashed">
- <TR>
- <TD colspan="3" align="center" class="member_title2 bottom2"
- height="30"><STRONG>{--WERNIS_NOW_TITLE--}</STRONG></TD>
- </TR>
- <TR>
- <TD colspan="3" height="3" class="seperator"> </TD>
- </TR>
- <TR>
- <TD height="25" align="right">{--WERNIS_MAX_WERNIS--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><STRONG>{--WERNIS_MAX_VALUE!}</STRONG></TD>
- </TR>
- <TR>
- <TD height="25" align="right">{--WERNIS_WANT_WERNIS--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><INPUT type="text" name="wernis" class="member_normal"
- size="10" maxlength="255" value="{--WERNIS_MAX_VALUE!}"></STRONG></TD>
- </TR>
- <TR>
- <TD height="25" align="right">{--WERNIS_TARGET_ACCOUNT--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><INPUT type="text" name="account" class="member_normal"
- size="20" maxlength="255"></STRONG></TD>
- </TR>
- <TR>
- <TD height="25" align="right">{--WERNIS_OPTIONAL_PASSWORD--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><INPUT type="password" name="pass" class="member_normal"
- size="10" maxlength="255"></STRONG></TD>
- </TR>
- <TR>
- <TD colspan="3" height="3" class="seperator bottom2"> </TD>
- </TR>
- <TR>
- <TD colspan="3" align="center" class="member_footer"><INPUT
- type="reset" class="member_reset" value="{--CLEAR_FORM--}"> * <INPUT
- type="submit" name="ok" class="member_submit"
- value="{--WERNIS_SEND_NOW--}"></TD>
- </TR>
-</TABLE>
-</FORM>
-
-<DIV class="member_note">{--WERNIS_MEMBER_NOTE--}<BR>
-<BR>
-<A href="{!URL!}/agb.php" target="_blank">{--WERNIS_REMEMBER_TERMS--}</A>
-</DIV>
-<table border="0" cellspacing="0" cellpadding="0"
- class="member_table dashed">
+<table border="0" cellspacing="0" cellpadding="0" class="member_table dashed">
<tr>
<td class="member_title2 bottom2" style="padding: 5px" colspan="2">
{--MEMBER_WERNIS_MODE_CHOOSE--}</td>
</tr>
<tr>
- <td width="50%" align="center" class="right2" height="40>"<a
- class="menu_blur" style="height: 40px"
- href="{!URL!}/modules.php?module=login&what=wernis&mode=widthdraw">
- <div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div>
- </a></td>
- <td width="50%" align="center"><a class="menu_blur"
- style="height: 40px"
- href="{!URL!}/modules.php?module=login&what=wernis&mode=payout">
- <div style="padding-top: 3px">{--MEMBER_WERNIS_MODE_PAYOUT--}</div>
- </a></td>
+ <td width="50%" align="center" class="right2" height="40">
+ <a class="menu_blur" style="height: 40px" href="{!URL!}/modules.php?module=login&what=wernis&mode=withdraw"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>
+ </td>
+ <td width="50%" align="center">
+ <a class="menu_blur" style="height: 40px" href="{!URL!}/modules.php?module=login&what=wernis&mode=pay"><div style="padding-top: 3px">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>
+ </td>
</tr>
</table>
+
+<p align="center">
+ <a href="http://www.wds66.com/ref.php?refid=$content[refid]" target="_blank">{--WERNIS_MEMBER_NO_ACCOUNT--}</a>
+</p>
--- /dev/null
+<TABLE border="0" cellspacing="0" cellpadding="0" width="680"
+ class="member_table dashed" align="center">
+ <TR>
+ <TD colspan="4" align="center" class="member_title2" height="30">
+ <STRONG>{--WERNIS_MEMBER_LIST_WERNIS--}</STRONG>
+ </TD>
+ </TR>
+ <TR>
+ <TD width="180" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TOTAL_WERNIS--}</STRONG></TD>
+ <TD width="130" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_ACCOUNT--}</STRONG></TD>
+ <TD width="150" align="center" class="member_title2 bottom2 right2"><STRONG>{--WERNIS_TIMESTAMP--}</STRONG></TD>
+ <TD width="120" align="center" class="member_title2 bottom2"><STRONG>{--WERNIS_MEMBER_STATUS--}</STRONG></TD>
+ </TR>
+ $content[rows]
+ <TR>
+ <TD colspan="4" class="member_footer" align="center">
+ <a href="{!URL!}/modules.php?module=login&what=wernis&mode=choose">{--MEMBER_WERNIS_MODE_CHOOSE2--}</a>
+ </TD>
+ </TR>
+</TABLE>
--- /dev/null
+<TR>
+ <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[points] {!POINTS!}</TD>
+ <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[acc]</TD>
+ <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[stamp]</TD>
+ <TD align="center" class="switch_sw$content[sw] bottom2">$content[status]</TD>
+</TR>
--- /dev/null
+<FORM action="{!URL!}/modules.php?module=login&what=wernis&mode=pay" method="POST" style="margin-bottom: 0px">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
+ <TR>
+ <TD colspan="3" align="center" class="member_title2 bottom2"
+ height="30"><STRONG>{--WERNIS_MEMBER_PAYOUT_TITLE--}</STRONG></TD>
+ </TR>
+ <TR>
+ <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_POINTS--}</TD>
+ <TD width="10" class="seperator bottom2"> </TD>
+ <TD width="115" class="bottom2"><strong>$content[points]</strong> {!POINTS!}</TD>
+ </TR>
+ <TR>
+ <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_PAYOUT_MIN_POINTS--}</TD>
+ <TD width="10" class="seperator bottom2"> </TD>
+ <TD width="115" class="bottom2"><strong>$content[min_points]</strong> {!POINTS!}</TD>
+ </TR>
+ <TR>
+ <TD colspan="3" height="3" class="seperator"> </TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_ID--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="text" name="wds66_id" size="6" maxlength="5" value="$content[wds66_id]" /></TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_PASSWORD--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="password" name="wds66_password" size="10" maxlength="255" /></TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_AMOUNT--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="text" name="amount" size="10" maxlength="255" /></TD>
+ </TR>
+ <TR>
+ <TD colspan="3" height="3" class="seperator bottom2"> </TD>
+ </TR>
+ <TR>
+ <TD colspan="3" align="center" class="member_footer">
+ <INPUT type="reset" class="member_reset" value="{--CLEAR_FORM--}"> *
+ <INPUT type="submit" name="ok" class="member_submit" value="{--WERNIS_MEMBER_PAYOUT_SUBMIT--}">
+ </TD>
+ </TR>
+</TABLE>
+<BR>
+<STRONG class="member_note"> {--WERNIS_MEMBER_PAYOUT_NOTE--}</STRONG>
+</FORM>
--- /dev/null
+<FORM action="{!URL!}/modules.php?module=login&what=wernis&mode=withdraw" method="POST" style="margin-bottom: 0px">
+<TABLE border="0" cellspacing="0" cellpadding="0" width="440" class="member_table dashed">
+ <TR>
+ <TD colspan="3" align="center" class="member_title2 bottom2"
+ height="30"><STRONG>{--WERNIS_MEMBER_WITHDRAW_TITLE--}</STRONG></TD>
+ </TR>
+ <TR>
+ <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT--}</TD>
+ <TD width="10" class="seperator bottom2"> </TD>
+ <TD width="115" class="bottom2"><strong>$content[points]</strong> {!POINTS!}</TD>
+ </TR>
+ <TR>
+ <TD width="315" class="bottom2" height="25" align="right">{--WERNIS_MEMBER_WITHDRAW_MIN_POINTS--}</TD>
+ <TD width="10" class="seperator bottom2"> </TD>
+ <TD width="115" class="bottom2"><strong>$content[min_points]</strong> {!POINTS!}</TD>
+ </TR>
+ <TR>
+ <TD colspan="3" height="3" class="seperator"> </TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_ID--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="text" name="wds66_id" size="6" maxlength="5" value="$content[wds66_id]" /></TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_PASSWORD--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="password" name="wds66_password" size="10" maxlength="255" /></TD>
+ </TR>
+ <TR>
+ <TD width="315" height="35" align="right">{--WERNIS_MEMBER_WDS66_AMOUNT--}</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD width="115"><INPUT type="text" name="amount" size="10" maxlength="255" /></TD>
+ </TR>
+ <TR>
+ <TD colspan="3" height="3" class="seperator bottom2"> </TD>
+ </TR>
+ <TR>
+ <TD colspan="3" align="center" class="member_footer">
+ <INPUT type="reset" class="member_reset" value="{--CLEAR_FORM--}"> *
+ <INPUT type="submit" name="ok" class="member_submit" value="{--WERNIS_MEMBER_WITHDRAW_SUBMIT--}">
+ </TD>
+ </TR>
+</TABLE>
+<BR>
+<STRONG class="member_note"> {--WERNIS_MEMBER_WITHDRAW_NOTE--}</STRONG>
+</FORM>
+++ /dev/null
-<TR>
- <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[points]</TD>
- <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[acc]</TD>
- <TD align="center" class="switch_sw$content[sw] bottom2 right2">$content[stamp]</TD>
- <TD align="center" class="switch_sw$content[sw] bottom2">$content[status]</TD>
-</TR>