Powered by nimages v$config[version]"; ########################### # Because I don't like typing # $HTTP_POST_VARS and # $HTTP_GET_VARS # all the time. # (Call it lazy, call it genius...) # if i need security for something, i'll call $HTTP_POST_VARS or $_POST $http=array_merge ($HTTP_POST_VARS, $HTTP_GET_VARS, $_POST, $_GET); #for compatiblity. if ((!$_SERVER) && ($HTTP_SERVER_VARS)) { $_SERVER=$HTTP_SERVER_VARS; } // else { upgrade_your_damn_php!(); } # get the filename and then the cwd. # i'm sure i remember this being easier, # but for some reason $_SERVER[cwd] didn't work. $temp_filename=split ("/", $_SERVER['PATH_TRANSLATED']); foreach ($temp_filename as $key => $value) { if (eregi (".php", $value)){$filename=$value; continue;} } $cwd=ereg_replace("$filename", "", $_SERVER['PATH_TRANSLATED']); ####################################################### # End Basic Confing and Setup ####################################################### # check to see if we have a config file. if not, offer only limited functions if (!file_exists ("nimages_conf.php")) { switch ($http['op']) { case "background": background(); break; case "logo": logo(); break; case "first_time": first_run(); break; case "blank": create_blank(); break; # printing out an error if they're not calling one of these functions default: do_header("Nimages: Nar3 Images"); print<<<___eofh

Nar3 Devel

Nimages: Nar3 Images
$config[version]

Error


Uh-oh!
The config file is missing! If this is your first time running this script, maybe you meant to go here:
http://$_SERVER[HTTP_HOST]$_SERVER[PHP_SELF]?op=first_time

If you are a user seeing this error, please contant the author of the referring webpage.
___eofh; do_footer(); } } else { # switch the op to see what we're being called to do only # if we have a config file. if we don't, call first_run to # create one. switch ($http['op']) { case "background": background(); break; case "logo": logo(); break; case "first_time": first_run(); break; case "blank": create_blank(); break; case "up": create_up(); break; case "down": create_down(); break; case "gallery": read_config(); if ($http['gid']) { gallery ($http['gid']); } // make sure we have a gallery else { list_galleries(); } // id. if not, print all galleries. break; case "image": read_config(); if ($http['id']) { image ($http['id'], $http['gid']); } // make sure we have a pic id. else { list_galleries(); } // if not, print galleries. break; case "make_thumb": read_config(); make_thumb($http['id']); break; case "display_image": read_config(); display_image($http['id']); break; case "list_galleries": read_config(); list_galleries(); break; default: read_config(); list_galleries(); // defaultly (heh) print galleries. break; } } # called for the first run configuration. function first_run(){ global $config, $http; if ((!file_exists ("nimages_conf.php")) && ($http['op']=="first_time")){ first_time_config($http[page]); } } ############################################################# # # IMAGE # makes a thumbnail for or reads # in thumbnail and spits it out. function make_thumb($id) { global $config, $_SERVER; $image_info=get_image_info($id); # they want to use evil thumbs if ($config['thumbs_conf']['evil_thumbs']==1) { # GIF if ($image_info['type']==1) { $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); $content="image/gif"; } # JPG elseif ($image_info['type']==2) { $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); $content="image/jpeg"; } #PNG elseif ($image_info['type']==3) { $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); $content="image/png"; } } # they want to make thumbnails and can. elseif (($config['general_conf']['gd_support']==1) && ($config['thumbs_conf']['create_thumbs']==1)) { #$thumbs_dir=$config['images_conf']['default_dir'] . "/" . $config['thumbs_conf']['directory']; $thumbs_dir=$config['thumbs_conf']['directory']; # making the thumbs dir if it doesn't exist... if (!is_dir($thumbs_dir)) { umask(000); mkdir($thumbs_dir, 0777); } $thumb_name=$thumbs_dir . "/" . $image_info['name']; # Make the thumb if it doesn't exists if (!file_exists($thumb_name)) { # ran into some problems with older versions of gd lib. # this check to see if we can create true color images or not, and then use # them if we can. If not, the old standby. # For anyone interested, it seems that the older versions of gd lib # that don't support ImageCreateTrueColor makes thumbnails with imagecreate # that look better than gd lib version that support ImageCreateTrueColor. # Also mentionable is that some versions of PHP have the function # ImageCreateTrueColor, but it just errors out because the gd lib version is too low. # Thus the extra @ checking. if (function_exists ('ImageCreateTrueColor') && (@ImageCreateTrueColor($image_info['thumb_width'],$image_info['thumb_height']))){$dst_img=ImageCreateTrueColor($image_info['thumb_width'],$image_info['thumb_height']); } else { $dst_img=imagecreate($image_info['thumb_width'],$image_info['thumb_height']); } #GIF -- with gd support if (($image_info['type']==1) && ($config['gdlib_conf']['gif_support']==1)) { $src_img = imagecreatefromgif($image_info['filename']); # if we can resample the image, do that. # makes it look prettier than imagecopyresized. if (function_exists ('imagecopyresampled') && (@imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']))) { imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } else { imagecopyresized ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } #Now write to file imagegif($dst_img, $thumb_name, 75); $header="image/gif"; } #GIF -- no gd support. make it an Evil Thumb by just spitting out the image elseif (($image_info['type']==1) && ($config['gdlib_conf']['gif_support']==0)) { header("Content-type: image/gif"); $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); print $thumb; exit; } #JPEG -- with gd support elseif (($image_info['type']==2) && ($config['gdlib_conf']['jpg_support']==1)) { $src_img = imagecreatefromjpeg($image_info['filename']); # if we can resample the image, do that. # makes it look prettier than imagecopyresized. if (function_exists ('imagecopyresampled') && (@imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']))) { imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } else { imagecopyresized ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } #Now write to file imagejpeg($dst_img, $thumb_name, 75); $header="image/jpeg"; } #JPEG -- no gd support elseif (($image_info['type']==2) && ($config['gdlib_conf']['jpg_support']==0)) { header("Content-type: image/jpeg"); $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); print $thumb; exit; } #PNG -- with gd support elseif (($image_info['type']==3) && ($config['gdlib_conf']['png_support']==1)) { $src_img = imagecreatefrompng($image_info['filename']); #same here as with jpgs. if (function_exists ('imagecopyresampled') && (@imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']))) { imagecopyresampled ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } else { imagecopyresized ($dst_img, $src_img, 0, 0, 0, 0, $image_info['thumb_width'], $image_info['thumb_height'], $image_info['width'], $image_info['height']); } #Now write to file imagepng($dst_img, $thumb_name); $header="image/png"; } #PNG -- no gd support elseif (($image_info['type']==3) && ($config['gdlib_conf']['png_support']==0)) { header("Content-type: image/png"); $thumbnail=$image_info['filename']; $fp=fopen($thumbnail, rb); $thumb=fread($fp, filesize($thumbnail)); fclose($fp); print $thumb; exit; } # so you can delete it. don't we love chmod 777 umask (000); chmod ($thumb_name, 0777); imagedestroy ($src_img); imagedestroy ($dst_img); } # Print the thumbnail $fp=fopen($thumb_name, rb); $thumb=fread($fp, filesize($thumb_name)); fclose($fp); } header("Content-type: $content"); print $thumb; } /* you have a version less then 2 */ function get_image_info($id) { global $config, $_SERVER; if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "images WHERE id='$id'"; $image_info=mysql_request ($query); } else { $image_info=$config['images']["$id"]; } $image_size=getimagesize($image_info['filename']); $image_num_conv=array("", "GIF", "JPEG", "PNG", "SWF", "PSD", "BMP", "TIFF", "TIFF", "JPC", "JP2", "JPX", "JB2", "SWC", "IFF"); $image_type=$image_size[2]; $width_div=$config['thumbs_conf']['width_max']/$image_size[0]; $height_div=$config['thumbs_conf']['height_max']/$image_size[1]; $new_width_based[0]=ceil ($width_div*$image_size[0]); $new_width_based[1]=ceil ($width_div*$image_size[1]); $new_height_based[0]=ceil ($height_div*$image_size[0]); $new_height_based[1]=ceil ($height_div*$image_size[1]); # kind of confusing. checking to see which one is smaller than the max height and widths if ($new_width_based[1] > $config['thumbs_conf']['height_max']) { $new_size=$new_height_based; } elseif ($new_height_based[0] > $config['thumbs_conf']['width_max']) { $new_size=$new_width_based; } #make it based on width otherwise... else { $new_size=$new_width_based; } $image_info['thumb_width']=$new_size[0]; $image_info['thumb_height']=$new_size[1]; $image_info['width']=$image_size[0]; $image_info['height']=$image_size[1]; $image_info['type']=$image_type; return $image_info; } # returns an image array like: # 0 => # id = IMAGE ID # name = NAME # dsc = DSC # filename = FILENAME function get_image_array($images, $orderby, $orderhow, $page) { global $config; # if we're instructed to get all images, get them all if ($images=="all") { #use mysql if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "images"; $result=mysql_query($query); $i=0; while ($row=mysql_fetch_array($result)) { $temp_image_array[$i]=get_image_info($row['id']); $temp_image_array[$i]['id']=$row['id']; $i++; } } # don't use mysql else { $i=0; foreach ($config['images'] as $id => $junk_array) { if ($id!="next_id") { $temp_image_array[$i]=get_image_info($id); $temp_image_array[$i]['id']=$id; } $i++; } } } # get only the images we need else { $temp_array = explode (":", $images); $i=0; foreach ($temp_array as $key => $id) { if ($id!="next_id") { $temp_image_array[$i]=get_image_info($id); $temp_image_array[$i]['id']=$id; } $i++; } } /* else { # id is the only one that's different as far as # sorting goes. can just read in the original array # and then sort it accordingly if ($orderby=="id") { $temp_image_array=$config['images']; if ($orderhow=="asc") { ksort ($temp_image_array); } else { krsort ($temp_image_array); } $image_array=$temp_image_array; } # luckily, it's easy to sort by everything else else { foreach ($config['images'] as $id => $image_info) { $temp_image_array[$id]=$image_info[$orderby]; } if ($orderhow=="asc") { asort ($temp_image_array); } else { arsort ($temp_image_array); } foreach ($temp_image_array as $temp_id => $temp_value) { $image_array[$temp_id] = $config['galleries'][$temp_id]; } } } this doesn't work....grawr. print "orderby is $orderby and orderhow is $orderhow


\n\n"; print "

\n\n\n\n"; print_r ($temp_image_array); print "

\n\n\n\n"; print_r ($config['galleries']); print "

\n\n\n\n"; if ($orderby=="id") { $image_array=$temp_image_array; if ($orderhow=="asc") { ksort ($image_array); } else { krsort ($image_array); } } if ($orderby=="id") { $temp_gal_array=$temp_image_array; if ($orderhow=="asc") { ksort ($temp_gal_array); } else { krsort ($temp_gal_array); } $image_array=$temp_gal_array; } else { foreach ($temp_image_array as $gid => $gal_info) { $temp_gal_array[$gid]=$gal_info[$orderby]; } if ($orderhow=="asc") { asort ($temp_gal_array); } else { arsort ($temp_gal_array); } foreach ($temp_gal_array as $temp_key => $temp_value) { $image_array[$temp_value] = $temp_image_array[$temp_value]; } } else { foreach ($temp_image_array as $id => $info) { $temp_sorting_array[$info[$orderby]]=$id; } if ($orderhow=="asc") { ksort ($temp_sorting_array); } else { krsort ($temp_sorting_array); } print_r ($temp_sorting_array); foreach ($temp_sorting_array as $temp_key => $temp_value) { $image_array[$temp_value] = $temp_image_array[$temp_value]; print "\$image_array[$temp_value] = \$temp_image_array[$temp_value]
\n"; } } */ $start=($config['image_conf']['max_page'] * $page) - $config['image_conf']['max_page']; $i=1; for ($start=$start; $i<=$config['image_conf']['max_page']; $start++) { if (is_array ($temp_image_array[$start])) { $counted_image_array[$i]=$temp_image_array[$start]; } $i++; } $image_array=$counted_image_array; return $image_array; } ############################### # DISPLAYING ############################### # lets you use a img src=PHP_SELF?op=display_image # so you can protect images from direct links. function display_image($id) { global $images, $_SERVER; $image_info=get_image_info($id); # GIF if ($image_info['type']==1) { $image_file=$image_info['filename']; $fp=fopen($image_file, rb); $image=fread($fp, filesize($image_file)); fclose($fp); $content="image/gif"; } # JPG elseif ($image_info['type']==2) { $image_file=$image_info['filename']; $fp=fopen($image_file, rb); $image=fread($fp, filesize($image_file)); fclose($fp); $content="image/jpeg"; } #PNG elseif ($image_info['type']==3) { $image_file=$image_info['filename']; $fp=fopen($image_file, rb); $image=fread($fp, filesize($image_file)); fclose($fp); $content="image/png"; } header("Content-type: $content"); print $image; #print $content; } # Displays an image. function image($id, $gid) { global $config, $http, $_SERVER; $image_info=get_image_info($id); $gal_info=get_gal_info($gid); $site_url=$config['general_conf']['site_url']; # should we usea config? if so, get it and stuff our image into it. if ($config['general_conf']['image_template']==1) { // go with the templating } # not using a template. default. w00t. else { # Figuring out what number image we're on to make next and previous links. $gal_images=get_gal_images($gid); for ($i=0; $iPrevious Image
<<<
";} else {$back_link="Beginning
<<<
";} if ($next_id) {$next_link="Next Image
>>>
";} else {$next_link="End
>>>
"; $end=1;} $image=<<<___eofh
$back_link

$gal_info[name] (Thumbnails)

$next_link

$image_info[name]

$image_info[dsc]


___eofh; do_header($image_info[name]); print $image; do_footer(); } } ############################################################# # # INSTALLATING AND CONFIGURATION FUNCTIONS # Basic functions for installation and configuration. Also includes functions # to read in the configuration. # # read_config(): # reads in the config and mysql tables. # # get_dir_array($dir): # gets an array of images from $dir. # # first_time_config($page): # Used to configure nimages the first time it's run. # # get_title(): # Guesses the title of the website. # # config_image_select($dir): # Gets a list of images from $dir. # # save_config($config_array): # Saves config to file and mysql. ############################################################# # Reads in the config file. # (Look at all that documentation...mmmMMM!) function read_config() { /* And to help any potential hackers or script kiddies... Below is the full, i-don't-use-mysql-so-i-want-to-make-life-hard version of the map of the $config array. The i'm-a-good-person-and-use-mysql version won't have the comments, galleries, images, or user sections. I've documented it so that each tab is another step into the world of multi dimensional arrays. So, for instance, to get the name of the gallery with id==1, it'd be: $config['galleries'][1]['name'] You get the idea... It should be noted that for the comments, galleries, images, and user arrays, we never, EVER start on 0. This is because mysql autoincrement doesn't start on 0, so to keep things straight between the two, I've decided not to use the 0 element of the array. (The idea was that perhaps this could later be merged into a mysql table...that is doubtful now, though.) This is in alphabetical order.) $config[comments] Comment Info [COMMENT_ID] The Comment's ID [time] When the comment was posted [to_id] To which image id the comment was posted [user] By which user id the comment was posted [next_id] The id the next comment will have. $config[galleries] Galleries Info [GAL_ID] The Gallery's ID [name] Gallery's Name [dsc] Gallery's Description [comments] Allow comments for this gallery (Boolean) [uploads] Allow uploads for this gallery (Boolean) [num_comments] The number of comments the gallery has [images] The image ids separated by ':'. All images if 'all' [num_images] The number of images in this gallery [next_id] The id the next gallery will have. $config[gdlib_conf] GD Lib Config [gif_support] GIF Support is available (Boolean) [jpg_support] JPG Support is available (Boolean) [png_support] PNG Support is available (Boolean) [wbmp_support] WBMP Support is available (Boolean) $config[general_conf] General Config [advanced] Using Advanced Mode (Boolean) [doc_root] The Document Root of the webserver [gd_support] GD Libs are installed (Boolean) [multi_gals] Support for multiple galleries (Boolean) [mysql_support] Support for MySQL (Boolean) [site_name] The name of the site [site_url] The url of the site [use_mysql] Use of MySQL (Boolean) [write_permission] Write permission for the installation dir (Boolean) $config[image_conf] Image Config [allow_others] Allow images NOT in default directory (Boolean) [default_dir] Default storing and upload directory for images [max_cols] Max number of image columns displayed [max_page] Max number of images displayed per screen $config[images] Images Info [IMAGE_ID] The Image's ID [filename] Image's filename [name] Image's displayed name [dsc] Image's Description [user] User who uploaded the image [num_comments] Number of Comments for Image (allowed by gal) [next_id] The ID the next image uploaded will have. $config[mysql_conf] MySQL Config [database] The database to connect to [pass] The password to connect with [prefix] The prefix to assign to tables (nimages_users, nimages_images) [server] The server to connect to [user] The user to connect as $config[thumbs_conf] Thumbnail Config [create_thumbs] Should (not can) nimages create thumbnails (Boolean) [directory] Directory to save thumbnails in [height_max] Max height of created thumbnails [width_max] Max width of created thumbnails $config[users] User Info [USER_ID] The User's ID [name] User's name [pass] User's password [addy] User's email or web address [admin] User is an admin (Boolean) [upload] User can upload images (Boolean) [next_id] The ID the next user will have. $config[powered_by] Give Brett Credit? (Boolean) $config[powered_by_tag] How to give Brett credit...printed at the end. $config[version] Nimages version number. Good luck... */ # elseif (file_exists ("nimages_conf.php")) { global $config; $config_file=file("nimages_conf.php"); //reading in conf file foreach ($config_file as $key => $value) { # getting our vars and making sure we # don't have any stray \n's.... list ($conf_key, $conf_value) = split ("!=!", $value); $conf_key=rtrim ($conf_key); $conf_value=rtrim ($conf_value); # ignoring comments.... if (($value{0}=="#") || $value{0}=="\n") {continue;} #finding out what section of the config we're on... elseif ($conf_key=="SECTION") {$section=$conf_value;} # getting images information and stuffing # it into an array in the form of: # config[images][IMAGE_ID][IMAGE INFO] elseif ($conf_key=="image_id") {$id=$conf_value; $config['images'][$id] = array();} elseif ($conf_key=="image_filename") {$config['images'][$id]['filename'] = $conf_value;} elseif ($conf_key=="image_name") {$config['images'][$id]['name'] = $conf_value;} elseif ($conf_key=="image_dsc") {$config['images'][$id]['dsc'] = $conf_value;} # doing the same with the galleries... elseif ($conf_key=="gal_id") {$id=$conf_value; $config['galleries'][$id] = array();} elseif ($conf_key=="gal_name") {$config['galleries'][$id]['name'] = $conf_value;} elseif ($conf_key=="gal_dsc") {$config['galleries'][$id]['dsc'] = $conf_value;} elseif ($conf_key=="gal_uploads") {$config['galleries'][$id]['uploads'] = $conf_value;} elseif ($conf_key=="gal_comments") {$config['galleries'][$id]['comments'] = $conf_value;} elseif ($conf_key=="gal_num_comments") {$config['galleries'][$id]['num_comments'] = $conf_value;} elseif ($conf_key=="gal_images") {$config['galleries'][$id]['images'] = $conf_value;} elseif ($conf_key=="gal_num_images") {$config['galleries'][$id]['num_images'] = $conf_value;} # doing the same with the comments... elseif ($conf_key=="comment_id") {$id=$conf_value; $config['comments'][$id] = array();} elseif ($conf_key=="comment_time") {$config['comments'][$id]['time'] = $conf_value;} elseif ($conf_key=="comment_to_id") {$config['comments'][$id]['to_id'] = $conf_value;} elseif ($conf_key=="comment_user") {$config['comments'][$id]['user'] = $conf_value;} # and once again for users. # see people? this is my mysql is fun... #elseif ($conf_key=="user_id") {print "user_id is $conf_value!
and we're looking at $key and $value
\n";$id=$conf_value; $config['users'][$id] = array();} elseif ($conf_key=="user_id") {$id=$conf_value; $config['users'][$id] = array();} elseif ($conf_key=="user_name") {$config['users'][$id]['name'] = $conf_value;} elseif ($conf_key=="user_addy") {$config['users'][$id]['addy'] = $conf_value;} elseif ($conf_key=="user_pass") {$config['users'][$id]['pass'] = $conf_value;} elseif ($conf_key=="user_admin") {$config['users'][$id]['admin'] = $conf_value;} elseif ($conf_key=="user_upload") {$config['users'][$id]['upload'] = $conf_value;} else {$config[$section][$conf_key]=$conf_value;} } # sorting the array by key because # it's easier to find stuff when printed. # shouldn't matter at all to the program. ksort ($config); # now see if we need to read in config from mysql or not. # also sets up some standard mysql functions and settings. if ($config['general_conf']['use_mysql']==1){ $sql_host=$config['mysql_conf']['server']; $sql_user=$config['mysql_conf']['user']; $sql_pass=$config['mysql_conf']['pass']; $sql_db=$config['mysql_conf']['database']; $config['mysql_con']=mysql_connect ($sql_host, $sql_user, $sql_pass) or die ("Could not connect to MySQL database!"); mysql_select_db ("$sql_db", $config['mysql_con']); function mysql_request($query) { global $config; $result=mysql_query("$query", $config['mysql_con']); $row=mysql_fetch_array ($result); return $row; } } # } return $config; } # grabs an array of images in $dir function get_dir_array($dir){ global $config; $dir_pt=opendir($dir); while ($file=readdir($dir_pt)) { # looking for images with expected extentions list ($filename, $ext)=split ("\.", $file); if (stristr ($ext, "jpg") || stristr ($ext, "jpeg") || stristr ($ext, "png") || stristr ($ext, "wbmp") || stristr ($ext, "gif")) { $images_array[]=$file; } } # if we didn't find any... if (count ($images_array)<1) { $images_array="No Images Found.\n"; } return $images_array; } ########################### # This is run the first time the # script is called. It sets up all the # basic config info. function first_time_config($page) { global $config, $http, $_SERVER, $cwd; # see what page of the config they're on. if (!$page || $page>6){$page=1;} # keep all the variables going from one page to the next # until it's time to put them into a file # strip the slashes from the name because php JUST KEEPS ADDING THEM! #if ($http['nimages:config:general:site_name']){$http['nimages:config:general:site_name']=stripslashes ($http['nimages:config:general:site_name']);} if ($http['dropdown']) {unset ($http['dropdown']);} $passed_vars.="\n"; # this is kinda messy. # because we're passing the vars from one page to the next, # we have to strip slashes twice and then add it once. # can't just strip it once because if they enter a " it will # mess up the html. foreach ($http as $key => $value) { $passed_vars.="\t\n"; } $passed_vars.="\n"; #start printing out the config do_header("Nimages: Nar3 Images -- Config: Step $page of 6"); if ($page==1) { // If we're on page 1 print<<<___eofh

