************************************************************************/
// Some security stuff...
-if ((!defined('__SECURITY')) || (!is_admin())) {
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
// Translate german decimal commas to computer decimal dots
- $_POST['beg_points'] = str_replace(",", ".", $_POST['beg_points'] );
- $_POST['beg_points_max'] = str_replace(",", ".", $_POST['beg_points_max'] );
- $_POST['beg_notify_bonus'] = str_replace(",", ".", $_POST['beg_notify_bonus']);
+ $_POST['beg_points'] = REVERT_COMMA($_POST['beg_points'] );
+ $_POST['beg_points_max'] = REVERT_COMMA($_POST['beg_points_max'] );
+ $_POST['beg_notify_bonus'] = REVERT_COMMA($_POST['beg_notify_bonus']);
// Save settings
ADMIN_SAVE_SETTINGS($_POST);
$_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")))
- {
- include(PATH."inc/mails/beg_mails.php");
- }
-}
- else
-{
+} 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));