2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 09/05/2003 *
4 * =================== Last change: 07/13/2004 *
6 * -------------------------------------------------------------------- *
7 * File : what-overview.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Generate a simple task list or menu descriptions *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Einfache Task-Liste oder Menuebeschreibungen *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * Copyright (c) 2009, 2010 by Mailer Developer Team *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Some security stuff...
41 if ((!defined('__SECURITY')) || (!isAdmin())) {
45 // Add description as navigation point
46 // In Opera browsers the menu is being displayed double: addMenuDescription('admin', __FILE__);
48 // Is sql_patches not yet installed?
49 if (!isExtensionInstalled('sql_patches')) {
51 loadTemplate('admin_settings_saved', false, '{--ADMIN_WARNING_SQL_PATCHES_MISSING--}');
54 // Load include file 'overview-inc' (old standard overview page)
55 loadIncludeOnce('inc/modules/admin/overview-inc.php');
58 $taskExt = false; // Default is that 'task' is not installed
60 // When the admin is logging in check several things first (new jobs to complete and so on)
61 if (getAction() == 'login') {
62 if ((isExtensionActive('task')) && (function_exists('outputAdvancedOverview'))) {
63 // When task extension is registered output advanced overview page
64 $jobsDone = outputAdvancedOverview($result_tasks); // This function is provided by the extension 'task'
67 // Output standart overview (provided by overview-inc.php)
68 $jobsDone = outputStandardOverview($result_tasks);
72 // Are we in 'welcome' page and are there jobs to be done?
73 if (!ifAdminMenuHasEntries(getAction())) {
74 // This menu is empty and so no content is displayed
75 loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MENU_IS_EMPTY', getAction()));
76 } elseif ($jobsDone === true) {
77 // Generate overview of all main menus
78 if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) {
80 foreach ($GLOBALS['menu']['description'] as $key => $value) {
83 'title' => $GLOBALS['menu']['title'][$key],
88 $OUT .= loadTemplate('admin_menu_hints_row', true, $content);
92 loadTemplate('admin_menu_hints', false, $OUT);
94 } elseif ($taskExt === false) {
95 if (isExtensionActive('task')) {
96 // Output warning message
97 loadTemplate('admin_settings_saved', false, getMaskedMessage('EXTENSION_WARNING_EXTENSION_INACTIVE', 'task'));
100 // List selected tasks on overview when task management is not active
101 outputSeletectedTasks(postRequestArray(), $result_tasks);