]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/admin/what-config_home.php
branched
[mailer.git] / 0.2.1 / inc / modules / admin / what-config_home.php
diff --git a/0.2.1/inc/modules/admin/what-config_home.php b/0.2.1/inc/modules/admin/what-config_home.php
deleted file mode 100644 (file)
index d580615..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 09/22/2004 *
- * ================                             Last change: 09/22/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-config_home.php                             *
- * -------------------------------------------------------------------- *
- * Short description : Set "home" page                                  *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : "Home"-Seite festlegen                           *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * 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__));
-
-$sub = "";
-if (!empty($_GET['sub'])) $sub = $_GET['sub'];
-
-switch ($sub)
-{
-case "": // Output selection table
-       LOAD_TEMPLATE("admin_config_home_main");
-       break;
-
-case "settings": // Settings related to the index page
-       if (isset($_POST['ok']))
-       {
-               // Save settings
-               ADMIN_SAVE_SETTINGS($_POST, "_config", "config='0'");
-               OUTPUT_HTML ("<A href=\"".URL."/modules.php?module=admin&amp;what=config_home&amp;sub=settings\">".ADMIN_CONTINUE_TO_CONFIG."</A>");
-       }
-        else
-       {
-               // Prepare data for the template
-               $content = array_fill(-1, 60, "");
-               $content[$CONFIG['index_delay']] = " selected=\"selected\"";
-
-               define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS($CONFIG['index_cookie'], "index_cookie", "YMWD"));
-               LOAD_TEMPLATE("admin_config_home_settings", false, $content);
-       }
-       break;
-
-case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
-       if (isset($_GET['home']))
-       {
-               // Set new home
-               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET index_home='%s' WHERE config='0' LIMIT 1", array($_GET['home']), __FILE__, __LINE__);
-               $CONFIG['index_home'] = $_GET['home'];
-       }
-
-       // Load all what menu points
-       $result = SQL_QUERY("SELECT id, what, title
- FROM "._MYSQL_PREFIX."_guest_menu
- WHERE action='main' AND what != '' AND locked='N'
- ORDER BY sort", __FILE__, __LINE__);
-
-       $SW = 2; $OUT = ""; $atitle = "";
-       while (list($id, $wht, $wtitle) = SQL_FETCHROW($result))
-       {
-               $LINK = "<A href=\"".URL."/modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=".$wht."\">"._IS_NEW_HOME."</A>";
-               if ($wht == $CONFIG['index_home'])
-               {
-                       // Is current home
-                       $LINK   = "<STRONG class=\"admin_note\">"._IS_CURRENT_HOME."</STRONG>";
-                       $atitle = "<STRONG class=\"admin_note\">".$atitle."</STRONG>";
-                       $wtitle = "<STRONG class=\"admin_note\">".$wtitle."</STRONG>";
-               }
-
-               // Add row...
-               $OUT .= "<TR>
-         <TD class=\"switch_sw".$SW." bottom right\">&nbsp;".$id."</TD>
-         <TD class=\"switch_sw".$SW." bottom right\">&nbsp;".$wtitle."</TD>
-         <TD class=\"switch_sw".$SW." bottom\" align=\"center\">
-           ".$LINK."
-         </TD>
-       </TR>\n";
-
-               // Switch color
-               $SW = 3 - $SW;
-       }
-
-       // Free memory
-       SQL_FREERESULT($result);
-       define('__HOME_ROWS', $OUT);
-
-       // Load template
-       LOAD_TEMPLATE("admin_config_home");
-       break;
-}
-//
-?>