define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "491");
+define('CURR_SVN_REVISION', "492");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Entry found
$content = SQL_FETCHARRAY($result);
SQL_FREERESULT($result);
- $eval = "\$content['mode'] = ADMINS_".strtoupper($content['mode'])."_MODE;";
- eval($eval);
- $eval = "\$content['la_mode'] = ADMINS_".strtoupper($content['la_mode'])."_LA_SETTING;";
- eval($eval);
+ $content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');
+ $content['la_mode'] = constant('ADMINS_'.strtoupper($content['la_mode']).'_LA_SETTING');
// Prepare some more data
$content['sw'] = $SW;
$SW = 2; $OUT = "";
while ($content = SQL_FETCHARRAY($result)) {
// Compile some variables
- $eval = "\$content['mode'] = ADMINS_".strtoupper($content['mode'])."_MODE;";
- eval($eval);
- $eval = "\$content['la_mode'] = ADMINS_".strtoupper($content['la_mode'])."_LA_SETTING;";
- eval($eval);
+ $content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');
+ $content['la_mode'] = constant('ADMINS_'.strtoupper($content['la_mode']).'_LA_SETTING');
// Prepare some more data
$content['sw'] = $SW;
function REGISTER_FILL_MUST_CONSTANTS()
{
$result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);
- while(list($name, $required) = SQL_FETCHROW($result))
- {
+ while(list($name, $required) = SQL_FETCHROW($result)) {
$value = "";
if ($required == "Y") $value = "<FONT class=\\\"guest_failed\\\"> (*)</FONT>";
$eval = "define('MUST_".strtoupper($name)."', \"".$value."\");";
eval($eval);
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);
$result = SQL_QUERY("SELECT field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);
while(list($name, $required) = SQL_FETCHROW($result))
{
- if (($array[$name] == "!") && ($required == "Y"))
- {
+ if (($array[$name] == "!") && ($required == "Y")) {
// Empty entry found
$array[$name] = "";
- $eval = "\$OUT = REGISTER_".strtoupper($name)."_REQUIRED;";
- eval($eval);
+ $OUT = constant('REGISTER_'.strtoupper($name).'_REQUIRED');
OUTPUT_HTML("<STRONG><SPAN class=\"register_failed\">".$OUT."</SPAN></STRONG><br /><br />");
}
}
// Guests are mostly not interested in how many members has
// choosen an individual category
$AND = "WHERE visible='Y' ";
+
// Admins are allowed to see every category...
if (IS_ADMIN()) $AND = "";
$result = SQL_QUERY("SELECT id, cat, visible FROM "._MYSQL_PREFIX."_cats ".$AND." ORDER BY sort", __FILE__, __LINE__);
$subject = ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
// Prepare subject
- $eval = sprintf("\$subject = ADMIN_SURFBAR_NOTIFY_%s_SUBJECT;",
+ $subject = constant(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
strtoupper($messageType)
- );
- @eval($eval);
+ ));
// Send the notification out
return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
$subject = MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
// Prepare subject
- $eval = sprintf("\$subject = MEMBER_SURFBAR_NOTIFY_%s_SUBJECT;",
+ $subject = constant(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
strtoupper($messageType)
- );
- @eval($eval);
+ ));
// Load template
$mailText = LOAD_EMAIL_TEMPLATE($templateName, $content, $content['uid']);
// Finally encrypt it PGP-like and return it
$valHashedCode = generatePassString($hashedCode);
+
+ // Return hashed value
//DEBUG_LOG(__FUNCTION__.":finalValCode={$valHashedCode}");
return $valHashedCode;
}
$MAIL_MODE = (($_CONFIG['beg_notify_bonus'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
// Generate subject line
- $eval = "\$SUBJECT = BEG_RALLYE_".strtoupper($MODE)."_NOTIFY;";
- eval($eval);
+ $SUBJECT = constant('BEG_RALLYE_'.strtoupper($MODE).'_NOTIFY');
// Load message body for bonus mails
$MSG = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", "", "{PER}uid{PER}");
$MAIL_MODE = (($_CONFIG['bonus_notify_points'] > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
// Generate subject line
- $eval = "\$SUBJECT = BONUS_RALLYE_".strtoupper($MODE)."_NOTIFY;";
- eval($eval);
+ $SUBJECT = constant('BONUS_RALLYE_'.strtoupper($MODE).'_NOTIFY');
// Load message body for bonus mails
$MSG = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", "", "{PER}uid{PER}");
$MSG = LOAD_EMAIL_TEMPLATE("bonus_".$MODE."_notify", array(), $uid);
SEND_EMAIL($uid, $SUBJECT, $MSG);
}
- }
+ } // END - if
// Shall I send out bonus mails?
if ($MAIL_MODE) {
// Is the raw userid set?
if ($_POST['uid_raw'][$id] > 0) {
// Generate subject
- $eval = "\$subjectLine = MEMBER_".$subject."_".strtoupper($table)."_SUBJECT;";
- eval($eval);
+ $subjectLine = constant('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT');
// Load email template
if (!empty($subjectPart)) {
} // END - if
// Generate subject
- $eval = "\$subjectLine = ADMIN_".$subject."_".strtoupper($table)."_SUBJECT;";
- eval($eval);
+ $subjectLine = constant('ADMIN_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT');
// Send admin notification out
if (!empty($subjectPart)) {
$admin = "<FONT class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</FONT>";
}
}
- $evl = "\$type_out = ADMIN_TASK_IS_".strtoupper($type).";";
- eval($evl);
+
+ // Get task type
+ $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
+
$type2 = substr($text, 0, strpos($text, ":"));
// Generate infos
switch ($type)
$infos = substr($subj, 1, strpos($subj, ":") - 1);
break;
}
- if ($uid > 0)
- {
+
+ if ($uid > 0) {
// Member found otherwise it's a system task
$uid = ADMIN_USER_PROFILE_LINK($uid);
- }
- else
- {
+ } else {
$uid = "<I>".ADMIN_IS_SYSTEM_TASK."</I>";
}
+ // Prepare content
$content = array(
'sw' => $SW,
'id' => $id,
'created' => MAKE_DATETIME($created, "2")
);
+ // Load row template
LOAD_TEMPLATE("admin_overview_list_rows", false, $content);
+
+ // Switch color
$SW = 3 - $SW;
}
// Free memory
// Prepare variables
if (empty($act)) $act = "---";
if (empty($wht)) $wht = "---";
- $eval = "\$mode = ADMINS_".strtoupper($mode)."_MODE;";
- eval($eval);
+
+ // Get admin mode
+ $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
// Load admin's data
$login = GET_ADMIN_LOGIN($admin);
// Prepare variables
if (empty($act)) $act = "---";
if (empty($wht)) $wht = "---";
- $eval = "\$mode = ADMINS_".strtoupper($mode)."_MODE;";
- eval($eval);
+
+ // Get mode
+ $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
// Load admin's data
$login = GET_ADMIN_LOGIN($admin);
$result = SQL_QUERY("SELECT id, field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);
$SW = 2; $OUT = "";
while (list($id, $name, $required) = SQL_FETCHROW($result)) {
- $eval = "\$name = ".strtoupper($name).";";
- eval($eval);
+ // Get constant value
+ $name = constant(strtoupper($name));
+
$OUT .= "<TR>
<TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".$id."</TD>
<TD class=\"switch_sw".$SW." bottom2 right2\"> ".$name."</TD>
else
{
// Translate status
- $evl = "\$status = PAYOUT_STATUS_".strtoupper($status).";";
- eval($evl);
+ $status = constant('PAYOUT_STATUS_'.strtoupper($status).'');
$status = "<FONT class=\"admin_failed\">".$status."</FONT>";
}
// Nothing entered must be secured in member/what-payputs.php !
- if ($allow == "Y")
- {
+ if ($allow == "Y") {
// Banner/Textlink views/clicks request
- if (!empty($banner))
- {
+ if (!empty($banner)) {
// Prepare array for the banner
$content = array(
'banner' => $banner,
// Load template for the banner
$account = LOAD_TEMPLATE("admin_list_payouts_banner", true, $content);
- }
- else
- {
+ } else {
// Textlink
$content = array(
'txt_link' => $alt,
// Admins can addionally test the URL for framekillers
$bank = "<A href=\"".FRAMETESTER($url)."\" target=\"_blank\">".CLICK_HERE."</A>";
- }
- else
- {
+ } else {
// e-currency payout request
if (empty($account)) $account = "---";
if (empty($bank)) $bank = "---";
}
// There are uncompleted jobs!
- $eval = "\$type = ADMIN_OVERVIEW_TASK_".strtoupper($_GET['type'])."_TYPE;";
- eval($eval);
+ $type = constant('ADMIN_OVERVIEW_TASK_'.strtoupper($_GET['type']).'_TYPE');
LOAD_TEMPLATE("admin_overview_header_task", false, array(
'message' => $type,
'type' => $_GET['type']
$admin = "<FONT class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</FONT>";
}
}
- $evl = "\$type_out = ADMIN_TASK_IS_".strtoupper($type).";";
- eval($evl);
+
+ // Get admin task
+ $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
+
$type2 = substr($text, 0, strpos($text, ":"));
// Generate infos
switch ($type)
$listHeader = ADMIN_ALL_ACCOUNTS;
if (!empty($_GET['mode'])) {
// Set title according to the "mode"
- $eval = sprintf("\$listHeader = ADMIN_LIST_%s_ACCOUNTS;", strtoupper(SQL_ESCAPE($_GET['mode'])));
- eval($eval);
+ $listHeader = constant(sprintf("ADMIN_LIST_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
} // END - if
// Remember it
$SW = 2; $gain_tabs = 0; $OUT = "";
foreach ($DATA['tables'] as $row_array)
{
+ // Init variables
+ $B1 = ""; $B2 = "";
+
// Fixes a bug which causes a parser error on eval'd code
if (empty($row_array[1])) $row_array[1] = "NONE";
- $eval = "\$REP = OPTIMIZE_STATUS_".strtoupper($row_array[1]).";";
- eval($eval); $B1 = ""; $B2 = "";
+
+ // Get optimization status
+ $REP = constant('OPTIMIZE_STATUS_'.strtoupper($row_array[1]).'');
+
$OPT = OPTIMIZE_STATUS_UNSUPPORTED;
- if ($row_array[4] > 0)
- {
+
+ if ($row_array[4] > 0) {
$OPT = OPTIMIZE_STATUS_OPTIMIZED;
$B1 = "<STRONG>"; $B2 = "<STRONG>";
$gain_tabs++;
- }
- elseif (count(explode(" ", $row_array[2])) == 0)
- {
- $eval = "\$OPT = OPTIMIZE_STATUS_".strtoupper($row_array[2]).";";
- die($eval);
- eval($eval);
+ } elseif (count(explode(" ", $row_array[2])) == 0) {
+ $OPT = constant('OPTIMIZE_STATUS_'.strtoupper($row_array[2]).'');
}
// Prepare data for the row template
// Load template
LOAD_TEMPLATE("admin_update_download");
-/*
- * DEACTIVATED ON 09/11/2008,02:47 AM
- *
-} elseif (sizeof($PATCHES['fname']) > 0) {
- // Some patches are available
- $OUT = ""; $SW = "2";
- foreach ($PATCHES['fname'] as $idx => $file) {
- $SIZE = TRANSLATE_COMMA(round($PATCHES['fsize'][$idx]/102.4)/10);
- $content = array(
- 'sw' => $SW,
- 'patch_url' => SERVER_URL."/patches/".$file,
- 'patch_title' => str_replace("_", " ", str_replace(".zip", "", $file)),
- 'patch_ctime' => MAKE_DATETIME($PATCHES['ctime'][$idx], "2"),
- 'patch_size' => $SIZE,
- 'patch_desc' => COMPILE_CODE($PATCHES['descr'][$idx]),
- );
- // Evaluate descrition code
- $eval = "\$content['patch_desc'] = \"".$content['patch_desc']."\";";
- eval($eval);
-
- // Load template, switch color and count total size up
- $OUT .= LOAD_TEMPLATE("admin_patches_row", true, $content);
- $SW = 3 - $SW;
- }
- define('__PATCH_ROWS', $OUT);
-
- // Total size
- define('__TOTAL_SIZE', TRANSLATE_COMMA($TOTAL_SIZE / 1024));
-
- // Load main template
- LOAD_TEMPLATE("admin_patches");
-*/
} else {
// You have the latest version!
LOAD_TEMPLATE("admin_settings_saved", false, NO_UPDATES_AVAILABLE);
else
{
// Status is not fine
- $eval = "\$content = SPONSOR_LOGIN_FAILED_".strtoupper($status).";";
- eval($eval);
+ $content = constant('SPONSOR_LOGIN_FAILED_'.strtoupper($status).'');
LOAD_TEMPLATE("admin_settings_saved", false, $content);
OUTPUT_HTML("<br />");
while (list($pid, $total, $account, $bank, $type, $tstamp, $status, $allow, $url, $alt, $banner) = SQL_FETCHROW($result_payouts))
{
// Translate status
- $evl = "\$status = PAYOUT_MEMBER_STATUS_".strtoupper($status).";";
- eval($evl);
+ $status = constant('PAYOUT_MEMBER_STATUS_'.strtoupper($status).'');
$status = "<FONT class=\"member_failed\">".$status."</FONT>";
// Nothing entered must be secured in member/what-payputs.php !