-
Notifications
You must be signed in to change notification settings - Fork 0
/
reports.php
executable file
·46 lines (38 loc) · 1.47 KB
/
reports.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
<?php
require_once("inc/config.php");
check_role($ROLE_USER);
$TITLE = "Poročila";
$tem = template_open("reports.tpl");
$tem = template_add_head_foot($tem,head,foot);
if ($role_id) {
switch ($role_id) {
case ($role_id >= $ROLE_ADMIN):
$tem = str_replace("##IF_ADMIN##","",$tem);
$tem = str_replace("##IF_LEADER##","",$tem);
break;
case ($role_id <= $ROLE_ADMIN and $role_id >= $ROLE_LEADER):
$tem = template_clean_up_tags($tem,"##IF_ADMIN##",1);
break;
case ($role_id <= $ROLE_LEADER and $role_id >= $ROLE_EMPLOYED):
$tem = template_clean_up_tags($tem,"##IF_ADMIN##",1);
$tem = template_clean_up_tags($tem,"##IF_LEADER##",1);
break;
default:
$tem = template_clean_up_tags($tem,"##IF_ADMIN##",1);
$tem = template_clean_up_tags($tem,"##IF_LEADER##",1);
$tem = template_clean_up_tags($tem,"##IF_EMPLOYED##",1);
//$tem = template_clean_up_tags($tem,"##IF_ZALEC##",1);
}
} else {
$tem = template_clean_up_tags($tem,"##IF_ZALEC##",1);
$head = template_clean_up_tags($head,"##IF_USER##",1);
$tem = template_clean_up_tags($tem,"##IF_ADMIN##",1);
$tem = template_clean_up_tags($tem,"##IF_LEADER##",1);
$tem = template_clean_up_tags($tem,"##IF_EMPLOYED##",1);
}
$tem = str_replace('##TEXT##',"prijavljen uporabnik:",$tem);
$tem = str_replace('##USER##',$identity,$tem);
$tem = str_replace('##TITLE##',$TITLE,$tem);
$tem=template_clean_up_tags($tem,"##");
echo $tem;
?>