-
Notifications
You must be signed in to change notification settings - Fork 4
/
results.php
468 lines (452 loc) · 27.5 KB
/
results.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
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
include_once('includes/functions.php');
require_once 'includes/Paginator.class.php';
global $conn;
// Build query with $_GET values
$sql = buildQuery();
// Get and sanitize 'limit' and 'p' for pagination
$g_lim = filter_input(INPUT_GET, 'limit', FILTER_SANITIZE_NUMBER_INT);
$g_p = filter_input(INPUT_GET, 'p', FILTER_SANITIZE_NUMBER_INT);
$limit = ( $g_lim !== '' && $g_lim > 0 ) ? $g_lim : 25;
$page = ( $g_p !== '' && $g_p > 0 ) ? $g_p : 1;
$links = 3;
$Paginator = new Paginator( $conn, $sql );
// Get paginated results
$results = $Paginator->getData( $limit, $page );
// Cleaned, pipe delimited strings from 'actor' and 'role' arrays
$getActors = array_map(function($act) {
return cleanStr($act);
}, $_GET['actor']);
$getRoles = (isset($_GET['role'])) ? array_map(function($rle) {
return cleanStr($rle);
}, $_GET['role']) : '';
$cleanedActors = (isset($_GET['actor'])) ? implode('|', $getActors) : '';
$cleanedRoles = (isset($_GET['role'])) ? implode('|', $getRoles) : '';
$search_filters_empty = TRUE;
foreach ($_GET as $key => $value) {
if ($key == 'date-type') break;
if ($key == 'sortBy') break;
if ($_GET[$key] == 'all') break;
if (!empty($value)) {
$search_filters_empty = FALSE;
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<?php include_once('common/header.php'); ?>
<title>Search</title>
</head>
<body id="results">
<?php include_once('common/nav.php'); ?>
<div id="main" class="main grid-container">
<div class="sql-query-wrap">
<div class="toggle-query"><a id="toggle">Toggle SQL Query</a></div>
<div class="sql-query">
<?php echo $sql; ?>
</div>
</div>
<form id="searchForm" class="form-accordion search-form grid-x" method="get" data-abide novalidate>
<div class="grid-container grid-x form-wrapper">
<div class="hide-for-large">
<button type="button" class="button hide-for-large open-filter-btn" data-toggle="filterMenu">
Open Search Filters
</button>
</div>
<div class="filter-menu form-section cell medium-4 large-3 off-canvas in-canvas-for-large position-left" id="filterMenu" data-off-canvas>
<button class="close-button" aria-label="Close menu" type="button" data-close>
<span aria-hidden="true">×</span>
</button>
<div class="download-btns">
<h2>Result Options</h2>
Download: <br>
<a href="get_all_json.php?<?php echo $_SERVER['QUERY_STRING']; ?>" class="button dwnld-btn">JSON</a>
<!--<a href="get_all_xml.php?ids=<?php //echo htmlspecialchars(json_encode($allResultIds), ENT_QUOTES); ?>" class="button dwnld-btn">Download XML</a>-->
<a href="get_all_xml.php?<?php echo $_SERVER['QUERY_STRING']; ?>" class="button dwnld-btn">XML</a>
<a href="get_all_csv.php?<?php echo $_SERVER['QUERY_STRING']; ?>" class="button dwnld-btn">CSV</a>
</div>
<h2>Search Filters</h2>
<div class="grid-x filter-sections-wrap form-accordion">
<div class="cell small-12 section-wrap">
<h2 class="active">Event</h2>
<div class="grid-x acc-section">
<div class="small-12 cell">
<div class="form-group field-theatre">
<label for="theatre" class="fb-select-label">Theatre</label>
<select class="theatre" name="theatre" id="theatre">
<option value="" disabled selected>Select a Theatre</option>
<option value="all">Any Theatre...</option>
<option disabled>_________</option>
<?php getTheatres(); ?>
</select>
</div>
<div class="form-group field-volume">
<label for="volume" class="fb-select-label">Volume</label>
<select class="volume" name="volume" id="volume">
<option value="" disabled selected>Select a Volume</option>
<option value="all">Any Volume...</option>
<option disabled>_________</option>
<option value="1" <?php getSticky(2, 'volume', '1'); ?>>1 (1659-1700)</option>
<option value="2" <?php getSticky(2, 'volume', '2'); ?>>2 (1700-1729)</option>
<option value="3" <?php getSticky(2, 'volume', '3'); ?>>3 (1729-1747)</option>
<option value="4" <?php getSticky(2, 'volume', '4'); ?>>4 (1747-1776)</option>
<option value="5" <?php getSticky(2, 'volume', '5'); ?>>5 (1776-1800)</option>
</select>
</div>
</div>
<div class="small-12 cell">
<div class="form-group field-dates">
<fieldset>
<legend>Date Range</legend>
<label class="hidden date-type hide" for="dateType">Date Type</label>
<select id="dateType" class="date-type hide" name="date-type">
<option value="1" <?php getSticky(2, 'date-type', '1'); ?>>Between</option>
<option value="2" <?php getSticky(2, 'date-type', '2'); ?>>Before</option>
<option value="3" <?php getSticky(2, 'date-type', '3'); ?>>On</option>
<option value="4" <?php getSticky(2, 'date-type', '4'); ?>>After</option>
</select>
<div class="year start-year">
<span class="year-title">Start</span>
<label class="hidden" for="startYear">Start Year</label>
<select class="date-year" id="startYear" name="start-year">
<option disabled selected>Year</option>
<option value="">All</option>
<?php getYears('start'); ?>
</select>
<label class="hidden" for="startMonth">Start Month</label>
<select class="date-month" id="startMonth" name="start-month" disabled>
<option disabled selected>Mon</option>
<option value="">All</option>
<?php getMonths('start'); ?>
</select>
<label class="hidden" for="startDay">Start Day</label>
<select class="date-day" id="startDay" name="start-day" disabled>
<option disabled selected>Day</option>
<option value="">All</option>
<?php getDays('start'); ?>
</select>
</div>
<div class="year end-year">
<span class="year-title">End</span>
<label class="hidden" for="endYear">End Year</label>
<select class="date-year" id="endYear" name="end-year">
<option disabled selected>Year</option>
<option value="">All</option>
<?php getYears('end'); ?>
</select>
<label class="hidden" for="endMonth">End Month</label>
<select class="date-month" id="endMonth" name="end-month" disabled>
<option disabled selected>Mon</option>
<option value="">All</option>
<?php getMonths('end'); ?>
</select>
<label class="hidden" for="endDay">End Day</label>
<select class="date-day" id="endDay" name="end-day" disabled>
<option disabled selected>Day</option>
<option value="">All</option>
<?php getDays('end'); ?>
</select>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<!-- end event wrap -->
<div class="cell small-12 section-wrap">
<h2 class="active">Performance</h2>
<div class="grid-x acc-section">
<div class="small-12 cell">
<div class="form-group field-performance">
<label for="performance" class="fb-text-label">Title</label>
<input type="text" class="performance ui-autocomplete-input" name="performance" id="performance" value="<?php getSticky(1, 'performance'); ?>" onKeyPress="checkEnter(event)">
</div>
<div class="form-group field-author inline-label">
<label for="author" class="fb-select-label">Author</label>
<span data-tooltip class="top l-tooltip" tabindex="2" title="Searches not only for performances of plays known to be by this author, but also performances of associated titles, including adaptations.">?</span>
<input type="text" class="author" name="author" id="author" value="<?php getSticky(1, 'author'); ?>" onKeyPress="checkEnter(event)">
</div>
</div>
<div class="small-12 cell">
<div class="form-group field-ptype">
<fieldset class="ptype-contain">
<div class="ptype-legend">
<legend>Filter by Performance Type</legend>
</div>
<div class="ptype">
<input type="checkbox" name="ptype[]" value="p" id="mainpiece" <?php getSticky(3, 'ptype', 'p'); ?>><label for="mainpiece">Mainpiece</label><br>
<input type="checkbox" name="ptype[]" value="a" id="afterpiece" <?php getSticky(3, 'ptype', 'a'); ?>><label for="afterpiece">Afterpiece</label><br>
<input type="checkbox" name="ptype[]" value="m" id="music" <?php getSticky(3, 'ptype', 'm'); ?>><label for="music">Music</label><br>
<input type="checkbox" name="ptype[]" value="d" id="dance" <?php getSticky(3, 'ptype', 'd'); ?>><label for="dance">Dance</label><br>
<input type="checkbox" name="ptype[]" value="e" id="entertainment" <?php getSticky(3, 'ptype', 'e'); ?>><label for="entertainment">Entertainment</label><br>
<input type="checkbox" name="ptype[]" value="s" id="song" <?php getSticky(3, 'ptype', 's'); ?>><label for="song">Song</label><br>
<input type="checkbox" name="ptype[]" value="b" id="ballet" <?php getSticky(3, 'ptype', 'b'); ?>><label for="ballet">Ballet</label><br>
<input type="checkbox" name="ptype[]" value="i" id="instrumental" <?php getSticky(3, 'ptype', 'i'); ?>><label for="instrumental">Instrumental</label><br>
<input type="checkbox" name="ptype[]" value="o" id="opera" <?php getSticky(3, 'ptype', 'o'); ?>><label for="opera">Opera</label><br>
<input type="checkbox" name="ptype[]" value="u" id="monologue" <?php getSticky(3, 'ptype', 'u'); ?>><label for="monologue">Monologue</label><br>
<input type="checkbox" name="ptype[]" value="t" id="trick" <?php getSticky(3, 'ptype', 't'); ?>><label for="trick">Trick</label>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<!-- end perf wrap -->
<div class="cell small-12 section-wrap">
<h2 class="active">Cast</h2>
<div class="grid-x acc-section">
<div class="small-12 cell">
<div class="form-group field-actor inline-label">
<label for="actor" class="fb-text-label">Actor</label>
<span data-tooltip class="top l-tooltip" tabindex="2" title="We recommend searching by last name (for example, instead of 'Dorothy Jordan,' search 'Jordan' to return instances where she is listed as 'Mrs Jordan')">?</span>
<span class="cast-switch">
<label for="actSwitch" class="show-for-sr">Select 'AND' or 'OR' search on multiple actors.</label>
<select name="actSwitch" id="actSwitch" title="Select 'AND' or 'OR' search on multiple actors." <?php echo (isset($_GET['actor']) && count(array_filter($_GET['actor'], 'strlen')) > 1) ? '' : 'disabled="disabled"'; ?>>
<option value="and" <?php getSticky(2, 'actSwitch', 'and'); ?>>AND</option>
<option value="or" <?php getSticky(2, 'actSwitch', 'or'); ?>>OR</option>
</select>
</span>
<span id="actors">
<?php
$actorArr = (isset($_GET['actor'])) ? array_filter($_GET['actor'], 'strlen') : [];
if (count($actorArr) > 0) {
$i = 0;
foreach($actorArr as $act) {
echo '<input type="text" class="actor actor-search" name="actor[]" id="actor" value="' . getSticky(5, 'actor', $actorArr[$i]) . '" onKeyPress="checkEnter(event)">';
$i++;
}
} else {
echo '<input type="text" class="actor actor-search" name="actor[]" id="actor" value="" onKeyPress="checkEnter(event)">';
}
?>
</span>
<div class="addActor"><a id="addActor" class="addCast" title="Add an actor">+</a></div>
</div>
</div>
<div class="small-12 cell">
<div class="form-group field-role inline-label">
<label for="role" class="fb-text-label">Role</label>
<span class="cast-switch">
<label for="roleSwitch" class="show-for-sr">Select 'AND' or 'OR' search on multiple roles.</label>
<select name="roleSwitch" id="roleSwitch" title="Select 'AND' or 'OR' search on multiple roles." <?php echo (isset($_GET['role']) && count(array_filter($_GET['role'], 'strlen')) > 1) ? '' : 'disabled="disabled"'; ?>>
<option value="and" <?php getSticky(2, 'roleSwitch', 'and'); ?>>AND</option>
<option value="or" <?php getSticky(2, 'roleSwitch', 'or'); ?>>OR</option>
</select>
</span>
<span id="roles">
<?php
$roleArr = (isset($_GET['role'])) ? array_filter($_GET['role'], 'strlen') : [];
if (count($roleArr) > 0) {
$i = 0;
foreach($roleArr as $act) {
echo '<input type="text" class="role role-search" name="role[]" id="role" value="' . getSticky(5, 'role', $roleArr[$i]) . '" onKeyPress="checkEnter(event)">';
$i++;
}
} else {
echo '<input type="text" class="role role-search" name="role[]" id="role" value="" onKeyPress="checkEnter(event)">';
}
?>
</span>
<div class="addRole"><a id="addRole" class="addCast" title="Add a role">+</a></div>
</div>
</div>
</div>
</div>
<!-- end cast wrap -->
<div class="cell small-12 section-wrap">
<h2 class="active">Keyword</h2>
<div class="grid-x acc-section">
<div class="small-12 cell">
<div class="form-group field-keyword inline-label">
<label for="keyword" class="fb-text-label">Keyword</label>
<span data-tooltip class="top l-tooltip" tabindex="2" title="Keyword searches event comments, performance titles, performance comments, roles, actors, and author names.">?</span>
<input type="text" class="keyword" name="keyword" id="keyword" value="<?php getSticky(1, 'keyword'); ?>" onKeyPress="checkEnter(event)">
</div>
</div>
</div>
</div>
</div>
<div class="cell small-12 button-wrap">
<a href="/search.php" class="new-search show-for-large">New Search</a>
<input type="submit" class="search-submit button" value="Update Results">
</div>
</div>
<div class="form-results cell small-12 large-9">
<div class="results-wrap">
<div class="your-search">
<span class="num-results"><?php echo $results->total . ' results'; ?></span><?php echo yourSearch(); ?>
</div>
<?php if(onlyKeyword()) {
$resByCol = getResultsByColumn(cleanStr($_GET['keyword']));
$msg = "We found ";
$resCnt = 1;
foreach($resByCol as $colKey => $col) {
$colMsg = '';
switch($col['col']) {
case 'pcount':
$colMsg = ' ' . $col['count'] . ' matches on Performance Title';
break;
case 'acount':
$colMsg = ' ' . $col['count'] . ' matches on Author';
break;
case 'pccount':
$colMsg = ' ' . $col['count'] . ' matches on Performance Comments';
break;
case 'eccount':
$colMsg = ' ' . $col['count'] . ' matches on Event Comments';
break;
case 'ccount':
$colMsg = ' ' . $col['count'] . ' matches on Roles/Actors';
break;
}
if ($resCnt < count($resByCol)) {
$msg .= $colMsg . ',';
} else {
$msg .= ' and ' . $colMsg . '.';
}
$resCnt++;
}
echo '<div class="res-by-col">' . $msg . '</div>';
} ?>
<?php if ($results->total > 0) { ?>
<div class="grid-x results-header">
<div class="input-group relevance-menu-wrap">
<label for="sortBy" class="input-group-label relevance-menu">Sort By
</label>
<select name="sortBy" id="sortBy" class="input-group-field">
<option value="relevance" <?php getSticky(2, 'sortBy', 'relevance'); ?>>Relevance</option>
<option value="datea" <?php getSticky(2, 'sortBy', 'datea'); ?>>Date (asc)</option>
<option value="dated" <?php getSticky(2, 'sortBy', 'dated'); ?>>Date (desc)</option>
</select>
<div class="input-group-button">
<input type="submit" class="search-submit button" value="Update">
</div>
</div>
<nav aria-label="Pagination" class="grid-x pag-wrap">
<?php echo $Paginator->createLinks( $links, 'pagination pagination-sm' ); ?>
</nav>
</div>
<div class="grid-x results-table">
<div class="cell">
<?php if (isset($_GET['author']) && $_GET['author'] !== '') : ?>
<div class="author-explain">
<span class="info-icon"></span>
<span>Results not only include performances of plays known to be by '<?php echo cleanQuotes(cleanStr($_GET['author'])); ?>', but also performances of associated titles, including adaptations.</span>
</div>
<?php endif; ?>
<?php for( $i = 0; $i < count( $results->data ); $i++ ) : ?>
<div class="event">
<?php $results->data[$i]['Performances'] = getPerformances($results->data[$i]['EventId']); ?>
<?php echo '<div class="evt-head grid-x">
<h2><a href="event.php?id=' . $results->data[$i]['EventId'] . '">'; ?>
<div class="evt-num"><?php echo (($limit * ($page - 1)) + ($i + 1)); ?></div>
<?php echo formatDate($results->data[$i]['EventDate']); ?>
<span class="evt-theatre"> @ <?php echo getTheatreName($results->data[$i]['TheatreId']); ?></span>
</a>
</h2>
</div>
<div class="evt-body">
<?php if (isFoundIn($results->data[$i]['CommentC'], cleanQuotes(cleanStr(isset($_GET['keyword'])? $_GET['keyword'] : '')))) echo '<div class="evt-info"><b>Event Comment: </b>' . highlight(namedEntityLinks($results->data[$i]['CommentC']), cleanQuotes($_GET['keyword'])) . '</div>';?>
<div class="evt-other clearfix">
<div class="perfs">
<h3>Performances</h3>
<?php foreach ($results->data[$i]['Performances'] as $perf) {
if ((isset($_GET['author']) && trim($_GET['author']) !== '') || (isset($_GET['keyword']) && trim($_GET['keyword']) !== '')) {
$perf['relatedWorks'] = getRelatedWorks($perf['PerformanceTitle']);
}
echo '<div class="perf">';
echo '<h4><span class="info-heading">' . getPType($perf['PType']) . (in_array($perf['PType'], ['a', 'p']) ? ' Title' : '') . ': </span>';
if (in_array($perf['PType'], ['a', 'p'])) {
echo '<i>' . highlight(cleanItalics(cleanTitle($perf['PerformanceTitle'])), cleanQuotes(isset($_GET['keyword'])? $_GET['keyword'] : '') . '|' . cleanQuotes(isset($_GET['performance'])? $_GET['performance'] : '')) . '</i>';
} else {
echo highlight(namedEntityLinks($perf['DetailedComment']), cleanQuotes(isset($_GET['keyword'])? $_GET['keyword'] : '') . '|' . cleanQuotes(isset($_GET['performance'])? $_GET['performance'] : ''));
}
echo '</h4>';
if (isFoundIn($perf['CommentP'], cleanQuotes(cleanStr(isset($_GET['keyword'])? $_GET['keyword'] : ''))) ) echo '<span class="perf-comm"><span class="smcp"><b>Performance Comment: </b></span>' . highlight(namedEntityLinks($perf['CommentP']), cleanQuotes($_GET['keyword'])) . '</span><br>';
echo '<div class="perf-body">';
$inCast = isInCast(cleanQuotes(isset($_GET['keyword'])? $_GET['keyword'] : '') . '|' . cleanQuotes($cleanedActors), cleanQuotes(cleanStr(isset($_GET['keyword'])? $_GET['keyword'] : '')) . '|' . cleanQuotes($cleanedRoles), $perf['cast']);
if ($inCast !== false) {
echo '<div class="cast"><h5>Cast</h5>';
foreach ($inCast as $cast) {
echo '<span class="c-role"><span class="smcp"><b>Role</b></span>: ' . highlight(linkedSearches('role[]', $cast['Role']), cleanQuotes(isset($_GET['keyword'])? $_GET['keyword'] : '') . '|' . cleanQuotes($cleanedRoles)) . '</span> <span class="c-act"><span class="smcp"><b>Actor</b></span>: ' . highlight(linkedSearches('actor[]', $cast['Performer']), cleanQuotes(isset($_GET['keyword'])? $_GET['keyword'] : '') . '|' . cleanQuotes($cleanedActors)) . '</span><br>';
}
echo '</div>';
}
if ((isset($_GET['author']) && trim($_GET['author']) !== '') || (isset($_GET['keyword']) && trim($_GET['keyword']) !== '')) {
if (isset($perf['relatedWorks']) && count($perf['relatedWorks']) > 0) {
$isFoundInRelated = false;
$isFoundUnique = array(); // Track unique work names
$isFoundArr = array();
foreach ($perf['relatedWorks'] as $rltd) {
if (isset($rltd['author']) && count($rltd['author']) > 0) {
foreach ($rltd['author'] as $rltdAuth) {
if (isFoundIn($rltdAuth['authname'], cleanQuotes(cleanStr($_GET['keyword'])) . '|' . cleanQuotes(cleanStr($_GET['author'])))) {
$isFoundInRelated = true;
if (!in_array($rltd['Title'], $isFoundUnique)) {
$isFoundUnique[] = $rltd['Title'];
$isFoundArr[] = $rltd;
}
//break 2;
}
}
}
}
if ($isFoundInRelated) {
echo '<div class="rltd-wrks"><h5>Related Works</h5>';
//print_r($perf['relatedWorks']);
foreach ($isFoundArr as $rltd2) {
echo '<div class="rltd-auth"><span class="work-wrap"><span class="smcp"><b>Related Work:</b></span> ' . $rltd2['Title'] . '</span> ';
echo '<span class="auth-wrap"><span class="smcp"><b>Author(s):</b></span> ';
foreach ($rltd2['author'] as $rltdAuth2) {
if (isFoundIn($rltdAuth2['AuthName'], cleanQuotes(cleanStr($_GET['keyword'])) . '|' . cleanQuotes(cleanStr($_GET['author'])))) {
echo '<span class="auth">' . highlight($rltdAuth2['AuthName'], cleanQuotes($_GET['keyword']) . '|' . cleanQuotes($_GET['author'])) . '</span>';
}
}
echo '</span></div>';
}
echo '</div>'; // End rltd-wrks
}
}
}
echo '</div></div>'; // End perf-body and perf
} ?>
</div>
</div>
</div>
</div>
<?php endfor; ?>
</div>
</div>
<nav aria-label="Pagination" class="grid-x pag-wrap">
<?php echo $Paginator->createLinks( $links, 'pagination pagination-sm pag-bottom' ); ?>
</nav>
<?php } else { ?>
<div class="no-results">
No results found. Modify the filters to the left or <a href="/search.php">try a new search</a>
</div>
<?php } ?>
</div>
</div>
</div>
</form>
</div>
<?php include_once('common/footer.php'); ?>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="/js/search.js"></script>
<!--
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo "Page generated in $total_time seconds.";
?>
-->
</body>
</html>