loggedin.php
2.32 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
// if (!isset($_SESSION) && !isset($_SESSION['username'])) {
// return;
// }
$dockets = Array();
$dockets_obj = json_decode($_SESSION['lookup']);
foreach ($dockets_obj as $docket => $key) {
$dockets[$docket] = $key;
}
ksort($dockets);
$id = (isset($_GET['id']) ? '?id=' . $_GET['id'] : ' ');
foreach ($dockets as $dir => $md5) {
$client = explode("-",$dir);
$clientIds[] = $client[1];
}
$clientIdsGrouped = array_unique($clientIds, SORT_REGULAR);
// var_dump($clientIdsGrouped);
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<?php $json = file_get_contents('includes/names.json');
$names = json_decode($json);
?>
<dl class="TzMenu">
<dt><label for="client_menu">Clients</label></dt>
<dd><select id="client_menu" name="client_menu">
<option value="">Pick</option>
<?php
/* Figure out clients */
foreach ($clientIdsGrouped as $key => $clientId ) {
if($names->$clientId == null){ $clientName = $clientId; }else{$clientName = $names->$clientId;};
echo '<option value="' . $clientId. '"' .' '. '>' .$clientName . '</option>';
}
?>
</select></dd>
</dl>
<dl class="TzMenu">
<dt><label for="menu">Project</label></dt>
<dd><select id="menu" name="menu">
<option value="home.html">Splash Page</option>
<?php
?>
</select></dd>
</dl>
<dl class="TzMenu" id="TzURL">
<dt style="font-weight: bold;">URL:</dt>
<dd>http://<?php echo $_GET['d'];?>/<span><?php echo $id;?></span></dd>
</dl>
<script type = 'text/javascript'>
$('#client_menu').on('change',function(){
populateSelect()
});
function populateSelect(){
cat= $('#client_menu').val();
menu = $.ajax({ url: 'includes/function.php',
data: {id: cat},
type: 'post',
success: function(output) {
// alert(output);
$('#menu').html('');
$('#menu').append(output)
}
});
}
</script>
<script type="text/javascript" src="TzLinker.js"></script>