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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<!-- bannermenu.php -->
<div id="bannerBody">
<!-- This div contains the bannermenu and centers it on the page -->
<div id="bannerWrapper">
<!-- Determines how the LenaSYSButton should look and function depending on if the user is logged in or not -->
<?php
//$userName
$url = base_url();
//If user is logged in
if($userName != '') {
$url = base_url().'cms';
}
echo '<a href="'.$url.'" title="Home"><div id="bannerLogoButton"></div></a>';
?>
<!-- This div contains all the content between the LenaSYS button and the user button -->
<div id="bannerContent">
<!-- This div contains the content that is needed on the banner for the CMS page.
The name is only used to set it hidden or shown. -->
<div id="bannerContentCMS">
<!-- Determines if the header should contain active course info depending on if the user is logged in or not -->
<?php
//$userName
//$activeCourse
$header = '';
//If user is logged in
if($userName != '') {
$header = '<span id="bannerHeaderCMSCourseName">'.
$activeCourse['courseName'].' </span><span id="bannerHeaderCMSCourseCode">- '.
$activeCourse['courseID'].'</span>';
}
echo '<div id="bannerHeaderCMS">'.$header.'</div>';
?>
</div>
<!-- This div contains the content that is needed on the banner for the example page.
The name is only used to set it hidden or shown. -->
<div id="bannerContentExample">
<!-- This div contains the dropdownmenu for the codeviewer menu button -->
<div id="dropdownCodeviewerMenu">
<div class="drowdownMenuHeader">Choose example</div>
<a href="#"><div class="dropdownMenuButton">Menu with images using divs</div></a>
<a href="#"><div class="dropdownMenuButton">Dropdown menu</div></a>
<a href="#"><div class="dropdownMenuButton">Expand and contract data</div></a>
</div>
<a href="#" title="Open example menu"><div id="bannerCodeviewerMenuButton" class="icomoon">%</div></a>
<a href="#" title="Go to previous example"><div id="bannerLeftArrowButton" class="icomoon">&</div></a>
<a href="#" title="Go to next example"><div id="bannerRightArrowButton" class="icomoon">'</div></a>
<a href="#" title="Play the example"><div id="bannerPlayButton" class="icomoon">-</div></a>
<div id="bannerHeaderExample">Menu with images using divs</div>
<a href="#" title=""><div id="bannerExtraButton" class="icomoon">+</div></a>
</div>
</div><!-- End of bannerContent -->
<!-- Determines how the userMenuButton should look and function depending on if the user is logged in or not -->
<?php
//$userName
$title = '';
$text = '';
if($userName == '') {
$title = 'Click to login';
$text = 'Login';
}
else if($userName != '') {
$title = 'Open settings menu';
$text = $userName;
}
echo '<div id="bannerUserMenuButton" title="'.$title.'">'.$text.'</div>';
?>
<!-- This div contains the dropdownmenu for user menu button -->
<div id="dropdownUserMenu">
<div class="drowdownMenuHeader">Settings</div>
<div id="dropdownMenuExpandCourses" class="dropdownMenuButton">
Courses<span id="dropdownMenuButtonArrow"> </span>
</div>
<div id="dropdownMenuCourseBlock">
<ul>
<?php
//$courses
//$activeCourse
foreach($courses as $course) {
if($course->courseID == $activeCourse['courseID']) {
echo '<li class="dropdownMenuCourseBlockActiveCourse">'
.$course->name.' - '.$course->courseID;
echo '</li>';
}
else {
echo '<li>'
.$course->name.' - '.$course->courseID;
echo '</li>';
}
}
?>
</ul>
<hr>
<p>Manage Courses</p>
</div>
<div class="dropdownMenuButton">Add Instructor</div>
<div class="dropdownMenuButton">Change Password</div>
<div class="dropdownMenuButton">Logout</div>
</div>
<!-- This div contains the all the popups needed for this view -->
<div id="popup"></div>
</div><!-- End of bannerWrapper -->
</div><!-- End of bannerBody -->
|