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 * -------------------------------------------------------------------- *
18 * Copyright (c) 2003 - 2009 by Roland Haeder *
19 * Copyright (c) 2009 - 2011 by Mailer Developer Team *
20 * For more information visit: http://www.mxchange.org *
22 * This program is free software; you can redistribute it and/or modify *
23 * it under the terms of the GNU General Public License as published by *
24 * the Free Software Foundation; either version 2 of the License, or *
25 * (at your option) any later version. *
27 * This program is distributed in the hope that it will be useful, *
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
30 * GNU General Public License for more details. *
32 * You should have received a copy of the GNU General Public License *
33 * along with this program; if not, write to the Free Software *
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
36 ************************************************************************/
38 // Some security stuff...
39 if ((!defined('__SECURITY')) || (!isAdmin())) {
43 // Is sql_patches not yet installed?
44 if (!isExtensionInstalled('sql_patches')) {
46 displayMessage('{--ADMIN_WARNING_SQL_PATCHES_MISSING--}');
49 // Load include file 'overview-inc' (old standard overview page)
50 loadIncludeOnce('inc/modules/admin/overview-inc.php');
52 // Default is that all jobs are done (why?)
55 // Default is that 'task' is not installed
58 // When the admin is logging in check several things first (new jobs to complete and so on)
59 if (getAction() == 'login') {
60 if ((isExtensionActive('task')) && (function_exists('outputAdvancedOverview'))) {
61 // When task extension is registered output advanced overview page
62 $jobsDone = outputAdvancedOverview($result_tasks); // This function is provided by the extension 'task'
65 // Output standart overview (provided by overview-inc.php)
66 $jobsDone = outputStandardOverview($result_tasks);
70 // Are we in 'welcome' page and are there jobs to be done?
71 if (!ifAdminMenuHasEntries(getAction())) {
72 // This menu is empty and so no content is displayed
73 displayMessage(getMaskedMessage('ADMIN_MENU_IS_EMPTY', getAction()));
74 } elseif ($jobsDone === true) {
75 // Generate overview of all main menus
76 if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) {
78 foreach ($GLOBALS['menu']['description'] as $key => $value) {
81 'title' => $GLOBALS['menu']['title'][$key],
86 $OUT .= loadTemplate('admin_menu_hints_row', true, $content);
90 loadTemplate('admin_menu_hints', false, $OUT);
92 } elseif ($taskExt === false) {
93 if (isExtensionActive('task')) {
94 // Output warning message
95 displayMessage(getMaskedMessage('EXTENSION_WARNING_EXTENSION_INACTIVE', 'task'));
98 // List selected tasks on overview when task management is not active
99 outputSeletectedTasks(postRequestArray(), $result_tasks);