// /-------------------------------------------------\ // | ############################################### | // | # ------------------------------------------- # | // | # --- Picy - a simple PHP folder gallery ---- # | // | # ------------------------------------------- # | // | ############################################### | // | # http://picy.infinitesimal.org/ # | // | ############################################### | // | # © 2004 - Adrian Stutz # | // | # This script is licensed unter a # | // | # creative Commons License. # | // | # http://creativecommons.org/licenses ¬ # | // | # /by-nc-sa/2.0/de/ # | // | # adrian.stutz@gmail.com # | // | ############################################### | // | # Table of Contents: # | // | # 0. Settings (line 49) # | // | # 1. Init (line 114) # | // | # 2. Redirects (line 187) # | // | # 3. Misc Functions (line 217) # | // | # 4. Final Theme Function (line 262) # | // | # 5. Create Thumbnail Function (line 292) # | // | # 6. Is_pic Function (line 417) # | // | # 7. Get_files Function (line 436) # | // | # 8. Fill_info Function (line 470) # | // | # 9. Main (line 559) # | // | # 10. Compile Main Output (line 601) # | // | # 11. Image Viewer (line 726) # | // | # 12. Tunnel Picture Function (line 902) # | // | # 13. Warning For Ie Users (line 1023) # | // | # 14. Pictures Stored Interally (line 1041) # | // | # 15. Themes (line 1073) # | // | ############################################### | // \-------------------------------------------------/ // Pre-init defenitions define ('THM_INT',true,false); define ('THM_EXT',false,false); // Use following code to set the table picy_hp up: /* CREATE TABLE `picy` ( `ip` tinytext NOT NULL, `key` tinytext, `pic` tinytext, PRIMARY KEY (`ip`(11)) ); */ // --------------------------------------------------- // -- 0. SETTINGS ------------------------------------ // --------------------------------------------------- // 'image/jpeg','gif'=>'image/gif','png'=>'image/png'); // Secure passed pictures from hotlinking? (thumbnails and pics small than thumbnails will be excluded from this) // - Options: true or false $set['img_hotprot'] = false; // Hotlinking protection type // - Options: 'file', 'mysql' or 'session' $set['img_hp_type'] = 'session'; // ## View ########################################## // Display how many pictures per page? // - Options: Positive non-decimal number from 1 to uselessly large $set['pics_pp'] = 36; // Range for user selectable number of pics per page, set to 'array ($set['pics_pp'],$set['pics_pp']);' to disable. // - Options: Two positive non-decimal numbers from 1 to uselessly large. First number must be smaller as or equal to the second $set['pp_range'] = array ($set['pics_pp'],$set['pics_pp']); // Use internal picy viewer? If not, the picture will be shown normally (like entering it directly into the browser) // - Options: true or false $set['use_viewer'] = true; // Pad Strings to x chars where apropriate // - Options: Positive non-decimal number from 1 to uselessly large $set['padlen'] = 18; // Theme-override for IE users. // - Options: false to turn it off or a theme index number $set['iethm'] = false; // Theme type and name. You can specify more use them one subgalleries (.pcx, while x is the numerical index of the theme) // - Options: array (x,y) where x is either THM_INT for internal and THM_EXT for external themes and y the name for filename $set['themes'] = array (array (THM_INT,'std'),array (THM_INT,'html401')); // Standard theme to use // - Options: Array index of the theme, positive non-decimal number including 0 $set['cthm'] = 0; // Theme user selectable (using thm=x in the url) // - Options: true or false $set['user_thm'] = true; // Display all folders in the gallery regardless of their extension? // - Options: true or false $set['all_folders'] = false; // ## Thumbnails ########################################## // Create thumbnails? This will automatically try to create a thumbnail once a picture without one is found. // - Options: true or false $set['make_thmbs'] = true; // Thumbnail size. Aspect ratio will be retained, those are max values. // - Options: array (x,y) where x is thumbnail width and y height. $set['tmb_size'] = array (100,75); // What thumbnail creation method to use? If the array has more than one value, the latter one will be used if the first fails. // - Options: 'gd' for internal php library (JPEG and PNG support, only GIF read support for PHP < 5 [see $set['gif_convto'] option]).'magick' for ImageMagick. // Has to be installed and proper path provided ($set['magick_path']). [http://www.imagemagick.org/] $set['tmb_method'] = array ('magick','gd'); // Path to the ImageMagick executables. // - Options: String or empty string ('') if ImageMagick is installed global $set['magick_path'] = ''; // Normally, ImageMagick will create thumbnails in the same format as the original picture. If you want different formats for thumbnailsyou can specify them here. // e.g. array ('gif'=>'png','tiff'=>'jpg'); would create png thumbnails for gif and jpg for tiff images. // - Options: 'x'=>'y' where x is extension defined in $set['img_exts'] and y extension supported by ImageMagick $set['conv_types'] = array (); // If you're using a GD version without GIF write support, you can specify here, what format thumbnails should be created in for GIF images. // - Options: 'png' or 'jpeg'. $set['gif_convto'] = 'png'; // ## MySQL ########################################## // MySQL options used for mysql image hotlinking (has to be activated by $set['img_hotprot'] and $img_ht_type. $set['mq_server'] = 'localhost'; $set['mq_user'] = ''; $set['mq_password'] = ''; $set['mq_db'] = ''; // !!> // --------------------------------------------------- // -- 1. INIT ---------------------------------------- // --------------------------------------------------- $picy_version = 'v0.7'; $msgs = array (); $pics = array (); // type names $types = array (1 => 'GIF', 2 => 'JPG', 3 => 'PNG', 4 => 'SWF', 5 => 'PSD', 6 => 'BMP', 7 => 'TIFF (intel byte order)', 8 => 'TIFF (motorola byte order)', 9 => 'JPC', 10 => 'JP2', 11 => 'JPX', 12 => 'JB2', 13 => 'SWC', 14 => 'IFF', 15 => 'WBMP', 16 => 'XBM'); // load current folder $folder = dirname ($_SERVER['SCRIPT_FILENAME']).'/'; $picy_root = dirname ($_SERVER['SCRIPT_FILENAME']); // not root folder? if (isset ($_GET['f']) && trim ($_GET['f']) != '') { // compile new path $fpath = str_replace ('..','',$_GET['f']); // enforce trailing slash if (substr ($fpath,-1) != '/') $fpath .= '/'; $folder .= $fpath; } else { $fpath = ''; } // valid folder? if (!file_exists ($folder) || !is_dir ($folder)) { $msgs[] = 'No valid directory.'; error (); } // set theme if ($fpath != '' && preg_match ('/(\.pc)(\d{1,2})$/',basename ($fpath))) { $set['cthm'] = preg_replace ('/(.*)(\.pc)(\d{1,2})$/','\3',basename ($fpath)); if (!isset ($set['themes'][$set['cthm']])) { $set['cthm'] = 0; $msgs[] = 'Theme not found.'; } } // prepare pass vars $qps = array(); $passvars = array ('f','pp','offset','warnok'); foreach ($passvars as $pv) { if (isset ($_GET[$pv])) $qps[$pv] = $_GET[$pv]; } // pp in range? if (isset ($_GET['pp'])) { if ($_GET['pp'] < $set['pp_range'][0]) { $msgs[] = 'Pics per page value out of range (can be no less than '.$set['pp_range'][0].')'; $set['pics_pp'] = $set['pp_range'][0]; } elseif ($_GET['pp'] > $set['pp_range'][1]) { $msgs[] = 'Pics per page value out of range (can be no more than '.$set['pp_range'][1].')'; $set['pics_pp'] = $set['pp_range'][1]; } else { $set['pics_pp'] = (int)$_GET['pp']; } } // ie users if ($set['iethm'] !== false && !isset ($_GET['warnok']) && !isset ($_GET['dp']) && strpos ($_SERVER['HTTP_USER_AGENT'],'MSIE') !== false && strpos ($_SERVER['HTTP_USER_AGENT'],'Opera') === false) { $set['cthm'] = $set['iethm']; } // select theme if ($set['user_thm'] && isset ($_GET['thm'])) { $set['cthm'] = (int)$_GET['thm']; if (!isset ($set['themes'][$set['cthm']])) { $set['cthm'] = 0; $msgs[] = 'Theme not found.'; } } // --------------------------------------------------- // -- 2. REDIRECTS ----------------------------------- // --------------------------------------------------- // redirect for picture output if (isset ($_GET['dp'])) { pass_pic ($_GET['dp']); exit; } // redirect for picture tunnel if (isset ($_GET['pic'])) { tunnel_pic ($_GET['pic']); exit; } // redirect for viewer if (isset ($_GET['view'])) { show_viewer ($_GET['view']); exit; } // --------------------------------------------------- // -- 3. MISC FUNCTIONS ------------------------------ // --------------------------------------------------- function pad_string ($str,$len=-1) { global $set; if ($len == -1) $len = $set['padlen']; if (strlen ($str) > $len) { $str = substr ($str,0,$len-3); $str .= '...'; } return $str; } function make_query ($args) { global $qps; $temp = array_merge ($qps,$args); $qstr = ''; foreach ($temp as $key => $var) { if ($var !== false) $qstr .= '&'.$key.'='.$var; } return $qstr; } function error () { print_main (); exit; } function picy_mysql_conn () { global $set,$msgs; $connection = mysql_connect($set['mq_server'],$set['mq_user'],$set['mq_password']); if (!$connection) { $msgs[] = 'MySQL connection failed for picy hotlink protection.'; error (); } $db = mysql_select_db($set['mq_db'],$connection); if (!$db) { $msgs[] = 'Couldn\'t select mysql DB for picy hotlink protection.'; error (); } } // --------------------------------------------------- // -- 4. FINAL THEME FUNCTION ------------------------ // --------------------------------------------------- function print_main ($mainbit='',$mainwidth=525) { global $thm, $msgs, $set; if (!isset ($thm['html'])) load_theme ($set['themes'][$set['cthm']][1],$set['themes'][$set['cthm']][0]); // header + errors if (count ($msgs) > 0) { $out_temp = array (); foreach ($msgs as $msg) { $out_temp[] = str_replace ('%%msg%%',$msg,$thm['msgs_bit']); } $msgbit = str_replace ('%%msgs%%',implode('',$out_temp),$thm['msgs']); } else { $msgbit = ''; } $mainbit = $msgbit.$mainbit; // final output $html = str_replace ('%%res-name%%',basename($folder),$thm['html']); $html = str_replace ('%%main-width%%',$mainwidth,$html); print str_replace ('%%picy-main%%',$mainbit,$html); } // --------------------------------------------------- // -- 5. CREATE THUMBNAIL FUNCTION ------------------- // --------------------------------------------------- function make_thmb ($pfn) { global $msgs,$set,$types; $success = false; foreach ($set['tmb_method'] as $tm) { if ($tm == 'gd') { $info = getimagesize ($pfn); // get image types supported $gd_info = gd_info (); $handlers = array (); if ($gd_info['GIF Read Support']) $handlers[1] = 'imagecreatefromgif'; if ($gd_info['JPG Support']) $handlers[2] = 'imagecreatefromjpeg'; if ($gd_info['PNG Support']) $handlers[3] = 'imagecreatefrompng'; $outh = array (1=>'imagegif',2=>'imagejpeg',3=>'imagepng'); if (!$gd_info['GIF Create Support']) { $outh[1] = 'image'.$set['gif_convto']; $msgs[] = 'GIF image thumbnails will be converted to '.$set['gif_convto'].'.'; } if (array_key_exists ($info[2],$handlers)) { // load image $func = $handlers[$info[2]]; $img = $func ($pfn); if ($img == '') { $msgs[] = "GD: Image '".basename($pfn)."' could not be opened."; continue; } // determin resize factor if ($info[0] > $info[1]) { $factor = $set['tmb_size'][0]/$info[0]; } else { $factor = $set['tmb_size'][1]/$info[1]; } if ($factor > 1) $factor = 1; // thumbnail sizes $width = $info[0] * $factor; $height = $info[1] * $factor; // resize image $tmb = imagecreatetruecolor ($width,$height); imagecopyresampled ($tmb,$img,0,0,0,0,$width,$height,$info[0],$info[1]); // new filename $afn = basename ($pfn); $type = preg_replace ('/(.*)(\.)([^.]+)$/','\3',$afn); $fn = preg_replace ('/(.*)(\.)([^.]+)$/','\1',$afn).'.tmb.'.$type; // write thumbnail $func = $outh[$info[2]]; @$func ($tmb,dirname($pfn).'/'.$fn); if (!file_exists (dirname($pfn).'/'.$fn)) { $msgs[] = "GD: Couldn't write thumbnail for '".$afn."'."; continue; } else { $msgs[] = "'".$afn."': Thumbnail created with GD."; $success = true; break; } } else { $msgs[] = "GD: Picture format '".$types[$info[2]]."' not supported for thumbnail creation."; continue; } } elseif ($tm == 'magick') { // compile new filename $afn = basename ($pfn); $type = preg_replace ('/(.*)(\.)([^.]+)$/','\3',$afn); if (!isset ($set['conv_types'][$type])) $set['conv_types'][$type] = $type; $fn = preg_replace ('/(.*)(\.)([^.]+)$/','\1',$afn).'.tmb.'.$set['conv_types'][$type]; // do not upsample $info = getimagesize ($pfn); // determin resize factor if ($info[0] > $info[1]) { $factor = $set['tmb_size'][0]/$info[0]; } else { $factor = $set['tmb_size'][1]/$info[1]; } if ($factor > 1) $factor = 1; // thumbnail sizes $width = $info[0] * $factor; $height = $info[1] * $factor; // compile command $command = $set['magick_path'].'convert -size '.$width.'x'.$height.' "'.$pfn.'" '; $command .= '-resize '.$width.'x'.$height.' +profile "*" '; $command .= '"'.dirname($pfn).'/'.$fn.'" 2>&1'; $error = shell_exec ($command); if (!file_exists (dirname($pfn).'/'.$fn)) { if ($error != '') { $msgs[] = "ImageMagick: Couldn't create thumbnail for ".$afn." (".$error.")"; continue; } else { $msgs[] = "ImageMagick: Couldn't create thumbnail for ".$afn." (unknown reason)."; continue; } } $msgs[] = "'".$afn."': Thumbnail created with ImageMagick."; $success = true; break; } else { $msgs[] = "'".$tm."': unkown method for thumbnail creation."; continue; } } return $success; } // --------------------------------------------------- // -- 6. IS_PIC FUNCTION ----------------------------- // --------------------------------------------------- function is_pic ($str,$no_folders=false,$thumbs=false) { global $set,$folder; if (in_array (preg_replace ('/(.*)(\.)([^.]+)$/','\3',strtolower($str)),$set['img_exts']) && strstr ($str,'.blk.') === false && ($thumbs || strstr ($str,'.tmb.') === false)) { return true; } elseif (is_dir ($folder.$str) && !$no_folders && (preg_match ('/(\.pc)(\d{1,2})$/',strtolower($str)) || $set['all_folders'])) { return true; } else { return false; } } // --------------------------------------------------- // -- 7. GET_FILES FUNCTION -------------------------- // --------------------------------------------------- function get_files ($path) { global $msgs; // Check if folder if (!is_dir ($path)) { $msgs[] = "'".basename($paht)."': Is not a folder."; return false; } // Try to open folder $dir = opendir ($path); if ($dir === false) { $msgs[] = "'".basename($paht)."': Could not be opened."; return false; } // Read files into array while (($cf = readdir ($dir)) !== false) { if ($cf != '..' && $cf != '.') { $files[] = $cf; } } @natcasesort ($files, 'DateCmp'); return $files ; } // --------------------------------------------------- // -- 8. FILL_INFO FUNCTION -------------------------- // --------------------------------------------------- function fill_info ($pic) { global $set, $folder, $fpath, $types; // Check if folder if (!is_dir ($folder.$pic)) { // compile basic info $info['ext'] = preg_replace ('/(.*)(\.)([^.]+)$/','\3',$pic); $info['name'] = preg_replace ('/(.*)(\.)([^.]+)$/','\1',$pic); // special link for viewer if ($set['use_viewer']) { $info['link'] = $_SERVER['PHP_SELF'].'?'.make_query (array ('view'=>$pic)); } else { $info['link'] = $fpath.$pic; } // special path for passthru if ($set['img_passthru']) { $info['path'] = $_SERVER['PHP_SELF'].'?'.make_query (array ('pic'=>$pic)); } else { $info['path'] = $fpath.$pic; } $info['path_int'] = $folder.$pic; // get additonal info $temp = getimagesize ($folder.$pic); $info['size'] = filesize($folder.$pic); $info['width'] = $temp[0]; $info['height'] = $temp[1]; $info['type'] = $types[$temp[2]]; // check for thumbnail / do we need a thumbnail anyway? if ($temp[0] < $set['tmb_size'][0] && $temp[1] < $set['tmb_size'][1]) { // special path for passthru if (!$set['img_passthru']) { $info['thm'] = $fpath.$pic; } else { $info['thm'] = $_SERVER['PHP_SELF'].'?'.make_query (array ('pic'=>$pic)); } } elseif (file_exists ($folder.$info['name'].'.tmb.'.$info['ext'])) { // special path for passthru if (!$set['img_passthru']) { $info['thm'] = $fpath.$info['name'].'.tmb.'.$info['ext']; } else { $info['thm'] = $_SERVER['PHP_SELF'].'?'.make_query (array ('pic'=>$info['name'].'.tmb.'.$info['ext'])); } } else { // create thumbnail if requested if ($set['make_thmbs']) { if (make_thmb ($info['path_int'])) { // special path for passthru if (!$set['img_passthru']) { $info['thm'] = $fpath.$info['name'].'.tmb.'.$info['ext']; } else { $info['thm'] = $_SERVER['PHP_SELF'].'?'.make_query (array ('pic'=>$info['name'].'.tmb.'.$info['ext'])); } } else { $info['thm'] = false; } } else { $info['thm'] = false; } } } else { // compile basic info $info['ext'] = preg_replace ('/(.*)(\.)([^.]+)$/','\3',$pic); $info['name'] = preg_replace ('/(.*)(\.)([^.]+)$/','\1',$pic); $info['link'] = $_SERVER['PHP_SELF'].'?'.make_query (array('f'=>$fpath.$pic,'offset'=>false)); $info['path_int'] = $folder.$pic; // get additonal info $info['type'] = 'Folder'; $info['thm'] = $_SERVER['PHP_SELF'].'?dp=folder'; } return $info; } // --------------------------------------------------- // -- 9. MAIN ---------------------------------------- // --------------------------------------------------- // generate hierarchy $hyr[] = array ('name'=>preg_replace ('/(.*)(\.)([^.]+)$/','\1',basename($picy_root)),'link'=>$_SERVER['PHP_SELF'].'?'.make_query(array('f'=>false,'offset'=>false))); $parts = explode ('/',$fpath); $temppath = ''; foreach ($parts as $part) { if ($part != '') { $temppath .= $part.'/'; $hyr[] = array ('name'=>preg_replace ('/(.*)(\.)([^.]+)$/','\1',$part),'link'=>($_SERVER['PHP_SELF'].'?'.make_query(array('f'=>$temppath,'offset'=>false)))); } } // open folder $files = get_files ($folder); // Offset if (!isset ($_GET['offset'])) { $off = 0; } else { $off = (int)$_GET['offset']; } $pics = array (); // filter pictures $picfiles = array_filter ($files,'is_pic'); $picfiles = array_values ($picfiles); // total pictures $pn = count ($picfiles); // search for pictures / fill with info for ($i=$off;$i 0) { $info_tags = array ('%%pic-link%%','%%pic-path%%','%%pic-name%%','%%pic-size%%', '%%tbl-width%%','%%img-type%%','%%tmb-width%%','%%tmb-height%%', '%%pic-width%%','%%pic-height%%'); $tdbits = array (); $rowbits = array (); $pagebit = ''; $tablebit = ''; $hyrbit = ''; for ($i=0;$i $lp) { return $lp; } else { return $int; } } // generate page links $page_tags = array ('%%first-page%%','%%last-page%%','%%prev-page%%','%%next-page%%'); $page_bitags = array ('%%page-n-link%%','%%page-n-num%%'); $tags_data = array ($_SERVER['PHP_SELF'].'?'.make_query(array('offset'=>'0')), $_SERVER['PHP_SELF'].'?'.make_query(array('offset'=>$lp)), $_SERVER['PHP_SELF'].'?'.make_query(array('offset'=>obey_limits($_GET['offset']-$set['pics_pp']))), $_SERVER['PHP_SELF'].'?'.make_query(array('offset'=>obey_limits($_GET['offset']+$set['pics_pp'])))); // output $pbits = array (); for ($i=1;$i<=ceil($pn/$set['pics_pp']);$i++) { $bittags_data = array ($_SERVER['PHP_SELF'].'?'.make_query(array('offset'=>(($i-1)*$set['pics_pp']))),$i); $pbits[] = str_replace ($page_bitags,$bittags_data,$thm['pgs_bit']); } $pagebit = str_replace ($page_tags,$tags_data,$thm['pgs']); $pagebit = str_replace ('%%pages%%',implode('',$pbits),$pagebit); } // compile folder hierarchy for ($i=0;$i$fpath))); // generate key for hotlink protection if ($set['img_hotprot']) { if ($set['img_hp_type'] == 'file') { // generate key $key = substr (md5 (uniqid (rand())),0,10); // check for file if (file_exists ($folder.'picy_key_'.$key.'.pkf')) { $msgs[] = 'Key collision error.'; error (); } // write key $keyfile = fopen ($folder.'picy_key_'.$key.'.pkf','w'); if ($keyfile === false) { $msgs[] = 'Cannot open dir for writing.'; error (); } $status = fwrite ($keyfile,time()); if ($status === false) { $msgs[] = 'Cannot write file.'; error (); } fclose ($keyfile); // pass key $tags_data[0] = $curr['path'].'&key='.$key; } elseif ($set['img_hp_type'] == 'mysql') { // connect picy_mysql_conn (); // generate key $key = substr (md5 (uniqid (rand())),0,10); // add to database $sql = "REPLACE INTO picy (`ip`,`pic`,`key`) VALUES ('".$_SERVER['REMOTE_ADDR']."','".addslashes($pic)."','".$key."')"; $err = mysql_query ($sql); if (!$err) { $msgs[] = 'A MySQL error occured.'; } // pass key $tags_data[0] = $curr['path'].'&key='.$key; } elseif ($set['img_hp_type'] == 'session') { // start session session_start (); // save into session $_SESSION['hp']['ip'] = $_SERVER['REMOTE_ADDR']; $_SESSION['hp']['pic'] = $pic; } else { $msgs[] = 'Unkown hotlink protection type.'; error (); } } // main width if ($curr['width']+26 > 525) { $width = $curr['width']+26; } else { $width = 525; } $picbit = str_replace ($info_tags,$tags_data,$thm['viewer']); $picbit = str_replace ('%%prev%%',$prevbit,$picbit); $picbit = str_replace ('%%next%%',$nextbit,$picbit); print_main ($picbit,$width); } // --------------------------------------------------- // -- 12. TUNNEL PICTURE FUNCTION -------------------- // --------------------------------------------------- function tunnel_pic ($pic) { global $folder, $fpath, $set, $msgs; // valid picture? if (!is_pic (basename($pic),true,true)) { $msgs[] = 'No valid picture.'; error (); } // get folder contents $files = get_files ($folder); // only valid pictures // make is_pic function with no folders for callback function is_pic_nf (&$str) { return is_pic ($str,true,true); } // remove non-pic files and folders $files = array_filter ($files,'is_pic_nf'); // reindex array $files = array_values ($files); // look for picture if (($pos = array_search ($pic,$files)) === false) { $msgs[] = 'Picture not found.'; error (); } // get dimensions $temp = getimagesize ($folder.$pic); // hotlink protection if ($set['img_hotprot'] && strstr ($pic,'.tmb.') === false && ($temp[0] > $set['tmb_size'][0] && $temp[1] > $set['tmb_size'][1])) { // no dir up-s $_GET['key'] = str_replace ('..','',$_GET['key']); if ($set['img_hp_type'] == 'file') { if (trim ($_GET['key']) == '' || !file_exists ($folder.'picy_key_'.$_GET['key'].'.pkf')) { $msgs[] = 'You don\'t have permission to access this file.'; error (); } else { unlink ($folder.'picy_key_'.$_GET['key'].'.pkf'); } } elseif ($set['img_hp_type'] == 'mysql') { // open connection picy_mysql_conn (); // look for key $sql = "SELECT * FROM picy WHERE ip = '".$_SERVER['REMOTE_ADDR']."' AND pic = '".addslashes($pic)."'"; $res = mysql_query ($sql); if (!$res) { $msgs[] = 'A MySQL error occured.'; error (); } if (!mysql_num_rows ($res) == 0) { if (mysql_result ($res,0,'key') != $_GET['key']) { $msgs[] = 'You don\'t have permission to access this file.'; error (); } } else { $msgs[] = 'You don\'t have permission to access this file.'; error (); } // remove key $sql = "DELETE * FROM picy WHERE ip = '".$_SERVER['REMOTE_ADDR']."'"; mysql_query ($sql); } elseif ($set['img_hp_type'] == 'session') { // start session session_start (); if (!isset ($_SESSION['hp']) || $_SESSION['hp']['ip'] != $_SERVER['REMOTE_ADDR'] || $_SESSION['hp']['pic'] != $pic) { unset ($_SESSION['hp']); $msgs[] = 'You don\'t have permission to access this file.'; error (); } unset ($_SESSION['hp']); } else { $msgs[] = 'Unkown hotlink protection type.'; error (); } } // get file extension $ext = strtolower (preg_replace ('/(.*)(\.)([^.]+)$/','\3',$pic)); if (!isset ($set['mime_types'][$ext])) { $msgs[] = 'No suiteable MIME type found.'; error (); } // tunnel picture $file = fopen ($folder.$pic,'rb'); if ($file === false) { $msgs[] = 'Picture couldn\'t be opened.'; error (); } header ('Content-type: '.$set['mime_types'][$ext]); fpassthru ($file); fclose ($file); } // --------------------------------------------------- // -- 14. PICTURES STORED INTERALLY ------------------ // --------------------------------------------------- function pass_pic ($p) { // } elseif ($p == 'file') { // } elseif ($p == 'icon') { // } elseif ($p == 'logo') { // } elseif ($p == 'almost-html401') { // } // !!> } // --------------------------------------------------- // -- 15. THEMES ------------------------------------- // --------------------------------------------------- function load_theme ($tname,$internal=THM_INT) { global $msgs, $thm, $picy_version; if ($internal == THM_INT) { // Cats!
%%picy-main%%
indiana holland park

