-
Notifications
You must be signed in to change notification settings - Fork 15
/
class_controller.php
57 lines (43 loc) · 1.38 KB
/
class_controller.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
class Controller {
var $navtitle;
var $navlist;
var $data;
var $content = '';
function __construct() {
}
function get_submenu() {
global $style, $main;
$sidebar_link_link = "tpl/menu/submenu_link.tpl";
$sidebar_link = "tpl/menu/submenu_main.tpl";
$admin_navigation = $main->getAdminNavigation();
$admin_nave_item = false;
if (isset($admin_navigation[$main->getvar['page']]) && !empty($admin_navigation[$main->getvar['page']])) {
$admin_nave_item = $admin_navigation[$main->getvar['page']];
}
$subsidebar = '';
if (isset($this->navtitle) && $this->navtitle) {
if (isset($this->navlist)) {
$array3 = array();
$array3['LINKS'] = null;
foreach($this->navlist as $key => $value) {
$array2['IMGURL'] = $value[1];
$array2['LINK'] = "?page=".$admin_nave_item['link']."&sub=".$value[2];
$array2['VISUAL'] = $value[0];
if (isset($main->getvar['sub']) && $value[2] == $main->getvar['sub']) {
$array2['ACTIVE'] = 'active';
} else {
$array2['ACTIVE'] = '';
}
$array3['LINKS'] .= $style->replaceVar($sidebar_link_link, $array2);
}
$subsidebar = $style->replaceVar($sidebar_link, $array3);
}
}
return $this->data['SUBMENU'] = $subsidebar;
}
function replaceVar($tpl, $data = array()) {
global $style;
$this->content .= $style->replaceVar($tpl, $data);
}
}