]/", "",$_REQUEST["search"])):''; $at_start = isset($_REQUEST['at_start'])?$_REQUEST['at_start']:0; $at_start1 = isset($at_start)&& $at_start==1?'\/':''; $active_page = isset($_REQUEST['active_page'])?$_REQUEST['active_page']:0; $image = isset($_REQUEST['image'])?$_REQUEST['image']:''; if($image){ $current_dir = dirname(urldecode($image)); } else { $current_dir = isset($_REQUEST['current_dir'])?$_REQUEST['current_dir']:$default; } if (isset($_REQUEST['per_page'])){ $_SESSION['per_page'] = $_REQUEST['per_page']; } else if (! isset($_SESSION['per_page'])) { $_SESSION['per_page'] = 32; } $per_page = $_SESSION['per_page']; // FILE SIZE CONVERSION TO MB/KB function human_filesize($bytes, $decimals = 2) { $sz = 'bkmgtp'; $factor = floor((strlen($bytes) - 1) / 3); return str_replace('.00','',sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]); } // HTML HEADERS echo <<
Icon bank
IconbanklogoHome Forum Comments
You must join the forum and be logged in to use this site
28266 icons and rising
Hot linking the images will slow your site down. Upload the images to your site using the "remote server" option
HEADER; if ($logged_in){ // DO SEARCH if (isset($search) && !empty($search)&& strlen($search) < 2){ echo '
Search query must be 2 or more characters in length
'; $search = ''; } if (isset($_REQUEST["srch"]) && !empty($search)){ $current_dir_contents = array_keys( iterator_to_array( new RegexIterator( new RecursiveIteratorIterator( new RecursiveDirectoryIterator($default.'/') ),'/.*'.$at_start1.$search.'[A-z 0-9_\-]*\.[A-z0-9_\-]*/i',RecursiveRegexIterator::GET_MATCH ) ) ); sort ($current_dir_contents); // NO RESULTS if (empty($current_dir_contents)){ echo '
No results for '.$search.' in the image library
'; $res=1; } // SAVE SEARCH RESULTS TO SESSION else { $_SESSION['current_dir_contents'] = $current_dir_contents; } } // RETRIEVE CURRENT DIR CONTENTS FROM SESSION if (isset($_REQUEST['cdc'])){ $current_dir_contents = $_SESSION['current_dir_contents']; } // OR LOAD THE CURRENT DIRECTORY INTO SESSION else if (empty($search)||isset($res)){ $current_dir_contents = glob($current_dir.'/*'); $_SESSION['current_dir_contents'] = $current_dir_contents; } $first_in_current_dir = ltrim($current_dir_contents[0],'.'); $count = count($current_dir_contents); $start = $active_page*$per_page; $end = $start+$per_page < $count?$start+$per_page:$count; // MAIN NAVIGATION echo '
'; for($i = 0;$i < strrpos($first_in_current_dir,'/');$i = strpos($first_in_current_dir,'/',$i+1)){ echo '
'; if(!empty($search)){break;} } // [?] ABOUT THIS ICON SET if (!($current_dir == $default || !empty($search))){ echo '
'; } echo '
'; // SHOW DIRECTORY CONTENT AS IMAGES $flag=0; echo '
'; if (is_file('.'.$first_in_current_dir)){ echo '
Images over 64x64px will be resized in this panel
Click on the images in the panel for the images info and download url.

'; $flag = 1; for($i = $start;$i < $end;$i++){ echo ' '; } echo '
'; } // OR SHOW SECONDARY NAVIGATION else { for($i = $start;$i < $end;$i++){ if (is_dir($current_dir_contents[$i])){ echo '
'; } } } echo '
'; // PAGINATION if( $count > $per_page){ echo '
'; $total_pages = ceil($count/$per_page); for($page = 0;$page < $total_pages;$page++){ $real_page = $page+1; $button = '
'; if($active_page == $page-1||$active_page == $page-2||$active_page == $page-3||$active_page == $page-4||$active_page == $page-5||$active_page == $page-6){ echo $button; } if($active_page == $page){ echo '
'; } if($active_page == $page+1||$active_page == $page+2||$active_page == $page+3||$active_page == $page+4||$active_page == $page+5||$active_page == $page+6){ echo $button; } } // SHOW TOTAL PAGES AND TOTAL IMAGES echo '
'.$total_pages.' Pages'.$count.' Images
'; } else { if ($flag){ echo '
'.$count.' Images
'; } } // PARENT DIRECTORY CONTENTS if ($flag && empty($search)){ echo '
'; $parent_contents = glob(dirname($current_dir).'/*'); for($i = 0;$i < count($parent_contents);$i++){ if (is_dir($parent_contents[$i])&& $parent_contents[$i] !== $current_dir){ echo '
'; } else { echo '
'; } } echo '
'; } //IMAGE META DATA if ($image){ $image=urldecode($image); $meta = getimagesize($image); echo '
Image name: '.preg_replace('/\..*/','',basename($image)).''; // [?] ABOUT THIS IMAGE if (isset($search) && !empty($search)){ echo ' 
'; } echo '
File size:        '.human_filesize(filesize($image)).'
Dimensions:  '.$meta[0].' x '.$meta[1].'px
Type:             '.$meta['mime'].'
Address:
Download:
*
Open:
*
';} // Show licence text $licence = isset($_REQUEST['licence'])?$_REQUEST['licence']:'0'; $current_dir = isset($_REQUEST['current_dir'])?$_REQUEST['current_dir']:'./library'; if ($licence){ $a='./licences'; $b=glob($a.'/*.txt'); for ($c=0;$c < count($b);$c++){ if (strpos ($current_dir,trim($b[$c],$a.'.txt'))){ echo '
'.nl2br(file_get_contents('/www'.ltrim($b[$c],'.'))).'
'; } } } // IMAGES PER PAGE echo'
The search uses a single keyword and looks for a match anywhere in the name of all images in the whole library.
The "at start" option limits the search to image names starting with the keyword.
All image names consist of letters and numbers with _ and - only
The extension is ignored in the search
'; // SEARCH FORM echo '
'; echo '
Please note: All images belong to their respective copyright holders and attribution may be required'; } else { echo '

You need to Join the forum and be logged in to use this site

'; } echo '

Old school Swatch Watches
'; ?>