indiana holland park

strong deb gorham

deb gorham

direct fulton footba

fulton footba

shoulder stone edge construction

stone edge construction

take lbe vest

lbe vest

mile gameboy advance cheap

gameboy advance cheap

both urban roots denver colo

urban roots denver colo

chance pittsburgh pride cheerleading

pittsburgh pride cheerleading

probable sanibel island lodgings

sanibel island lodgings

plural kim roberts san diego

kim roberts san diego

reason julian demarcus

julian demarcus

tool willie lynch irish music

willie lynch irish music

try roscoe bartlett e mail

roscoe bartlett e mail

same fabio george clooney

fabio george clooney

answer carmen miranda purse

carmen miranda purse

fruit booboo scrapbook pages

booboo scrapbook pages

picture standard travel expense tables

standard travel expense tables

behind newark nj zip

newark nj zip

noise cumberland high school foundation

cumberland high school foundation

fruit stephen tompkinson

stephen tompkinson

track jobs in prescott valley

jobs in prescott valley

bone walmart distribution ladd il

walmart distribution ladd il

front budweiser camp chair

budweiser camp chair

strange kelso cornelius funeral home

kelso cornelius funeral home

equal michael ferrell mash

michael ferrell mash

object sweetwater florist in tennessee

sweetwater florist in tennessee

