Completed
Push — master ( 0424ea...923121 )
by Michael
03:57
created

admin/header.php (1 issue)

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
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 38 and the first side effect is on line 23.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/*
3
-------------------------------------------------------------------------
4
                     ADSLIGHT 2 : Module for Xoops
5
6
        Redesigned and ameliorate By Luc Bizet user at www.frxoops.org
7
        Started with the Classifieds module and made MANY changes
8
        Website : http://www.luc-bizet.fr
9
        Contact : [email protected]
10
-------------------------------------------------------------------------
11
             Original credits below Version History
12
##########################################################################
13
#                    Classified Module for Xoops                         #
14
#  By John Mordo user jlm69 at www.xoops.org and www.jlmzone.com         #
15
#      Started with the MyAds module and made MANY changes               #
16
##########################################################################
17
 Original Author: Pascal Le Boustouller
18
 Author Website : [email protected]
19
 Licence Type   : GPL
20
-------------------------------------------------------------------------
21
*/
22
23
require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
24
25
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
26
    include_once(XOOPS_ROOT_PATH . '/class/template.php');
27
    $xoopsTpl = new XoopsTpl();
28
}
29
30
if (!@ include_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.admin.php'):
31
32
    /**
33
     * @param        $currentoption
34
     * @param string $breadcrumb
35
     *
36
     * @return string
37
     */
38
    function loadModuleAdminMenu($currentoption, $breadcrumb = '')
39
    {
40
        if (!$adminmenu = $GLOBALS['xoopsModule']->getAdminMenu()) {
41
            return false;
42
        }
43
44
        $breadcrumb  = empty($breadcrumb) ? $adminmenu[$currentoption]['title'] : $breadcrumb;
45
        $module_link = XOOPS_URL . '/modules/adslight/';
46
        $image_link  = XOOPS_URL . '/modules/adslight/images';
47
48
        $adminmenu_text = '
49
    <style type="text/css">
50
    <!--
51
    #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0;}
52
    #buttonbar { float:left; width:100%; background: #e7e7e7 url("' . $image_link . '/modadminbg.gif") repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px;}
53
    #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
54
    #buttonbar li { display:inline; margin:0; padding:0; }
55
    #buttonbar a { float:left; background:url("' . $image_link . '/left_both.gif") no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
56
    #buttonbar a span { float:left; display:block; background:url("' . $image_link . '/right_both.gif") no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
57
    /* Commented Backslash Hack hides rule from IE5-Mac \*/
58
    #buttonbar a span {float:none;}
59
    /* End IE5-Mac hack */
60
    #buttonbar a:hover span { color:#333; }
61
    #buttonbar .current a { background-position:0 -150px; border-width:0; }
62
    #buttonbar .current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
63
    #buttonbar a:hover { background-position:0% -150px; }
64
    #buttonbar a:hover span { background-position:100% -150px; }
65
    //-->
66
    </style>
67
    <div id="buttontop">
68
     <table style="width: 100%; padding: 0; " cellspacing="0">
69
         <tr>
70
             <td style="width: 70%; font-size: 10px; text-align: left; color: #DFE0E0; padding: 0 6px; line-height: 18px;">
71
                 <a href="../index.php">' . $GLOBALS['xoopsModule']->getVar('name') . '</a>
72
             </td>
73
             <td style="width: 30%; font-size: 10px; text-align: right; color: #DFE0E0; padding: 0 6px; line-height: 18px;">
74
                 <strong>' . $GLOBALS['xoopsModule']->getVar('name') . '</strong>&nbsp;' . $breadcrumb . '
75
             </td>
76
         </tr>
77
     </table>
78
    </div>
79
    <div id="buttonbar">
80
     <ul>
81
    ';
82
        foreach (array_keys($adminmenu) as $key) {
83
            $adminmenu_text .= (($currentoption == $key) ? '<li class="current">' : '<li>') .
84
                               '<a href="' .
85
                               $module_link .
86
                               $adminmenu[$key]['link'] .
87
                               '"><span>' .
88
                               $adminmenu[$key]['title'] .
89
                               '</span></a></li>';
90
        }
91
        $adminmenu_text .= '<li><a href="' .
92
                           XOOPS_URL .
93
                           '/modules/system/admin.php?fct=preferences&op=showmod&mod=' .
94
                           $GLOBALS['xoopsModule']->getVar('mid') .
95
                           '"><span>' .
96
                           _PREFERENCES .
97
                           '</span></a></li>';
98
        $adminmenu_text .= '
99
     </ul>
100
    </div>
101
    <br style="clear:both;" />';
102
103
        return $adminmenu_text;
104
    }
105
106
endif;
107