X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_refid.php;h=def8ad18f31aac994d6edda4aa30bcc56cf54164;hp=7d91ef73042936b8a342c21010bdee1a15c17264;hb=d3c4fdd9bfab35389e1a5ff48f3952d527c7b4bb;hpb=d8148e3f1f3a6762b2e786dbe99ada269dcf2ea0 diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index 7d91ef7304..def8ad18f3 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -6,13 +6,18 @@ * -------------------------------------------------------------------- * * File : what-config_refid.php * * -------------------------------------------------------------------- * - * Short description : Setup default referal ID * + * Short description : Setup default referal id * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Standart Referal-ID einstellen * + * Kurzbeschreibung : Standart Referal-Id 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 * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,52 +37,32 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); +if ((!defined('__SECURITY')) || (!isAdmin())) { + die(); } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +addMenuDescription('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data - ADMIN_SAVE_SETTINGS_POST(); + adminSaveSettingsFromPostData(); } else { - // Prepare contants for the template - define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('def_refid'), false, true, true, "def_refid")); - - switch (getConfig('refid_target')) { - case "index": - define('__DEF_RT_INDEX' , " selected=\"selected\""); - define('__DEF_RT_REGISTER', ""); - break; + // Prepare member selection + $content['member_selection'] = addMemberSelectionBox(getConfig('def_refid'), false, true, true, 'def_refid'); - case "register": - define('__DEF_RT_INDEX' , ""); - define('__DEF_RT_REGISTER', " selected=\"selected\""); - break; - } // END - switch - - switch (getConfig('select_user_zero_refid')) { - case "Y": - define('__RAND_REFID_Y', " selected=\"selected\""); - define('__RAND_REFID_N', ""); - break; - - case "N": - define('__RAND_REFID_Y', ""); - define('__RAND_REFID_N', " selected=\"selected\""); - break; - } // END - switch + // Prepare contants for the template + foreach (array('refid_target_index','refid_target_register','select_user_zero_refid_y','select_user_zero_refid_n') as $entry) { + $content[$entry] = ''; + } // END - foreach - // Prepare content - $content = array( - 'user_min_confirmed' => getConfig('user_min_confirmed') - ); + // Set all selections + foreach (array('refid_target', 'select_user_zero_refid') as $entry) { + $content[$entry . '_' . strtolower(getConfig($entry))] = ' selected="selected"'; + } // END - foreach // Load template - LOAD_TEMPLATE("admin_config_refid", false, $content); + loadTemplate('admin_config_refid', false, $content); } // [EOF]