row hanson lehigh

hanson lehigh

famous dorothy lauer davids

dorothy lauer davids

whole elizabeth swann gown costumes

elizabeth swann gown costumes

ship los angeles metro plaza

los angeles metro plaza

plain selenite crystal vortex

selenite crystal vortex

receive muskegon river log house

muskegon river log house

written barnes commentary online

barnes commentary online

touch obituraries canada

obituraries canada

energy joel drake

joel drake

similar dr mistry tarrytown

dr mistry tarrytown

late san carlos border tooling

san carlos border tooling

on miami driver liscense

miami driver liscense

held cash for keys california

cash for keys california

together industrial avenue tewksbury junk

industrial avenue tewksbury junk

deep dana deboer cancer

dana deboer cancer

blow jennifer lane earlysville va

jennifer lane earlysville va

probable mel fisher dives

mel fisher dives

describe opened for carrie underwood

opened for carrie underwood

pay elwin decker redding calif

elwin decker redding calif

simple been speer

been speer

circle honey lemon bourbon

honey lemon bourbon

control alex davis design

alex davis design

hurry lane lopez escondido

lane lopez escondido

check shawnee wigwams

shawnee wigwams

nature who is alex ferrer

who is alex ferrer

know independent magazine sales agents

independent magazine sales agents

