-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.php
More file actions
executable file
·103 lines (97 loc) · 3.72 KB
/
gallery.php
File metadata and controls
executable file
·103 lines (97 loc) · 3.72 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
// get library file and include
include_once ("lib/lib.inc.php");
// setup page vars
$pageID = $_GET['pageID'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>COMPANY NAME</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" language="JavaScript1.2" src="menu/stmenu.js"></script>
<script type="text/javascript" src="assets/prototype.js"></script>
<script type="text/javascript" src="assets/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="assets/lightbox.js"></script>
</head>
<body>
<div id="wrapper">
<div id="header">
<?php include ("inc/search.inc.php"); ?>
</div>
<div id="navigation"><?php include ("inc/menu.inc.php"); ?></div>
<div id="date"><?php echo date("D jS M Y"); ?></div>
<div id="container">
<div id="leftcolumn">
<!-- <?php include ("inc/gallery_menu.inc.php"); ?> -->
</div>
<!-- start main content -->
<div id="content">
<!-- page title -->
<div id="title">
<h2 class="bluetxt">
<?php
// get page name
if ($pageID && $pageID >= "81150") {
$distitle = db_query("select name from ".$dbext."child_menu where cid = '".$pageID."' and active = '1' limit 1") or db_die();
$pgtitle = fetch_row($distitle);
echo $pgtitle[0];
} elseif ($pageID && $pageID <= "81150") {
$distitle = db_query("select name from ".$dbext."sub_menu where sid = '".$pageID."' and active = '1' limit 1") or db_die();
$pgtitle = fetch_row($distitle);
echo $pgtitle[0];
} else {
$distitle = db_query("select name from ".$dbext."parent_menu where pid = '91115' limit 1") or db_die();
$pgtitle = fetch_row($distitle);
echo $pgtitle[0];
}
?>
</h2>
</div>
<!-- body copy -->
<?php
// table setup
print '<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td>Click on an image below for a larger view, once you\'re in Gallery mode simply use your Left/Right arrow keys to browse through the images.<br /></td>
</tr>
<tr><td>
<div style="height:8px" class="dottedline"></div><br />
<table width="100%" border="0" cellspacing="3" cellpadding="2">';
// content begins - the query
$sql = db_query ("select * from ".$dbext."gallery where active = '1' order by photoid desc") or db_die();
$num = num_row($sql);
if ($num) {
// display all existing images
$cols = 3;
for ($i = 0; $i < $num; $i++) {
$rowimg = fetch_row($sql);
if ($i % $cols == 0) {
echo "<tr>\n";
}
echo "<td align=\"center\" valign=\"bottom\" class=\"txt10 bluetxt\"><a href=\"".$gallerydirurl."/".$rowimg[1]."\" rel=\"lightbox[midcms]\" title=\"".$rowimg[3]."\">";
echo "<img src=\"".$gallerydirurl."/".$rowimg[2]."\" border=\"0\" class=\"imgborder\"></a>";
echo "<br />".$rowimg[3]."</td>\n";
if (($i % $cols) == ($cols - 1) || ($i + 1) == $num) {
echo "</tr>\n";
}
}
// close table
} else {
print '<tr><td align="center"><strong class="redtxt">SORRY:</strong> No images found, please try back later.<br /></td></tr>';
}
print '</table></td></tr></table>';
?>
</div>
<!-- end main content -->
<div id="rightcolumn">
<?php include ("inc/photos.inc.php"); ?>
</div>
<div id="divider"></div>
<div id="base"><?php include("inc/base.inc.php"); ?></div>
</div>
</div>
</body>
</html>