]> git.mxchange.org Git - mailer.git/blob - inc/modules/admin/what-overview.php
Introduced template call-back function 'doTemplateAdminListUserTitle':
[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  * -------------------------------------------------------------------- *
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                  *
21  *                                                                      *
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.                                  *
26  *                                                                      *
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.                         *
31  *                                                                      *
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,               *
35  * MA  02110-1301  USA                                                  *
36  ************************************************************************/
37
38 // Some security stuff...
39 if ((!defined('__SECURITY')) || (!isAdmin())) {
40         die();
41 } // END - if
42
43 // Is sql_patches not yet installed?
44 if (!isExtensionInstalled('sql_patches')) {
45         // Output warning
46         displayMessage('{--ADMIN_WARNING_SQL_PATCHES_MISSING--}');
47 } // END - if
48
49  // Load include file 'overview-inc' (old standard overview page)
50 loadIncludeOnce('inc/modules/admin/overview-inc.php');
51
52 // Default is that all jobs are done (why?)
53 $jobsDone = true;
54
55 // Default is that 'task' is not installed
56 $taskExt = false;
57
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'
63                 $taskExt = true;
64         } else {
65                 // Output standart overview (provided by overview-inc.php)
66                 $jobsDone = outputStandardOverview($result_tasks);
67         }
68 } // END - if
69
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)) {
77                 $OUT = '';
78                 foreach ($GLOBALS['menu']['description'] as $key => $value) {
79                         // Prepare content
80                         $content = array(
81                                 'title' => $GLOBALS['menu']['title'][$key],
82                                 'text'  => $value
83                         );
84
85                         // Load row template
86                         $OUT .= loadTemplate('admin_menu_hints_row', true, $content);
87                 } // END - foreach
88
89                 // Load base template
90                 loadTemplate('admin_menu_hints', false, $OUT);
91         }
92 } elseif ($taskExt === false) {
93         if (isExtensionActive('task')) {
94                 // Output warning message
95                 displayMessage(getMaskedMessage('EXTENSION_WARNING_EXTENSION_INACTIVE', 'task'));
96         } // END - if
97
98         // List selected tasks on overview when task management is not active
99         outputSeletectedTasks(postRequestArray(), $result_tasks);
100 }
101
102 // [EOF]
103 ?>