-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
284 lines (247 loc) · 13.4 KB
/
index.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Campus Map - Millersville University</title>
<meta content="campus map, directions, map, buildings, houses, dorms, housing, academic buildings, administrative buildings, shuttle, bus, routes, stops, bus stops, emergency callboxes, callboxes, lots, parking, parking lots," name="keywords"/>
<meta content="Search or browse by building name. View building information and get directions." name="description"/>
<link rel="stylesheet" href="lib/css/bootstrap.css?v=1.4" />
</head>
<body>
<div id="header" class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="index.php">Campus Map</a>
<p class="navbar-text pull-right"><a href="http://www.millersville.edu" title="Millersville University Home"><img src="http://www.millersville.edu/lib/v2/img/common/millersvilleCircleM-32.png" alt="Millersville University Home" /></a></p>
</div>
</div>
</div>
<div id="campusmap-ui" class="row">
<div id="map-canvas"></div>
<div id="panel-wrapper" class="span5">
<div id="options-nav-bar" class="btn-toolbar">
<div class="btn-group">
<a title="Show the Search Map tab" id="tablink-search" href="#kwsearch" class="btn active">Search</a>
<a title="Show the Location List tab" id="tablink-buildings" href="#locsearch" class="btn">Locations</a>
<a title="Show the Map Options tab" id="tablink-mapoptions" href="#map-overlays" class="btn">Overlays</a>
<a title="Link to this Map" id="tablink-link" href="#link" class="btn"><i class="icon-share-alt"></i></a>
</div>
<a title="Close this sidebar" id="map-options-toggler" class="icon-chevron-left" href="#">Close</a>
</div>
<div id="features-panel">
<div id="map-search" class="tabs-content">
<form action="" id="marker-search" method="get">
<fieldset id="kwsearch" class="form-inline">
<input id="kwsearch-keyword" name="query" type="text" placeholder="Search Campus Map"/>
<button id="kwsearch-submit" class="btn btn-primary" name="search" type="submit" title="Perform Search"><i class="icon-search icon-white"></i></button>
<a href="#" title="Clear Search" class="close kwsearch-clear">×</a>
</fieldset>
<fieldset id="locsearch">
<?php
$locations = json_decode(file_get_contents('lib/data/json/mu_campusmap_locations.json'));
$acadLocHTML = $adminLocHTML = $dormLocHTML = $otherLocHTML = '';
foreach ($locations as $name => $l) {
if ($l->isDepartment == false) {
$optionHTML = '<option value="'.$l->id.'">' . (strlen($l->name) < 40 ? $l->name : substr($l->name, 0, 40) . '...' ) . '</option>';
switch ($l->category) {
case 'academics':
$acadLocHTML .= $optionHTML;
break;
case 'administrative':
$adminLocHTML .= $optionHTML;
break;
case 'dorm':
$dormLocHTML .= $optionHTML;
break;
default:
$otherLocHTML .= $optionHTML;
break;
}
}
}
?>
<label for="locsearch-select">Select a location:</label>
<div class="input">
<select class="span4" id="locsearch-select" name="locsearch-select">
<option/>
<optgroup label="Academic Buildings">
<?php echo $acadLocHTML; ?>
</optgroup>
<optgroup label="Administrative Buildings">
<?php echo $adminLocHTML; ?>
</optgroup>
<optgroup label="Dorm Buildings">
<?php echo $dormLocHTML; ?>
</optgroup>
<optgroup label="Other Locations">
<?php echo $otherLocHTML; ?>
</optgroup>
</select>
<a title="Clear Search" class="close kwsearch-clear">×</a>
</fieldset>
</form>
<div id="map-results-wrap">
<div id="map-results-stats"></div>
<div id="map-results"></div>
<div id="map-results-pagination" class="pagination"></div>
</div>
</div>
<div id="map-overlays" class="tabs-content">
<fieldset id="filter-map" class="form-stacked">
<legend>Overlays</legend>
<ul class="inputs-list">
<li class="filter-heading">Buildings</li>
<li><label for="baseLayer" class="checkbox">
<input type="checkbox" name="baseLayer" class="filter-checkbox" id="baseLayer" checked="checked" value="http://www.millersville.edu/directions/data/markers.kml" />
All Buildings</label></li>
<li><label for="academicsLayer" class="checkbox">
<input type="checkbox" name="academicsLayer" class="filter-checkbox building-layer" id="academicsLayer" value="http://www.millersville.edu/directions/data/academic-buildings.kml" />
<span class="filter-icon filter-icon-academics"></span>Academic Buildings</label></li>
<li><label for="administrativeLayer" class="checkbox">
<input type="checkbox" name="administrativeLayer" class="filter-checkbox building-layer" id="administrativeLayer" value="http://www.millersville.edu/directions/data/administrative-buildings.kml" />
<span class="filter-icon filter-icon-administrative"></span>Administrative Buildings</label></li>
<li><label for="dormLayer" class="checkbox">
<input type="checkbox" name="dormLayer" class="filter-checkbox building-layer" id="dormLayer" value="http://www.millersville.edu/directions/data/dorm-buildings.kml" />
<span class="filter-icon filter-icon-housing"></span>Student Housing</label></li>
<li class="filter-heading">Services</li>
<li><label for="muathleticLayer" class="checkbox">
<input type="checkbox" name="muathleticLayer" class="filter-checkbox" id="muathleticLayer" value="http://www.millersville.edu/directions/data/mu-athleticareas.kml" />
<span class="filter-icon service-icon"><img src="http://www.millersville.edu/directions/img/icons/athleticarea.png" alt="" /></span>Athletics
</label></li>
<li><label for="emergencycallboxesLayer" class="checkbox">
<input type="checkbox" name="emergencycallboxesLayer" class="filter-checkbox" id="emergencycallboxesLayer" value="http://www.millersville.edu/directions/data/mu-emergencycallboxes.kml" />
<span class="filter-icon service-icon"><img src="http://www.millersville.edu/directions/img/icons/callbox.png" alt="" /></span>Emergency Callboxes
</label></li>
<li><label for="muparkingLayer" class="checkbox">
<input type="checkbox" name="muparkingLayer" class="filter-checkbox" id="muparkingLayer" value="http://www.millersville.edu/directions/data/mu-parkinglots.kml" />
<span class="filter-icon service-icon"><img src="http://www.millersville.edu/directions/img/icons/parkinglot.png" alt="" /></span>Parking Lots
</label></li>
<li class="filter-heading">Shuttle Routes</li>
<li><label for="mushuttleLayer" class="checkbox">
<input type="checkbox" name="mushuttleLayer" class="filter-checkbox" id="mushuttleLayer" value="http://www.millersville.edu/directions/data/mu-shuttlebus.kml" />
<span class="filter-icon route-icon"><img src="http://chart.apis.google.com/chart?chs=12x12&cht=ls&chco=FF69BB&chd=s:A9&chls=2" alt="" /></span>MU Campus Shuttle
</label></li>
<li><label for="route16" class="checkbox">
<input type="checkbox" name="route16" class="filter-checkbox" id="route16" value="http://www.millersville.edu/directions/data/route-16.kml" />
<span class="filter-icon route-icon"><img src="http://chart.apis.google.com/chart?chs=12x12&cht=ls&chco=ff694e&chd=s:A9&chls=2" alt="" /></span>MU-Lancaster Route 16
</label></li>
<li><label for="parkcity" class="checkbox">
<input type="checkbox" name="parkcity" class="filter-checkbox" id="parkcity" value="http://www.millersville.edu/directions/data/park-city-xpress.kml" />
<span class="filter-icon route-icon"><img src="http://chart.apis.google.com/chart?chs=12x12&cht=ls&chco=5577bb&chd=s:A9&chls=2" alt="" /></span>MU Park City Xpress
</label></li>
</ul>
</fieldset>
</div>
<div id="link" class="tabs-content"></div>
<div id="footer">
<p><a href="files/CampusMap.pdf"><i class="icon-download-alt"></i> Download PDF map</a>
<p id="afs"><a href="http://www.millersville.edu">Millersville University</a>. All Rights Reserved.<br />A member of the Pennsylvania State System of Higher Education. © <?=date('Y');?></p>
</div>
</div>
</div>
</div>
<!-- Tip Content -->
<ol id="joyRideTipContent">
<li data-id="tablink-search" data-text="Next: Locations">
<h2>Search by Keyword</h2>
<p>You can search for buildings and/or departments using the keyword search tab.</p>
</li>
<li data-id="tablink-locations" data-text="Next: Overlays">
<h2>Search by Location</h2>
<p>Not sure what to search for? Try browsing a listing of location names.</p>
</li>
<li data-id="tablink-mapoptions" data-text="Next: Share">
<h2>Overlays</h2>
<p>Want a general overview of what campus looks like, or the locations for parking and emergency callboxes? How about shuttle routes, too?</p>
</li>
<li data-id="tablink-link" data-text="Close Tour">
<h2>Share a URL</h2>
<p>Want to send someone a link to a building, or a search you made? Use the share tab to easily copy a link to bookmark, e-mail, or even IM.</p>
</li>
</ol>
<div id="modalContain" />
<script type="text/template" id="search-results-stats">
<div id="map-results-feedback">
<p>Showing <strong><%= lowerBound == 0 ? 1 : lowerBound+1 %> - <%= upperBound <= resultCount ? upperBound : resultCount %></strong> of <strong><%= resultCount %></strong><% print(query !== '' ? ' for <em>'+query+'</em>' : ''); %>.</p>
</div>
</script>
<script type="text/template" id="search-results-item">
<li>
<span class="marker-result-label"><% print(String.fromCharCode(label + 65)); %></span>
<a id="result-<%= id %>" href="#"><%= marker.name %><span><%= marker.address %></span></a>
</li>
</script>
<script type="text/template" id="share-fields">
<fieldset>
<legend>Share via URL</legend>
<p>Copy the link below to <strong>bookmark</strong> or share via <strong>e-mail</strong> or <strong>IM</strong>.</p>
<label for="sharedlink" style="display:none">Map Link</label>
<textarea id="sharedlink" class="span3" readonly="readonly"><%= shareUrl %></textarea>
</fieldset>
</script>
<script type="text/template" id="marker-infowindow-content">
<div style="width:380px;">
<div style="font-weight: bold; font-size: medium; margin-bottom: 0em;"><%= marker.name %></div>
<div class="map-infowindow">
<%= marker.image != '' ? "<img src=\"" + marker.image + "\" align=\"right\" alt=\"Picture of " + (marker.isDepartment ? marker.buildingName : marker.name) + "\" />" : "" %>
<address><%= marker.isDepartment ? marker.buildingName + "<br/>" : "" %><%= marker.address %><br/>Millersville, PA 17551</address>
<%= marker.phone != '' ? "<p>Ph: " + marker.phone + "</p>" : "" %>
<p>
<a href="<%= marker.directionsUrl %>" target="_blank">Get directions</a> | <a href="#markerModal" data-toggle="modal" class="modal-toggler-<%= marker.id %>">View more</a>
</p>
</div>
</div>
</script>
<script type="text/template" id="marker-modal-content">
<div class="modal" id="markerModal">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3><%= marker.name %></h3>
</div>
<div class="modal-body">
<div class="span4">
<%= marker.description != "" ? "<p>" + marker.description + "</p>" : "" %>
<%= marker.isDepartment ? "<p><a href=\"" + marker.website + "\" target=\"_blank\" class=\"btn\">Visit website</a></p>" : "" %>
</div>
<div class="span2">
<%= marker.image != '' ? "<img src=\"" + marker.image + "\" class=\"thumbnail\" style=\"margin-bottom:10px\" alt=\"Picture of " + (marker.isDepartment ? marker.buildingName : marker.name) + "\" />" : "" %>
<%= marker.phone != '' ? "<p><strong>Ph:</strong> " + marker.phone + "</p>" : "" %>
<address><%= marker.isDepartment ? marker.buildingName + "<br/>" : "" %><%= marker.address %><br/>Millersville, PA 17551</address>
<p><a href="<%= marker.directionsUrl %>" target="_blank" class="btn">Get directions</a></p>
</div>
</div>
</div>
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="lib/js/underscore.1.3.1-min.js"></script>
<script src="lib/js/backbone.0.5.3-min.js"></script>
<script src="//maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
<script src="lib/js/app.js?v=1.5"></script>
<script src="lib/js/jquery.joyride.1.0.2-min.js"></script>
<script src="lib/js/bootstrap.modal.min.js"></script>
<script type="text/javascript">
$(document).load(function() {
$(this).joyride({
'cookieMonster': true,
'cookieName': 'mucampusmaptour',
'cookieDomain': false
});
}).ready(function(){
window.App = new AppView;
App.resizeUI();
$(window).resize(App.resizeUI);
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-123021-2']);
_gaq.push(['_setDomainName', 'millersville.edu']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>