- thumbnail support is fully functional with custom imageThumb class which supports caching and so on, the class is still considered beta (specially the clean_cache() function)

- updated simple template
- added Last Access (atime) to dirlist.lib.php
- updated and fixed loads of other things

git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@18 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
jim
2006-04-09 18:00:39 +00:00
parent 02c6a18b1d
commit edf251dbec
16 changed files with 289 additions and 25 deletions

26
thumb.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
require_once('libs/imagethumb.lib.php');
$src = ( !empty($_GET['src']) ) ? $_GET['src'] : false ;
$w = ( !empty($_GET['w']) && preg_match("/[0-9]{1,4}/", $_GET['w']) ) ? $_GET['w'] : null ;
$h = ( !empty($_GET['h']) && preg_match("/[0-9]{1,4}/", $_GET['w']) ) ? $_GET['h'] : null ;
$q = ( !empty($_GET['q']) ) ? $_GET['q'] : false ;
//TODO load sizes from config instead of from $_GET vars for security reasons...
if ( preg_match("/^\//", $src) ) {
if ( function_exists('apache_lookup_uri') ) {
$file = apache_lookup_uri($src);
$file = ( is_array($file) ) ? $file['filename'] : $file->filename ;
} else {
$file = $_SERVER['DOCUMENT_ROOT'].$src;
}
} else $file = $src;
$image = new imageThumb();
$image->cache_dir = 'cache/thumbnails/';
$image->quick($file, $w, $h, $q);
?>