X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-config_beg.php;h=516538aaafa8427b866f542f47e2d79152a36351;hb=5071030af40e69ca4284642f44758964e18f5be8;hp=6bc51b7e8d8b4a25c5a64136065e1d9d91dad151;hpb=8f60465485bd5e9ab2c0ddfa1f054458cf510042;p=mailer.git diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 6bc51b7e8d..516538aaaf 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Bettel-Link einstellen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,164 +38,143 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); -if (isset($_POST['ok'])) { +if (IS_FORM_SENT()) { // Translate german decimal commas to computer decimal dots - $_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']); + REQUEST_SET_POST('beg_points' , convertCommaToDot(REQUEST_POST('beg_points') )); + REQUEST_SET_POST('beg_points_max' , convertCommaToDot(REQUEST_POST('beg_points_max') )); + REQUEST_SET_POST('beg_notify_bonus', convertCommaToDot(REQUEST_POST('beg_notify_bonus'))); // Save settings - ADMIN_SAVE_SETTINGS($_POST); + ADMIN_SAVE_SETTINGS_POST(); // Remember new settings - setConfigEntry('beg_rallye' , $_POST['beg_rallye']); - setConfigEntry('beg_ral_en_notify', $_POST['beg_ral_en_notify']); - setConfigEntry('beg_ral_di_notify', $_POST['beg_ral_di_notify']); + setConfigEntry('beg_rallye' , REQUEST_POST('beg_rallye')); + setConfigEntry('beg_ral_en_notify', REQUEST_POST('beg_ral_en_notify')); + setConfigEntry('beg_ral_di_notify', REQUEST_POST('beg_ral_di_notify')); } else { // Prepare constants for the template - define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points') , false)); - define('__BEG_POINTS_MAX' , TRANSLATE_COMMA(getConfig('beg_points_max') , false)); - define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA(getConfig('beg_notify_bonus'), false)); - define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_timeout') , "beg_timeout" , "Dhm")); - define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS(getConfig('beg_uid_timeout'), "beg_uid_timeout", "Dhm")); - define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('beg_ip_timeout') , "beg_ip_timeout" , "Dhm")); - define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS(getConfig('beg_notify_wait'), "beg_notify_wait", "ms" )); - define('__BEG_RANKS' , getConfig('beg_ranks')); + $content['points'] = translateComma(getConfig('beg_points') , false); + $content['points_max'] = translateComma(getConfig('beg_points_max') , false); + $content['notify_bonus'] = translateComma(getConfig('beg_notify_bonus'), false); + $content['timeout'] = createTimeSelections(getConfig('beg_timeout') , 'beg_timeout' , 'Dhm'); + $content['uid_timeout'] = createTimeSelections(getConfig('beg_uid_timeout'), 'beg_uid_timeout', 'Dhm'); + $content['ip_timeout'] = createTimeSelections(getConfig('beg_ip_timeout') , 'beg_ip_timeout' , 'Dhm'); + $content['wait_selection'] = createTimeSelections(getConfig('beg_notify_wait'), 'beg_notify_wait', 'ms' ); + $content['ranks'] = getConfig('beg_ranks'); // Activate / Deactivate beg rallye (Y/N) switch (getConfig('beg_rallye')) { - case "Y": - define('__BEG_RALLYE_Y', " checked=\"checked\""); - define('__BEG_RALLYE_N', ""); - break; - - case "N": - define('__BEG_RALLYE_Y', ""); - define('__BEG_RALLYE_N', " checked=\"checked\""); - break; + case 'Y': + $content['rallye_yes'] = ' checked="checked"'; + $content['rallye_no'] = ''; + break; + + case 'N': + $content['rallye_yes'] = ''; + $content['rallye_no'] = ' checked="checked"'; + break; } switch (getConfig('beg_active')) { - case "Y": - define('__BEG_ACTIVE_Y', " checked=\"checked\""); - define('__BEG_ACTIVE_N', ""); - break; - - case "N": - define('__BEG_ACTIVE_Y', ""); - define('__BEG_ACTIVE_N', " checked=\"checked\""); - break; + case 'Y': + $content['active_yes'] = ' checked="checked"'; + $content['active_no'] = ''; + break; + + case 'N': + $content['active_yes'] = ''; + $content['active_no'] = ' checked="checked"'; + break; } switch (getConfig('beg_mode')) { - case "DIRECT": - define('__BEG_MODE_DIRECT', " checked=\"checked\""); - define('__BEG_MODE_REF' , ""); - break; - - case "REF": - define('__BEG_MODE_DIRECT', ""); - define('__BEG_MODE_REF' , " checked=\"checked\""); - break; + case 'DIRECT': + $content['mode_direct'] = ' checked="checked"'; + $content['mode_ref'] = ''; + break; + + case 'REF': + $content['mode_direct'] = ''; + $content['mode_ref'] = ' checked="checked"'; + break; } switch (getConfig('beg_ral_en_notify')) { - case "Y": - define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\""); - define('__BEG_RAL_EN_NOTIFY_N', ""); - break; - - case "N": - define('__BEG_RAL_EN_NOTIFY_Y', ""); - define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\""); - break; + case 'Y': + $content['ral_enable_notify_yes'] = ' checked="checked"'; + $content['ral_enable_notify_no'] = ''; + break; + + case 'N': + $content['ral_enable_notify_yes'] = ''; + $content['ral_enable_notify_no'] = ' checked="checked"'; + break; } switch (getConfig('beg_ral_di_notify')) { - case "Y": - define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\""); - define('__BEG_RAL_DI_NOTIFY_N', ""); - break; - - case "N": - define('__BEG_RAL_DI_NOTIFY_Y', ""); - define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\""); - break; + case 'Y': + $content['ral_disable_notify_yes'] = ' checked="checked"'; + $content['ral_disable_notify_no'] = ''; + break; + + case 'N': + $content['ral_disable_notify_yes'] = ''; + $content['ral_disable_notify_no'] = ' checked="checked"'; + break; } switch (getConfig('beg_new_mem_notify')) { - case "Y": - define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\""); - define('__BEG_NEW_MEMBER_NOTIFY_N', ""); - break; - - case "N": - define('__BEG_NEW_MEMBER_NOTIFY_Y', ""); - define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\""); - break; + case 'Y': + $content['new_member_notify_yes'] = ' checked="checked"'; + $content['new_member_notify_no'] = ''; + break; + + case 'N': + $content['new_member_notify_yes'] = ''; + $content['new_member_notify_no'] = ' checked="checked"'; + break; } switch (getConfig('beg_include_own')) { - case "Y": - define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\""); - define('__BEG_INCLUDE_OWN_N', ""); - break; - - case "N": - define('__BEG_INCLUDE_OWN_Y', ""); - define('__BEG_INCLUDE_OWN_N', " checked=\"checked\""); - break; - } - - switch (getConfig('beg_pay_mode')) { - case "IMG": - define('__BEG_PAY_MODE_IMG' , " selected=\"selected\""); - define('__BEG_PAY_MODE_JS' , ""); - define('__BEG_PAY_MODE_BOTH', ""); - define('__BEG_PAY_MODE_NONE', ""); + case 'Y': + $content['include_own_yes'] = ' checked="checked"'; + $content['include_own_no'] = ''; break; - case "JS": - define('__BEG_PAY_MODE_IMG' , ""); - define('__BEG_PAY_MODE_JS' , " selected=\"selected\""); - define('__BEG_PAY_MODE_BOTH', ""); - define('__BEG_PAY_MODE_NONE', ""); + case 'N': + $content['include_own_yes'] = ''; + $content['include_own_no'] = ' checked="checked"'; break; + } - case "BOTH": - define('__BEG_PAY_MODE_IMG' , ""); - define('__BEG_PAY_MODE_JS' , ""); - define('__BEG_PAY_MODE_BOTH', " selected=\"selected\""); - define('__BEG_PAY_MODE_NONE', ""); - break; + // Init elements + $content['pay_mode_img'] = ''; + $content['pay_mode_js'] = ''; + $content['pay_mode_both'] = ''; + $content['pay_mode_none'] = ''; - case "NONE": - define('__BEG_PAY_MODE_IMG' , ""); - define('__BEG_PAY_MODE_JS' , ""); - define('__BEG_PAY_MODE_BOTH', ""); - define('__BEG_PAY_MODE_NONE', " selected=\"selected\""); - break; - } + // Set pay mode + $content['pay_mode_'.strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"'; - // Add data to constant __MEMBER_SELECTION - define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, "beg_uid")); + // Member selection box + $content['member_selection'] = ADD_MEMBER_SELECTION_BOX(getConfig('beg_uid'), false, true, true, 'beg_uid'); // Load form template - LOAD_TEMPLATE("admin_config_beg"); + LOAD_TEMPLATE('admin_config_beg', false, $content); } //