-
Notifications
You must be signed in to change notification settings - Fork 0
/
browse-names.html
executable file
·338 lines (338 loc) · 17.5 KB
/
browse-names.html
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<?php
//get and set url protocol
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';
//set and sanitize global variables for URL construction
$server = isset($_SERVER['SERVER_NAME']) ? htmlentities(strip_tags($_SERVER['SERVER_NAME'])) : null;
$path = isset($_SERVER['PHP_SELF']) ? htmlentities(strip_tags(dirname($_SERVER['PHP_SELF']))) : null;
$fileName = isset($_SERVER['SCRIPT_NAME']) ? htmlentities(strip_tags(basename($_SERVER['SCRIPT_NAME']))) : null;
$fileNameURI = isset($_SERVER['REQUEST_URI']) ? htmlentities(strip_tags($_SERVER['REQUEST_URI'])) : null;
$fileExtension = isset($_SERVER['PATH_INFO']) ? pathinfo($fileName, PATHINFO_EXTENSION) : null;
//assign value for title of page
$pageTitle = 'Linked People (Demo) - Alphabetical List of People';
//declare filename and filepath for screen/projection stylesheet variable - "none"
$customCSS = 'none';
//pass database parameters and connect to database
include_once './meta/assets/database-params.inc';
//create an array with filepaths for multiple page scripts - default is "none"
$customScript[0] = 'none';
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8"/>
<meta http-equiv="x-ua-compatible" content="ie=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title><?php echo($pageTitle); ?>: Montana State University (MSU) Library</title>
<meta name="description" content="<?php echo($pageTitle); ?>: Code prototype for Linked People"/>
<link rel="canonical" href="<?php echo $protocol.$server.$path; ?>/<?php echo $fileName; ?>"/>
<link rel="stylesheet prefetch" href="https://fonts.googleapis.com/css?family=Oswald"/>
<style>
html {-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;}
*,:before,:after {box-sizing:inherit;}
html,body {-webkit-font-smoothing:antialiased;background-color:#eee;color:#333;font-family:Oswald,Helvetica,arial,sans-serif;font-size:100%;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;height:100%;line-height:1.5;margin:0;padding:0;width:100%;}
header {background-color:#002a61;color:#fff;line-height:70px;padding:0 70px;width:100%;}
nav {color:#828282;display:inline;font-size:.7em;padding:0 10px;}
a {color:#002a61;transition:all .3s;}
nav a {color:#bebebe;text-decoration:none;}
nav a:hover {text-decoration:underline;}
header .nav a,footer .nav a {font-size:14px;}
header .nav a:not(:last-child),footer .nav a:not(:last-child) {border-right:.0725em solid #c4c4c4;margin-right:5px;padding-right:10px;}
main {/*height:100vh;*/min-height:396px;padding:20px 40px;}
.content {column-gap:40px;column-width:300px;}
.content {display:grid;grid-gap:40px;grid-template-columns:repeat(1, 100%);}
section {-webkit-column-break-inside:avoid;background-color:#fff;break-inside:avoid;padding:30px;page-break-inside:avoid;}
@supports (column-width:300px;) {
section+section {margin:20px 0;}
}
@supports (display:grid) {
section+section {margin:0;}
}
header h1 {color:#fff;display:inline-block;font-size:2em;font-weight:bold;margin:10px 0;padding:0;}
h1 {color:#1a202c;font-size:1.5em;font-weight:normal;padding:10px 30px;}
h2 {color:#5d5d5d;font-size:1.17em;font-weight:normal;margin-bottom:.4em;}
p+p {margin-top:.7em;}
hr {border:0;border-bottom:0 solid #fff;border-top:.0725em solid #c4c4c4;box-sizing:content-box;height:0;margin:2em auto 1em;}
a.home {text-decoration:none;color:#fff;}
.border-ftr {width:90%;}
.center {text-align:center;}
.copyright {font-size:12px;}
.text {padding:5px;width:250px;}
/*medium screen view < 1030px (based on 16px browser default)*/
@media all and (max-width:64.375em) {
/*.content {grid-template-columns: repeat(2, 48%);}*/
}
/*small screen view < 801px (based on 16px browser default)*/
@media all and (max-width:50.063em) {
header {line-height:40px;padding:0 45px;}
header nav {display:block;padding:0;}
main {padding-left:15px;padding-right:15px;}
.content {grid-template-columns: repeat(1, 100%);}
}
</style>
<?php
if ($customCSS = (empty($customCSS)) ? null : $customCSS) {
$countedCSS = count($customCSS);
for ($i = 0; $i < $countedCSS; $i++) {
?>
<link rel="stylesheet" href="<?php echo $customCSS[$i]; ?>">
<?php
}
}
?>
</head>
<body id="page" vocab="https://schema.org/" typeof="AboutPage" resource="<?php echo $protocol.$server.$path; ?>/<?php echo $fileName; ?>#page">
<link property="isPartOf" typeof="CollectionPage" href="<?php echo $protocol.$server.$path; ?>/"/>
<header>
<h1><a class="home" href="index.html">Linked People</a></h1>
<nav class="nav"><a href="index.html">Home</a> <a href="search.html">Search</a> <a href="browse-expertise.html">Browse</a></nav>
</header>
<main>
<h1 id="top">Browse Alphabetical List of People</h1>
<div class="content">
<section>
<form class="search" name="searchform" action="search.html" method="get">
<input class="text" type="text" name="q" id="q" maxlength="55" placeholder="Enter people or topics..."/>
<select name="facet">
<option name="keyword" id="keyword" value="keyword" selected>People</option>
<option name="topic" id="topic" value="topic">Topics</option>
</select>
<button class="submit" id="submit" role="button" type="submit">Search</button>
</form>
<h2>Browse by staff last name</h2>
<p><a href="./browse-names.html#abc">A B C</a> | <a href="./browse-names.html#def">D E F</a> | <a href="./browse-names.html#ghi">G H I</a> | <a href="./browse-names.html#jkl">J K L</a> | <a href="./browse-names.html#mno">M N O</a> | <a href="./browse-names.html#pqr">P Q R</a> | <a href="./browse-names.html#stu">S T U</a> | <a href="./browse-names.html#vwx">V W X</a> | <a href="./browse-names.html#yz">Y Z</a> | <a href="./browse-names.html#spec">Other</a></p>
<h2><a name="abc"></a>A B C <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "ABC" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='a' AND familyName <='d' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleAtoC = $connectLibstaff->query($query);
if (!$getpeopleAtoC) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleAtoC->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="def"></a>D E F <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "DEF" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='d' AND familyName <='g' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleDtoF = $connectLibstaff->query($query);
if (!$getpeopleDtoF) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleDtoF->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="ghi"></a>G H I <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "GHI" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='g' AND familyName <='j' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleGtoI = $connectLibstaff->query($query);
if (!$getpeopleGtoI) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleGtoI->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="jkl"></a>J K L <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "JKL" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='j' AND familyName <='m' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleJtoL = $connectLibstaff->query($query);
if (!$getpeopleJtoL) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleJtoL->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="mno"></a>M N O <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "MNO" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='m' AND familyName <='p' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleMtoO = $connectLibstaff->query($query);
if (!$getpeopleMtoO) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleMtoO->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="pqr"></a>P Q R <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "PQR" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='p' AND familyName <='s' AND person_status = 'a' ORDER BY familyName ASC";
$getpeoplePtoR = $connectLibstaff->query($query);
if (!$getpeoplePtoR) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeoplePtoR->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="stu"></a>S T U <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "STU" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='s' AND familyName <='v' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleStoU = $connectLibstaff->query($query);
if (!$getpeopleStoU) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleStoU->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="vwx"></a>V W X <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "VWX" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='v' AND familyName <='y' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleVtoX = $connectLibstaff->query($query);
if (!$getpeopleVtoX) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleVtoX->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="yz"></a>Y Z <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "VWX" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName >='y' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleYtoZ = $connectLibstaff->query($query);
if (!$getpeopleYtoZ) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleYtoZ->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
<h2><a name="spec"></a>Other <a href="#top">[^]</a></h2>
<ul>
<?php
//request people with letters "VWX" in last name
$query = "SELECT person_id, familyName, givenName, jobTitle, person_status FROM linked_people.person WHERE familyName <='a' AND person_status = 'a' ORDER BY familyName ASC";
$getpeopleYtoZ = $connectLibstaff->query($query);
if (!$getpeopleYtoZ) {
die('<p>Error retrieving people data from database!<br />'.
'Error: ' . $connectLibstaff->error() . '</p>');
}
while ($row = $getpeopleYtoZ->fetch_object()) {
$person_id = stripslashes($row->person_id);
$person_name = html_entity_decode(stripslashes($row->givenName . ' ' . $row->familyName));
$person_title = stripslashes($row->jobTitle);
echo '<dl><dt><a href="./about.html?id='.$person_id.'">'.$person_name.'</a></dt>'."\n";
echo '<dd>'.$person_title.'</dd>'."\n";
echo '<dd><a class="expand" title="Learn more about '.$person_name.'" href="./about.html?id='.$person_id.'">Learn more...</a></dd></dl>'."\n";
echo '<hr size="1" />'."\n";
}
?>
</ul>
</section>
</div>
</main>
<footer>
<hr class="border-ftr">
<p class="nav center">
<a property="relatedLink" href="https://github.com/msulibrary/linked-people">GitHub</a>
<a property="relatedLink" href="http://journal.code4lib.org/articles/12320">Article</a>
<a property="relatedLink" href="https://www.lib.montana.edu/">Library</a>
</p>
<p class="copyright center">
© <a property="author creator copyrightHolder reviewedBy" rel="author" href="https://www.wikidata.org/wiki/Q15255419">Montana State University (MSU) Library</a> <time property="dateModified lastReviewed" datetime="2017-04-17T18:57:03-07:00" title="published 2017-04-17T18:57:03-07:00">2017</time>
</p>
</footer>
<?php
if ($customScript = (empty($customScript)) ? null : $customScript) {
$counted = count($customScript);
for ($i = 0; $i < $counted; $i++) {
?>
<script type="text/javascript" src="<?php echo $customScript[$i]; ?>"></script>
<?php
}
}
?>
</body>
</html>