************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))
-{
+if ((!defined('__SECURITY')) || (!is_admin())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
$_POST['beg_notify_bonus'] = str_replace(",", ".", $_POST['beg_notify_bonus']);
// Save settings
- ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
+ 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']);
+ define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
// Load form template
LOAD_TEMPLATE("admin_config_beg");