Nar3 Devel

Nimages: Nar3 Images
$config[version]

Configuration


Welcome!
Thank you using Nimages: Nar3 Images!

Over the next few screens, nimages will install itself onto your sever. All you have to do is answer some basic questions. Nimages is designed to automatically detect many of these answers for you, and for many users, these default values suggested by nimages should work fine.

Checking for any errors...

$passed_vars ___eofh; #seeing if we have write permission in the current dir. umask (000); if (@mkdir ("nar3_rocks_w00t_baby_W00T", 0755)){ //didn't feel like making a random dir name. rmdir ("nar3_rocks_w00t_baby_W00T"); // no one will have this as a dir or file. $errors.=<<<___eofh Directory permissions...OK!
___eofh; } #if we don't have write permission... else { $fatal_error=1; $errors.=<<<___eofh Directory permissions...FATAL ERROR.
Nimages does not have write access to the server. In order to use this script, nimages must be able to write to the directory in which it is installed.

Currently, nimages is installed as:
$_SERVER[PATH_TRANSLATED]

In order to correct this problem, please change the rights of the directory:
$cwd

to either 777 (drwxrwxrwx) or to 775 (drwxrwxr-x) depending upon your server setup.

This can by done with the command
chmod 777 $cwd
OR
chmod 775 $cwd

Also, this can be done through an ftp client.

Once the permissions are corrected, re-run this script to continue the installation.

___eofh; } #checking to see if they've compiled php with mysql support if (function_exists ('mysql_query')) { $errors.=<<<___eofh MySQL PHP functions...OK!
___eofh; } else { #if those functions don't exist, then say so. $errors.=<<<___eofh MySQL PHP functions...ERROR.
The functions to make MySQL requests from PHP were not found. This is not a fatal problem, as configuration and other information will be written to a file instead, but it may be slower than using MySQL.

___eofh; } # checking to see if we have gd lib functions or not if (function_exists ('imagetypes')){ $errors.=<<<___eofh \n GD Graphics Library Support...OK!

