-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_view.php
35 lines (26 loc) · 857 Bytes
/
single_view.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
<html>
<?php
include 'config.php';
$id = $_GET["id"];
$full_query = "SELECT * FROM `bikelane` WHERE increment =" . $id . " LIMIT 1";
$entries = mysqli_query($connection, $full_query);
$row = mysqli_fetch_array($entries);
$image_url = $row[2];
echo '<img src="images/' . $image_url . '" class="fullsize" />';
echo '<br>';
echo "<h2>#" . $row[0] . ": " . strtoupper($row[3]) . "</h2>\n";
$datetime = new DateTime($row[5]);
echo "<p class='entry_details'>" . strtoupper($datetime->format('m/d/Y g:ia')) . " @ <a class='coords' onclick='body_map.setZoomAround([" . $row[7] . "," . $row[8] . "], 17);'>";
if ($row[9] !== ''){
echo strtoupper($row[9]);
if ($row[10] !== ''){
echo " & " . strtoupper($row[10]);
}
}
else {
echo $row[7] . " / " . $row[8];
}
echo "</a></p>\n";
echo "<p class='entry_comment'>" . nl2br($row[11]) . "</p>\n";
?>
</html>