-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimageblock.php
More file actions
65 lines (49 loc) · 1 KB
/
Copy pathimageblock.php
File metadata and controls
65 lines (49 loc) · 1 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
<?php
$tn_width = "69px";
$tn_height = "69px";
include 'db.php';
$q = "SELECT " .
"id," .
"name, " .
"type, " .
"title " .
"FROM image_metadata " .
"WHERE page = {$pagenum} " .
"ORDER BY pos ASC";
$col_cur_pos = 0;
print("<table class='picture-grid'>\n");
if($result = $mysqli->query($q))
{
echo "<tr>";
while($row = $result->fetch_array())
{
$col_cur_pos = $col_cur_pos + 1;
$id = $row['id'];
$name = $row['name'];
$type = $row['type'];
$title = $row['title'];
print("<td>\n" .
"<a class='fancy_image' rel='group1' href='displayimage.php?id={$id}'>\n" .
"<img \n" .
"alt='{$title}'\n" .
"title='{$title}'\n" .
"style='\n" .
"border: 1px solid black; \n" .
"width: {$tn_width}; \n" .
"height: {$tn_height};' \n" .
"src='thumbnails/{$name}.{$type}'\n" .
"/>" .
"</a>\n" .
"</td>\n");
if ($col_cur_pos % $cols == 0) {
print("</tr>\n<tr>\n");
}
}
echo "</tr>\n</table>\n";
}
else
{
print "ERROR!";
die($error);
}
?>