1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* You may not change or alter any portion of this comment or credits |
4
|
|
|
* of supporting developers from this source code or any supporting source code |
5
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
* |
7
|
|
|
* This program is distributed in the hope that it will be useful, |
8
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ |
14
|
|
|
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
15
|
|
|
* @package |
16
|
|
|
* @since |
17
|
|
|
* @author XOOPS Development Team |
18
|
|
|
* @version $Id $ |
19
|
|
|
*/ |
20
|
|
|
defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); |
|
|
|
|
21
|
|
|
|
22
|
|
|
//$path = dirname(dirname(dirname(__DIR__))); |
23
|
|
|
//include_once $path . '/mainfile.php'; |
24
|
|
|
|
25
|
|
|
$moduleHandler = xoops_getHandler('module'); |
26
|
|
|
$module = $moduleHandler->getByDirname(basename(dirname(__DIR__))); |
27
|
|
|
$pathIcon32 = '../../' . $module->getInfo('icons32'); |
28
|
|
|
xoops_loadLanguage('modinfo', $module->dirname()); |
29
|
|
|
|
30
|
|
|
$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $module->getInfo('dirmoduleadmin') . '/moduleadmin'; |
31
|
|
|
if (!file_exists($fileinc = $pathModuleAdmin . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
32
|
|
|
$fileinc = $pathModuleAdmin . '/language/english/main.php'; |
33
|
|
|
} |
34
|
|
|
include_once $fileinc; |
35
|
|
|
|
36
|
|
|
$adminmenu = array(); |
37
|
|
|
$i = 0; |
38
|
|
|
$adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
39
|
|
|
$adminmenu[$i]['link'] = 'admin/index.php'; |
40
|
|
|
$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
41
|
|
|
++$i; |
42
|
|
|
$adminmenu[$i]['title'] = _MI_ASSESSMENT_ADMENU1; |
43
|
|
|
$adminmenu[$i]['link'] = 'admin/main.php?op=manter_provas'; |
44
|
|
|
$adminmenu[$i]['icon'] = $pathIcon32 . '/manage.png'; |
45
|
|
|
++$i; |
46
|
|
|
$adminmenu[$i]['title'] = _MI_ASSESSMENT_ADMENU2; |
47
|
|
|
$adminmenu[$i]['link'] = 'admin/main.php?op=manter_resultados'; |
48
|
|
|
$adminmenu[$i]['icon'] = $pathIcon32 . '/button_ok.png'; |
49
|
|
|
++$i; |
50
|
|
|
$adminmenu[$i]['title'] = _MI_ASSESSMENT_ADMENU3; |
51
|
|
|
$adminmenu[$i]['link'] = 'admin/main.php?op=manter_documentos'; |
52
|
|
|
$adminmenu[$i]['icon'] = $pathIcon32 . '/content.png'; |
53
|
|
|
++$i; |
54
|
|
|
$adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
55
|
|
|
$adminmenu[$i]['link'] = 'admin/about.php'; |
56
|
|
|
$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
57
|
|
|
|
PHP has two types of connecting operators (logical operators, and boolean operators):
and
&&
or
||
The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like
&&
, or||
.Let’s take a look at a few examples:
Logical Operators are used for Control-Flow
One case where you explicitly want to use logical operators is for control-flow such as this:
Since
die
introduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined withthrow
at this point:These limitations lead to logical operators rarely being of use in current PHP code.