send canadian idol elimination

canadian idol elimination

as gregory feldmann history

gregory feldmann history

bright stanwood senior

stanwood senior

dear dominican republic weather temperature

dominican republic weather temperature

prove northland chrysler detroit

northland chrysler detroit

cost jackson tn permits

jackson tn permits

so sexy women dating boston

sexy women dating boston

base albany regional

albany regional

value george mcghee ireland

george mcghee ireland

little dansk caribe dominican green

dansk caribe dominican green

past rawlins wyoming sheep land

rawlins wyoming sheep land

question local move pensacola florida

local move pensacola florida

ask justin ray rackley

justin ray rackley

they allison cumbra

allison cumbra

animal tom scott irvine

tom scott irvine

then michael coleman holt country

michael coleman holt country

doctor point arena koa campground

point arena koa campground

sudden naples florida venetian village

naples florida venetian village

save pueblo cheiftan

pueblo cheiftan

enough swift reach

swift reach

one university of vermont medicine

university of vermont medicine

feel oktoberfest minneapolis

oktoberfest minneapolis

south savoy ceramic pottery

savoy ceramic pottery

help maple plot curve polynomial

maple plot curve polynomial

every chesapeake teak

chesapeake teak

woman computershare capita watson wyatt

computershare capita watson wyatt

