// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
// Simply redirect... :-)
- LOAD_URL("modules.php?module=admin&action=login");
- // Redirection should be done here
+ LOAD_URL("modules.php?module=admin");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
require("inc/config.php");
// Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed'))
-{
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// Simply redirect... :-)
LOAD_URL("modules.php?module=index&what=agb");
- // Redirection should be done here
-}
- else
-{
- // You have to configure first!
+} else {
+ // You have to install first!
LOAD_URL("install.php");
}
+
// Really all done here... ;-)
?>
LOAD_URL("modules.php?module=index");
}
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Include footer
include(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Really all done here... ;-)
// Load the URL
LOAD_URL($URL);
-
- // Redirection should be done here
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Output footer
include(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Finish generation here
require_once(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
if ((getConfig('auto_purge_active') == "Y") && (getConfig('auto_purge') > 0)) {
// First calculate the timestamp
- if (function_exists('CREATE_TIME_SELECTIONS')) {
- $PURGE = getConfig('auto_purge');
- } else {
- $PURGE = getConfig('auto_purge') * getConfig('one_day');
- }
+ $PURGE = getConfig('auto_purge');
// Init variables
$admin_points = 0;
define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "717");
+define('CURR_SVN_REVISION', "718");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
function SQL_QUERY_ESC($qstring, $data, $file, $line, $run=true, $strip=true) {
global $link;
+ // Init variable
+ $query = "failed";
+
if ($strip) {
$strip = "true";
} else {
$strip = "false";
}
- $query = "";
$eval = "\$query = sprintf(\"".$qstring."\"";
foreach ($data as $var) {
if ((!empty($var)) || ($var === 0)) {
//* DEBUG: */ fclose($fp);
// Run the code
- @eval($eval);
+ eval($eval);
// Was the eval() command fine?
- if (empty($query)) {
+ if ($query == "failed") {
// Something went wrong?
print "eval=".htmlentities($eval)."<pre>";
debug_print_backtrace();
// Log this error
DEBUG_LOG(__FUNCTION__, __LINE__, "Headers already sent! We need debug backtrace here.");
- // Output debug trace
- print("<stron>Headers are already sent!</strong><br />\n");
- print("Please report this error at <a href=\"http://bugs.mxchange.org\" rel=\"external\" target=\"_blank\">bugs.mxchange.org</a>:<pre>");
- debug_print_backtrace();
- die("</pre>Thank you for your help finding bugs.");
+ // Trigger an user error
+ trigger_error("Headers are already sent!");
} // END - if
// Output cached HTML code
$OUTPUT = ob_get_contents();
// Clear output buffer for later output
- ob_end_clean();
+ clearOutputBuffer();
// Send HTTP header
header("HTTP/1.1 200");
header("Connection: Close");
// Extension "rewrite" installed?
- if ((EXT_IS_ACTIVE("rewrite")) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
+ if ((EXT_IS_ACTIVE("rewrite")) && ($CSS != "1") && ($CSS != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
} // END - if
OUTPUT_RAW($OUTPUT);
} elseif ((OUTPUT_MODE == "render") && (!empty($OUTPUT))) {
// Rewrite links when rewrite extension is active
- if ((EXT_IS_ACTIVE("rewrite")) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
+ if ((EXT_IS_ACTIVE("rewrite")) && ($CSS != "1") && ($CSS != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
} // END - if
if (getConfig('auto_purge') == 0) {
// Will never expire!
$EXPIRATION = MAIL_WILL_NEVER_EXPIRE;
- } elseif (function_exists('CREATE_FANCY_TIME')) {
+ } else {
// Create nice date string
$EXPIRATION = CREATE_FANCY_TIME(getConfig('auto_purge'));
- } else {
- // Display days only
- $EXPIRATION = round(getConfig('auto_purge')/60/60/24)." "._DAYS;
}
// Is content an array?
if (empty($newContent)) {
// Compiling failed
$newContent = "Compiler error for template {$template}!\nUncompiled content:\n".$tmpl_file;
+ // Add last error if the required function exists
if (function_exists('error_get_last')) $newContent .= "\n--------------------------------------\nDebug:\n".print_r(error_get_last(), true)."--------------------------------------\nPlease don't alter these informations!\nThanx.";
} // END - if
// Clear it only if there is content
if (!empty($OUTPUT)) {
- ob_end_clean();
+ clearOutputBuffer();
} // END - if
// Add some data to URL if cookies are not accepted
debug_print_backtrace();
die("</pre>URL={$URL}");
*/
- @header ("Location: ".str_replace("&", "&", $URL));
+ header ("Location: ".str_replace("&", "&", $URL));
} else {
// Output error message
include(PATH."inc/header.php");
}
exit();
}
+
+// Wrapper for LOAD_URL but URL comes from a configuration entry
+function LOAD_CONFIGURED_URL ($configEntry) {
+ // Get the URL
+ $URL = getConfig($configEntry);
+
+ // Is this URL set?
+ if (is_null($URL)) {
+ // Then abort here
+ trigger_error(sprintf("Configuration entry %s is not set!", $configEntry);
+ } // END - if
+
+ // Load the URL
+ LOAD_URL($URL);
+}
+
//
function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) {
global $SEC_CHARS, $URL_CHARS;
return $ERROR;
}
+// Clears the output buffer. This function does *NOT* backup sent content.
+function clearOutputBuffer () {
+ // Trigger an error on failure
+ if (!ob_end_clean()) {
+ // Failed!
+ trigger_error(__FUNCTION__.": Failed to clean output buffer.");
+ } // END - if
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
LOAD_URL("surfbar.php?frame=".$page);
} else {
// Reload to external page
- LOAD_URL(getConfig('surfbar_pause_url'));
+ LOAD_CONFIGURED_URL('surfbar_pause_url');
}
}
}
// Add links for selecting some users
-function alpha($sortby, $colspan, $return=false) {
+function alpha ($sortby, $colspan, $return=false) {
global $_CONFIG;
if (empty($_GET['offset'])) $_GET['offset'] = 0;
$ADD = "&page=".SQL_ESCAPE($_GET['page'])."&offset=".SQL_ESCAPE($_GET['offset']);
// Stop saving data if one input field is !isset
if (isset($_POST['ok'])) {
- if (function_exists('CREATE_TIME_SELECTIONS')) {
- // Calculate stamps and set calculated stamps
- $_POST['online_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , $_POST);
- $_POST['url_tlock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , $_POST);
- $_POST['profile_lock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , $_POST);
- $_POST['profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , $_POST);
- $_POST['resend_profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", $_POST);
- }
+ // Calculate stamps and set calculated stamps
+ $_POST['online_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , $_POST);
+ $_POST['url_tlock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , $_POST);
+ $_POST['profile_lock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , $_POST);
+ $_POST['profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , $_POST);
+ $_POST['resend_profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", $_POST);
// Online-Timeout shall be > 0 or your database will crow and crow and crow...
if (!isset($_POST['online_timeout'])) { unset($_POST['ok']); }
define('_CFG_REJECT_URL' , getConfig('reject_url'));
define('_CFG_MIN_AGE' , getConfig('min_age'));
- // 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(getConfig('online_timeout'), "ip_timeout" , "ms"));
- define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , "url_tlock" , "WDh"));
- define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , "profile_lock" , "WDh"));
- define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), "profile_update" , "YM"));
- define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , "resend_profile_update", "MWD"));
- } else {
- // Normal input boxes
- define('_CFG_ONLINE_TIMEOUT', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".getConfig('online_timeout')."\"> <div class=\"tiny\">("._SECONDS.")</div>");
- define('_CFG_URL_TLOCK' , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".getConfig('url_tlock') ."\"> <div class=\"tiny\">("._SECONDS.")</div>");
- define('_CFG_PROFILE_LOCK' , "<INPUT type=\"text\" name=\"profile_lock\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".getConfig('profile_lock') ."\"> <div class=\"tiny\">("._SECONDS.")</div>");
- define('_CFG_PROFILE_UPDATE', "<INPUT type=\"text\" name=\"profile_update\" class=\"admin_normal\" size=\"10\" maxlength=\"255\" value=\"".getConfig('profile_update')."\"> <div class=\"tiny\">("._SECONDS.")</div>");
- define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\" maxlength=\"255\" value=\"".getConfig('resend_profile_update') ."\"> <div class=\"tiny\">("._SECONDS.")</div>");
- }
+ // Time selection boxes
+ define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('online_timeout'), "ip_timeout" , "ms"));
+ define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , "url_tlock" , "WDh"));
+ define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , "profile_lock" , "WDh"));
+ define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), "profile_update" , "YM"));
+ define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , "resend_profile_update", "MWD"));
if (getConfig('order_multi_page') == "N") {
define('_CFG_ORDER_MULTI_N', " checked=\"checked\"");
define('__COLSPAN2' , ($colspan + 2));
define('__USER_CNT' , $user_count);
- if ((function_exists('alpha')) && (function_exists('SortLinks'))) {
- define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true));
- define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
- } else {
- define('__ALPHA_SORT', "");
- define('__SORT_LINKS', "");
- }
+ // Sorting links
+ define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true));
+ define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
if ($PAGES > 1) {
define('__PAGE_NAV', ADD_PAGENAV($PAGES, getConfig('user_limit'), true, $colspan, true));
$OUTPUT = ob_get_contents();
// Clean content
- ob_end_clean();
+ clearOutputBuffer();
// Set header
if (substr($access, -3, 3) == "log") {
// When the admin is logging in check several things first (new jobs to complete and so on)
if ($GLOBALS['action'] == "login") {
- if ((EXT_IS_ACTIVE("task")) && (function_exists('OUTPUT_ADVANCED_OVERVIEW'))) {
+ if (EXT_IS_ACTIVE("task")) {
// When task extension is registered output advanced overview page
$JOBS_DONE = OUTPUT_ADVANCED_OVERVIEW($result_tasks); // This function is provided by the extension 'task'
$taskExt = true;
define('__BEG_UID' , getConfig('def_refid'));
}
-if (function_exists('CREATE_FANCY_TIME')) {
- define('__BEG_TIMEOUT' , CREATE_FANCY_TIME(getConfig('beg_timeout')));
- define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout')));
-} else {
- define('__BEG_TIMEOUT ' , round(getConfig('beg_timeout') / 60)." ".MINUTES);
- define('__BEG_UID_TIMEOUT', round(getConfig('beg_uid_timeout') / 60)." ".MINUTES);
-}
+// Selection boxes are now the default
+define('__BEG_TIMEOUT' , CREATE_FANCY_TIME(getConfig('beg_timeout')));
+define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout')));
// Load final template
LOAD_TEMPLATE("guest_".substr(basename(__FILE__), 5, -4));
ADD_DESCR("guest", __FILE__);
//// TOP logins
-$ADD = "userid";
-if (EXT_IS_ACTIVE("nickname")) $ADD = "nickname";
-$result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", total_logins, last_online
-FROM "._MYSQL_PREFIX."_user_data
-WHERE total_logins>0 AND status='CONFIRMED' ORDER BY total_logins DESC LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("
+SELECT
+ userid, total_logins, last_online
+FROM
+ "._MYSQL_PREFIX."_user_data
+WHERE
+ total_logins > 0 AND
+ status='CONFIRMED'
+ORDER BY
+ total_logins DESC
+LIMIT %s",
+ array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ""; $SW = 2; $cnt = 1;
-while(list($uid, $nick, $logins, $last) = SQL_FETCHROW($result))
-{
+while (list($uid, $logins, $last) = SQL_FETCHROW($result)) {
$nick2 = "---";
- if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
+
+ // Get nickname
+ if (EXT_IS_ACTIVE("nickname")) $nick2 = NICKNAME_GET_NICK($uid);
// Prepare data for template
$content = array(
// Switch colors and count one up
$SW = 3 - $SW; $cnt++;
}
-if ($cnt < getConfig('top10_max'))
-{
+
+if ($cnt < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++)
- {
+ for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'sw' => $SW,
}
define('__TOP_LOGINS_ROWS', $OUT);
+// Free result
+SQL_FREERESULT($result);
+
//// TOP earners
-$result = SQL_QUERY_ESC("SELECT DISTINCT p.userid, d.".$ADD.", (SUM(p.points) - d.used_points) AS tpoints, d.last_online
-FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
-ON p.userid=d.userid
-WHERE p.points > 0 AND d.status='CONFIRMED'
-GROUP BY p.userid
-ORDER BY tpoints DESC, d.last_online DESC
+$result = SQL_QUERY_ESC("
+SELECT DISTINCT
+ d.userid,
+ (SUM(p.points) - d.used_points) AS tpoints,
+ d.last_online
+FROM
+ `"._MYSQL_PREFIX."_user_data` AS d
+LEFT JOIN
+ "._MYSQL_PREFIX."_user_points AS p
+ON
+ p.userid=d.userid
+WHERE
+ p.points > 0 AND
+ d.status='CONFIRMED'
+GROUP BY
+ p.userid
+ORDER BY
+ tpoints DESC,
+ d.last_online DESC
LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+ array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ""; $SW = 2; $cnt = 1;
-while(list($uid, $nick, $points, $last) = SQL_FETCHROW($result))
-{
+while (list($uid, $points, $last) = SQL_FETCHROW($result)) {
$nick2 = "---";
- if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
+
+ // Get nickname
+ if (EXT_IS_ACTIVE("nickname")) $nick2 = NICKNAME_GET_NICK($uid);
// Prepare data for template
$content = array(
// Switch colors and count one up
$SW = 3 - $SW; $cnt++;
}
-if ($cnt < getConfig('top10_max'))
-{
+
+if ($cnt < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++)
- {
+ for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'sw' => $SW,
}
define('__TOP_POINTS_ROWS', $OUT);
+// Free result
+SQL_FREERESULT($result);
+
//// TOP referal "hunter"
-$result = SQL_QUERY_ESC("SELECT DISTINCT r.userid, d.".$ADD.", SUM(r.counter) AS refs, d.last_online
-FROM "._MYSQL_PREFIX."_refsystem AS r
-LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
-ON r.userid=d.userid
-WHERE r.counter > 0 AND d.status='CONFIRMED'
-GROUP BY r.userid
-ORDER BY refs DESC, d.last_online DESC
+$result = SQL_QUERY_ESC("
+SELECT DISTINCT
+ d.userid,
+ SUM(r.counter) AS refs,
+ d.last_online
+FROM
+ `"._MYSQL_PREFIX."_user_data` AS d
+LEFT JOIN
+ "._MYSQL_PREFIX."_refsystem AS r
+ON
+ r.userid=d.userid
+WHERE
+ r.counter > 0 AND
+ d.status='CONFIRMED'
+GROUP BY
+ r.userid
+ORDER BY
+ refs DESC,
+ d.last_online DESC
LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+ array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ""; $SW = 2; $cnt = 1;
-while(list($uid, $nick, $refs, $last) = SQL_FETCHROW($result))
-{
+while (list($uid, $refs, $last) = SQL_FETCHROW($result)) {
$nick2 = "---";
- if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
+
+ // Get nickname
+ if (EXT_IS_ACTIVE("nickname")) $nick2 = NICKNAME_GET_NICK($uid);
// Prepare data for template
$content = array(
// Switch colors and count one up
$SW = 3 - $SW; $cnt++;
}
-if ($cnt < getConfig('top10_max'))
-{
+
+if ($cnt < getConfig('top10_max')) {
// Add more "blank" rows
- for ($i = $cnt; $i <= getConfig('top10_max'); $i++)
- {
+ for ($i = $cnt; $i <= getConfig('top10_max'); $i++) {
// Prepare data for template
$content = array(
'sw' => $SW,
}
define('__TOP_REFERRAL_ROWS', $OUT);
+// Free result
+SQL_FREERESULT($result);
+
// Remember other values in constants
define('__TOP10_MAX', getConfig('top10_max'));
ADD_DESCR("guest", __FILE__);
OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
-$rdf = new fase4_rdf;
+$rdf = new fase4_rdf();
$rdf->use_dynamic_display(false);
$rdf->set_CacheDir(PATH."inc/cache/");
-$rdf->set_salt(SITE_KEY);
+$rdf->set_salt(md5(SITE_KEY));
$rdf->set_max_item(10);
$rdf->set_Options(
array(
if (empty($uid)) { $uid = $GLOBALS['userid']; $nickname = false; }
// Prepare constants
-define('__BEG_UID' , $uid);
-define('__BEG_CLICKS' , $clicks);
-define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA(getConfig('beg_points_max')));
-
-if (function_exists('CREATE_FANCY_TIME'))
-{
- define('__BEG_TIMEOUT' , CREATE_FANCY_TIME(getConfig('beg_timeout')));
- define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout')));
-}
- else
-{
- define('__BEG_TIMEOUT ' , round(getConfig('beg_timeout') / 60)." ".MINUTES);
- define('__BEG_UID_TIMEOUT', round(getConfig('beg_uid_timeout') / 60)." ".MINUTES);
-}
+define('__BEG_UID' , $uid);
+define('__BEG_CLICKS' , $clicks);
+define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
+define('__BEG_POINTS_MAX' , TRANSLATE_COMMA(getConfig('beg_points_max')));
+define('__BEG_TIMEOUT' , CREATE_FANCY_TIME(getConfig('beg_timeout')));
+define('__BEG_UID_TIMEOUT', CREATE_FANCY_TIME(getConfig('beg_uid_timeout')));
// Load template
LOAD_TEMPLATE("member_".substr(basename(__FILE__), 5, -4));
// Remember transfer reason and fancy date/time in constants
define('__TRANSFER_REASON', $_POST['reason']);
- if (function_exists('CREATE_FANCY_TIME')) {
- define('__TRANSFER_EXPIRES', CREATE_FANCY_TIME(getConfig('transfer_age')));
- } else {
- define('__TRANSFER_EXPIRES', round(getConfig('transfer_age')/60/60/24)." ".DAYS);
- }
+ define('__TRANSFER_EXPIRES', CREATE_FANCY_TIME(getConfig('transfer_age')));
// Generate tranafer id
define('__TRANS_ID', bigintval(GEN_RANDOM_CODE("10", mt_rand(0, 99999), $GLOBALS['userid'], $_POST['reason'])));
// Footer
require(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Footer
require(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
- // Simply redirect... :-)
- LOAD_URL("modules.php?module=index&what=login");
- // Redirection should be done here
+ // Is this a member?
+ if (IS_MEMBER()) {
+ // Then redirect into login area
+ LOAD_URL("modules.php?module=login");
+ } else {
+ // Guests will be redirected to login form
+ LOAD_URL("modules.php?module=index&what=login");
+ }
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
break;
case "REJECT": // Redirect to rejection page
- LOAD_URL(getConfig('reject_url'));
+ LOAD_CONFIGURED_URL('reject_url');
break;
default:
require_once(PATH."inc/footer.php");
}
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
ADD_POINTS_REFSYSTEM("mailid_okay", $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'))) {
+ if (GET_EXT_VERSION("bonus") >= "0.2.2") {
// Is an active-rallye running and this is not a notification mail?
if ((getConfig('bonus_active') == "Y") && ($notify == "N")) {
// Shall I exclude the webmaster's own userid from the active-rallye?
} // END - if
}
} elseif ($mode != "img") {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Load the URL
LOAD_URL($URL);
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Include footer
include(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Load the URL
LOAD_URL($URL);
-
- // Redirection should be done here
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Load the URL
LOAD_URL($URL);
-
- // Redirection should be done here
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}
// Load footer
require_once(PATH."inc/footer.php");
} else {
- // You have to configure first!
+ // You have to install first!
LOAD_URL("install.php");
}