-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 07/10/2004 *\r
- * =============== Last change: 07/10/2004 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : what-config_register.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Setup for the registration form *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Einstellungen für das Anmeldeformular *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2007 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
-// Do we want to save changes?\r
-if (isset($_POST['ok']))\r
-{\r
- foreach ($_POST['sel'] as $id=>$value)\r
- {\r
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%d AND field_required != '%s' LIMIT 1",\r
- array($value, bigintval($id), $value),__FILE__, __LINE__);\r
- }\r
- LOAD_TEMPLATE ("admin_settings_saved", false, REGISTER_ADMIN_CHANGES_SAVED);\r
-}\r
-\r
-// List all register values\r
-$result = SQL_QUERY("SELECT id, field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);\r
-$SW = 2; $OUT = "";\r
-while (list($id, $name, $required) = SQL_FETCHROW($result))\r
-{\r
- $eval = "\$name = ".strtoupper($name).";";\r
- eval($eval);\r
- $OUT .= "<TR>\r
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".$id."</TD>\r
- <TD class=\"switch_sw".$SW." bottom2 right2\"> ".$name."</TD>\r
- <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">\r
- ".ADD_SELECTION("yn", $required, "sel[".$id."]")."\r
- </TD>\r
-</TR>\n";\r
- $SW = 3 - $SW;\r
-}\r
-\r
-// Free memory\r
-SQL_FREERESULT($result);\r
-\r
-// Remember rows in constant\r
-define('__REGISTER_ROWS', $OUT);\r
-\r
-// Load template\r
-LOAD_TEMPLATE("admin_config_register");\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 07/10/2004 *
+ * =============== Last change: 07/10/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_register.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Setup for the registration form *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Einstellungen f�r das Anmeldeformular *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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__));
+
+// Do we want to save changes?
+if (isset($_POST['ok']))
+{
+ foreach ($_POST['sel'] as $id=>$value)
+ {
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%d AND field_required != '%s' LIMIT 1",
+ array($value, bigintval($id), $value),__FILE__, __LINE__);
+ }
+ LOAD_TEMPLATE ("admin_settings_saved", false, REGISTER_ADMIN_CHANGES_SAVED);
+}
+
+// List all register values
+$result = SQL_QUERY("SELECT id, field_name, field_required FROM "._MYSQL_PREFIX."_must_register ORDER BY id", __FILE__, __LINE__);
+$SW = 2; $OUT = "";
+while (list($id, $name, $required) = SQL_FETCHROW($result))
+{
+ $eval = "\$name = ".strtoupper($name).";";
+ eval($eval);
+ $OUT .= "<TR>
+ <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">".$id."</TD>
+ <TD class=\"switch_sw".$SW." bottom2 right2\"> ".$name."</TD>
+ <TD align=\"center\" class=\"switch_sw".$SW." bottom2 right2\">
+ ".ADD_SELECTION("yn", $required, "sel[".$id."]")."
+ </TD>
+</TR>\n";
+ $SW = 3 - $SW;
+}
+
+// Free memory
+SQL_FREERESULT($result);
+
+// Remember rows in constant
+define('__REGISTER_ROWS', $OUT);
+
+// Load template
+LOAD_TEMPLATE("admin_config_register");
+
+//
+?>