climb south minneapolis soil contamination

south minneapolis soil contamination

record stone forest industries flagstaff

stone forest industries flagstaff

substance tallulah bankhead marlene dietrich

tallulah bankhead marlene dietrich

tree rene denis ottawa sports

rene denis ottawa sports

side colorful cabin nassau

colorful cabin nassau

require michael chiarello meatballs

michael chiarello meatballs

bit kelley barracks stuttgart germany

kelley barracks stuttgart germany

whose vista golf background pictures

vista golf background pictures

am george parker moore

george parker moore

yellow prescott valley vacation rentals

prescott valley vacation rentals

spot sabine peters clawson mi

sabine peters clawson mi

verb fireman california

fireman california

blow golf split hand grip

golf split hand grip

cat archibald neil mcdougall

archibald neil mcdougall

gentle baltimore maryland hotline

baltimore maryland hotline

state pantone home color guide

pantone home color guide

break orange street helmet

orange street helmet

fat blueeyed 36 west chester

blueeyed 36 west chester

held davis lounge roy utah

davis lounge roy utah

map new jersey railroaders

new jersey railroaders

been jeff fenech boxrec

jeff fenech boxrec

near crane s top attorney list

crane s top attorney list

learn bowling in lake oswego

bowling in lake oswego

visit satellite flat cable supplies

