0) { $n = ($pg - 1) * $perPage; $limit = "limit $n,$perPage "; } } // Determine number of images in gallery $total = db_getVal("SELECT count(*) FROM photo_gallery_images WHERE school_num = $school_num AND gallery_num = $gallery_num"); // Get the images for this gallery $images = db_query("SELECT * FROM photo_gallery_images WHERE school_num = $school_num AND gallery_num = $gallery_num ORDER BY sequence $limit"); if (db_num_rows($images)) { if ($total > $perPage) { if (!isset($pg)) $pg = 1; $link = "action=photo-gallery&gallery_num=$gallery_num"; $last = 1; for ($i = 1; (($i - 1) * $perPage) <= $total; $i++) { if ($i == $pg) $pages .= "[$i] "; else $pages .= "[$i] "; $last = $i; } $prev = $pg - 1; if ($prev > 0) $pages = "<<<  $pages"; $next = $pg + 1; if ($next <= $last) $pages .= "  >>>"; $pages = "$pages

"; } if (!isset($pages)) $pages = ''; ?> 0) echo(" \n"); echo(" \n"); } $count++; //$image_size = GetImageSize("$gallerydir/$photo"); //$image_width = $image_size[0]; //$image_height = $image_size[1]; //$span_id = "img_span$record_num"; //$otipSpans .= "" . sprintf($otipIMG,"$galleryurl/$photo",$image_height,$image_width,$product_name) . "\n"; // $image = ""; $image = ""; echo(" \n"); } unset($otipSpans); ?> 0) { ?>
Click on any Image to View a Larger Version
$image

\n"); echo(" \n"); echo(" \n"); echo(" \n"); } $prevCategory = $category_num; echo("
\n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo("
$category_title
\n"); echo(" \n"); echo("
\n"); } } // Ensure that only valid user types can see the buttons $AllowedUserTypes = array('SuperUser','System Administrator','Communications Administrator'); if (isset($gallery_num) && checkPermission($AllowedUserTypes) == 1) { ?>
  Manage Gallery     Upload Images