This repository was archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfungi.php
More file actions
80 lines (63 loc) · 2.13 KB
/
Copy pathfungi.php
File metadata and controls
80 lines (63 loc) · 2.13 KB
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
<?php
/**
* @file
* fungi.php
*/
require_once "includes/configuration.php";
$application->setTitle("Fungi Caroliniani Exsiccati");
$query = "
SELECT parent_object, pointer, title
FROM manuscripts
WHERE pointer = '9705'
OR pointer = '9232'
OR pointer = '9307'
OR pointer = '9461'
OR pointer = '9540'
OR pointer = '8128'
ORDER BY pointer ASC
";
// http://digital.tcl.sc.edu/cdm/search/collection/rav/searchterm/Fungi%20Caroliniana%20Exsicatti,%20Century/field/title/mode/any/conn/and/order/nosort/ad/asc/cosuppress/1
$prepare = $application->getConnection()->prepare($query);
$prepare->execute();
$results = $prepare->fetchAll(PDO::FETCH_ASSOC);
$count = 0;
require "layout/header.php";
?>
<main class="container">
<div class="row page-header">
<div class="col-xs-12">
<h1>Fungi of Carolina</h1>
<p class="lead">Illustrated By Natural Specimens of the Species</p>
</div>
</div>
<div class="row">
<?php foreach ($results as $key=>$result): ?>
<?php
$info = json_decode(file_get_contents($application->getManuscriptCompoundObjectInfo($result['pointer'])), true);
$first = $info['page'][0]['pageptr'];
$query = "
SELECT image_height, image_width
FROM manuscripts
WHERE pointer = :pointer
";
$prepare = $application->getConnection()->prepare($query);
$prepare->bindParam(':pointer', $first);
$prepare->execute();
$image = $prepare->fetchObject();
?>
<a href="<?php print ROOT_FOLDER; ?>viewer?type=transcript&institute=Carolina&number=<?php print $first; ?>">
<div class="col-sm-4">
<h2><?php print $result["title"]; ?></h2>
<img src="<?php print $application->getManuscriptImage($first, $image->image_width, $image->image_height); ?>" alt="<?php print $result["title"]; ?>" class="img-responsive">
</div>
</a>
<?php $count++; ?>
<?php if ($count % 3 === 0): ?>
</div>
<hr>
<div class="row">
<?php endif; ?>
<?php endforeach; ?>
</div>
</main>
<?php require "layout/footer.php"; ?>