-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 01/09/2005 *\r
- * ================ Last change: 01/09/2005 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : what-config_beg.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Setup beg link *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Bettel-Link einstellen *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder *\r
- * For more information visit: http://www.mxchange.org *\r
- * *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or *\r
- * (at your option) any later version. *\r
- * *\r
- * This program is distributed in the hope that it will be useful, *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
- * GNU General Public License for more details. *\r
- * *\r
- * You should have received a copy of the GNU General Public License *\r
- * along with this program; if not, write to the Free Software *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *\r
- * MA 02110-1301 USA *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin()))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
- require($INC);\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-if (isset($_POST['ok']))\r
-{\r
- // Translate german decimal commas to computer decimal dots\r
- $_POST['beg_points'] = str_replace(",", ".", $_POST['beg_points'] );\r
- $_POST['beg_points_max'] = str_replace(",", ".", $_POST['beg_points_max'] );\r
- $_POST['beg_notify_bonus'] = str_replace(",", ".", $_POST['beg_notify_bonus']);\r
-\r
- // Save settings\r
- ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");\r
-\r
- // Remember new settings\r
- $CONFIG['beg_rallye'] = $_POST['beg_rallye'];\r
- $CONFIG['beg_ral_en_notify'] = $_POST['beg_ral_en_notify'];\r
- $CONFIG['beg_ral_di_notify'] = $_POST['beg_ral_di_notify'];\r
-\r
- // Include sending out mails\r
- if ((($CONFIG['beg_rallye'] == "Y") && ($CONFIG['beg_ral_en_notify'] == "Y")) || (($CONFIG['beg_rallye'] == "N") && ($CONFIG['beg_ral_di_notify'] == "Y")))\r
- {\r
- include(PATH."inc/mails/beg_mails.php");\r
- }\r
-}\r
- else\r
-{\r
- // Prepare constants for the template\r
- define('__BEG_POINTS' , TRANSLATE_COMMA($CONFIG['beg_points'] , false));\r
- define('__BEG_POINTS_MAX' , TRANSLATE_COMMA($CONFIG['beg_points_max'] , false));\r
- define('__BEG_NOTIFY_BONUS' , TRANSLATE_COMMA($CONFIG['beg_notify_bonus'], false));\r
- define('__BEG_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_timeout'] , "beg_timeout" , "Dhm"));\r
- define('__BEG_UID_TIMEOUT' , CREATE_TIME_SELECTIONS($CONFIG['beg_uid_timeout'], "beg_uid_timeout", "Dhm"));\r
- define('__BEG_REMOTE_IP_TIMEOUT', CREATE_TIME_SELECTIONS($CONFIG['beg_ip_timeout'] , "beg_ip_timeout" , "Dhm"));\r
- define('__WAIT_SELECTION' , CREATE_TIME_SELECTIONS($CONFIG['beg_notify_wait'], "beg_notify_wait", "ms" ));\r
- define('__BEG_RANKS', $CONFIG['beg_ranks']);\r
-\r
- // Activate / Deactivate beg rallye (Y/N)\r
- switch ($CONFIG['beg_rallye'])\r
- {\r
- case "Y":\r
- define('__BEG_RALLYE_Y', " checked");\r
- define('__BEG_RALLYE_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_RALLYE_Y', "");\r
- define('__BEG_RALLYE_N', " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_active'])\r
- {\r
- case "Y":\r
- define('__BEG_ACTIVE_Y', " checked");\r
- define('__BEG_ACTIVE_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_ACTIVE_Y', "");\r
- define('__BEG_ACTIVE_N', " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_mode'])\r
- {\r
- case "DIRECT":\r
- define('__BEG_MODE_DIRECT', " checked");\r
- define('__BEG_MODE_REF' , "");\r
- break;\r
-\r
- case "REF":\r
- define('__BEG_MODE_DIRECT', "");\r
- define('__BEG_MODE_REF' , " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_ral_en_notify'])\r
- {\r
- case "Y":\r
- define('__BEG_RAL_EN_NOTIFY_Y', " checked");\r
- define('__BEG_RAL_EN_NOTIFY_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_RAL_EN_NOTIFY_Y', "");\r
- define('__BEG_RAL_EN_NOTIFY_N', " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_ral_di_notify'])\r
- {\r
- case "Y":\r
- define('__BEG_RAL_DI_NOTIFY_Y', " checked");\r
- define('__BEG_RAL_DI_NOTIFY_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_RAL_DI_NOTIFY_Y', "");\r
- define('__BEG_RAL_DI_NOTIFY_N', " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_new_mem_notify'])\r
- {\r
- case "Y":\r
- define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");\r
- define('__BEG_NEW_MEMBER_NOTIFY_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_NEW_MEMBER_NOTIFY_Y', "");\r
- define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");\r
- break;\r
- }\r
- switch ($CONFIG['beg_include_own'])\r
- {\r
- case "Y":\r
- define('__BEG_INCLUDE_OWN_Y', " checked");\r
- define('__BEG_INCLUDE_OWN_N', "");\r
- break;\r
-\r
- case "N":\r
- define('__BEG_INCLUDE_OWN_Y', "");\r
- define('__BEG_INCLUDE_OWN_N', " checked");\r
- break;\r
- }\r
-\r
- // Add data to constant __MEMBER_SELECTION\r
- ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['beg_uid']);\r
-\r
- // Load form template\r
- LOAD_TEMPLATE("admin_config_beg");\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 01/09/2005 *
+ * ================ Last change: 01/09/2005 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_beg.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Setup beg link *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Bettel-Link einstellen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!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__));
+
+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']);
+
+ // Save settings
+ ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
+
+ // 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'];
+
+ // 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
+{
+ // 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']);
+
+ // Activate / Deactivate beg rallye (Y/N)
+ switch ($CONFIG['beg_rallye'])
+ {
+ case "Y":
+ define('__BEG_RALLYE_Y', " checked");
+ define('__BEG_RALLYE_N', "");
+ break;
+
+ case "N":
+ define('__BEG_RALLYE_Y', "");
+ define('__BEG_RALLYE_N', " checked");
+ break;
+ }
+ switch ($CONFIG['beg_active'])
+ {
+ case "Y":
+ define('__BEG_ACTIVE_Y', " checked");
+ define('__BEG_ACTIVE_N', "");
+ break;
+
+ case "N":
+ define('__BEG_ACTIVE_Y', "");
+ define('__BEG_ACTIVE_N', " checked");
+ break;
+ }
+ switch ($CONFIG['beg_mode'])
+ {
+ case "DIRECT":
+ define('__BEG_MODE_DIRECT', " checked");
+ define('__BEG_MODE_REF' , "");
+ break;
+
+ case "REF":
+ define('__BEG_MODE_DIRECT', "");
+ define('__BEG_MODE_REF' , " checked");
+ break;
+ }
+ switch ($CONFIG['beg_ral_en_notify'])
+ {
+ case "Y":
+ define('__BEG_RAL_EN_NOTIFY_Y', " checked");
+ define('__BEG_RAL_EN_NOTIFY_N', "");
+ break;
+
+ case "N":
+ define('__BEG_RAL_EN_NOTIFY_Y', "");
+ define('__BEG_RAL_EN_NOTIFY_N', " checked");
+ break;
+ }
+ switch ($CONFIG['beg_ral_di_notify'])
+ {
+ case "Y":
+ define('__BEG_RAL_DI_NOTIFY_Y', " checked");
+ define('__BEG_RAL_DI_NOTIFY_N', "");
+ break;
+
+ case "N":
+ define('__BEG_RAL_DI_NOTIFY_Y', "");
+ define('__BEG_RAL_DI_NOTIFY_N', " checked");
+ break;
+ }
+ switch ($CONFIG['beg_new_mem_notify'])
+ {
+ case "Y":
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
+ define('__BEG_NEW_MEMBER_NOTIFY_N', "");
+ break;
+
+ case "N":
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
+ define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
+ break;
+ }
+ switch ($CONFIG['beg_include_own'])
+ {
+ case "Y":
+ define('__BEG_INCLUDE_OWN_Y', " checked");
+ define('__BEG_INCLUDE_OWN_N', "");
+ break;
+
+ case "N":
+ define('__BEG_INCLUDE_OWN_Y', "");
+ define('__BEG_INCLUDE_OWN_N', " checked");
+ break;
+ }
+
+ // Add data to constant __MEMBER_SELECTION
+ ADD_MEMBER_SELECTION_BOX(false, true, true, $CONFIG['beg_uid']);
+
+ // Load form template
+ LOAD_TEMPLATE("admin_config_beg");
+}
+//
+?>