-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.php
86 lines (69 loc) · 1.95 KB
/
gallery.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
<?php
ob_start();
require_once (__DIR__.'/scripts/config.php');
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/index_style.css">
</head>
<body>
<div id="content">
<h1>Meet Our Animals</h1>
<table border="1">
<?php
echo "<tr>";
$sql="SELECT `animalName`, `animalPictureURL` FROM animal ORDER BY animal.animalArrivalDate DESC LIMIT 0 , 5;";
$query=$DB_con->prepare($sql);
$query->execute();
foreach( $query as $row) {
echo "
<th>
<figure >
<img src='{$row['animalPictureURL']}' alt=''style='width:100px;height:100px;'/>
<figcaption> {$row['animalName']} </figcaption>
</figure>
</th>
";
}
echo "</tr>";
echo "<tr>";
$sql="SELECT `animalName`, `animalPictureURL` FROM animal ORDER BY animal.animalArrivalDate DESC LIMIT 5 , 10;";
$query=$DB_con->prepare($sql);
$query->execute();
foreach( $query as $row) {
echo "
<th>
<figure >
<img src='{$row['animalPictureURL']}' alt=''style='width:100px;height:100px;'/>
<figcaption> {$row['animalName']} </figcaption>
</figure>
</th>
";
}
echo "</tr>";
echo "<tr>";
$sql="SELECT `animalName`, `animalPictureURL` FROM animal ORDER BY animal.animalArrivalDate DESC LIMIT 10 , 15;";
$query=$DB_con->prepare($sql);
$query->execute();
foreach( $query as $row) {
echo "
<th>
<figure >
<img src='{$row['animalPictureURL']}' alt=''style='width:100px;height:100px;'/>
<figcaption> {$row['animalName']} </figcaption>
</figure>
</th>
";
}
echo "</tr>";
?>
</table>
</div>
<?php
$page_Content=ob_get_contents();
ob_end_clean();
$pagetitle="Gallery";
include("master.php");
?>
</body>
</html>