The yearly copyright-update commit. 2009, 2010 are now copyrighted on the developer...
[mailer.git] / inc / modules / admin / what-overview.php
1 <?php
2 /************************************************************************
3  * Mailer v0.2.1-FINAL                                Start: 09/05/2003 *
4  * ===================                          Last change: 07/13/2004 *
5  *                                                                      *
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  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
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                  *
23  *                                                                      *
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.                                  *
28  *                                                                      *
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.                         *
33  *                                                                      *
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,               *
37  * MA  02110-1301  USA                                                  *
38  ************************************************************************/
39
40 // Some security stuff...
41 if ((!defined('__SECURITY')) || (!isAdmin())) {
42         die();
43 } // END - if
44
45 // Add description as navigation point
46 // In Opera browsers the menu is being displayed double: addMenuDescription('admin', __FILE__);
47
48 // Is sql_patches not yet installed?
49 if (!isExtensionInstalled('sql_patches')) {
50         // Output warning
51         loadTemplate('admin_settings_saved', false, getMessage('ADMIN_WARNING_SQL_PATCHES_MISSING'));
52 } // END - if
53
54  // Load include file 'overview-inc' (old standard overview page)
55 loadIncludeOnce('inc/modules/admin/overview-inc.php');
56
57 $jobsDone = true;
58 $taskExt = false; // Default is that 'task' is not installed
59
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'
65                 $taskExt = true;
66         } else {
67                 // Output standart overview (provided by overview-inc.php)
68                 $jobsDone = outputStandardOverview($result_tasks);
69         }
70 } // END - if
71
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)) {
79                 $OUT = '';
80                 foreach ($GLOBALS['menu']['description'] as $key => $value) {
81                         // Prepare content
82                         $content = array(
83                                 'title' => $GLOBALS['menu']['title'][$key],
84                                 'text'  => $value
85                         );
86
87                         // Load row template
88                         $OUT .= loadTemplate('admin_menu_hints_row', true, $content);
89                 } // END - foreach
90
91                 // Load base template
92                 loadTemplate('admin_menu_hints', false, $OUT);
93         }
94 } elseif ($taskExt === false) {
95         if (isExtensionActive('task')) {
96                 // Output warning message
97                 loadTemplate('admin_settings_saved', false, getMaskedMessage('EXTENSION_WARNING_EXT_INACTIVE', 'task'));
98         }
99
100         // List selected tasks on overview when task management is not active
101         outputSeletectedTasks(postRequestArray(), $result_tasks);
102 }
103
104 // [EOF]
105 ?>