-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinc-page-top-admin.php
47 lines (42 loc) · 2.67 KB
/
inc-page-top-admin.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
<div id="nav-admin-bg">
<ul id="nav-admin-ul">
<? if ($_SESSION['admin'] >= 1){ ?>
<li class="<? if ($subpage_name == 'Vacation') echo 'active'; ?>"><a href="admin-vacation.php">Vacation</a></li>
<? } ?>
<?php if($_SESSION['admin'] >= 1) { ?><li class="nav-admin <? if ($subpage_name == 'Vacation Count') echo 'active'; ?>"><a href="admin-vacation-count.php">Vacation Count</a></li><?php } ?>
<?php if($_SESSION['admin'] >= 1) { ?><li class="nav-admin <? if ($subpage_name == 'Hours Admin') echo 'active'; ?>"><a href="admin-hours.php">Hours</a></li><?php } ?>
<?php /*if($_SESSION['admin'] >= 1) { ?><li class="nav-admin <? if ($subpage_name == 'Cleaning Admin') echo 'active'; ?>"><a href="admin-cleaning.php">Cleaning</a></li><?php }*/ ?>
</ul>
<? if ($subpage_name == 'Vacation'){ ?>
<div id="nav-admin-sub">
<ul>
<li class="<? if ($subpage_name == 'Add Time') echo 'active'; ?>"><a id="show-form-add-time-button" href="#show-form-add-time">Add Time</a></li>
<li class="<? if ($subpage_name == 'Request Vacation') echo 'active'; ?>"><a id="show-form-request-button" href="#show-form-request">Request Vacation</a></li>
<script type="text/javascript">
$(function() {
$('#show-form-add-time-button').click(function(){
$('#add_time_form').toggle();
$('#request_form').hide();
$('#show-form-request-button').parent().removeClass("active");
if($('#show-form-add-time-button').parent().hasClass("active")){
$('#show-form-add-time-button').parent().removeClass("active");
}else{
$('#show-form-add-time-button').parent().addClass("active")
}
});
$('#show-form-request-button').click(function(){
$('#request_form').toggle();
$('#add_time_form').hide();
$('#show-form-add-time-button').parent().removeClass("active");
if($('#show-form-request-button').parent().hasClass("active")){
$('#show-form-request-button').parent().removeClass("active");
}else{
$('#show-form-request-button').parent().addClass("active")
}
});
});
</script>
</ul>
</div>
<? } ?>
</div>