]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/admin/what-config_rewrite.php
win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / admin / what-config_rewrite.php
index 63576a2adc97bbe6a0dba177eed64b69032d7128..0fe433f49f243d23e6b58bc92604b36b9f16a906 100644 (file)
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 02/12/2004 *\r
- * ================                             Last change: 02/12/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-config_rewrite.php                          *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Rewrite-Engine configuration                     *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Rewrite-Engine Konfiguration                     *\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
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-if (isset($_POST['ok']))\r
-{\r
-       // Generate string\r
-       $MODs = array();\r
-       foreach ($_POST['mod'] as $mod=>$sel)\r
-       {\r
-               // Now you can never deselect the admin module, bah!!! ;-)\r
-               if (($sel == "Y") || ($mod == "admin"))\r
-               {\r
-                       // Add module to queue\r
-                       $MODs[] = $mod;\r
-               }\r
-       }\r
-\r
-       // Implode array to string and remove posted mod array\r
-       $_POST['rewrite_skip'] = implode(":", $MODs);\r
-       unset($_POST['mod']);\r
-\r
-       // Save settings\r
-       ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");\r
-}\r
- else\r
-{\r
-       // Load existing modules and generate TR rows for the template\r
-       $result = SQL_QUERY("SELECT module, title FROM "._MYSQL_PREFIX."_mod_reg ORDER BY module", __FILE__, __LINE__);\r
-       $SW = 2; $OUT = "";\r
-       while(list($mod, $title) = SQL_FETCHROW($result))\r
-       {\r
-               // Set title to three dashes when no title is supplied\r
-               if (empty($title)) $title = "---";\r
-\r
-               // Already registered module?\r
-               if (ereg($mod, $CONFIG['rewrite_skipped_mods']))\r
-               {\r
-                       // Found\r
-                       $y = " checked";\r
-                       $n = "";\r
-               }\r
-                else\r
-               {\r
-                       // Not found\r
-                       $y = "";\r
-                       $n = " checked";\r
-               }\r
-\r
-               // Remember data in array for the dynamic row template\r
-               $content = array(\r
-                       'module'    => $mod,\r
-                       'title'     => $title,\r
-                       'y_default' => $y,\r
-                       'n_default' => $n,\r
-                       'sw'        => $SW,\r
-               );\r
-\r
-               // Load template and switch colors\r
-               $OUT .= LOAD_TEMPLATE("admin_config_rewrite_rows", true, $content);\r
-               $SW = 3 - $SW;\r
-       }\r
-\r
-       // Free memory\r
-       SQL_FREERESULT($result);\r
-       define('__MODULE_ROWS', $OUT);\r
-\r
-       // Load main template\r
-       LOAD_TEMPLATE("admin_config_rewrite");\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 02/12/2004 *
+ * ================                             Last change: 02/12/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-config_rewrite.php                          *
+ * -------------------------------------------------------------------- *
+ * Short description : Rewrite-Engine configuration                     *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Rewrite-Engine Konfiguration                     *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * 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']))
+{
+       // Generate string
+       $MODs = array();
+       foreach ($_POST['mod'] as $mod=>$sel)
+       {
+               // Now you can never deselect the admin module, bah!!! ;-)
+               if (($sel == "Y") || ($mod == "admin"))
+               {
+                       // Add module to queue
+                       $MODs[] = $mod;
+               }
+       }
+
+       // Implode array to string and remove posted mod array
+       $_POST['rewrite_skip'] = implode(":", $MODs);
+       unset($_POST['mod']);
+
+       // Save settings
+       ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
+}
+ else
+{
+       // Load existing modules and generate TR rows for the template
+       $result = SQL_QUERY("SELECT module, title FROM "._MYSQL_PREFIX."_mod_reg ORDER BY module", __FILE__, __LINE__);
+       $SW = 2; $OUT = "";
+       while(list($mod, $title) = SQL_FETCHROW($result))
+       {
+               // Set title to three dashes when no title is supplied
+               if (empty($title)) $title = "---";
+
+               // Already registered module?
+               if (ereg($mod, $CONFIG['rewrite_skipped_mods']))
+               {
+                       // Found
+                       $y = " checked";
+                       $n = "";
+               }
+                else
+               {
+                       // Not found
+                       $y = "";
+                       $n = " checked";
+               }
+
+               // Remember data in array for the dynamic row template
+               $content = array(
+                       'module'    => $mod,
+                       'title'     => $title,
+                       'y_default' => $y,
+                       'n_default' => $n,
+                       'sw'        => $SW,
+               );
+
+               // Load template and switch colors
+               $OUT .= LOAD_TEMPLATE("admin_config_rewrite_rows", true, $content);
+               $SW = 3 - $SW;
+       }
+
+       // Free memory
+       SQL_FREERESULT($result);
+       define('__MODULE_ROWS', $OUT);
+
+       // Load main template
+       LOAD_TEMPLATE("admin_config_rewrite");
+}
+//
+?>