-
Notifications
You must be signed in to change notification settings - Fork 1
/
reports.php
34 lines (33 loc) · 1.24 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
<?php
$custom_report_id = $module->getProjectSetting('custom-report-id',$project_id);
$custom_report_label = $module->getProjectSetting('custom-report-label',$project_id);
$project_id = (int)$_GET['pid'];
$report = htmlentities($_GET['report'],ENT_QUOTES);
if(!empty($custom_report_id) && $custom_report_id[0] != "" && !empty($custom_report_label) && $custom_report_label[0] != ""){?>
<div style="padding-top: 10px">
<ul class="nav nav-tabs">
<?php
$isActive = false;
$navigation = "";
foreach ($custom_report_id as $index => $rid){
$active = "";
if($report == $rid){
$active = "active";
$isActive = true;
}
$navigation .= '<li class="nav-item">
<a class="nav-link '.$active.'" href="'.$module->getUrl("index.php")."&report=".$rid.'">'.$custom_report_label[$index].'</a>
</li>';
}
$active = "";
if(!$isActive){
$active = "active";
}
?>
<li class="nav-item">
<a class="nav-link <?=$active?>" aria-current="page" href="<?=$module->getUrl("index.php")?>">All Data</a>
</li>
<?php echo $navigation;?>
</ul>
</div>
<?php } ?>