include('global_vars.php'); $link=mysql_connect($host, $user, $pw) or die(mysql_error()); mysql_select_db($db) or die(mysql_error()); function load_images() { // loads all small images into scrolling div and large images into array $num_images = fget_number_of_images_in_gallery(); $small_image_array=array(); $total_image_width=0; for($i=1;$i<=$num_images;$i++) { $image_width=0; $image_name="graphics/gallery/image_".$i."_sm.jpg"; $size = getimagesize($image_name); $image_width=$size[0]; $total_image_width=$total_image_width+$image_width+22; $small_image_array[$i]=$image_name; } $gallery_mini_scroll_width=(133+20)*($i) - 133 - 20 + 10; // 133 is pic width, 22 = spacer width (20) + 2 x side borders of 1px each $gallery_mini_scroll_width=$total_image_width-20; echo(""); } $query = "SELECT g_image_name, g_caption FROM gallery ORDER BY g_order_ref"; $result = mysql_query($query, $link); $num=mysql_numrows($result); // create javascript arrays of images echo("\r\n"); // close the connection mysql_close(); ?>
$page_name="gallery"?>