Checking image types supported:
___eofh; if (imagetypes() & IMG_GIF) { $errors.="\t\t\t\t
  • GIF files are supported.
    \n"; $errors.="\t\t\t\t\n"; } else { $errors.="\t\t\t\t
  • GIF files are not supported.
    \n"; $errors.="\t\t\t\t\n"; } if (imagetypes() & IMG_JPG) { $errors.="\t\t\t\t
  • JPG files are supported.
    \n"; $errors.="\t\t\t\t\n"; } else { $errors.="\t\t\t\t
  • JPG files are not supported
    .\n"; $errors.="\t\t\t\t\n"; } if (imagetypes() & IMG_PNG) { $errors.="\t\t\t\t
  • PNG files are supported.
    \n"; $errors.="\t\t\t\t\n"; } else { $errors.="\t\t\t\tPNG files are not supported
    .\n"; $errors.="\t\t\t\t\n"; } if (imagetypes() & IMG_WBMP) { $errors.="\t\t\t\t
  • WBMP files are supported.
    \n"; $errors.="\t\t\t\t\n"; } else { $errors.="\t\t\t\tWBMP files are not supported
    .\n"; $errors.="\t\t\t\t\n"; } # if no gd functions, } else { $errors.=<<<___eofh GD Graphics Library Support...ERROR.
    The GD Graphics Library is required for Nimages to create thumbnails automatically. You do not have the BG Graphics Library installed, or PHP was not compiled to make use of it.

    While this is not a fatal error, nimages will not be able to automatically create thumbnails. You will either have to use the Evil Thumbs option, or make thumbnails yourself.

    ___eofh; } if ($fatal_error) { print<<<___eofh $errors
  • ___eofh; } else { print<<<___eofh $errors

    No fatal errors were found! Select installation type and click next to continue!

    Installation Type
    If you select advanced, you will have more control
    and more options will be available, but it will also
    increase the difficulty of setting up this script.
    Most drop-and-go users will want to keep it on "Normal".

    Keeping it on "Normal" will disable some advanced options
    during the setup. These options will appear grayed out.
    ___eofh; } do_footer(); exit; } elseif ($page==2) { // If we're on page 2 $title_names=get_title(); // Grabbing a title... print<<<___eofh

    Nar3 Devel

    Nimages: Nar3 Images
    $config[version]

    Configuration
    Step $page of 6.


    Basic Information
    WebSite Name:
    Enter you website name here, or select
    one from the list of detected names.
    ___eofh; # Doing some Tricky Javascript Stuff to print # out all the titles we've painstakingly found. # (and probably even some we haven't...) $i=0; foreach ($title_names as $title => $points) { if ($i==0) { print "\t\t\t\t

    \n"; print "\t\t\t\t
    WebSite Url
    Do not put "http://" in front of this!
    Document Root
    If you do not know what this is, the default is probably ok.
    Include a trailing slash!
    Default User
    This is the default username and password
    you want to use to access the Nimages Control Panel.
    Username:
    Password:
    Email/Web:

    ___eofh; # whew...things are getting confusing with the advanced settings # checking to see if they want advanced stuff, or not and # printing out all options if they do, and selected options # if they don't. #it'd be easier without this gd lib crap... # making sure i don't get emails "but i TOLD it to make thumbnails...i TOLD it to..." if ($http['nimages:config:general:gd_support']!=1){$suggestion="
    GD support was not detected.
    Enabling this will result in errors.";} else {$suggestion="";} # we're not in advanced mode, and don't have gd support or are just in advanced mode. if ((($http['nimages:config:general:advanced']!=1) && ($http['nimages:config:general:gd_support']!=1)) || ($http['nimages:config:general:advanced']==1)) { print<<<___eofh ___eofh; } #we're not in advanced mode, and do have gd support. if (($http['nimages:config:general:advanced']!=1) && ($http['nimages:config:general:gd_support']==1)) { print<<<___test ___test; } #we can make thumbnails, doesn't matter if advanced or not. if ($http['nimages:config:general:gd_support']==1){ print<<<___eofh ___eofh; } #if they can create thumbs, and are advanced, let them specify a dir for the thumbs. #also let the change default thumb width and height if (($http['nimages:config:general:advanced']==1) && ($http['nimages:config:general:gd_support']==1)) { print<<<___eofh ___eofh; } else { print<<<___eofh ___eofh; } print<<<___eofh
    Imaging Options
    Evil Thumbs
    If you select yes to this option, the actual
    images will be resized and used as thumbnails.
    To be used only if the GD Library is not installed,
    or if you are in advanced mode.
    Evil Thumbs
    If you select yes to this option, the actual
    images will be resized and used as thumbnails.
    To be used only if the GD Library is not installed,
    or if you are in advanced mode.
    No
    Create Thumbs
    Nimages can create thumbnails.
    If you select yes to this option, the thumbnails will be created
    automatically.
    $suggestion
    Thumbnail Directory
    The directory in which thumbnails are stored.
    This will be a subdirectory from the directory in which
    nimages is installed. Include a trailing slash!
    Max Thumbnail Width
    The largest width (in pixels) thumbnails should be.
    Max Thumbnail Height
    The largest height (in pixels) thumbnails should be.
    Thumbnail Directory
    The directory in which thumbnails are stored.
    This will be a subdirectory from the directory in which
    nimages is installed. Include a trailing slash!
    thumbs
    Max Thumbnail Width
    The largest width (in pixels) thumbnails should be.
    130
    Max Thumbnail Height
    The largest height (in pixels) thumbnails should be.
    150
    $passed_vars
    ___eofh; do_footer(); } elseif ($page==3) { // If we're on page 3 print<<<___eofh

    Nar3 Devel

    Nimages: Nar3 Images
    $config[version]

    Configuration
    Step $page of 6.


    ___eofh; if ($http['nimages:config:general:advanced']==1){ print<<<___eofh ___eofh; } else { print<<<___eofh ___eofh; } print<<<___eofh ___eofh; # print out some advanced options like uploads and stuff if ($http['nimages:config:general:advanced']==1){ print<<<___eofh ___eofh; } else { print<<<___eofh ___eofh; } print<<<___eofh ___eofh; print<<<___eofh $passed_vars
    Gallery Options
    Multiple Galleries
    If you say yes to this question, you will be
    able to support more than one gallery
    with this script.
    Multiple Galleries
    If you say yes to this question, you will be
    able to support more than one gallery
    with this script.

    If you select yes to this question, create a gallery
    below, and then return to the admin section to create more.
    No
    Gallery Name
    The name of your default gallery.
    This is only for a name. Use the description box
    below for longer descriptions.
    Gallery Description
    A description for your default gallery.
    Allow Uploads
    Allows new uploads to the server. If set to
    "Only Users", only users with upload rights will
    be able to upload.
    If set to "Anonymous Users", anyone can upload.
    If set to "None", uploads will be disabled.
    WARNING! Setting this to "Anonymous Users" is potentially DANGEROUS!
    Allow Uploads
    Allows new uploads to the server. If set to
    "Only Users", only users with upload rights will
    be able to upload.
    If set to "Anonymous Users", anyone can upload.
    If set to "None", uploads will be disabled.
    WARNING! Setting this to "Anonymous Users" is potentially DANGEROUS!
    Only Users
    Allow Comments
    Lets users comment on pictures. If you
    "Only Users", the only users who are logged in can comment.
    "Anonymous Users" lets anyone post a comment. "None" turns off commenting.
    ___eofh; do_footer(); } elseif ($page==4) { // If we're on page 4 print<<<___eofh

    Nar3 Devel

    Nimages: Nar3 Images
    $config[version]

    Configuration
    Step $page of 6.


    Image Options
    Image Location
    This is the default location of the images
    you want nimages to find and display.
    On the next screen, you will be able to
    select which images you want to be displayed
    from this directory, and which ones you do not.
    This is also where any uploaded images go.

    Note that this is the absolute path.
    Allow Other Locations
    If you choose Yes, then you will later
    be able to give nimages the locations
    of images not under default location.
    Max Thumbnails On Page
    How many images should be displayed
    as thumbnails before starting a new page.
    Max Columns On Page
    How many columns of image thumbnails
    should be displayed.

    Note: To keep things looking pretty,
    Max Thumbnails On Page divided by Max
    Columns On Page should NOT have a remainder.


    $passed_vars
    Miscellaneous Options
    MySQL Options
    Nimages can make use of the popular
    open source database program MySQL.
    If you have and want to use MySQL, select
    Yes and enter your server, login name,
    and password. If you do not want to use
    MySQL, say No and leave the options blank.

    If you enter a nimages prefix, any tables
    created by nimages will begin with that
    prefix (eg. nimages_galleries).
    Use MySQL:
    Sever:
    User:
    Password:
    Database:
    Prefix:
    ___eofh; do_footer(); } elseif ($page==5) { // If we're on page 5 print<<<___eofh

    Nar3 Devel

    Nimages: Nar3 Images
    $config[version]

    Configuration
    Step $page of 6.


    ___eofh; $image_array=config_image_select($http['nimages:config:images:default_dir']); print<<<___eofh $passed_vars
    Image Selection
    Checkmark all images you want to include in your default gallery. You can later add descriptions to these images through the control panel.

    Note that these images are not rescaled to size on this screen.
    $image_array
    ___eofh; do_footer(); } elseif ($page==6) { // If we're on page 6 print<<<___eofh

    Nar3 Devel

    Nimages: Nar3 Images
    $config[version]

    Configuration
    Step $page of 6.


    Finishing Up!
    The installation and configuration of nimages is nearly complete!
    Writing configuration to file or storing into MySQL database.

    ___eofh; save_config($http); } } # creeping some people out, making others' lives easier. # this searches a couple normal places for a tag # and steals the name from it. Mostly fun. # this uses a sort of crazy points system my cousin # and i developed on the spot. # ...fun. function get_title(){ global $_SERVER; $ext=array ("html", "shtml", "htm"); // Getting some arrays ready $files=array ("index", "main", "default"); // with the normal places to $dir=array ("$_SERVER[DOCUMENT_ROOT]/", ""); //look for a title... foreach ($dir as $dir_key => $dir_value) { // Starting the foreach loops if ($dir_value==""){$dir_points=2;} // and assigning points based on else {$points+=1;} // what Jason and I thought were // the most likely places to find foreach ($files as $files_key => $files_value) { // titles. if ($files_value=="index") {$file_points=2;} elseif ($files_value=="main") {$file_points=1;} elseif ($files_value=="default") {$file_points=0.5;} foreach ($ext as $ext_key => $ext_value) { if ($ext_value=="php") {$ext_points=2;} elseif ($ext_value=="html") {$ext_points=1.75;} elseif ($ext_value=="shtml") {$ext_points=1.5;} elseif ($ext_value=="htm") {$ext_points=1;} $filename=$dir_value . $files_value . "." . $ext_value; if (file_exists ($filename)){ if ($title!=""){$title_points=2;} $points=$dir_points + $file_points + $ext_points + $title_points; $title_files[$filename]=$points; } } } unset ($points); } $title_names=array(); // Doing a test to see if any of the if (is_array($title_files)){ foreach($title_files as $filename => $points) { // titles appear more than once. $file=implode("", file($filename)); // (Is very complex, no?) list ($junk, $title)=spliti ("<title>", $file); list ($title, $junk)=spliti ("", $title); if ($title !="") { if(in_array($title, $title_names)) { $title_names[$title]=$points+2; } else { $title_names[$title]=$points; } } } } $title_names[$_SERVER['SERVER_NAME']]=0; $title_names[$_SERVER['HTTP_HOST']]=0; arsort($title_names); // Can't use array_pop because foreach ($title_names as $title_key => $title_value) { // It's an associative array. $title=$title_key; // Instead we sort and then foreach continue; } return $title_names; } # funciton to select images during first config function config_image_select($dir){ global $config, $http; $doc_root = $http['nimages:config:general:doc_root']; $max_cols=$http['nimages:config:images:max_cols']; $url_dir=str_replace ($doc_root, "", $http['nimages:config:images:default_dir']); $abs_dir="{$http['nimages:config:images:default_dir']}"; $images_array=array(); $dir_pt=opendir($dir); while ($file=readdir($dir_pt)) { # looking for images with expected extentions # i know this won't work if they've named # the image "bob's birthday cake" or something. # but it'll teach them.....HAH! list ($filename, $ext)=split ("\.", $file); if (stristr ($ext, "jpg") || stristr ($ext, "jpeg") || stristr ($ext, "png") || stristr ($ext, "wbmp") || stristr ($ext, "gif")) { $images_array[]=$file; } } sort ($images_array); # if we didn't find any, say so. if ((count ($images_array))<1) { $value="No images found in $dir!\n
    Upload some images, then use the control panel to add them to your gallery!

    Press next to finish the installation."; } # print out a list of the ones we found. else { $value=<<<___eofh ___eofh; # setting a counter to know how many # columns to make (based on what # the user answered to max columns per page. # we're ignoring the max thumbs per page right now. # it's messy enough with all these hidden vars. $count=1; for ($i=0; $i ___eofh; $count++; } #if the count is max for the # of cols that should be displayed, end the tr, and set count back to 1 elseif ($count==$max_cols) { $value.=<<<___eofh ___eofh; $count=1; } #anything else, $value .= out the image in a td and count++ else { $value.=<<<___eofh ___eofh; $count++; } } # checks to see if it's the last of the images. (end is set when it checks pages, if it's # the last page of the images, end==1) # sees how many blanks images to spit out and does that, then closes off the tr if (($count<=$max_cols) && ($i==sizeof($images_array)) && (sizeof($images_array)%$max_cols!=0)) { for ($i=$count; $i<=$max_cols; $i++){ $value .= "\n\t\t\t\t\n"; } $value .= "\t\t\t"; } $value .= "\t\t

    $images_array[$i]

    $images_array[$i]

    $images_array[$i]
    \n"; } return ($value); } # saves the configuration to either a file or mysql function save_config($config_array){ global $config, $cwd; $config_file_fp="nimages_conf.php"; #stripping the slashes so it will go into the conf file nicely # but don't wanna touch the sent images. foreach ($config_array as $key => $value) { if ($key=="nimages:config:images:selected_images") {continue;} else {$config_array[$key]=stripslashes ($value);} } # save a copy of the array to ask the ever popular "are you sure" question. if (file_exists ($config_file_fp)) { $old_config=file($config_file_fp); } # going through and getting all of the values from # the config array. ksort ($config_array); foreach ($config_array as $key => $value) { list ($nimages, $section, $subsection, $option)=split (":", $key); # scanning to make sure all of the vars # being processed has the nimages prefix. # don't wanna process any extra stuff. if ($nimages=="nimages") { # if we're in config, grab all the config info # to see if we're going to write it to file or not. # stuff each into it's own array so i can make # the config file it spits out at least # moderately organized. if ($section=="config") { if ($subsection=="images") { if (($option=="selected_images") && (is_array($value))) { $config_sent_images=$value; } else { $config_images[$option]="$value"; } } else {${"config_" . $subsection}[$option]="$value";} } # grabbing some gallery info # the gallery config is a little different.. # the subsection of the galleries section # will be the id for the gallery. # 1 is the default. elseif ($section=="galleries") { $config_galleries[$subsection][$option]="$value"; } # the users section works in almost the same way # the galleries do. # fun. elseif ($section=="users") { $config_users[$subsection][$option]="$value"; } } } # getting ready to write this to a file # part of this will always go into a file no matter # if they want to use mysql or not. # The only thing mysql is used for is # storing the images'and galleries' info and comments. $config_file= "#DO NOT EDIT!\n" . "#THIS FILE WAS AUTOMATICALLY GENERATED BY NIMAGES VERSION $config[version].\n" . "#Editing may break your configuration!!!\n\n\n" . "SECTION!=!general_conf\n"; foreach ($config_general as $key => $value) {$config_file.="$key!=!$value\n";} $config_file.="\n\nSECTION!=!gdlib_conf\n"; foreach ($config_gdlib as $key => $value) {$config_file.="$key!=!$value\n";} $config_file.="\n\nSECTION!=!mysql_conf\n"; foreach ($config_mysql as $key => $value) {$config_file.="$key!=!$value\n";} $config_file.="\n\nSECTION!=!thumbs_conf\n"; foreach ($config_thumbs as $key => $value) {$config_file.="$key!=!$value\n";} $config_file.="\n\nSECTION!=!image_conf\n"; foreach ($config_images as $key => $value) {$config_file.="$key!=!$value\n";} # put the images info and gallery info into mysql if we should if ($config_general['use_mysql']==1) { #making things easier to read $sql_host=$config_array['nimages:config:mysql:server']; $sql_user=$config_array['nimages:config:mysql:user']; $sql_pass=$config_array['nimages:config:mysql:pass']; $sql_db=$config_array['nimages:config:mysql:database']; $sql_prefix=$config_array['nimages:config:mysql:prefix']; #set up a mysql connection $mysql_con=mysql_connect ($sql_host, $sql_user, $sql_pass) or die ("Could not connect to MySQL database!"); mysql_select_db($sql_db, $mysql_con); # Creating the tables we'll need # the images table $query="CREATE TABLE `$sql_prefix" . "images` ( `filename` TEXT NOT NULL, `name` TEXT NOT NULL, `dsc` TEXT NOT NULL, `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY )"; mysql_query($query); # the galleries table $query="CREATE TABLE `$sql_prefix" . "galleries` ( `name` TEXT NOT NULL, `dsc` TEXT NOT NULL, `uploads` INT NOT NULL, `comments` INT NOT NULL, `num_comments` INT NOT NULL, `images` TEXT NOT NULL, `num_images` INT NOT NULL, `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY )"; mysql_query($query); # the users table $query="CREATE TABLE `$sql_prefix" . "users` ( `name` TEXT NOT NULL, `pass` TEXT NOT NULL, `addy` TEXT NOT NULL, `admin` INT NOT NULL, `upload` INT NOT NULL, `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY )"; mysql_query($query); # the comments table $query="CREATE TABLE `$sql_prefix" . "comments` ( `from` INT NOT NULL, `to_gid` INT NOT NULL, `to_id` INT NOT NULL, `time` TEXT NOT NULL, `comment` TEXT NOT NULL, `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY )"; mysql_query($query); # stuffing the config into the newly created tables # images info for ($i=0; $i $gal_value) { $query="INSERT INTO `$sql_prefix" . "galleries` ( `name`, `dsc`, `uploads`, `comments`, `num_comments`, `images`, `num_images`, `id`) VALUES ( '{$config_galleries[$i][name]}', '{$config_galleries[$i][dsc]}', '{$config_galleries[$i]['user_uploads']}','{$config_galleries[$i][comments]}', '0', 'all', '" . count ($config_sent_images) . "', '')"; mysql_query ($query); $i++; } # user info $i=1; foreach ($config_users as $user_key => $user_value) { $query="INSERT INTO `$sql_prefix" . "users` ( `name`, `pass`, `addy`, `admin`, `upload`, `id`) VALUES ( '{$config_users[$i][name]}', '{$config_users[$i][pass]}', '{$config_users[$i]['addy']}','{$config_users[$i][admin]}', '{$config_users[$i][upload]}', '')"; mysql_query ($query); $i++; } } # put the images info and gallery info into the file if we should else { # going through the images and printing them into the # config file $config_file.= "\n\nSECTION!=!images\n"; for ($i=0; $i $gal_value) { $config_file.= "#START GALLERY\n" . "gal_id!=!$i\n" . "gal_name!=!" . $config_galleries[$i]['name'] . "\n" . "gal_dsc!=!" . $config_galleries[$i]['dsc'] . "\n" . "gal_comments!=!" . $config_galleries[$i]['comments'] . "\n" . "gal_uploads!=!" . $config_galleries[$i]['user_uploads'] . "\n" . "gal_num_comments!=!". $config_galleries[$i]['num_comments'] . "\n" . "gal_images!=!all\n" . "gal_num_images!=!" . count ($config_sent_images) . "\n" . "#END GALLERY\n\n"; $i++; } # get the same next_id for the galleries $next_id=$config['galleries']['next_id']+$i; $config_file.="next_id!=!$next_id\n\n"; # go through and make the users into files. $config_file.="\n\nSECTION!=!users\n"; $i=1; foreach ($config_users as $user_key => $user_value) { $config_file.= "#START USER\n" . "user_id!=!$i\n" . "user_name!=!" . $config_users[$i]['name'] . "\n" . "user_pass!=!" . $config_users[$i]['pass'] . "\n" . "user_addy!=!" . $config_users[$i]['addy'] . "\n" . "user_admin!=!" . $config_users[$i]['admin'] . "\n" . "user_upload!=!" . $config_users[$i]['upload'] . "\n" . "#END USER\n\n"; $i++; } # get the same next_id for the users $next_id=$config['users']['next_id']+$i; $config_file.="next_id!=!$next_id\n\n"; # make the comments section # used later, as we have no comments now $config_file.="\n\nSECTION!=!comments\n"; $config_file.="next_id!=!1\n\n"; } # make sure we can set permissions properly... umask (000); $fp=fopen ("$config_file_fp", "w"); fputs ($fp, "$config_file"); fclose ($fp); chmod ($config_file_fp, 0665); } ############################################################# # # GALLERY FUNCTIONS # This seciton is divided into displaying and manipulating functions # # DISPLAYING: # # list_galleries: # Prints out a list of galleries. # # gallery: # Prints out the gallery in thumbnail view. # # MANIPULATING: # # get_gal_images: # Gets a list of the gallery images. # # get_gal_info: # Gets gallery information. # # get_galleries: # Gets a list of galleries. ############################################################# ############### # # DISPLAYING # ############### function list_galleries() { global $config, $http, $_SERVER; if (!$http['orderby']) {$http['orderby']="name";} if (!$http['orderhow']) {$http['orderhow']="asc";} $gal_array=get_galleries($http['orderby'], $http['orderhow']); # see how and by what we're soring and make links to sort # the other way around. if ($http['orderhow']=="asc") { $arrow=""; $order_switch="desc"; } else { $arrow=""; $order_switch="asc"; } if ($http['orderby']=='name') {$name="Name $arrow";} else {$name="Name";} if ($http['orderby']=='id') {$id="ID $arrow";} else {$id="ID";} if ($http['orderby']=='dsc') {$dsc="Description $arrow";} else {$dsc="Description";} if ($http['orderby']=='num_images') {$num_images="Images $arrow";} else {$num_images="Images";} $gal_table.=<<<___eofh ___eofh; $i=0; foreach ($gal_array as $gid => $gal_info) { if ($i%2) {$bgcolor="#cacaca";} else {$bgcolor="#b3b3b3";} $gal_table.=<<<___eofh ___eofh; $i++; } $gal_table.="
    Galleries
    $name
    ($id)
    $dsc $num_images
    $gal_info[name]
    $gid
    $gal_info[dsc] $gal_info[num_images]
    \n"; # leaving hooks in for templates later on. if ($config['general_conf']['list_gals_template']==1) { // make pretty with the templates } else { $gallery_list.=<<<___eofh

    {$config['general_conf']['site_name']}
    Image Galleries



    $gal_table ___eofh; $gallery_list.= "
    \n"; } do_header("{$config['general_conf']['site_name']} Image Galleries"); print $gallery_list; do_footer(); } function gallery($gid) { global $config, $http, $_SERVER; if (!$http['orderby']) { $http['orderby']="name"; } if (!$http['orderhow']) { $http['orderhow']="asc"; } $gal_info=get_gal_info($gid); # making the dsc and name html friendly $gal_info['dsc']=htmlentities($gal_info['dsc']); $gal_info['name']=htmlentities($gal_info['name']); $gal_info['dsc']=nl2br($gal_info['dsc']); $gal_info['name']=nl2br($gal_info['name']); $pages=ceil (($gal_info['num_images']/$config['image_conf']['max_page'])); # make sure the kiddies don't say "page 100 doesn't work!!!" if ((!$http['page']) || ($http['page']>$pages)) { $http['page']=1; } $image_array=get_image_array($gal_info['images'], $http['orderby'], $http['orderhow'], $http['page']); # making links for "previous" and "next" if ($http['page'] != "1") {$back_link="Previous
    <<<
    ";} else {$back_link="Beginning
    <<<
    ";} if ($http['page'] != $pages) {$next_link="Next
    >>>
    ";} else {$next_link="End
    >>>
    "; $end=1;} $colspan=$config['image_conf']['max_cols']-2; if ($config['general_conf']['gallery_template']==1) { // use the template } else { $gallery.=<<<___eofh
    $gal_info[name]
    $back_link Page
    ___eofh; for ($i=1; $i<=$pages; $i++) { if ($i==$http['page']) { $gallery .= "($http[page]) "; } else { $gallery .= "\t\t\t\t$i "; } } $gallery.=<<<___eofh
    $next_link
    ___eofh; #set a column counter so it knows how many cols of pics to have #also lets it know how many images/blank.gif spacefillers to use on the last page if #$images / $pictures_max_cols isn't even. $count=1; #while there are still images to spit out, spit them out foreach ($image_array as $key => $info) { $link="" . "" . "
    $image_dsc
    "; #if it's the first count, send out a tr opening and then $value .= the image in a td if ($count==1) { $gallery .=<<<___eofh ___eofh; $count++; } #if the count is max for the # of cols that should be displayed, end the tr, and set count back to 1 elseif ($count==$config['image_conf']['max_cols']){ $gallery .=<<<___eofh ___eofh; $count=1; } #anything else, $value .= out the image in a td and count++ else { $gallery .=<<<___eofh ___eofh; $count++; } } # checks to see if it's the last of the images. (end is set when it checks pages, if it's # the last page of the images, end==1) # sees how many blanks images to spit out and does that, then closes off the tr if (($count<=$config['image_conf']['max_cols']) && ($end==1) && (sizeof($image_array)%$config['image_conf']['max_cols']!=0)) { for ($i=$count; $i<=$config['image_conf']['max_cols']; $i++){ $gallery .= "\t\t\t\t\n"; } $gallery .= "\t\t\t"; } $gallery.="\t\t
    $link $link
    $link
    \n\n"; } do_header($gal_info['name']); print $gallery; do_footer(); } ##################### # # MANIPULATING # ##################### function get_gal_info($gid) { global $config; if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "galleries where id='$gid'"; $gal_info=mysql_request ($query); } else { $gal_info=$config['galleries'][$gid]; } return $gal_info; } # grabs an array of galleries function get_galleries($orderby, $orderhow) { global $config; # makes life easier later... if ($config['galleries']['next_id']) { unset ($config['galleries']['next_id']); } # grab from mysql or file $config if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "galleries ORDER BY $orderby $orderhow"; $result=mysql_query ($query, $config['mysql_con']); while ($row = mysql_fetch_array ($result)) { $gal_array[$row['id']]=array ( "name" => $row['name'], "dsc" => $row['dsc'], "comments" => $row['comments'], "uploads" => $row['uploads'], "num_comments" => $row['num_comments'], "images" => $row['images'], "num_images" => $row['num_images'] ); } } # grab from the config array else { # id is the only one that's different as far as # sorting goes. can just read in the original array # and then sort it accordingly if ($orderby=="id") { $temp_gal_array=$config['galleries']; if ($orderhow=="asc") { ksort ($temp_gal_array); } else { krsort ($temp_gal_array); } $gal_array=$temp_gal_array; } # luckily, it's easy to sort by everything else else { foreach ($config['galleries'] as $gid => $gal_info) { $temp_gal_array[$gid]=$gal_info[$orderby]; } if ($orderhow=="asc") { asort ($temp_gal_array); } else { arsort ($temp_gal_array); } foreach ($temp_gal_array as $temp_gid => $temp_value) { $gal_array[$temp_gid] = $config['galleries'][$temp_gid]; } } } return $gal_array; } function get_gal_images($gid) { global $config; $gal_info=get_gal_info($gid); # if it says to use all images, grab them from # mysql or the file if ($gal_info['images']=="all") { #if we're using mysql if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "images"; $result=mysql_query ($query, $config['mysql_con']); while ($row = mysql_fetch_array ($result)) { $gal_images[]=$row['id']; } } #grab from the config array if not else { foreach ($config['images'] as $key => $value) { if ($key=="next_id") {continue;} else {$gal_images[]=$key;} } } } # if not all, explode what we need from # the config or mysql table else { if ($config['general_conf']['use_mysql']==1) { $query="SELECT * FROM " . $config['mysql_conf']['prefix'] . "galleries where id='$gid'"; $gal_info=mysql_request($query); $gal_images=explode (":", $gal_info['images']); } else { $gal_images=explode (":", $gal_info['images']); } } return $gal_images; } # MySQL functions ############################################################# # # FORMATTING FUNCTIONS # Below contains functions for formatting the pages. These include: # # do_header: # spits out a header for installation and non-template displays # do_footer: # spits out a footer for installation and non-template displays # logo: # spits out a nar3 logo image. # # create_blank: # spits out a blank 1x1 clear gif used for spacing. # # create_up: # spits out an up arrow. # # create_down: # spits out a down arrow. # ############################################################# # function to pop out some basic header stuff # title is the title of the page. simple enough... # note that this doesn't use any of the user stuff. this header # is only for setup and other non-user-customiziable things function do_header($title){ global $_SERVER; print<<<___eofh $title ___eofh; } # prints out a page footer for non-template pages function do_footer(){ global $config, $_SERVER; $config['powered_by']=0; if (!$config['powered_by'] && !$config['general_conf']['powered_by']) { print<<<___eofh

    $config[powered_by_tag] ___eofh; } else { print<<<___eofh ___eofh; } } #spit out a nar3 logo # (yes i know this add significantly to the size # of this script, but i didn't want to include another # file, nor did i want to link to a file on my personal # server.) function logo() { header("Content-type: image/gif"); $data = "47494638396182005900E7000002020285AC9E648F8448655A3848462436305E" . "0B031D3029F2E696182822D78F44A0AFB5CB6C2CAA4824141F1BA93D19380504" . "C7904BA36940EFD998974621131A188B3B21DFAD63638BB50E1613747376523E" . "B7665663200304A0BEBF1112136994C0593C3D608174544A8EFAF2CC47484A47" . "3E7C0D0E0EB1BCC258646CF1DFA4989CAC8E0E02738F8C37363A425A52442F81" . "AFCADF7EA0A6C7955D292F31722E85C2E6E25F1D0F0A0A0A5C7771E5C0795264" . "62FAF6D8C8DAE88A8C8D5F3CA12B2A2D2E21447A7D7D443E63B18A801402026D" . "9AC83C5D5173519D504E736E9ECDA984896E20113A2F6377AADA8B8EADD8D8D8" . "C8C8C8374D6544565536296080A3939093ACEDEFF1343E3DD0722C676D8B2620" . "4084948A4E6E62485C66DEA45AB97D45C2956D586F6B4B060291B5C0FDFEFAAA" . "AAAB2D40548082A6B6D2EA0C02021F202272A2D2697E7F828CA73330503B3A3D" . "567A9F7E74C2060606AA8F857D311F4D5256C24621954F6D653B75FAF8E0F3E2" . "AB2527297F50802F284B5D2A5A3A564C4E6A66606D721F1A378C3A51E7C88384" . "8485403E5AE0E0E1AFB0B15D4FB7F4F5F68CA5BC4D4A678AABB1A14C266A4E52" . "44312ED09B584F5E809C6676545C61A1A0A24B171478819BBCBCBD32465AC340" . "12574A49D6C0C0332F48242038D6BABA2C03038695AE5C81A7C6E6E23B365474" . "709A80200B4B4E4FC6320AB55424527699B6CEE7743B262A3C37413D54929293" . "1B1A1CCE9E9AC2C2C2992B125C2F2F1616184E2034A0A1C0FDFAEF607996926E" . "5AC583433F40417E8CA449399C730C043D56714E6A6AB8763F4828286D829739" . "52482C3C4EB6B6B66E4A528E325A381824E6E8EA2B27409899999EBDD8E2B66B" . "F5E9B863646675A6D8A05A564E11063E5A757886886B6E71303031A4A6A6723D" . "53C75720CDCECFD481368E6E664A6A88D1D2D29D5A2B595C7469787B3442508A" . "B1D8525659FAF2C2A5CDCE822646874E4A496580AD8368B16530AC573986B0C9" . "3431404F7192777E8DEBCF8C64647CEADEDE61272FB6723BDD9A495C5C5E91A1" . "AB719B8F1C162F425D72FFFFFF21F904010A00FF002C00000000820059000008" . "FE00FF091C48B0A0C18308132A14E8A4A1936910234274E864A1C58B18336ADC" . "78F0A1C4696CD82819A924A44993244BB2F938AD22C79730635AF408F2E1B367" . "AC7AF4B8B228D7A29F40830245A433C6CD922357467429B3A9538B12CDE56496" . "AB4C999F5798314304A5ABD7AF5F116D4594F527941E311C25553AEDA9DBA734" . "9FED5C54265756AE503259F2A12105AA5E2E80AC8955C15685586B80B8C0D248" . "9F06439632750B0785ABD6AD31CC9154CAF4AD67A82D5921AABB686B5E671A4A" . "00C101A0B5EBD7B063BFC601A4043667C8A25416CB2C1C0A36464A42FC4CDC20" . "44733198D5CD0A059921547C58CB9E4EBD3A8E35258498E9B69B598F673282FE" . "2B2DFE19E23352CB117573766ECD9CEAF0E3579F13CB8E8F59DC112162C5C888" . "91F1E4C9F4103C695C71556F56A092817C0C3648DD0925F89049385C21F28C7F" . "4A4C142047D39893462E762192883EB63868E289B1D9728E25E15008050A2080" . "20DC8618B5D4435DBDF9100F8AF3CDE1E38F3FF2F85A3686CC4219141E1821E3" . "703422141A88BD09B18690B10169E595410A198B064676B500062000D8E4404E" . "3C63E015E1CC130B95AE5989030E73BC29E79B3ED269E589756ED965383260F0" . "5F5B633674E32288F830259B000009279C71BE79C29C8FCE69A78FF1C579C207" . "1F5CFA010E7C18120577302E096880D398990B3389C08168A289FE2867A4FE38" . "5C7A42A4B0CE192790D4E1F041061938E0ABAFBC7E80853693A1208A9F2B05E8" . "441A5741818D7454BABAE8ABB1CE7A822DB6C86AADB58EDA4AE96B739C904105" . "0E2490C001E69AEB4005984A3361388E8099EC670D8D760532D9ACDA6A9D8E6E" . "ABE907D8622A70A6B24A7AEBB700C4DAABB90714E04A01101F80EEBA1FD040AC" . "6FA32CD959534E98632022869C80A89BAF5A8BA92D007F3058C0D8A23C30C1B1" . "CAE9EA09E526E0F0C3113B5CC0C419CCAA411451A0D002B21BC3D4214F8854A2" . "6FAB8BFA9B72CBD8AEB1463FB1401DB0C0B37A1BE7AE0E34AC892B60872DF101" . "AE4C9CED1CA818390B0660321953C73F75A3EAC8D266AD29CA2D53BDC6FE2740" . "64C3C7DF7B0FD64FCB03DB0DA7B8E616600C019A00E2B831C668B2F30167A0CB" . "EE7BF1E496C9287EB61453873F45C187BE75365AEDC9D8C68218104078120F1C" . "4394520A1CA5C4930D107C7CB2B2CB763F3A6E02AE00620C20470CD04517031C" . "0108013B47EC4006D2AD6146149914338A116E6B04F722B31C4AF7B4B19E0C70" . "3F7B67134F29430CD1C808498C6082FB260CF14AEDD9E80E35A68F9E50C1B9C6" . "1CE17FF203301EF296B7B3B225A00227780F006C91886E6CAE73455B08E8CA10" . "8504ACEA3DFC3A1DC0A2B606F3A56F04234082221431825F98700328DC4023D2" . "170F207CA26A2ECBD407BA4600FFF9EF7839C88118C490830118A36CFECE4BA0" . "6B2AD0C00782C0731971023316D18DD191AE4EDBDAA02DD6D00C17BCE27D2854" . "443D8660827A98200854A042134E4842F9C5C37E31CC001F5CD13F00E6801C6D" . "88A30EBB70040248CC1509789E025BB386DC986115C84A227A7AD08B27DECA51" . "A823DFF986300214FE62041CD8C2204A008B150CE1138308821FA8508A148E60" . "08817961D4B24100630C400439E88208DA700D21B8528762F0E11D0FA047D8B8" . "6016B358C02A96749169C4A00CF69006E99886C894C5E213E76B040A6120C624" . "C40307B1D047279CA10F3FF4E313CD78C3210EF1BE1126A10470B01D1C4A2006" . "6CB4410002C8412004410E2E70011B82C0C60E8F608C02E67153B1FEB103F57C" . "1187308D0A211DB3CB0AA205A7D660D05277B3452CFAF68A46FEA20954D8821F" . "C6D10F1C64C3075190C6623E108B6610E01CE3A8473D4C210739CCC314D89086" . "34F4310502B88206343840DF7A810D6D5862073B184020E8394B070831369E42" . "862EE280BD080E641A4B8CC29A50741D1764231BB16054B77405B058F0211E5C" . "DC0033B7804D3F70201627E84526CCD08B35BC427FC7A8472534D10B021CA204" . "2668442F9EEA825E94C00E7640450950710E6968C012DDB08410EC608C1700A2" . "7210CBE34F61F30164CCC212F2E85C424A5506449C83479C2AEB07F800876C24" . "B051095D433C1ABA815F445492CD68C6383E610B7DC2221E6BE8FEC5B5085002" . "07D8E2137545851DF4810D21F8C01289C804D01261094B980119DD508136F4D1" . "8BBFB8B46C657B9EC8A65302EAB5A19FF332881316710533ECD144B1E8056B4E" . "C0871248C30E25C314D59A11098746F413FDB8E62BF4C15A7D84C307D9B04509" . "147A8E7200A117828085633F15855964421BB03004643ED50DB2DC4B1A40C800" . "0DCA76C702E4117AD499032CA290087664EC9F478D412EA0E0021ECDE1A909E3" . "C3392063066CD8E24D27B32AEC4A4B053F48721083D8C22BEA118F68DE170861" . "5D430550810D6CB0E8B186D0C0797BD159DCC1411A4230042C28140543604164" . "D9A0C1FE129B00E87D373640A05E310099DDA36AC512423A01FE1CDCB3060E38" . "230A88B0472634F089812586B44D08C2169AF1892D48B409D8284534BBE1031A" . "E0A0177F434564A2E00354F8AD6A59EB201C107D38584061B9EE01402F7CDA35" . "73F10A5AD4C1A833FC713D105316110410D2074AF0A65EC002113D2114328400" . "04945D331ECAFCC51B9A81633F78229B3BE6447D08BD9A5E008106E578020A0C" . "D18B175F8B0F2E280127E6BA06193AC015DA80022CF60B80F066608679F429A8" . "A9E382A0E9421EFE24C8347692892F3B48BF73B085348EB4C445D8C339F95DE8" . "2B50785A3E6FE10DAF684217DBE35A20004035CD28C139EA715EBD96009C59E6" . "83D41CB08604D0C036DA4084254AB0A912440707BCEAD9B8FEABA38D59B8C1C3" . "D823C87611A1012AC5021500588310A0E00C67CC822CF6CE84215C90982194D6" . "C683F88427DEE08743342209A6A8471038C168831B1B0849D0423DF4810AA74A" . "9C0F16A781274A710C3860E11C9510C22CA0B073FD02F94DBC7A9483A411056D" . "F8A39F48ECD815A0902F21D902E66BC0E84A6B1A8E9F2022133E504D291EEA87" . "6670F5DF1FE480294CB186B4C102087330360DCE81063460021B7E712A4C35A1" . "89F725C10EE795861944A48FF266E303A62BA883D6300B64B023B21962480CAE" . "300B36DD7D0E6B8045265001047DD8C1125060060F98310B1FD8A1094DD87533" . "F8F006D995A2112145830F123E0B67405E35D9A8C71356FE60055CECE31A5E28" . "81268E510E63244111A610C2C3859009B2DB15C8EFA1138AE6105C6C7838F6FF" . "98461A98010B2AA9E1EED7711FFB5575255072F6501AB36005E35078A9E5072E" . "500A87C03E48600A68E00CD95002C8607D73A01A70701BB86009FBC008BE500F" . "93600704200529000E68F00465E5024696091AB5068B452545E2066F9772F977" . "0588204C54B26A27907751500261950DB1E503C8006BB46705E7400309F00605" . "A0095200525A4052569008A5D00BC445031BF85F42800BB8C07D6EA0015A2008" . "2930095E500FE420076FC0512EE80CD8803F8FE26E27A20F51B002C1B04B6DE1" . "046CC01525E07FABC65142D00D9CA066A7F701A86008FE47C85D516005294003" . "C7A009E7C00E62A00B6DD002DD370B0F475CD9B08117870666E0852BF004D7A0" . "0529E00552B00398B05A1C950DFA000B89800DE730575125872602071CA60991" . "C5060FB18774C726ABA6501A100EFA700291E0591C750E46880876B11EF5700C" . "04000E22800102600432C008CF90067F6106DAB0892570713E900889800B4F60" . "795A3086E480092550189F901D890005F60005DD90087CA101A8305D42B2066D" . "A709E0800119320D4AA01EDEC323615535C1482234E002B3E200BDA77BB0C60C" . "51E08604704AFC200355E00864E001366007BD005C25D68D25F004E0880B5680" . "06F35092D7500940E0007CD00B1A800C5D8173D110FE0EC8A00D896006D29069" . "3CF201F9B88FBAE804FF180E2542253800077CF001D2E02C88010797B2063450" . "00D2C0903E110596800DA72800FC300D01E001E960032FB09189E0029C4800BE" . "B00022E90698E00B985009CB7781EC178F8620046FB64463A16DA8000741C954" . "F9C80EFC08113F799798050740F001F6A50152D30B986233E5270D569009B0C6" . "4453690CECD00216A99536200658E00C99009625708198800B8CE00668E0065A" . "40037C8005ADF82996200D801909FAF0668DB90830883B2E30720C820379C98F" . "0FF1930189226AF054276007DD6008D5B65F1970005830058030058A99886862" . "091AE00539500517B9953B0007BAA799404000F3FEB002A28006C5800976250D" . "C49209B0700E50152BE55502AED6771AB75F91678F26A29396A009F7D7127B18" . "0E759766D9A0949C300BB0900D386007B1900105403CFE3000C2A005B801053C" . "010566A001FA400EFBE0011E90063BE00A12D20B5BD80BE4200A68A905258951" . "B3A07E458903B6900D4C16556A0004DA4021B0205E1BE897ABB79318A08BFE88" . "08E150482636071FE0024A59027A910D6A500242E60A81D0053920002D500CE4" . "B0A0573077DA6008113AA1AC509D193AA44080055AE00B6E500C5A30096E9009" . "99800D9E7502B5B19932E8231F900D4606329B1856F0E920E5A60D67B08FFDA8" . "04E11005D8805997520158205E70008E3F8A75FE802002E8649546500C39C005" . "EDD8A0F26807E450051E20062E5024AC061D34300EBA8009BA900276500EF320" . "0473D50B9C4094B1B029719201D960072EA001504098B8A7943C5209D5479FB8" . "A9872800053E702230362E0E405B1F0007DA800CE2656C07704AE8C40F15C908" . "2DD04E0DD4A0E4790ED7B00F624024987868AC8374E538098D7008340007E104" . "04A73A382E73A276D03733270D258268B4181F45320FFAB8972041060E64220A" . "B3300740005310AC9680893DBA33C8AAAC16F90CF0D00239E003D3B344882095" . "29700D1A250451800A38A01A9F700821750EDF540A7EF042FD802999C46749C9" . "0152A30FB39008B2F58B426206289002B818FE2615C1068CD00D516070F26129" . "0B732E053005E790012EE00CDD700E1F00047070AC5659050170911EF00CCC7A" . "B0DA1005CCA007572095E4400ED9F1B361450383F006EB930487103BBC165FFD" . "1004300003F1C007B5D11E7CA00FB9810D6BA0069D459BF2C17A892005C1806E" . "6C2010D360049FB2A7F2A13035D33058F00295B0A63EAB0F9B85050770042270" . "B4483B0B1EB0005C700D62700D96E0B4DC25936E3865C3089815D00CB2B34DCD" . "E0099E806383400530F00B21100991C009C20604D8205C1A00A02BF90142C276" . "CE500ED6007778AB04281005DE55298883B358B03304B003AAEA03E1200DAA53" . "0207000802100001800C1E800C21E90C5CFE2004930B0BB3C00C5740020B1B5C" . "C2D8A3F9F5097E4074A5F00641E7094120B6359007211002900007CB00073F33" . "0B107602281A0BED1A1F91A10167A097F8E78F8C00343A6A1DBDD2350E3336C6" . "200DAA6A08CE329CCDFBBC64509336450774B0043E700DF2049799B0443E610F" . "0E4922D9E0021F3008CD507842C767620B033F9007DBB00EEB700FCB10024B10" . "0E23026475859328920DBE3B05F1AA044CC10620B000DDD07FD611BC097C47A8" . "200D154024AF2A83DD7804FC00BD36D50EBC1001614004EDF00D1A20083B2004" . "0CD9133E810C24C259B6704D7D8663BBE6073090077D8007120006E2D00AEB40" . "079D000B9C506D4C660BFBEBAE55760CFEB9EBB24765048E0034F9291B20572E" . "64333605800580A0014DECC06C8B03A870002F30C501C00574D00E9250081300" . "0D444009D8500FA8600CD82021B0762A645C351C7702A48B6341F00A2C8C04D4" . "20016150083A1001BC200BBB1009D8B2997C4C257CC0613B409FA3807F0CA104" . "20901BCE9061E282C0780431AEF075E4B0062E000BDD4022684303C620005550" . "053ED00EC3000D4F3B0133400994C0018D9057FA908C76810CCA0B21FD7002FD" . "80635BB0BE3080046FCC041250083C100D3AC00BEB400C1DC0079CE059882221" . "B0700C52B04B65967FD4285C7D88C834732E14E6306D3505D8609A9960B222D3" . "0B34800586CA0F42F00D12000D2490FE0BD1A00078800748800490300491C001" . "4B9008F6600F6620B26AC009F3DC0FCB1004CB00037FF0033F400DF7700A60A0" . "027AB0083AF00E4C00019110026B00B70ED20B1CE6C3A41626C6A10418303D89" . "40BBB1A130162D310E435B4B7C1BE120256AA0697C70005DC0052D200412E00E" . "17800E2A2D090D40087DD00748B00DB5F007C9B004A0000A441002CB500486DD" . "013FFD077F50038E4D08EBC004B4C00B7B5006E8000D146000B520D554DD2038" . "9008B3760C75CB4BC6610418901BBB1AD6F84A61D34C00B4951D63650715807B" . "2E600B34F002392004BB200EEFF005D1900B7BA0000F4008C4DDD284A00EF740" . "08ED4004EB500B10100A865D0DB7FE700B8EAD0CC45D07CAA00E77A0004ACD03" . "17F0007520C345B02A62E70C9AF0BF1FE624422C0AB97159B091C8363339AD8D" . "0A0EF71844BA92320804A8A00FE2B00E0DC00DBEADD2C24D0B16F00E60C00BC3" . "400DD9AD0CEE400DAD500D63500797700FCA50E1CAF00EC300060CD00077C00D" . "DE400FB9C0033AA00A7530061DB0D66C923666A00F67100CD80562EA66DA2B20" . "A625361BABDD308D6C57C6E0700F47006B8629D9C00990B00E8FE00E0A5008E8" . "5006D13003A9400BAAF005F4600F85F005F8700784800F92C00B14C004EA5007" . "F8200BC3D000AA2009F4300153CE00DCC000FEAC073AE00EC00001278EE23C02" . "0499800C1AC0D0760AE32A071CFEA3B002AD1790E1A2C817ED0A04D05CF48D0A" . "855E0057070421C009AD200E60000D2A800E3CA0E4039E051310E224100DD090" . "050CA003D1300111F000B4E00EA0AE030CE00D13C0037AB0E9D080E628AD07F4" . "E0E663100A728E22B1105C86500052E0614764544725C45D3D567729D68BDC30" . "60435B90B3570480050F430351DD0A8FA000F4800EE8100D3C900B24900FA9B0" . "09BEAD07D140027A600FF9000685B00824000D77F0000A10EE85E00DBEFDCF24" . "B008C10DE049AE020C700AB55E04B7EE201F10193E70DE81FCD04EC2D5A3D0AF" . "DAB054E1B23049EC307FDA56AE8D0512EF0AD91009AD4001BC50EDD15008D0B0" . "EAE8F0059B70073A40023CB0FE0708F0CFF9F0E9E24E0FB0BEE917E00D235FF2" . "084002F5DEEE7A8000BCA0EFA130DE28F201DA409EE57006D60048C80C155CAD" . "0B9161066B92AA824ED63723F1BD30CD10D337B55007EEE0CF24F0EE59A0033C" . "90EEDC9005F490EDD60ED059C00DF9100D7A10DC1FCE0313A0001FAE077A800E" . "9BAE0359B009DEB0072A1D01B4B0EFFD2E1FB630ACB010F4D6007B7A9E10B989" . "016DD0AF89902F0B9F381486E36193C47C1009B5D00ABC8000710FF2DC80D2B9" . "500859A000789F0BE8300117A0000C90EA1EAF03D0B007E9FEF9A14F02A4AF00" . "65EF0D2A60D95F400B0600013CEF2040600640DFE29155541BA1874A300A072F" . "A62590AA1980B38F0F31CEFE2F31D01609F740015F40026580000AD0EDD5CF03" . "F4A0001790D224D0FDDE900F3AF005DE000D943E011340022AE00DF65E06E19F" . "0FE3AF0317900FAB4E02DF9DFB275ED5621AF82DBE8F006164DAB47F050D1E44" . "7870A0110CA360A19845EEC4890C15121C28E0AAC08103093C72CCE882D80D0A" . "1748948996EF0EB70BE872A9C8976F4F2E74D0BCE59BB0071A036F2AF4A003AA" . "83DB26051368DAC4B94787027A7AF4E878640042073500AC5EC59A155BA64486" . "CA6109266F9411364E129E45EB641A080CAB6021CB64890645070E2E6674A531" . "6FDE0340F85C6A35231ACD420A70F24099CF5B211EE8E8E950118D1EAF07DCA0" . "91C8A5279AA454B4B831FE760C6D82646F0C74F0D033C11DB0A955B3BE06B0C6" . "D9AC44428E9DB1260F83926966D1FE46E8840DC338F312654226ED4306BB1731" . "1680BEB1E39A659798B82B84EEE78409E878D0FCC2A025CD68D174F0B2708A96" . "8299B926E063C1E2C17874E50B51567501B58A61375AC3CECA8E4CE292A60029" . "AC590503B20802AE418384234E0C583299C512573260AEB98B3C4AA0AE0A6281" . "A09A3AF08146853DF65021A7C62EE0C69B09F42041A7616801069853DE298404" . "742E68A0C653C09880071EA2D9C902166891241A3D10E80F82225C03900F67A2" . "40C610028E91C29F38142CCB412F0B524B09104691E79AE36631840F0C33ACCB" . "C30C3E38A18350C660FE828261225080175E2E882C9F061A90841E7A2411A70E" . "03C618C3803A8629A4107C9830C000602C98819E42083D051803AED3610268C4" . "A926942701B4458359E2D2008B3382016714107863F0CB2FA751C288515611C3" . "99E332D1C0010C29C2F0033871C0A108391365828953D47B278219C459D60271" . "C4B1E0863120C036C456A63514DB316E90965A26AE45F41E717659C7BF0E8A80" . "0D076990A1CD0754CED0243757799335DF8216C2200E61C8D1065E64B049E004" . "62899D638EABD4303614081045F4863AEAB036E26AAE9DAA033943A9A63A0842" . "0965E3312EB90463901DAE86E49047C5EA8377A974A692DB8261674B817CD337" . "DF81C424931D722CFE813713216850F8353518367663871DFEF8E393D77DF2E8" . "86352EA2EAAA4F5ED96A8DA966D9AA3534C804666954CD52AC5707CA39ED7FF8" . "1D051C9F819EA5C2124E80AD2AA9AB5E176AABAD76ED68BF19FEDBEFAA0347BA" . "6B1C4A98923667A429E70C29C2BA176DB5D51E880DB6DA66071B1FCC083B1343" . "7AC101400008F77B74D1A1CC0AF58517C6010E213AD7C607C6B1B4069C2D5F65" . "23D6C9D50E93AD38C0F1C78B6B2C398E4A434AF84074E59767FEAA0F4A300499" . "2890B34483126E3BD0760CCEC67977EF7766A8677F043184F859A288A2FA5E6C" . "29BA79F761FBA0176C2C8922EE442C31A492C63509C69F556EE74DF7BC37C0CA" . "89A921AB00DEF8FE0CA12B78D5CF0C8690462FD610BAF7896E0E6B80833E3677" . "BE5325C21942D047398EA1892CD9CE5520C89DE406B842854C6338BE93073BAC" . "118C1D606381668057DCA667065808411A76E84536F8108B6111EB041F88C51A" . "B2D10B544843039BA310FA0664066718A21EA8501509ADC18E558C627B4A8015" . "0BC57816B5B8D0086322933CFC118C604C41104F8485367008171DA2CF8E77C4" . "E3F9A6C7154B5451039520C0FE1EC70E7088E5846054CB1815891617B2414C97" . "5B853C80178CC749C10B959086103420843E3AC3939F04E5270DA1016CA4C00E" . "76208026E8F5389AB1431E5DDCDEABC2B8485AA645386C70245B1A722B49B2C3" . "1F33A4A4143488314C556AA21CC4342632A5B04C36FA831DAEFC9F1741000223" . "C0CA0902AC6536133290029E1103DF1C451CE2200F7282C36D8444273ADDB64E" . "728A330EA3F0E2F6AAA9841462539BF74C4BE55C48CF5A795397DF6C0838013A" . "50B650138CB8AC676FF0B9D09C71B372B943E841F9E948304A348529E4264335" . "3AC6DE5C532D1FE5264837AAAF8000003B"; #convert the image to binary and then send it. $len = strlen($data); print pack("H" . $len, $data); } function background() { header("Content-type: image/gif"); $data = "47494638396164006400A50000CFCFCFCDCDCDD8D8D8D1D1D1D5D5D5BDBDBDC1" . "C1C1C5C5C5BFBFBFBABABABCBCBCB3B3B3C2C2C2B0B0B0C7C7C7DCDCDCC9C9C9" . "C4C4C4BEBEBEDBDBDBC8C8C8D3D3D3D0D0D0BBBBBBADADADC3C3C3CCCCCCCECE" . "CEC0C0C0B6B6B6D4D4D4B8B8B8B9B9B9C6C6C6CACACACBCBCBDADADAD7D7D7B7" . "B7B7B1B1B1D6D6D6B2B2B2D9D9D9DFDFDFB5B5B5E4E4E4A9A9A9AEAEAEA6A6A6" . "D2D2D2B4B4B4DDDDDDDEDEDEAFAFAFE3E3E3E7E7E7ABABABACACACE1E1E1E2E2" . "E2E5E5E5E0E0E0FFFFFFFFFFFF21FE1543726561746564207769746820546865" . "2047494D500021F904010A003F002C00000000640064000006FE404040101810" . "0A868301814828168001A35038341C85072422391026100925C2504C0715C521" . "10903802148AE5725960320CCD8603A9503A215E1402162314071314101D2F1A" . "232A131507121B237D10292F071B260A1A0E140F641B0908441E100A060A171F" . "0C11201C07140A19111017068114156C214C111F071A00220E236C0C03C30224" . "25061F01072003162184100806180904047204332288112F0A11023A15420909" . "221B01080C0E1A1A540323230E000509061A15466CC8A341DB1F040E24243041" . "EC40840427208818E1F00016065B20AC21C046000A1401003CF0A0C100831014" . "100410510282400329221C88396100840D1E4498DC6021C0FE2D023B5A284120" . "C142867F1552E5BBA02061A0034252282080055F860E48429C8BD00184010805" . "2040707042978600621D8DA8E7B2820A122456084025C298BC6100018C10A101" . "96021303F01D38F04080A56A1B20B499308140820C660E0C28D041C2000F8022" . "5430F046820406148A216390810208352825B03851E0D11605AD0F58A82002F4" . "060D2232ACA140A0198916A81450902093822500160454B02096C488D9163464" . "A8A001456206156844503462A40506060854B86A80830402225281C820C14502" . "97C6216838E7C00102B1B45EB81B81008F99012454100102C30C44010A168810" . "4200289410C00A0130970102C3C9B6811F245840200300FE54B04E05DE1C10C2" . "59EB8CC0000A0050604068735530C12C3344C0812271A84894431198308C490E" . "704000042BD607810503980683491A78800204C8C9672203681190A40A8654E0" . "81031665E0935E7C0D10C3017958F086076206E4450616A8408108CBC141C092" . "C43C40403563A1E5080007B090C2011548C102079C6D80040314D932093119E4" . "02A61C1060340200009CA50F038345E741A40CF0A49B581E8CF0190021ECC386" . "10D109A40105805AE0C10C828E20C0056CCAA68283274ED0A1068D8DF182041C" . "80501B1C15849A00070815C0C1087810F9D7079CD13300286379B9C1B426C9B7" . "8644C886268403A01D00C1189F14E9E16D11FC230005FECCAE33117E1174F940" . "00230CA08E081ED0C0833414CC03528F0870B08E121F9CF0C105059C15120232" . "A8E180581A0512E93022501080232A0880915822406A40841064300208120000" . "D62C0653640F463649B48110E348C36605026C10810A3D0C0000508EE5610202" . "166C70D92B0B1FD0C1095398F04A092248C3820C21301410032228C001991168" . "0035099132A81105A14610C006F515708C09865844C006498C67A262B0E4C581" . "08021020D331562AE6810A1FF546422E25D8CC9701264430A14D0534D000020B" . "683342050EB0C0E3606E784D4C1C22A080CCA5428C2093050EF18C960721D884" . "0001073071A5CC0B5A10A903036D712AA4244C64B3FE028B1F13D8042AF482DB" . "080444B7B25E20E838A17C40AEE2CF42278420023E5C2D50C42C315010431497" . "A9A0C167DF1AD00504736D7008000A84102908171A50C00633884C2434372911" . "C774D48D10C2B71E143040092B78E0D0008681A7820ABF5BC306E4D1010ACD89" . "020EF88009FC218F76D9431E7108812C5214834BF5617EF21BC0273460811558" . "4055FDB2480442750011C8402531B000018400AF0C6C612D164900400AE0353E" . "91E01023884162A8F228AB2D6C1EAEB2046C1830851194C0010A884501149000" . "2C41292901D01E053400811808602E45D2DCB332800A02900902285887055C11" . "8208E823020A33060A327419AE01C00011708008FE2E80449E712B1D04D08703" . "3CE481040C667A9D330B5A021008131480287274A1184AB19DD08CA0031CE090" . "462E8302325540021980C7766E22000038C003908981019670801128203AD978" . "050035D0B76D15200F9EF2470CD072190700A8021BF0CA3F0C71931A41293A06" . "1053024200B5E128821E78A08204A2868049F964380CB0401C89C0000F300E4B" . "07C8890748A700799C4686F1724074C4A7C1D03D201F6B3A071EC4521F9C3840" . "06B34A0CD72400026C46A00029C88009D8802E350C262707C845053830A30C88" . "4D020BD88E21F235052212CA0028308C069EB5140ECA41580820DA215C62B59E" . "C56083F1D0C03770E3800E10912F22F062D23EFEF8099470C6002CB88062BEC3" . "350D1C605806881769F2C19926784526EB51845A447880020841260FE8092FBD" . "441108844006016887460C30009F3800A26AB2C43C5CB2160D828F88BFD8C030" . "0660B90B20F01070C840414C9092E9CC21030ED8534914639C8274F32105FC96" . "642446013F26000E3AC1CDFE6C2A1614CC124C890A0B9600C08780C600411128" . "57D5220600D01CA35144020081EAE180115EEEAAFBCC47183AA08432AE88381D" . "88C0A54A10072ADC7301277985D58C7AD30F200B0103D8C0029C344C04CCE008" . "99CB17048E85120A5475416A32803C9D2A3D972424A7F9C89A580620130E6886" . "23538CDA3F368100E9742145DD8C01B22C80FE223830A003DDBC0002421082F2" . "28E154FDC2032C90B1263990001568E180985060CBF656D1B8B8D90200D0C4A8" . "10EC21039E84171936C69B5B8845024C42B08C0422861034200225E805E738F0" . "098F2D2C93702028C814909B3876CC3C0E0900964CE30A9B79E8830198DA0650" . "40CFEC7C6C6136B1EBF26CA7224AEDC372C7309FC7F0B196D6C0032D2358113E" . "00405A8B588924254081B7081AAA024C0C4F05204E003225810224CAAC1650C4" . "88B0900009705020163000BDF8C3A11532C0BA5E4BC360DE4312CD2922622198" . "A54E9220DA5B506A2D087AC400425080A42C910C8F50EBB35696180E840A0456" . "8643081C138704040F041F2818320030A0FE1498A0CB11E04814C600350DAC40" . "032C88814CBE45BC89C94C75FCD9041581B4CED03840A6D44122928DA082328E" . "210553E06268A888428DDCC2002078085A265D90328320010CA8C12C100000CB" . "75A20E0A00C097E6B4050708400508D1211254679C3DAA20422A8EE4B9427301" . "F0B87412B7E88B7446D04442C4A07722A0026478228208702E9C191BA503B482" . "002F4BC36A32E296D13A6B06B0E581031D18830296399611D8400320505D36E0" . "8A02ED6DB30413FDE028A5308B7C3550681D0889755DF8AD7C200480321C0903" . "482000688C800F9C06C0A53AF09E728107046504C17BC57A8165C06604329080" . "4ED1C600A11755023798030B72BB8455FED82C5272609D248C30A41268C3DF57" . "4D413DE3300F05C4805215088B8A35D89B199FBB691078960488B0B03D7CE003" . "E53201E700D117E110A969D0EE404E2960D600B85003ED95004A48818201F4DB" . "CC7E480F2055EC2D313DA8E35D20A603E09A123394B10FF5E19D6A7990C72179" . "001F2760A9715457895B48D0D2B448C0180E41862944EC9E9DC551079C47480F" . "9586580E4041754CF40D228A345F889FE8270692845176A051361D78A6079EB4" . "89ACEC012B908266AC4991FF2DEC1DF289233D38F7CA140C2A10167886D4FCED" . "DCAF609C0174CCF804D031B10145C093665C021A96339F00E0B2B37501027223" . "0FEA854632E21022101DBC20250C52FE0864051268A2091EA02484203855B00F" . "62B22613E25784820C216008FD96010A5229F231009E4102071003FAE50150B2" . "00DDE4070AA0118A0329D1573536F581282041812302266034A11205E2952009" . "285EBDB30E14E03313605823E00119524AA5631C70802528411105D06EA5441A" . "10170310003201B0448B631C2AD013EBF069A0470BC6410078902F3AD759FD81" . "0017303F82A3189FB165185000811051049201817113DB247CC3A1213DA302D9" . "3701F530226554425F9366F4C011B8A762010002B0752CB3F04E50D25D961303" . "13906412F000057002F9923116805082B31C0D801518110FDCD26E11A05E9C83" . "6C328129066656F1E20D1A143E5DFE960037A002ED22264AA085C772487CB15E" . "A76453C6273168940BB278001FC03D2CA05608B01CF7B43209707709800FFFD7" . "0FEBF5100980363C372391841521910066050F1A340B608325B3A117A72202C1" . "730133963103D004DE254E12911B87B0285732246AC6006E0816A7F4312BA112" . "A5030002208E13156D2C1007CF42443AC70F20D074C890010BF00114D009FF70" . "16A3E46F11D217F4608F55742A0AA06206002957B45E7315553290021FA80131" . "334033524ADEA01BD264875D9027B0653387B4041EF0256BF12308B033AA630D" . "90B16509A8111BC801E780001D200314E00106506666264786104736484C5693" . "022A9131602400F737422AE382FE98E45909C201D21012130129897100B44329" . "78506D8EF60975514AAD271B0B735136F51596A67301050229006D8DF3025304" . "0B20601C1EA06272141AF4C251150976389113089042B925098351003AA201C7" . "221F3DD3336311772180027CF10B08B01D5827021C204722F0511EB00243D24C" . "096800B31463BAB1594C742A11C002E765023A010226553561460A94D2179712" . "59F92238623531190057D076161A011637461CE55108E41503B664352C900031" . "C05ABFA03ACA302201C002144249BD500D391407457501323470635100352052" . "1FF80282D72B80E20871C02B91350E6F3423B001473727138983445022131C71" . "4829A8187F62002EE445F725FE2267513479010A36514A31960FFDB61D92E101" . "0F306837671F09004326C019F5F0307A644820900F70500B686587DC121666E4" . "041793009A7000C42282F2C3411EE3194444500AD52799D449F36065A9300339" . "C13503C037E435001DB040B103171FA40A8D2282A5C38F19C09387200906B530" . "12617FD6052F42770183910112940B4C1408BAD1237830022C5000415A5B0C01" . "077A21011EB00152221354E86FE8A15D7A6002ED730052A62A62C28440C2005D" . "905B0C800126211C6F201630CA015696471F200F49D0059A9353CC4145245654" . "CDA7110B631FDD34235C130212D02F6FE37F1AA2131BA08BB2415D67F1492340" . "4795603FE2130FB2D73B0BFE223E16500B5DD32E90F14D19D07899E69CBD821C" . "B81147840626F01202EEB0053241208AE033C8F06C1F506656AA0614E16F9520" . "19D6D81F1C445767144CA5347168C124EDE27F13503F86445E400313AF20024C" . "70021E530012431109E0020F294EDC460655A3623E270CD94006981277512502" . "CC42010605678D540D22326A8F322911133148E400E2E50F29B801D3C3112140" . "02281059D5204D52D71AE2982552203658A09626806982E4250874164A874413" . "B96A08E449807300A521312A56001850035E3145080002425098C7A6223F2239" . "98891149D05D1180026F5201318052C6E26D95940165B1851180361101B33705" . "A875481990F68A650410FE62220F6F04875882A932317171D401F59100BB9730" . "4AD014CF374B31202038F055170A3508E001B460021B501B2AB10785D94C0220" . "2234B43C55451B1DC04A15403052A12D20F0027688958A670013E92D96E02260" . "D21A24D01747314AC64107F26300FAA3404A87100E9003E7857C4240288C23B0" . "EAA5015A88270405074B1802490124D9F42CECC5001B1A021EC001323500BA80" . "070BE0471B1002427702A5439948B92BA1D1A93A671DCB1B9A35F2106A300F21" . "51002ED00138E0471D62027D293160122CC7903E10261066F0513F42788360A5" . "2C12382000746B12666B000034A06217A04F23203618778F76484426F002CD64" . "5378121A3211556EE0FE106AC8002C0000674A2905300775700779B0077DF007" . "81F00D84503689B0088DF00891300995700999B0099DF009A120044460044830" . "144DF00451300555700559B0055DF00561406A66603F72C6066E000714E00CD0" . "200DD4600DD8A00DDCE00DE0200EE4600EE8A00EECE00EF0200FF4600FF6930F" . "A3500AA7900AABD00AAF100BB3500BB7900BBBD00B84040CC2400CC6800C5BB6" . "0C2C491226811259D9122F111333110135C1873A91293DF11341311445711400" . "A114ABDA14FCE00F0021100461100594100BD1100F11111351111791111BD111" . "1F111223518FF6F19B79B1177D711A80211884611871A7998BD1188F11199351" . "199701084E311851FE311555812C58A10B5BD1155F1116635116DC9916F9C016" . "8BF316713117A9301CC5711CC9B11CCDF11CFC371DD5711DD9B149DD4126E021" . "1EE4611EE8A1199CD1069F8198A3511AA72122C3B11AADA102AF111BB3511B47" . "881BBAE126BED1021C332115D23318A22160D2211F1222DC59222792222B4290" . "D6F42214102333C26A49C41EEE011F96301FE2771FDFA200FA3111FD5106CA10" . "20035220A081200AC2200EB20258B2795BC2C95E02261C34266542116898266B" . "D226BC0127223127CC71A87712074BD0059155993CE2234082400B4324468224" . "4AC22493FA245132255542269B02019DF2293F382A1B692AA8124CABD22AAF12" . "2B69422B28602BFED4912B32A1277CE22780C23A83522832616603A628A0C11C" . "8E020059332995922498F23B2AD62DDF5235B6C40BB8D417E6822E06A02E9630" . "D7EE022FF2421BF5722FB3C000BBD22BBFC20BC2027CC6822CD13400CBD22C13" . "052DB6A443D4821136851613511AEFFC3121333253C40626F34A7187312BB312" . "6B50421E123333533337B30339A3013B137CE9D62FFF020D02433006A3596A6B" . "A50D031536851B12433116C33019F34661333665E3006793361E738A6DB30E6F" . "133773B338F8753779D30C7CE3373DF33326263444439947933479C2344E6322" . "513335D2643522803567B124B3D0355F033AA2433AA6C33A231421ABD33A55A3" . "2DB1132FE053FE3BF13200B8A33B13D13B7A501281333860613888A3388CE338" . "F300399D75659463390180390A261B9DD3137A053EE28371E5733EE93324BEBB" . "8C62B52202EB218E303F4D693FF8A33F11C03F266200FFF33B1F233CF74145A3" . "C4444F6902C9B33C9AB37BCF233DD2433D77733D18A122DBD33D1E10429D4542" . "2684422AC442C8F242D12743695743157043A5A44310C04398B2306A2D400464" . "404592400BB404E9FA40A0C13513243D16142C2E113A1BD4411F24466464460C" . "67116AC446762B3E70244774D44D62C20078A4477CE44729882764700CA23C44" . "45744449A4A84CE444FEA718524445568445C631E39BD7455F8402A1344A0462" . "4AA8D440ABFED44A330B4B0AE19AB47425B7944BA3249FBD941282A418857448" . "6E901B35CC4871A017902449155A49B381499AB4AC9DF4496AE94DB3194EE314" . "05883700E70482EA7431ED7425F05402F2E4A9F53418F79402F9B291C1E400C3" . "544C623016D2E1C2CBD44DCEB41D9F214DDEB665D6541FFF442F0480511A25B9" . "1D25B120D55D23650C26556A29951311121D03A72257155333A54FFCF401FE94" . "4DE320500425B0079550C641760D45444916515D750CAB6A5116005552A50455" . "154758151F5BD5CB5E6506278100623551657556BBE18C6C054123725380A253" . "1E93641AFA53D3501A4E4211B967543E41184AA5084CE52D2190586301158D75" . "018F254DFE9225DC9585405A95599BF5099E95E1A0052F9620011DE056F51B57" . "3BA2AD76159A687B1F87502470E05780F50FE330E3840546874544C3253F0A49" . "4801905CCB85125AA80F12005D3DF4ADD405A3D70507B8A10A3695E2A645CCA9" . "B55AAD454305005BC45435538027D3785BB9B55B8ED05BBF65F486107CFDF515" . "D1A341E9717F04C61C06C60108F6069A031E6EE2606110619C762C1B5061DDC5" . "1E50410B8F395EE5952FE8E586EBD55EB2F00F29E1FA5B4C5F116301F7A518C3" . "455E3546033756DA3A465145621216516DFA90645E162FBD6C646CE0124AF628" . "1D706119162130DA61FAD031F0802ABD220124660B1F86625EB36298A60CF60C" . "6332E6FEB56E06674010A8280E8704C4A3194528101125140B880C86C3680489" . "4018570DCA32520D42850AA45074543CC912EA00E170428E4240033814249100" . "6343A220E3E282C2A22944C32E4142236CC3C240C4634444634583252622AE49" . "03026F23C2026004E1600314C22083018202C0E102A262512100626480402584" . "2922452182412C4363C061036043AE0EE42E008A2081822201C404E4A3402900" . "200221C5443082E07B8082584005C12166A3C0A09462644D25C022C0818341C0" . "1AC00506064250B0D2078286081A328C48E040808518042C88285080C1200FB1" . "4021081003C2812D06404448902B04010D081A8148C0A0C6010A0800A0186142" . "C185FE050A00C43840608016071A409482802083031406247820500299054906" . "0674B1C60001834E1D3A7CE3102103045858DCA9D89040C3030F1914441241EA" . "4A321100AA3808A100C1A000073468E5E0808109060E222800045803870EEA14" . "481001C1C1081B17580CD86000810105030000D07048598503BC205828919994" . "0303294038B8EA40418C2E150A847230400301011B18901060E0C3080E10C001" . "F000A0C39108060682F805E280010D1B0E5C1870404181113224EC02C41CFA1E" . "09372C244031E0ADA30A141EC7D0B32F8E050701562C957020C4E0A4330DFFAA" . "E520320222F0800702B2B000057C42300182642410601F0836E0E0830F9633C1" . "82FE033A50A4B043C830E1A50E0C1881024302084B8310982A6803A5BE188101" . "0228608081DC664C11994578B3A28A0EB8D0E000BBB8B14B84294658E68115AA" . "8A800D0F0618E104A93E1BA1940D968020040EB0A140816A981089C6029E88A0" . "00C2448AA08305020820840A2AC880020E1040200259221801B301DCB440035C" . "2A68310211440041C0AC2EA073180E4412814F0A2A5029003076410185132B18" . "E100155470C089661402F0913D1848411E064238C034CDBEB24017D512028181" . "0B1C286A8208205428809D10584F8190321BA1332009D300C8104640214B1302" . "3541B03A001820062A059568048A2A008082485E38A00D1422022B0D0700908F" . "FEBD0C5832A29811D824F1AD0C443815D58406904002120E8881030B3C60A002" . "D714A887005766348E30A410B820042DC20A400206FEC0A08053BD4525830182" . "DAC029143E93C0020406980085683D2021434C11A8471A07F0AB670F81AE6020" . "03C540024182000A506084F5C4D0E75A72203861C6B92C906001B02AB0A0810E" . "300AC59D58B53A3443923AF1CCD40D0CD98500A0FA0C4190042CD84005252720" . "56915F0E28321203863A87CCF9E60361010638C094020764701881176398004F" . "091E28E083049EFC9311047E492081CB92E3204E0694FE26014336080037995A" . "54D9826B47F86C50132ED8E0061502952F3A90E62E00814B0C5780CF0368FCFE" . "2C80C22E30E0EA033E804000168ED9D502329749E0036B92A1D138000A801504" . "75335820789CA4D320802A48C9E7530D44801382183EC345B5CE04100085B906" . "608921091C605550388B6080020F38954404AC68B9390C10A6F0E8009A04881C" . "19985828C5022160CB1F18151273258003C340400764D03E0334C2110E100189" . "2230AC14D568541E990B04BC150E451820140990410A8CA581DD6C00018CBB42" . "D632802A3271AD082C881B675087190FF8647304388A094E16402081101BC6A9" . "0E0852F01207B0E0051450080840500F0FEC4382B1A0842E3EA32CF960CC0322" . "40807B229030116C602712C84017A5C581BD7C63829D69067660740057D4FE84" . "0E8B10D415ACD409F9B0420A01E0400B51D127B4A883058E33011540D001AD3C" . "225B2FE1CB80C0C104AD64803A78C84052BC6619D114A10026E0CBDC12F2B5AF" . "41A64121085F8AE6C404CFB0E72F82D29E0756501A045802112D438B5D205380" . "1AE4C6582F10110740C001E990880212F84AA00E4017C665C70077FACA0116E0" . "0EC3D4281771D04E6BFA60807C512964B7E90B0B12108312400101A5600019A0" . "C782930DC00328A800E5C210837AFC85259B3B8009D4462CCF5C014026381E16" . "A4A100F5D9AC0E19D182430C2396046CEB00728ADD4F6C860A90048005BE0C0B" . "0146E601FC402F2326D0C0B55C13942BE8110B6FF9123A1F4006058010FE6622" . "C81F563280430A1C403419289358DE42A7AF046004D0B940113290A5D975E954" . "2DE4C72427A8080B34845E349A0313723600480A000083B903041430832C4261" . "00B32B018206D001109140042420990518701FCB300003CCF9D77CC492500EDC" . "C1401FC8CA41AEB01C2A2584AA2A95477442C229076465042C28C0558DF0018D" . "4AC3144DD9804A3A81A902908200823AE97418449D03C0415FF219192B7A4A98" . "40B105045DCAC079B8514D5E8ECB7A152C83EB701A82043C26029D40451336F0" . "A400B8042F8C8302D752C881221D2D7506009B1D07B0907D544256562A001900" . "1000965080222160D3B80C53C1D568458B083841430A40019C1AC105FEB03A1F" . "50B470C87D2C87011F88039D1840B50605E0B581339F58888029525869348343" . "CA2342510FC2CCE30A8DC90571022584097820930540900528A39DC805A96219" . "01501A14A08D0F10047AD0AA1BF4BA031BE6750216E2528D26E144810B5340A6" . "C36402050690A1103CAB1EA600CC139E009B7738C40AF070CF3942400214C4B6" . "C5BDCBC009405892CB9CC080E89200C40AD001684CED171B954F56E892B00AC6" . "21489D684C05BBB28F0260A00620308012110082E63E712406D1A11F40F18857" . "58216F11400101D419834B58E42FE07B620544D0010D94A00217288030620100" . "10BC20622940800454C4BC3864A10213709D7648A0900C5461CC23D728C40854" . "E43E0724204D322082661CE02329C4A00211C001000C53520668712315DE40FC" . "3C32A127BE5200F879AC082CE6010ED062000471C50212908A1040E704F9CB64" . "025F208158ECD63828D8C0B3E9640D7524800883F986EDC8710A00E5C071376A" . "6E31FA85E2436900247A98833446E0813689C50A4EB24B7E12C0E9037C8306FB" . "B840064C30823211E5A57BC84F605EF04A20E921169D80AFF944323006B00000" . "82EDC2455CD0011C141B0015304111BDEBBA0AD461043300800474B101C3684F" . "8725A2800038050B000840594C2C08A3281004003B"; /* $data = "47494638396180008000A50000EDEDEDF7F7F7F0F0F0F2F2F2E7E7E7EFEFEFEB" . "EBEBF4F4F4ECECECE6E6E6FDFDFDE9E9E9E2E2E2E4E4E4DCDCDCEAEAEAF6F6F6" . "F5F5F5EEEEEEF1F1F1DADADAE1E1E1E5E5E5E3E3E3E8E8E8F3F3F3FBFBFBD9D9" . "D9F8F8F8FEFEFEF9F9F9E0E0E0DFDFDFDDDDDDFFFFFFFCFCFCFAFAFADEDEDEDB" . "DBDBD8D8D8D5D5D5D7D7D7D6D6D6D4D4D4D3D3D3D1D1D1D0D0D0C6C6C6D2D2D2" . "CDCDCDCECECECACACACFCFCFC2C2C2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" . "FFFFFFFFFFFFFFFFFFFFFFFFFF21FE1543726561746564207769746820546865" . "2047494D500021F904010A003F002C00000000800080000006FE404040201810" . "0A0602E08048280E050162B010301A8E0701718004220549E13021241A9402A2" . "51B158189785C42008602C09824122C81C245B05040B160E090900000907192A" . "0B171813061F1B200F1726020620207A251727180916081D061C7E19021C1E08" . "0A0322221C1658210E18080B06180616721291150813181219C5061A19AA9A0F" . "871B0C00191C1D1E0F11831107BD1F20180F16150C081A08AA101C0B79626145" . "9A16CE620B6A05A400100518250C040D130109405C088180408536B91A30E885" . "0103840C122400508740C20208C5225E9B2062C43E0B170A94F8106282850149" . "0C64B8D0808A280F13F0B5DA267141BF041962DDD330E041FE44900D09DCB982" . "C1CF080F4932462C3001C9B70513A0489185312A820F80300C28302042850D17" . "AE58F8C0B281D00F164A24202601012D020F0020B8F060412208124C44D02062" . "C207045F1738A002E001020020E70C380C60820012113C14B80740DA9C08222C" . "6C01C4E001840F254C5C98700C4409692220EC7AF00D4014A70F62F361174081" . "802A08466460C0A1A0877226000800496B8F44D606589A54E36B015433F45C5F" . "0850B84151C1264054F830A184C58AF3160C9850D1C000011AC86000600033F5" . "010A7E47B0B9A081090306462D60FD008484090A4CF440010FEC31C10413F503" . "0F3B3199D7D6001614414831724CA0020605EC57401804FE006341655A5CD50F" . "030D25909420F82D96C03500349040050E54C009010C0850C100000022C10715" . "C8719B000E35768739920CD081081A80C4178D1E5847005C0648B39106664DE1" . "D804E315A60501023826C01224DC8381000F9420C00518395005620E0025C01C" . "2C31F01702054DC2803842B9C1CB047619D0548F1F1816895AB77C501801385E" . "55A603662DC08B01ED14D0A36305504302814A08D04F5348EC919CA1A8740089" . "5D0270C5C81C0810B8956B55048000400726300208A9AA9341000EA801C2070D" . "5C204100359A9701151EDC91000642D95411444CE4C2CB075CD975C2271BC0D5" . "80611195704781258490470606401181268D75C54100FE1D1CD06B5744E45897" . "18021C404004980D32CA207504401EA42B2600D5AF0870A0C104111C1206060E" . "7C90401C161964C0021B8450E608E341C18008F91896070218BA0B511805349A" . "EA8BDD6C3C001F1324100208785C00427E0D18D0005745480047180123298834" . "9A4C5651187CDC838A20A1CD0CD1306444E1671300309001961CCC97C0621398" . "501CC763D1DA00B416600015045B0D9081B65106844785003424C10138B688C4" . "03218086C703E432410B2D0D34609305065460180211906080B6522C408206F8" . "381349B993F1D165048BB1868B0108503E0004657866C66DF33CF0455C103011" . "55DE21B0F46205214D14B2D7024430C17F0328EC2FFE8D04749DAA45776F9881" . "2E1F50C286C94C05B0182157E8517919624CA081078010524131118C200B069D" . "410545AA940E1B86E58360DF14002488CD017E1178ED87184F4B3A7B096C789D" . "DF028749526A066077A92921BAD8250AA96AD495E2867963C08BF2F680F144E0" . "215220004B14380AA6A52A74A5BA0AADE611805858E302268A488E48D3055510" . "A8804FF249186222819395D02DD79A06E6EA92A1054400300D281D0016039754" . "4521470D5B187E7C51390968C12E072AC201D2B61E1C49AE77A53B4C57D2C7B1" . "3C5CA11318A2DC127A02299921E04D02905EF9565304A640A0030373142F6E95" . "9C312DE31877B04009C700000D68400A6D594006FEC087A241F80A0A1A9186CF" . "82F2BC47E4011E7920D51C666837E760A0011F52C83EF05300C811C18741C1C0" . "F3CC631888E8E2721270515B8AA2005799300311F0430038C00149E4E8303CA9" . "5C65B802905D54400016E480146E08807E30623C9AFAC0BC16239701A0A229FF" . "99007F5C740675308014E7A94817A8B080362002316F38826B323099871DE211" . "0400818B64B6800068212A9311C0B56C5207B011CC75FF200107D6B6950870A0" . "00093055E4C64030019065149D94CAAA5C72007A41CA046C58465C1A393CAF71" . "683F6611C52EDC0095A71D409DE523C05F1A93800F30800150C9911AD4212312" . "91C23AEB39C214F09100C0E16501BD031C0944FEF0000E84C9001EE8802CC7F5" . "800CA4C751F08B1704C52082082012510C909E269671C5C3F0C10022B0915E46" . "E0183A2D46144A40CC217865067048021712F947072070101064A8A215705249" . "0FF04E4801C0659D3181097AC41EB29632037E7B40CACCD0B5C66440011C101B" . "09F4F5BA6110C3001020013E864182110C618E7518A2318CA10011E84B0D1C40" . "A489DED4812BCE2B65109903B20661483A19449B28B5C0EB7E94017278847D07" . "08011E9EA41F0291A003678207435AF481F544001E6370D4052A6000D65C339D" . "22A806093CB0154D54A4401659C67808F69BA8A54A011A98C310B8E2CE217C68" . "000CA040037EC58A0D78336A11908B33C202FE07AFD964B7F0B8427E9C112FB6" . "2DA00420C02805FC355E1ED66100DF3AD32830D08D27E5E743743AD642EAA28E" . "983122160FD14696C4201C04151002A1EC674E3C08006A34B23207E0CBC088A0" . "8EB0D8350012F0C010BEC0E04780200425D88E00DF704C865EA01FAE39C0991A" . "2090048C64105B8B193DDBD2DBFD2C00C518A47149F916333596683DBD50C243" . "A973C5DAB8E61D25554397BA12807A90E385581481DA0EC00849A002A305316E" . "041440020510C03103C8D221BBE1000A78A320774296CC0E290A0CBC1001D008" . "07055EECB20B0C03266310C02838E3291A13E203F5594333EF10093CC2E79D46" . "C58C0746F04E647D4315956B1D9F148219FE023162B8231801840300010B54B9" . "A20D00D70006961E26C46B2BDB3B5D7CE9D030643D4080B8B6003533E000F896" . "204620419D5DD87620021DA24008AA488E6577071AE54225ACF84D078E61175D" . "40A0B12438C028C95319781DC82430A6D8993D800E72ABA23E61B84448E61800" . "75EAA6845B39CC64A8B7B063EEE150C70AC141EE10C1F19DF8130771D1934431" . "010F44A017FE2A4C2E1A939651408244FB41EEE5200061265CB421EB31861A22" . "A38A270D430A3394C0BE5B95E1988A203E4C180022AF2897DE7084238D29555B" . "0E939F0BB0242C4A4832EF6CCE1AF248805E66791E4962968493542E03829D4B" . "128AA088900844187E3BD6B58AF03A67FE20E00115506D83DB83127857F90DB3" . "330FD90E81000804B7B10A80F0E124C0371355D9A6EF7CC06F341A06F6DC616B" . "C7D283266A2B8D6FE8A11FE28154845EDC8037D9E403BBE8894DD6D218826960" . "0460885F783B248110386A40C6EEDA909233A0DE0E835E5BB1B30FDD404D6DA1" . "A5020492009246D081AD282FA9CE38F4A5022007C495160270B4C8053E608263" . "768B6EFC0D4B31CE50861CC961323E59538EF430E09A20A1C07983479768A185" . "0BB8E12D94B3499E3A919F7E4469CAE7A9073046C1781B8360030930845C10EC" . "01F1CCB1009299870203B08B8754F8001EC0638268D4B5068C8401DA9200C764" . "13C54027C3D058D4412E71D113B6B6FE22362106BDC51A0A61221AA00E6DE12F" . "5F2245F8D65B02344C03126FA7B42278C00B497316935005061054229000C391" . "0022F0303FD7537E1605C0000B1C0036C8D70FFE1702D6F1062B573BD7B4708E" . "3200873347EC40395537119AD10F03221C69E6434F524DB533085125069B3459" . "BE154F04D225B970185A707726D2150C904917305FDAF13B39612825C03C5DD1" . "5B15144A3F670D08D0176F52132ED30FBC802C0B833FCE20786AE0274028171D" . "44044F137B957348796706C9F20862503B759137FEC2183FE44304E6187CA006" . "36D40436D70D74910127611321C05F81722F17830B63727572D11893B63CCC33" . "3596C81464020FCE211412617D7CFEF300532747E3010127562388E24ECC8223" . "54E835187408BDE22220910025044AAE67189521178744391DC2367FE0254440" . "04F9700515906285B73F3C9802239101FD803A21D001CB611805C000FA86011C" . "200219F000605478FD63438A608C675606C9120E1DE21A1B420257D00088E11A" . "A45400CC821FE2E047B8C01EACA18FCE5100C2434890231157174F4D40509033" . "1934831FB78116C7887874923200A0304700219060012A907600E02DB7C1002A" . "2080113004DA00064DF14346851FCEF02417208D62A1072BD2462C332A72C117" . "143743C2310A83C328BA506736991F45F1071B3219FB311BEC218B11323E7141" . "1E88841814200E79231A219081FE88B78D061000A273480D70027B61002B6002" . "05C02BE2311B16504A01405C362128D6810470A10612504CA8360E1330021BC0" . "23EAF02450F11B2036007760120660021B601755251C0113190AF00007B03F4C" . "81424F52425F521809E03A2A7109F0A47961B17BF39501AD90621670628CE42B" . "8EB85B1D300214700494E306E2E416AF471D0D410895033FAC21656C37800D71" . "01AEE30B6C000879731005901A0022020720020420021E8018E6B10B8DA40117" . "E58EB7E143A4321118B06731540283805178594BA1B830A6819AA2A046780123" . "8C0202CE310115001714204E29E082EE7428EFD43A0820625E807BC4A387BE45" . "999C124425E4196D593C32C2FE82C3615177D51746454D09600221E02758726D" . "8FD01B5DF20786712073904968810914C00F1BD0162C7310E3B55BDD5232BB80" . "210B700270301716910F18B07B87B002B170A31520025E454D02332E5FC20B85" . "C10B74627858B54A2450701C90361E2633BB722C88B0000AE09EF9102598F279" . "1E609A9D7426B71444204304324239A0F16324F262E967103787486E907E2540" . "6B5A60795DE3344C3A111270021BA002E4D6537C310BFA024A1A3A05D0D82BD2" . "8732A5429002637EF1A51996771EF541121CD30020660027C025871100DEA47A" . "C3B257EF585A5110445E7254A0B18D28401079233393B51820B0566C800535E2" . "3A05D10D26D004FD611F0CFE500027901F5907103525571AB052F9004ACE0101" . "CF080E0B4207AFD36012500229A00215B03061410839F70109B39FA90600E857" . "8C4A906CA5C561E1458FCA140073846328860BEA808B457700B8E81C71767590" . "90040BC00861E10D63E82F36070228A029486002EF052974C25FBB3A5828B32C" . "7F902333B40C91415C25025F214001A470268C020EBDE32F2290055CC60410B1" . "05D4A404FFA11539226383BA4400105EC842639DE13469F13A85171B87413DDA" . "D134CFE33F00C03229F90D13D02BB3AA023F37A1FA50002FE00181621342C525" . "43A4058DC10EFA5305F024403DD2352A03AD2EC20602240A86D0160FA001B523" . "0A902044BB2A47A41158FE51F0926D1305BC098025D02DDB8251F805887C4300" . "BDF6000EB0624551009C400916E02D7ED61FDE909482C05F6CC00190A036943A" . "075C512044800E4430460B008EA5D61F2CC815EBC1377130B23C6226C2437FDF" . "700804100228E000A1137E12F11F4E7932ED6A0CE01002771248DC51218E320E" . "00A50415E52D207056E27801631B5686A1405D6306651317BDF062FF81000254" . "0A1D707088C5270DA506E3E10695A3058864171B624AC199161690027C531145" . "510700906251522B61410BBC670229A03C3C01010D501176D096A9792C58B120" . "7A28687950012A40019F1002112001107016264001A25117E6E4253FD6061867" . "13D7E215C9B1172470FE7531814551703224134FBD627DBA1081CE611112B107" . "14E000AAA529B2722D739A0526001998E27F27B0021560021FB002D7A21BCC23" . "000E50862F930021EA379A503BE140100AC4237511352CF522A611370D2CA15A" . "7183F9E01CBA2017E2F10107201EEB81573E344DD4C4058A30A38182373DB921" . "1171040B81078807121B50ABDFE00C3E31C20B402213D935FD31B62A70A4DDC9" . "15F1417FCD7402E31B9A900217715123233C022E92458DD52379B335DA012D0C" . "C0328A7808A33082FB11250C101FC6931E73B00762F31FEC511DF692375B1015" . "BD630812E3137EC10283A05DBC504A9AF1060F505BAD8A62BF660B04D0020A61" . "0BB7C07210512069FEF33787410433AB72A23C4A04A002E0430C6CE0006B4517" . "D6F730D31856BA203972D0771640028272004741264B401D8EA2070402C0C563" . "18D644009F9037B1190121B002CE71CC1FCB8BA2B1016D600649794C6DEB0049" . "0000CBFA15FA807F8EF52663783201F31058572AE2D41FBA940226D014E49775" . "B6B01D1D4208C0A70B57671728A10A7E5601611415EE8439B152B974C00BB1B1" . "78771307428108E1A2CFBE600160D18415F4001BB00BBD2514927402F56902BC" . "1C022770562870278A204EA120020310B011F09A7D512049B010365701F0CB0B" . "5DE3430C60022AC0980A430B5EA3056EB04DE7413900E1BBF9A7781060580563" . "3C0426A474E25BFE6F6009D7A2C78631B6DA61012E6001F860A9A4EB2DD51C0E" . "0B50C19CB03229F06334FC26A3A0301B60244722022B45CEDB360C63E30F26E0" . "12ECB135B770279008788320959AF925F0D44364B94166479179E022E2C85A87" . "6050E4712C97B76FF15551F05B0132262F0B000214A01593607D3372136FD03B" . "72C20F63D622C714D40241012E9002ACB1CEA160118A9C2961D027977B028806" . "AD59B1A846000E801017C9534B17F0184E3596AAB122E0D0210074B77CD3260D" . "811F49795B79AB747709019700020E57DA314212BE56780E8002375200D26322" . "24B11D7E334726620673710220002402B22602A000D0720100A0B0C7CD0F3F45" . "3BA2D0232861FE804C917AEDE10124505A8823CF0446075A60B923E21C0A210E" . "260202DD513B2FC65F14700FC470002B700BB8E80BB8208087503A988131832C" . "17A0112882C030FD823ADDB0016B8041A43101A31106E3600621A0C9B9220C82" . "F63C965001A7F430BC1011940358A4941E7D406251D2A19A71092ED2B6B5C323" . "186445DC0160DCF6BAEC5101ED2609F41111F6EC05B9700C1AD022CDB400EEB8" . "57517D5B1F8023599204BEFB222CD107E3708B22A7B486500257011234E23298" . "782D4BF964B1311E3F272FC6109151F026EEF32412159FFBA30EA31033F34200" . "98A32DBDA7460B206204423D9010AB7AD0C8039B3614B00102D0011D10261771" . "14AC57316EFE748D176501D961002880144271150EC0280BC3378E51970A0315" . "FBB5073E4390E5730D6C57C87605722723054DF8C016414C79E3001BB00F196E" . "357631C26A7162A1AA0BDBA8372462685C660C1A304A57EA010A30B3DA7232F7" . "402605722B36E5179A11EA26D14F81F2952060088869134F6316F88552FC3517" . "2B920B0907366B33EC5D5C42C02007E1A18CF991368FD06B9020016D4B010A7B" . "1FBD6773246C7D25F08EBB35BE5240306C172EAC9A5A2BD03B2D7170E811010C" . "B0019C5C10988C31B4F0627189200F039E7470CB2D033FF1F7ADB28BCE776306" . "36E70B52411E7331E485F1CC7930D966702CB9907528AD4B2031121E62730560" . "73DA1528FE0D410B1F7B001FFA11BB151436760152610E476C22C32C512B1207" . "50700183C1072111F521C931196009D8B5988256116792DF5BE921F6E206EB9C" . "0123302100990F26C24DD7524BBC8048D6977543E667131031375242610C526C" . "D098E382CB6A8E52BD132874710525F43AF571041F4237B3C80621B056F5C12A" . "72B00644E07DF53135C4F42185C176C291822660CD54E88C64E2284F460CE680" . "01E2BC1515401EEA08907D93A0E0E02268657D52EE35331A5677F00917B05724" . "C03E20F1D9F0555B61A54D36790772C116E1A9876CA04DB1B10A1A105E338451" . "9707785DE217F731119EA80A6D6102186002622F0A2E8201EE490707EE73CD64" . "C186A3FEBB6C70734040F85C1689064662213006164CC9F8585C1A86C5C76402" . "6944820FE481B8542A0C42C5627900309606639C4820121882A9F2984C008FC7" . "C06AC22340C0E0A36EC12A61A1602202A0C121E502816DCF22C10CC0E0E2E3C3" . "02C0C2C042C2A0A120E191E081336FA20000C1E081A061A1E18200E3416280C0" . "806001A42124A421CC0F010183196521C283014142609920780EE095E082A184" . "0184A1A121AB04811657ADC06062203603E20098C10CA3A1C22143646002A2DF" . "A042013F13A47DC0306B81850B096A79C8F0A09A060CD0320048682103AC4605" . "CE3190430040B5047E2434481082C187320464ED120081CE8A5D13D4849450A9" . "12B5FE0C4970198383E1C38914203684C8B560412D0C0504247CD0E880981221" . "407C28610AC3800C17408C10C0E1C1CE0F12B8A57192E08205100F1208C0E080" . "E39E33023A40D0A50D550502058864C2B08C01A475194A5858E08002942504F8" . "30B34A8003876B37110808E988C384446C9881BCF74198A70FB69441323365C8" . "8157184238684000440566BD0A40E0BAA0D204010A0620F096CBC080086DCF01" . "A82760820166054848D883C00203C3861B7C92C3B6C2114ED2419408C7A04202" . "0012C80E7070D00359E5069A0218C00582810211E0452D9066D82F009B60ABB0" . "6320140A4278E0A00C32C0600E0930308101A42CF846800C12384000076A61C5" . "00FEDAA6B1A784301250F09569DC5900000F3C3880B2071A0041890C8D2800A4" . "5C2A98C09E6030E8E4825D0402608E062A2341994504604880114488E0AF0820" . "80E5820740D9050EF05EB3E0900B4210B0820F1C28CA000A0B1008AB0F40608A" . "318B2018AE8E60D6984002F70A580039E518A1863CDD0AC820820E4490871529" . "20A88815002A58800F81063061AAA41660E0CD0F05A085AD06FAA090C44DFA11" . "8104E490334C368616D06BAA128E210F8031CA28418B333C692B822460414005" . "4E982AA03704769232810044086000123AB8F32B0048882782014680F1959D34" . "1040040E2240258348B4992300072460C000600410C0A3266DA900840554BCA0" . "FE800300206080830AF82B000E46E84045A40C10EFCE7B1048E49A37A4C3F703" . "0A10B52A84A1AEC99280A6E6B520850624780416092080491A5D4550C0595D0F" . "D0C0031132A04902BEF4E8180466453857010D24D0A0803C06F872160B0ED8E5" . "2D5132510E280636F80B1712E7C300000E0EC88004059AC5458A598E78F32906" . "4E586A6529A4F00E5501AB5A31840ABA910E1E93D70940817649F0C05D12B412" . "61840C0278643C105689E08F093A3403010232E0A2D74DFCD080010EBA6E3382" . "42AEB16080234AB0C8300CFBE80313F9047062A9005001202A3808702330032A" . "012601034CF8D0223BA810D7CA104AF0CE0494C0693080AD5268F6C10E4810FE" . "A1037EB8D06084014894408A8D838BED0376ACB8000018853E408176BAB9E5CA" . "0244209BBE792B08051027204500963E90BAE7C30B949BE30A341641EB0D1058" . "5C0003A21AF0E22CC61318DD3B901E6060DC44E40B2001111CF9B9040838708F" . "030533187E3CD9EA0314B242095E3860011C7854379637821170E10217D84016" . "40508AB1348B2EE79A97014AE02D3BDC220DBD68000518350159AC0F1468A104" . "063C820B6938CD39BAD8CC26D0220E9644600425F30024D4902D00214052C1C9" . "D0017043020D1C20021AE8000020570A367C20041608015A0082860D100002BD" . "5240C926E02B02242061993082A832118F11E0EE0046080F0330901D26E8FE22" . "4219688AED8AE000102088012938550542F001595020051F8048047354809284" . "C004E348033D32D78192F94C2B11889B4054D4083C714D041A70171F8267C83E" . "3CE1020EC844DC3254857B7180040550C0CB3020B613880904DA981C15827300" . "0BEC2F0103E8862041B08884E802249A6944C726D080AB600006A24C80051C50" . "067BDCC2044AF865473EF1841318E3203759D102B810011F410003192080043E" . "C011A105C04B01088B8204A09A03848A2FD191C25A2CF72C41F0A11A0A788A52" . "24B0161E5D40402D6896062A329EC90DC8029B5B403401203A51388D010E5848" . "045AB0814858CD02CBE0CB143070988470441C49C8D1E482618056F522FE16B4" . "C0C41A8889800870606507F8930BECC0000194C400E2AB001E12F297CCDDD439" . "0038639C2210002654E066B6B8C61D1E90820DB4C090CB5B65311BC08207884F" . "0B37C2000B90B0081EDDB1031B000105C821AA6BC4ED1653EA842C1640012188" . "475CA368806A9E7884718C6416009A806A0834012E70C001E6488B09E9C180C4" . "44071B90D30D1FF2208B097040030A58D2483CC128712CA03529100F051EF0B5" . "03ACC2012158416C44192107C0C1246FB0C0049647810420F0170A81C2020670" . "80E72540900F306A1B4A5094CC9107026D62033A5A6485CD74AC0F61988F003A" . "D106162D9399A2920D2CF65A0A8418889803D09502CE708192A86D5EFE6308CA" . "091CF001966800BDC4306F054A50000F0CC032EE1D018A2660B60054ED460A7B" . "8A1A449782A51962212488400810F00115188608321DCF00B44287082E821948" . "C14D0606F0003E8A0C771258941D58988B2ABCC29049914F85A9018008646A00" . "757980160C0244DCC02004040881722CF0BC0360CA81F7D1AD06DC712E8FECF5" . "5E001041018CE9D6DE0060181D4280091018DA0A20C0030210DB5ED059E15768" . "B8600AE2E3303EC2230BCC874617C8C0BB2876AF03144D8644E8A88417B0B050" . "B0A4007A8346BA7077AEB42A84024D628D78565482D735B06410F04064516485" . "5E3405031303ACA8A671009082EB01E76926780000819B3E48021EFE288DB8E4" . "0044E8786721C1304D582A7C811304E08C11D815122AD1A7F0403811E4D33020" . "18C30798B68303D91C405B2EB0820B9460051B60CB3285C011F7646C57BCE140" . "9C27E644DBD58F032268C0064E050206D9C214B7008A4A04F0522462AC5C1258" . "048024600E6E14F608D16910723EF5801318806C1CE880B304C0917A1B2611CC" . "58861ACEC7969B22E088F09DC00518CC28260656940B01810310B5016D4CC008" . "8E581E0A167C1F04048D2337161A8F836110D048C742CCC0C0092E60020C74E0" . "5A260200CA3422EB0650CEDA27C003B8860139FAA420B82778C0F23025C77249" . "72714BA08432E4288BBC2E18027A4A57227EC6C6D1051604568AFE1B02683427" . "2A42600401787204826120E1447679FDBB407254B0164919E7012A280C442AE0" . "010574A02E01D000003272005B1C232925F80038761A943E5A204210208147D2" . "05992D2A60BE0860F011BE188CA490024E02780D9BE024B45D47105B09282614" . "ABF20951BC93C8AC981C6E1EC08100B01572200880B829E0472345C00196E920" . "9337001AC3C48602AEB9F8FED810A1B8F5B2A34A2003AAE871518F44081A4EEA" . "181C3D90F423C9272A56F82243ECB09723AF0C39C5C26DE6CC4B097577E22424" . "FA94E59641858E8E44A8057D5E559C64888E269D423C22908FDE20C179118300" . "CB0B001832571150FE023AB8E2B4BC210518AE0436E300D4E9FE1410C07B7A66" . "04BE2602C88F40D2204D7881C174E32616C67110C416CA274D12A09790AA9842" . "E01660E122C46509E6C55798C2FB4E22016EC6C23E2093E24C454E6BEFBC6172" . "180051DEC30332C51EDA0102AA421CD42B82DA2004AEC98ED620AA32A097C48D" . "F12AA0F5FC8A03946116EC60996C421B2CC339CAE54478C4BCF8094128005680" . "8741622C4770021D582803C4651F30414A980B3A4E000442C003E02509B8A10D" . "C421F756E113E06110A6103AD2A57CA4C36AB060E1AC8DBDFC882900E06CA620" . "4D28E0B0AA0303E8ED1CB2A50DA6215BB625781C422BD6C11E72A40D84202112" . "204BDE872826871760215B96012BC203532CE3B48C40830CFEC0014E4D0300E7" . "2D4225393C80121CA0ECA40309F4E78B70831EA8B002E470F856040432440232" . "C056C0E21BDA802BA8A2970640B24AA1D5266711A8675B0CC961B2EE5170410E" . "AAC6016461504A6002088002C8202736214384A33B1AE44BF664044E413A70EB" . "088C41F344008148717D6C86C078822B30C1042A2D3ED820011269249242009A" . "8008C6218E966500A2CC0DDAC81E7AE97D1C2002D8643C08C71E0EE2172CA3DE" . "648A1F8AAA044EA58D2C8C001CCE033E81BDBCCA04F3652359810A1A5204004E" . "CD4C02B77E82033C20C6AC052DDC80134E617D8CC0DA4CA0073D4017EC601838" . "8C015AE3D7CC615B266649EA6B5D8AA03B4240054C2009FEFE0239A0E303D291" . "7C8C02778C813D32E00006803CD466034C6D02B0C06A78A104182EC63040F28A" . "60B82AA1211504B7CAC51A3BCA109600000C02F152A260C449080AE33C5E4374" . "84E18B4A0129E64F276DE1AA8E4179C80202A8CF00144009B0A08370812B6A01" . "23B86E7C58A885448502D9E16710E03C4070013A28654240494C400CA9C08F4C" . "EC5E7C04BE66A1125C06010E80044280BB688108C6CE0902A003DA810EC0A077" . "18C1BCCCC016CEC356ECACF1A02B13D26E012A420452C20C54A211AAA1C6C003" . "315C03149B0415D22016C08521A4893D90084F32C0011EC4AD802282240DA912" . "895000443E58A134DA04225E033A44E00F7CB2042460FE0370235BA22D39EB8D" . "EA0041926864140082A4A673F458C847B84E23BC4200E4B08F8620425828365E" . "EE7B8EA02805820119A408C8C0168267AFD2528122005BB264A7000005268002" . "6CB48FAC26431E851494E329566614086E09A42133B3CE059CA060E480E7EC67" . "63EC9259B880623AA00E47000284A67FD8014616E0C61A880DD020A1646C8A40" . "80C24AC2C976AA38C3655E580828C265A7D88215FE03F9508D7B56C42358C817" . "7CA32A0CE32668611A0C69169C831F0EE1014200006E74E778253B18E2269647" . "4F32466884460002C003F64002A24DC024A00322E0623C8023066028E08421A8" . "6D224E001358600A10E04CCE2018E8C11EB0C54910FE041D44F416626D178849" . "4033401AC42D2D403009C88284AC0B1428B5126201279AF100CEC3048440BB60" . "4A04800124DA49DE3A4000D0409064838D024802C466238BC5BE60E4359E0718" . "34800298862BAAC3131EC04AB901FC9A04207C440F4643C6F6C228108119CF41" . "4B05940446A300A86D01444005264408B2C490D6C5768EA61A30201D61640D11" . "20962C4A5A31E65830827A340052AEEA0C0A2C8AC6632916C0036A870FC84DC6" . "3AA405A6420A0EA21EF5A2417A8B5C7A631C98E118C4001408447B1E60035460" . "A4ACE4B4E4831AC6A976322A2117E0040E401A42A00DD0205CAAE0F15681376F" . "CA321EE216D4A60A0840010C64790AE02A92E351FE82815B409014A7C80A604A" . "6C4820004A853188AC02722A2810A00440E24F0AA398562B0DE0610AAE414556" . "EB0EA7013C224D053EC908C4A42D4222387CA18D3E00056A410256A04192A041" . "2CA265DD00CE6E02BEC823C4D0A299AEA10078456816610C76021300C7650AC3" . "0E28801D0AAA4436E653A6C016A2EE1E664105066064428F2C7E81C1A8C4B99C" . "4033A4206EC04325968240AE41851AA0C21E22D3BEC8F33E40035EB377806155" . "F0C21B372129BEA41B21B34F966924E683C74CE0530202030200231802160E94" . "02EE685E6EC2D1E08BEA0CC10452403AF6A202EE348038689972A1DE8C2914EC" . "80477E480AB8010D32448AEC282B158F0D0CC0FE6C04C05F74413C32402DA807" . "20B3241148C58758944D8C6B15A8403718E21492B30538CA2BD9A00FF433A358" . "E40128A10FB40B8986C4132E4005F2610254443C9AA44DCEE3167EA104F1C5C5" . "4C010093C202DF273B66A9019C360D68677B4BA241F6C2041EA06FEC011FF665" . "3C98E2A698D82264D12210A05D5EA187194C0350200D6E647182E38B04C0035E" . "C3C2CAAE0848813E5E8162B7C4A2B43000B8624C5E0E188A015505C549A40015" . "54287300C01DD556EF86100B96201CED60F04AA1DB24846782A71A4229CF4C82" . "17B6257AC9236E428D0D683317D63000B24504B0184ED2202124693C5EA28316" . "6003D4422F942111CE07E2C60A0408C20028FE6003626FBF902207D1050F69CB" . "0A1840B894013BA24E0E10415C6CE14B9620D1F4E458BA448EDCC039D6A73B46" . "C70C3284296E222438A2FAB4E21E56240D90451F128237DDE08060A79812020E" . "3A34470C030946E1A6CE96B93EA128D262718C216E8E812D18B21290C06EF0D8" . "42DD602A286185894C2B5A1805106004548D1394B701202093241596F2941762" . "61156521064961631240402E0005B8A61344E016DCA32D8AB882046D18D4F67D" . "42295CA4E74E223301CEE44A402311C243D4AA0877488425780618009356DE04" . "379621731C611300410FCE1703C0E088F6614916A6F95E8A41A9E413FC205B92" . "8221AE615ED0051020810A6C258461C003FE604F920411BA34E05968A5F0B4A0" . "A9D7F05CC649096CC5B6C4400E22AC17A0E31AE0A4A3D848C424B7316C2A5BD4" . "E3B3EACD1AC5A95385835812903E7EC60AE02B5D06C0A6EE41694BF68B066451" . "B414151680052CEE1647478A45C0365E832140009544006C7E138FA76D0EAD20" . "16B48B0E2C40D3F6A2774C02364CE002E803610B017204C2323601414A4A9DC4" . "A977D0850D320D0262C12DC4AC6FBCE4A656F142742130A2E97CB4872CC44714" . "BE34090440032AE153BE881F95A37D196C00ACA38BFA61E522609546C0ACC92A" . "CF9A020D74AB00CAE6015E860D0A403A8EA143FABADE32E229F0985897D81361" . "02019AB5BA2F2E8467018F99E5213CE0FE0FDCC172D8E21A980102C0A12DCD4B" . "A9792B3CC3803D3880D398260B78C1965B058173C80348A495B02E931C222186" . "40CF764191086419BFC824164573C02524E843533AA63488B5129084A8970404" . "220014B6625018208D9CC572F402B2FCE1A6FC00BC59631C3801982A6341AE81" . "0A58B84A3B80000EC00424497B5661245686B5B8AB2418C144F66410E42394A6" . "681570470CF27199E0A01B0C6040CCEB3CF6B2177CEE96E5C59E424242D0F14B" . "E6F60A58EB00F42478BA840432A314D6801F68E18EDA600E4C213C7CC8BC228D" . "014C08531460191B4004C67C45F2801DF6AA8032EA7590E3E5E6E80AA0087E70" . "6332A4C32A7AE9246004BD15E22964FEA1B690037A1BA63746801738D538004F" . "02C8C00EB2438A6FAC03BE8CEEE4C82202970B76880D3A8438D7570EA6C4BC5E" . "E1014EC447D8A354C0A84A00E100280478EA5B6CC5AD2AEA408A1322171E008A" . "EC88142F6A08AAE00015E62315BABEF0383704AE4A1DA8CD6C940CA8A1C69440" . "21E428DA32C9843AA6DEEA096C32431B4C4F414C0241B4447B247172E6230338" . "A07D2FE0C63020CF4663B92F95095C170C0A8045A4E80A06AB10B62F05FE8EDB" . "81C8ECA05011982178DCC35C0CA91F9E851ADE6550F56E29BF424232AA83EB4D" . "D53225A5A8C10FF4A1C7EACD84D452BA0504148E5A7C3241F2526C5E166004F4" . "0E0A1E04243EE4014C46393A0613FE8AA13A1280C85E4E0A4CE004C2373E570C" . "94C9C9204A423B7846378ACABD202B931E65501560114238041A72C725281744" . "81443460F570F50D98A24B7A610FD660B570A30224E00016022D58537BF64E45" . "F8B39D0C8988AA4085D66599ACD13055440220512DE6D03518F80C8C49EF7221" . "134AC031E0E7EF3FA25CD252352A22DA15601D72A18DCA022DBA4B6D462347FC" . "603E28A422168261096004A6A0101400F0C7770D0CA00330407DDDE8CBFC6D17" . "78418E7A8116A0AB1642C2169A2D1CCE20045A1960CE15665157469D807CB481" . "7E1A3897B6252AF4925796C417C847D73F2014DAEB4A82BE0C54C223E80E02B8" . "408AEF5D384A85A592433D80E1FEAAC489536CA122B108082202C96090E18854" . "A610C8811100161652E79098442A8B0AE5522A813E06C1C3F028851CA14A0243" . "B020042204225310400600080103CF1C413158102C38083080980C129A3DB43D" . "2C1400204C086474300C608018703618481458145C481040608C662D74085C10" . "9C8110306440D8013C603C34488CC4E412C0162C3C0078640C4C30F8857C7C85" . "58342C7870108460975CEC622434341C10091C283430544020E8652C001C1C4C" . "60345470800058940110345C7C7C8030B8000A428107B84488C8308118820208" . "124430100181840B0C18340030A105AD144FA4E8AB80C0C2840042167C580340" . "C404091F184C2020C18C0111FE109A9430C16F4388120CA460F0A0A0C0350726" . "7C4AEBD720C1820108349040F0264281090B16401230C1EA340B151C7862D0F0" . "C1CB06050C2C308B365906840A051428808113000C061E3E6BF080AC080B2CDC" . "4890008018AC0403C299219040C2151132121C086877808100070C54C0C06088" . "097F73EF00E0D021C2920AB1348760A0CF9404050614641030E40101910F6035" . "2D202A8105440D8600007021C1075E1710183B5B878387087A02789056224182" . "0D084CF403C1ABC2054476174CC8B0571F8001674A2C4DF0A0420A0D104A5078" . "B9D7EA02040AC80C5030A081050BEA010110800801B4515E04194885CF030C48" . "600B01728DE210071350C4FED46F122C34800A165C050B027908504205A911E0" . "40530900A0000422187000191D8C9080030098D6C707FD11708F05E73CA4C702" . "113827C2011C08E0DF03168440C06922CCD0478BBB44110225270C30822E8594" . "204A6823C043063F09842240022648310041C4587040058C7140D41003A0589F" . "45EA2DD0CD05770120015C06D0F281036218105A1E0F08368000640A80007B23" . "D555A705182080C107751A70879E110838018A184CB7453B194035028B800440" . "001D17C0F90D0019F551C03B019000C1047C1A20CD4222B4FA80080F5C12CD01" . "185C101C5C214880417D0B80818007014CB0DE200F20E04902C298330D750590" . "00425C03340800050DA4FEE01028C12500CB3E0A1633587801B05B6C9DFD20D0" . "E6593FF6628104088060CA8D17A0CA2708F25054C05B1074900121BBC003E904" . "2490B015189AC9930008581D7997000D7C28011224C4D6CD3773494340281852" . "F840781A20A2A90827587001081554604601E60CD740091FA8B757A507401001" . "91BA350400035FC49480651E44BBC101487E3001BFE0E9859229D12288010710" . "1CB080012D5962535F753E34B446E51AA05A4BDB0CF0C1012244A0C180138493" . "0106DC7973919355092680110A3CE0A23B06DCF9CD04DF4C0CB83316ED52061E" . "54717BC725032C702FAF92120A01440E94D15B21086C118A458A61506C021934" . "4061A0AA7010C01321FE242040A00860948201286812CB020C18400212026030" . "40071C6470C01EC42C40CB17F35CD04E5C12D42782062020504200629A705709" . "D11A3478081794114BA058101579705B21375271C48D31E174251452012F604A" . "C08F3C2F53E79F304405842A8B13843049E40F0004451C4800052AB014994C60" . "451088440120708B96082002BAE3DD3768010B42314F23A242816028908A063C" . "C3017408946ED2D20037D4E7718003CF9BC850861248AA04B76B8A0768C08002" . "9400052EFB89C98813025E14A20DB703D3C75A44900374020D257800B76AA182" . "5911C07592A815076A11003D6C653006D15D04E051970B10823F4822C1072490" . "901154450A0A208EB3141C40086849E11C5729CF01D04489AA84C72AB008811B" . "3EB02A09584004351041024EE00FD51CF00129105F1922C51F6F546A001120CB" . "200442804E1060191658227A2ED91F7938A5001EB0CA56A0C594AB0C40031C00" . "00146453A74B7EC04A1020412D38F7040118420022938B039C501733002078CC" . "8394165C678BC5FC8B425E000FAA86B2810828CD01BC4949FCB405B8BD60441A" . "5113E51E449028110C20211170404C1449A3129C000009900BF78200003B"; */ #convert the image to binary and then send it. $len = strlen($data); print pack("H" . $len, $data); } # creates a transparent 1x1 gif image # for various uses. function create_blank() { header("Content-type: image/gif"); #behold: the 1x1 gif image in hex. #complete with "created by the gimp" ;) $data= "47494638396101000100800000ffffffffffff21fe1543726561746564207769" . "7468205468652047494d500021f904010a0001002c0000000001000100000202" . "4c01003b"; #convert the image to binary and then send it. $len = strlen($data); print pack("H" . $len, $data); } #creates a down arrow function create_down() { header("Content-type: image/gif"); $data="47494638396107000700c200000402046c6a6cd4d2d4d4d6dcd4d6d4fcfafcff" . "ffffffffff21fe15437265617465642077697468205468652047494d500021f9" . "04010a0007002c000000000700070000031308ba10228388721ca4350e5ce7f9" . "15c17d5c02003b"; #convert the image to binary and then send it. $len = strlen($data); print pack("H" . $len, $data); } #creates an up arrow function create_up() { header("Content-type: image/gif"); $data="47494638396107000700c20000fcfafc6c6a6cd4d6d4d4d2d4d4d6dc040204ff" . "ffffffffff21fe15437265617465642077697468205468652047494d500021f9" . "04010a0007002c0000000007000700000314780ada21cc8d78c2205059ccec18" . "c2548c649100003b"; #convert the image to binary and then send it. $len = strlen($data); print pack("H" . $len, $data); } ?>