GALLERY
|
|
This gallery represents a sampling of the fine custom weapons and products that we have available to our
customers. Please browse our photos and contact us for additional information, 1-888-404-5211 or Email.
|
if($numcats == 0) {
?>
|
No Gallery items to display.
|
}
elseif($numcats > 0) {
// Build result paging
$perPage = 9; //records per page
$maxrecords_sql = "SELECT COUNT(ID) as maxrecords FROM gallery_data WHERE catID = '$catID' AND viewable = 'Y'";
$maxpages_sql = "SELECT CEILING(COUNT(ID) / ".$perPage.") AS maxpages FROM gallery_data WHERE catID = '$catID' AND viewable = 'Y'";
$maxrecords_query = mysql_query($maxrecords_sql);
$temp = mysql_fetch_array($maxrecords_query);
$maxrecords = $temp[0];
mysql_free_result($maxrecords_query);
$maxpages_query = mysql_query($maxpages_sql);
$temp = mysql_fetch_array($maxpages_query);
$maxpages = $temp[0];
mysql_free_result($maxpages_query);
if($_REQUEST["page"] == "") {
$page = 1;
}
else {
$page = mysqlquerycleaner($_REQUEST["page"]);
}
?>
|
Notice: Undefined variable: catname in /var/www/gallery/index.php on line 92
|
if($maxrecords > 0) {
?>
Notice: Undefined variable: maxrecords in /var/www/gallery/index.php on line 96
Notice: Undefined variable: maxpages in /var/www/gallery/index.php on line 96
gallery item(s) on page(s).
|
}
?>
if($maxpages > 1) {
?>
for($i=1;$i<=$maxpages["maxpages"];$i++){
if($page==$i){print("");}
?>
Notice: Undefined variable: i in /var/www/gallery/index.php on line 111
if($page==$i){print("");}
if($i<=$maxpages["maxpages"]-1){print("|");}
}
?>
|
}
?>
|
$fl = (($page-1) * $perPage);
$sql = "SELECT * FROM gallery_data WHERE catID = '$catID' AND viewable = 'Y' ORDER BY title LIMIT $fl, $perPage";
$gallery = mysql_query($sql);
if(mysql_num_rows($gallery) == 0) {
?>
No gallery items to display
}
else {
?>
$cellcount = 1;
while($row = mysql_fetch_array($gallery)) {
if($cellcount == 1) { print(""); }
$ID = $row["ID"];
$title = $row["title"];
$mainthumb = $row["mainthumb"];
if($mainthumb == "") {
// get the first existing one if no mainthumb is selected
clearstatcache();
for($i=1;$i<=8;$i++) {
$file = "images/small/".$ID."_".$i.".jpg";
if(file_exists($file)){
$mainthumbIMG = $ID . "_" .$i. ".jpg";
break;
}
}
}
else {
$mainthumbIMG = $ID . "_" .$row["mainthumb"] . ".jpg";
}
?>
Notice: Undefined variable: title in /var/www/gallery/index.php on line 166
|
$cellcount++;
if($cellcount == 4) { print(" "); $cellcount = 1; }
}
?>
}
?>
|
if($maxpages > 1) {
?>
for($i=1;$i<=$maxpages["maxpages"];$i++){
if($page==$i){print("");}
?>
Notice: Undefined variable: i in /var/www/gallery/index.php on line 191
if($page==$i){print("");}
if($i<=$maxpages["maxpages"]-1){print("|");}
}
?>
|
}
}
?>
|