satellite flat cable supplies

allow oriental massage fort lauderdale

oriental massage fort lauderdale

mean sun java performance

sun java performance

five tagtooga music rock star

tagtooga music rock star

produce umbc independence cup

umbc independence cup

kind lake milton police ohio

lake milton police ohio

cotton edge cliff condos

edge cliff condos

thank gaum heath

gaum heath

baby outsiders by se hinton

outsiders by se hinton

end filers powersports macedon ny

filers powersports macedon ny

five bim bam boom magazine

bim bam boom magazine

learn william rogers 5677

william rogers 5677

start flights from daytona beach

flights from daytona beach

least mark iv brushes

mark iv brushes

question trinity chicago board

trinity chicago board

base optima 2100 price

optima 2100 price

root walden surfshop

walden surfshop

necessary repton news newspaper today

repton news newspaper today

coast samuel adams beer distributer

samuel adams beer distributer

leave vertus bow thrusters

vertus bow thrusters

weight drivers education columbus ohio

drivers education columbus ohio

grew cisco 100base t sfp

cisco 100base t sfp

fresh carver 355 height

carver 355 height

paper american standard faucets everclean

american standard faucets everclean

sun standard video fps rate

standard video fps rate

solution wellington clinic memphis

wellington clinic memphis

post e k enoch smith

