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
|
<?php function Navigation($sections, $rights) { $cnt = ""; foreach($sections as $section) { if(strchr($rights, $section->credentials)) { $cnt.= "<div id=\"navigation_btn\"><br /><a href=\""; if($section->pageType == 2) { $cnt.="index.php?cnt_=$section->pageTypeInfo\">"; } else if($section->pageType == 1) { $cnt.="index.php?dbc_=$section->pageTypeInfo\">"; } $cnt.= "<!--img src=\"img/$section->imgName\" border=\"0\"/><br-->" . $section->name . "</a></div>"; } } return $cnt; }
function assert_rights($right) { global $session_; if(!strchr($session_->getVar("rights"), $right)) { $session_->Destroy(); global $ADMINPATH; header("location:../../login.php?st=51"); exit(); } }
function assert_refferer($name) { $arr = parse_url($_SERVER['HTTP_REFERER']); //print_r($arr); // print_r($name); $arr2 = parse_url($name); print_r($arr2); } ?>
|