Completed
Push — master ( d0bd11...fbf230 )
by
unknown
10s
created

_admin/class.ProfilesAdminPage.php (1 issue)

Labels
Severity

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
require_once('class.FlipAdminPage.php');
3
require_once('class.FlipSession.php');
4
5
class ProfilesAdminPage extends FlipAdminPage
6
{
7
    function __construct($title)
8
    {
9
        parent::__construct($title, 'LDAPAdmins');
10
        $this->addJSByURI('js/admin.js');
11
    }
12
13
    function add_links()
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
    function print_page($header = true)
31
    {
32
        if(!$this->is_admin)
33
        {
34
            $this->body = '
35
        <div class="row">
36
            <div class="col-lg-12">
37
                <h1 class="page-header">
38
                  You must
39
                  <a href="'.$this->profilesUrl.'/login.php?return='.$this->currentUrl().'">log in
0 ignored issues
show
The property profilesUrl does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
40
                    <span class="glyphicon glyphicon-log-in"></span>
41
                  </a>
42
                  to access the Burning Flipside Profile Admin system!
43
                </h1>
44
            </div>
45
        </div>';
46
        }
47
        parent::printPage($header);
48
    }
49
}
50
?>
51