e k enoch smith

stand currency exchange in mexico

currency exchange in mexico

draw eyewear glasses christie brinkley

eyewear glasses christie brinkley

call maintaining dsl maximum speed

maintaining dsl maximum speed

bank tuscan place names

tuscan place names

wrote savannah river walk

savannah river walk

lady peoplepc and home page

peoplepc and home page

season rocky raccoon race photos

rocky raccoon race photos

and white rock bc homebuy

white rock bc homebuy

should eric burden inside out

eric burden inside out

four monticello vineyards

monticello vineyards

late hepatitis c western blot

hepatitis c western blot

melody dawsonville kangaroo

dawsonville kangaroo

city maryland divorce trauma alimony

maryland divorce trauma alimony

under myspace court rulings california

myspace court rulings california

radio caseys cabin country mobile

caseys cabin country mobile

eat old portugese coin

old portugese coin

nation peter kelly bradrick

peter kelly bradrick

section canadian exchange rate calculator

canadian exchange rate calculator

watch tampa florida escort agencies

tampa florida escort agencies

it represa nueva costa rica

represa nueva costa rica

inch durango mexico teenagers

durango mexico teenagers

them madison river rv campgrounds

madison river rv campgrounds

result zipcar ceo scott griffith

zipcar ceo scott griffith

consonant choctaw english online dictionary

choctaw english online dictionary

nothing chicago pneumatic schematic

chicago pneumatic schematic

steam hotrod university

hotrod university

us holiday traditions in cuba

holiday traditions in cuba

reply leo hrdlicka burton ohio

leo hrdlicka burton ohio

bought ariel jordan vids

ariel jordan vids

day maryland democratic derek walker

maryland democratic derek walker

song jimi hendrix bootleg album

jimi hendrix bootleg album

moment log cabin restaurant lancaster

log cabin restaurant lancaster

heard buy a mustang

buy a mustang

print nikki f1 female models

nikki f1 female models

machine new orleans sinper

new orleans sinper

open andover pelco

andover pelco

sell kings lynn churches

kings lynn churches

matter vickery stone

vickery stone

cold anaesthetists agency

anaesthetists agency

it harrison alfred lyle

harrison alfred lyle

tiny danvers schools ma

danvers schools ma

experience virgil johanns

virgil johanns

she bartlett illinois zip code

bartlett illinois zip code

family bellevue school district washington

bellevue school district washington

toward garnet conger

garnet conger

four swinger clubs in bogota

swinger clubs in bogota

horse tolland pizza tolland ct

tolland pizza tolland ct

master bert winfield lionel

bert winfield lionel

did home use for electricty

home use for electricty

noun amhersburg ontario

amhersburg ontario

degree toyota replacement engines maryland

toyota replacement engines maryland

said marry mills

marry mills

train lincoln city news guard

lincoln city news guard

science dodge avenger blinker

dodge avenger blinker

bread andy donnelly

andy donnelly

glass john thomas altman

john thomas altman

so professional alliances

professional alliances

large birds that chase hawks

birds that chase hawks

simple crawford county ks fairgrounds

crawford county ks fairgrounds

liquid radisson hotel portland oregon

radisson hotel portland oregon

he marine power dealer

marine power dealer

her north branch correctional

north branch correctional

insect hooler house milwaukee

hooler house milwaukee

settle richard hunter 1800

richard hunter 1800

miss west newbury daily news

west newbury daily news

by gene hunt wallpapers

gene hunt wallpapers

class wise howard reynoldsburg oh

wise howard reynoldsburg oh

instant biodiesel route in mexico

biodiesel route in mexico

stone walter reed funding history

walter reed funding history

similar mit homestead

mit homestead

particular justin allen woodside

justin allen woodside

shape alfa realty elmore county

alfa realty elmore county

rain home theater riser

home theater riser

build adidas predator power

adidas predator power

quart roberta middlestate

roberta middlestate

scale bernadette hart louisiana

bernadette hart louisiana

thus rock fractures and discontinuities

rock fractures and discontinuities

fraction katreena williams

katreena williams

capital hugh cook of texas

hugh cook of texas

valley simple clear screen script

simple clear screen script

been bastrop county property tax

bastrop county property tax

best cannon powershot g6

cannon powershot g6

wear rose claybon

rose claybon

fast adhd michael savage

adhd michael savage

care austin laurie tierny pics

austin laurie tierny pics

does mustang condensor

mustang condensor

family toasted buns

toasted buns

gone halifax carnaval

halifax carnaval

fraction 5121 north warren st

5121 north warren st

pound redhead osage

redhead osage

experience uc channel islands

uc channel islands

compare who owns clear channel

who owns clear channel

circle claudia swartz

claudia swartz

move pse ranger bow package

pse ranger bow package

walk henry viii first queen

henry viii first queen

also straight razor magazine

straight razor magazine

high used jennings bow prices

used jennings bow prices

ground stacie model

stacie model

count kingdom authority rockford illinois

kingdom authority rockford illinois

speech barton tartan pattern

barton tartan pattern

must dale krebbs

dale krebbs

went harbor restaurant group destin

harbor restaurant group destin

think backpage escorts new jersey

backpage escorts new jersey

half durango co snowmobile trails

durango co snowmobile trails

morning newfoundland dog t shirts

newfoundland dog t shirts

thick leo d ambrosio

leo d ambrosio

center ford dealer southern california

ford dealer southern california

bought optoma h27 canada

optoma h27 canada

every information on ronald ragan

information on ronald ragan

map clarkston wa motels

clarkston wa motels

sound j crew printed fontana

j crew printed fontana

silver bull bucks

bull bucks

similar the survivors forum welcome

