-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.php
51 lines (49 loc) · 2.35 KB
/
navbar.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
<?php
$style = '';
if(array_key_exists('page',$_REQUEST)){
$style = 'padding-bottom:10px;';
}
?>
<div class="nav-padding-left">
<div class="nav nav-pills" style="margin-top: 100px;<?=$style?>">
<?PHP
$active = "";
$path = "";
if( !array_key_exists('page', $_REQUEST)) {
$active = "class='wiki_active'";
}
?>
<?php if( array_key_exists('page', $_REQUEST)){?>
<a href="index.php?pid=<?= DES_DATAMODEL; ?>" <?=$active?> style="padding-top: 40px;">DES Main</a>
<?php } ?>
<?php if( array_key_exists('page', $_REQUEST) && ($_REQUEST['page'] === 'variables' || $_REQUEST['page'] === 'variableInfo')){
$tid = $_REQUEST['tid'];
$vid = isset($_REQUEST['vid']) ? $_REQUEST['vid']:"";
$path = "&tid=".$tid."&vid=".$vid;
$dataTable = getTablesInfo(DES_DATAMODEL,$tid);
$active = "";
foreach( $dataTable as $data ) {
if (!empty($data['record_id'])) {
if ($_REQUEST['page'] === 'variables' || $_REQUEST['page'] === 'variableInfo') {
if($_REQUEST['page'] === 'variables') {
$active = "class='wiki_active'";
}
$url = "index.php?pid=".DES_DATAMODEL."&tid=".$data['record_id']."&page=variables";
?>
<span> > </span>
<a href="<?=$url?>" <?=$active?>><?= $data['table_name'] ?></a>
<?php }
if ($_REQUEST['page'] === 'variableInfo') {
$active = "class='wiki_active'";
$url = "index.php?pid=".DES_DATAMODEL."&tid=".$tid ."&vid=". $vid ."&page=variableInfo";
?>
<span> > </span>
<a href="<?=$url?>" <?=$active?>><?= $data['variable_name'][$vid] ?></a>
<?php }
}
}
}else if($_REQUEST['page'] == 'search'){
echo "<span> > </span><a href='index.php?pid=".DES_DATAMODEL."&page=search' class='wiki_active'>Variable search</a>";
}?>
</div>
</div>