Completed
Push — master ( 335ef5...b9683e )
by Patrick
11s
created

ProfilesAdminPage::print_page()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 19
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
require_once('class.FlipAdminPage.php');
3
require_once('class.FlipSession.php');
4
5
class ProfilesAdminPage extends FlipAdminPage
6
{
7
    function __construct($title)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
8
    {
9
        parent::__construct($title, 'LDAPAdmins');
10
        $this->addJSByURI('js/admin.js');
11
    }
12
13
    function add_links()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
14
    {
15
        $users_menu = array(
16
            'Current' => 'users_current.php',
17
            'Pending' => 'users_pending.php'
18
        );
19
        $pos_menu = array(
20
            'Areas' => 'areas.php',
21
            'Leads' => 'leads.php'
22
        );
23
        $this->addLink('<span class="glyphicon glyphicon-dashboard"></span> Dashboard', 'index.php');
24
        $this->addLink('<span class="glyphicon glyphicon-user"></span> Users', '#', $users_menu);
25
        $this->addLink('<span class="glyphicon glyphicon-tower"></span> Groups', 'groups.php');
26
        $this->addLink('<span class="glyphicon glyphicon-briefcase"></span> Positions', '#', $pos_menu);
27
        $this->addLink('<span class="glyphicon glyphicon-cloud"></span> Sessions', 'sessions.php');
28
    }
29
}
30
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
31