the survivors forum welcome

month accram phoenix az

accram phoenix az

sign historical comments jackson

historical comments jackson

stone ray wilson california

ray wilson california

milk royal purple stores

royal purple stores

those lourdes foundation paducah

lourdes foundation paducah

word ray stevens logger

ray stevens logger

say atlas load booster shocks

atlas load booster shocks

high restaurants little italy baltimore

restaurants little italy baltimore

object kansas city beaumont club

kansas city beaumont club

view iowa raptor rehabilitation

iowa raptor rehabilitation

note coldwater canyon

coldwater canyon

arrange gay or eurotrash

gay or eurotrash

whole clarks amulet brown sandal

clarks amulet brown sandal

an john weir perry

john weir perry

fear knox geletain recipies

knox geletain recipies

mass cherry tree burgh castle

cherry tree burgh castle

oh marge homer in bed

marge homer in bed

equal buffalo strippers

buffalo strippers

point central park events christmas

central park events christmas

brown pga national golf day

pga national golf day

motion wesley pallet mule

wesley pallet mule

floor jack s towing sacramento california

jack s towing sacramento california

suffix mohawk valley events

mohawk valley events

five john wayne gun belts

john wayne gun belts

whether volcanos mexico

volcanos mexico

draw moss adams bellingham

moss adams bellingham

skin apache tribe resivation

apache tribe resivation

other delaware adult escort service

delaware adult escort service

exact ventura wine cellar

ventura wine cellar

season big river credit union

big river credit union

town sterling kennel

sterling kennel

band butt thornton

butt thornton

favor animal shelter springfield va

animal shelter springfield va

tree self efficient homes

self efficient homes

except sante asheville nc

sante asheville nc

beat mexican warrior carrying maiden

mexican warrior carrying maiden

feet lights for bud

lights for bud

did grandin road

grandin road

water brian young cary nc

brian young cary nc

win ohio medicare fee schedule

ohio medicare fee schedule

day valley bulk transport

valley bulk transport

thousand beverly hills porcelain veneers

beverly hills porcelain veneers

move super herbal greens plus

super herbal greens plus

during coat care waltham

coat care waltham

crease white slut black dick

white slut black dick

square stateline diesel

stateline diesel

practice liquor laws in ohio

liquor laws in ohio

idea carbon savegame

carbon savegame

design pennsylvania mutual diversifier

pennsylvania mutual diversifier

can hilo tide pools

hilo tide pools

swim santa cruz rop

santa cruz rop

hard griswold v connecticut 1964

griswold v connecticut 1964

father john turner hopkins missouri

john turner hopkins missouri

could singer mack the knife

singer mack the knife

substance omaha fontonelle forest

omaha fontonelle forest

level ford truck brake problems

ford truck brake problems

complete hunter puhr

hunter puhr

speech private eyes dundee

private eyes dundee

copy desert rose plant climate

desert rose plant climate

low ozzy ozbourne s home page

ozzy ozbourne s home page

degree circo sparkle ballet flats

circo sparkle ballet flats

begin sunset studio game coupon

sunset studio game coupon

solution grace chisholm young s papers

grace chisholm young s papers

protect 93 9 el paso texas

93 9 el paso texas

girl roadster camp trailer

roadster camp trailer

woman rv dealer stone mountail

rv dealer stone mountail

mean aimshot laser green scope

aimshot laser green scope

big federal reserve s funding

federal reserve s funding

show ewing township schools nj

ewing township schools nj

mount christian le bouton shoesz

christian le bouton shoesz

arm gray gilliam lodi

gray gilliam lodi

energy jeff gordon superman 1999

jeff gordon superman 1999

broad bandana shoes boise

bandana shoes boise

that genuine mustang parts

genuine mustang parts

condition willow glen lodge

willow glen lodge

boy kon bo chicken recipe

kon bo chicken recipe

new american standard 1 6 gpf

american standard 1 6 gpf

value lakeside fire dept

lakeside fire dept

station joe black movie review

joe black movie review

drop cool haan air mosby

cool haan air mosby

wind buffalo canal path

buffalo canal path

check hotel franklin new york

hotel franklin new york

little ryan adams minnesota

ryan adams minnesota

is gulf states health system

gulf states health system

dictionary roscoe white

roscoe white

hot boyes gas

boyes gas

there krbg guymon

krbg guymon

shout stockings issues

stockings issues

best scranton pa transporter

scranton pa transporter

molecule pancake bay ontario canada

pancake bay ontario canada

talk erotic bliss

erotic bliss

brought gay russian young boys

gay russian young boys

dog painkiller dvd black edition

painkiller dvd black edition

road vi valley isle

vi valley isle

heavy keystone contracting ridgefield washington

keystone contracting ridgefield washington

family define semiconductor design centre

define semiconductor design centre

name pickled cherries

pickled cherries

wear valarie neely walker

valarie neely walker

caught ulyses grant robinson

ulyses grant robinson

spoke eugene c brune

eugene c brune

bit terry mixell

terry mixell

sudden firewood wellington

firewood wellington

of harlan p kelsey arboretum

harlan p kelsey arboretum

pitch star tech big spring

star tech big spring

heart wells fargo idaho falls

wells fargo idaho falls

does barrie ontario nuresing homes

barrie ontario nuresing homes

particular pastor david busse smith

pastor david busse smith

way marine guestbook

marine guestbook

protect patriot hunt

patriot hunt

any state senator debra bowen

state senator debra bowen

win charthouse restaurant california

charthouse restaurant california

fraction young pussy banged

young pussy banged

stream halloween costumes medina ohio

halloween costumes medina ohio

gave diamond acres yellville ar