Completed
Push — master ( 8ca430...3024c9 )
by Michael
03:12
created

admin/admin_header.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Module: XoopsTube
4
 *
5
 * You may not change or alter any portion of this comment or credits
6
 * of supporting developers from this source code or any supporting source code
7
 * which is considered copyrighted (c) material of the original comment or credit authors.
8
 *
9
 * PHP version 5
10
 *
11
 * @category        Module
12
 * @package         Xoopstube
13
 * @author          XOOPS Development Team
14
 * @copyright       2001-2013 The XOOPS Project
15
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
16
 * @version         $Id$
17
 * @link            http://sourceforge.net/projects/xoops/
18
 * @since           1.0.6
19
 */
20
21
$path = dirname(dirname(dirname(__DIR__)));
22
include_once $path . '/mainfile.php';
23
include_once $path . '/include/cp_functions.php';
24
require_once $path . '/include/cp_header.php';
25
26
include_once dirname(__DIR__) . '/include/common.php';
27
28
global $xoopsModule;
29
30
$thisModuleDir  = $GLOBALS['xoopsModule']->getVar('dirname');
31
$thisModulePath = dirname(__DIR__);
32
33
//if functions.php file exist
0 ignored issues
show
Unused Code Comprehensibility introduced by
37% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
34
//require_once dirname(__DIR__) . '/include/functions.php';
35
//require_once $thisModulePath . '/include/functions.php';
36
37
// Load language files
0 ignored issues
show
Unused Code Comprehensibility introduced by
55% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
38
//xoops_loadLanguage('admin', $thisModuleDir);
39
//xoops_loadLanguage('modinfo', $thisModuleDir);
40
//xoops_loadLanguage('main', $thisModuleDir);
41
xoops_loadLanguage('admin', XOOPSTUBE_DIRNAME);
42
xoops_loadLanguage('modinfo', XOOPSTUBE_DIRNAME);
43
xoops_loadLanguage('main', XOOPSTUBE_DIRNAME);
44
45
$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16');
46
$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
47
48
$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin');
49
50
require_once $pathModuleAdmin . '/moduleadmin.php';
51
52
include $thisModulePath . '/include/config.php';
53
include_once $thisModulePath . '/include/functions.php';
54
include_once $thisModulePath . '/include/video.php';
55
include_once $thisModulePath . '/class/xoopstube_lists.php';
56
include_once $thisModulePath . '/class/myts_extended.php';
57
58
include_once XOOPS_ROOT_PATH . '/modules/xoopstube/class/xoopstubetree.php';
59
include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
60
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
61
62
$xtubemyts = new xtubeTextSanitizer(); // MyTextSanitizer object
63
64
$xtubeImageArray = array(
65
    'editimg'     => "<img src='$pathIcon16/edit.png' alt='" . _AM_XOOPSTUBE_ICO_EDIT . "' align='middle'>",
66
    'deleteimg'   => "<img src='$pathIcon16/delete.png' alt='" . _AM_XOOPSTUBE_ICO_DELETE . "' align='middle'>",
67
    'altcat'      => "<img src='$pathIcon16/folder_add.png' alt='" . _AM_XOOPSTUBE_ALTCAT_CREATEF . "' align='middle'>",
68
    'online'      => "<img src='$pathIcon16/1.png' alt='" . _AM_XOOPSTUBE_ICO_ONLINE . "' title='" . _AM_XOOPSTUBE_ICO_ONLINE . "' align='middle'>",
69
    'offline'     => "<img src='$pathIcon16/0.png' alt='" . _AM_XOOPSTUBE_ICO_OFFLINE . "' title='" . _AM_XOOPSTUBE_ICO_OFFLINE . "' align='middle'>",
70
    'approved'    => "<img src='$pathIcon16/1.png' alt=''" . _AM_XOOPSTUBE_ICO_APPROVED . "' align='middle'>",
71
    'notapproved' => "<img src='$pathIcon16/0.png' alt='" . _AM_XOOPSTUBE_ICO_NOTAPPROVED . "' align='middle'>",
72
    'relatedfaq'  => "<img src='../assets/images/icon/link.gif' alt='" . _AM_XOOPSTUBE_ICO_VIDEO . "' align='absmiddle'>",
73
    'expired'     => "<img src='../assets/images/icon/clock_red.png' alt='" . _AM_XOOPSTUBE_ICO_EXPIRE . "' title='" . _AM_XOOPSTUBE_ICO_EXPIRE . "' align='absmiddle'>",
74
    'approve'     => "<img src='$pathIcon16/1.png' alt='" . _AM_XOOPSTUBE_ICO_APPROVE . "' align='middle'>",
75
    'ignore'      => "<img src='$pathIcon16/0.png' alt='" . _AM_XOOPSTUBE_ICO_IGNORE . "' align='middle'>",
76
    'ack_yes'     => "<img src='$pathIcon16/1.png' alt='" . _AM_XOOPSTUBE_ICO_ACK . "' align='middle'>",
77
    'ack_no'      => "<img src='$pathIcon16/0.png' alt='" . _AM_XOOPSTUBE_ICO_REPORT . "' align='middle'>",
78
    'con_yes'     => "<img src='$pathIcon16/1.png' alt='" . _AM_XOOPSTUBE_ICO_CONFIRM . "' align='middle'>",
79
    'con_no'      => "<img src='$pathIcon16/0.png' alt='" . _AM_XOOPSTUBE_ICO_CONBROKEN . "' align='middle'>",
80
    'view'        => "<img src='$pathIcon16/search.png' alt='" . _AM_XOOPSTUBE_ICO_VIEW . "' align='middle'>"
81
);
82