-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
86 lines (78 loc) · 3.36 KB
/
sidebar.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
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
<?php
include 'db.php';
$query = mysqli_query($conn,"SELECT * FROM school_year where status='Yes' ");
$s = mysqli_fetch_assoc($query);
$school_year=$s['school_year'];
?>
<ul class="nav navbar-nav side-nav">
<li>
<a href="rms.php?page=home"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
</li>
<li>
<a id=demo1 href="javascript:void(0)" data-toggle="collapse" data-target="#masterlistCollapse"><i class="fa fa-fw fa-files-o"></i> Main <i class="fa fa-fw fa-caret-down"></i></a>
<ul id="masterlistCollapse" class="collapse">
<li>
<a href="rms.php?page=Students"><i class="fa fa-fw fa-users"></i> Students List</a>
</li>
<li class="">
<a href="rms.php?page=subjects"><i class="fa fa-fw fa-book"></i> Units List</a>
</li>
<li class="">
<a href="rms.php?page=program"><i class="fa fa-fw fa-bars"></i> Curriculum/Course</a>
</li>
</ul>
</li>
<li>
<a href="javascript:void(0)" data-toggle="collapse" data-target="#recordsCollapse"><i class="fa fa-fw fa-file"></i> Records <i class="fa fa-fw fa-caret-down"></i></a>
<ul class="collapse" id="recordsCollapse">
<li>
<a href="rms.php?page=records"><i class="fa fa-fw fa-files-o"></i>Academic Record </a>
</li>
<li>
<a href="rms.php?page=candidates&sy=<?php echo $school_year ?>"><i class="fa fa-fw fa-users"></i> Promote Students </a>
</li>
<li>
<a href="rms.php?page=candidates_list&sy=<?php echo $school_year ?>"><i class="fa fa-fw fa-file-o"></i> Students List </a>
</li>
</ul>
</li>
<li>
<a href="javascript:void(0)" data-toggle="collapse" data-target="#reportsCollapse"><i class="fa fa-fw fa-file"></i> Reports <i class="fa fa-fw fa-caret-down"></i></a>
<ul id="reportsCollapse" class="collapse">
<li>
<a href="rms.php?page=report"><i class="fa fa-fw fa-files-o"></i> Print Marks</a>
</li>
<li>
<a href="#" data-toggle="modal" data-target="#s_report"><i class="fa fa-fw fa-files-o"></i> Students List</a>
</li>
<li>
<a href="rms.php?page=candidates_report&school_year=<?php echo $school_year ?>" ><i class="fa fa-fw fa-file-text-o"></i> Students Report</a>
</li>
</ul>
</li>
<li>
<a href="rms.php?page=users"><i class="fa fa-users"></i> Users</a>
</li>
<li>
<a href="javascript:void(0)" data-toggle="collapse" data-target="#maintenanceCollapse"><i class="fa fa-fw fa-gears"></i> Maintenance <i class="fa fa-fw fa-caret-down"></i></a>
<ul id="maintenanceCollapse" class="collapse">
<li>
<a href="rms.php?page=school_year"><i class="fa fa-fw fa-calendar"></i>School Year</a>
</li>
<li>
<a href="rms.php?page=grade"><i class="fa fa-fw fa-file-text-o"></i> Semester(s)</a>
</li>
</ul>
</li>
</ul>
<script>
$('.side-nav li a').each(function(){
if((location.href).includes($(this).attr('href')) == true){
$(this).closest('li').addClass("active")
console.log($(this).closest('li').parent('ul').attr('id'))
if($(this).closest('li').parent('ul').hasClass('collapse') == true){
$('[data-target="#'+$(this).closest('li').parent('ul').attr('id')+'"]').click()
}
}
})
</script>