<?php
/************************************************************************
- * MXChange v0.2.1 Start: 11/23/2004 *
- * ================ Last change: 11/23/2004 *
+ * Mailer v0.2.1-FINAL Start: 11/23/2004 *
+ * =================== Last change: 11/23/2004 *
* *
* -------------------------------------------------------------------- *
* 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:: $ *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
************************************************************************/
// 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();
+} // END - if
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+addMenuDescription('admin', __FILE__);
-if (isset($_POST['ok'])) {
+if (isFormSent()) {
// Save data
- ADMIN_SAVE_SETTINGS($_POST);
+ adminSaveSettingsFromPostData();
} else {
+ // Prepare member selection
+ $content['form_selection'] = addMemberSelectionBox(getConfig('def_refid'), false, true, true, 'def_refid');
+
// Prepare contants for the template
- define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['def_refid'], false, true, true, "def_refid"));
+ foreach (array('refid_target_index','refid_target_register','select_user_zero_refid_y','select_user_zero_refid_n') as $entry) {
+ $content[$entry] = '';
+ } // END - foreach
- switch ($_CONFIG['refid_target']) {
- case "index": define('__DEF_RT_INDEX', " selected=\"selected\""); define('__DEF_RT_REGISTER', ""); break;
- case "register": define('__DEF_RT_INDEX', ""); define('__DEF_RT_REGISTER', " selected=\"selected\""); break;
- }
+ // 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");
+ loadTemplate('admin_config_refid', false, $content);
}
-//
+
+// [EOF]
?>