// $Id: imageselector.sc,v 1.4 2006/05/31 06:33:28 e107coders Exp $ global $sql,$parm; if(strstr($parm,"=")){ // query style parms. parse_str($parm, $tmp); extract($tmp); }else{ // comma separated parms. list($name,$path,$default,$width,$height,$multiple,$label,$subdirs) = explode(",",$parm); } require_once(e_HANDLER."file_class.php"); $fl = new e_file; // $paths = explode("|",$path); $recurse = ($subdirs) ? $subdirs : 0; if($imagelist = $fl->get_files($path,".jpg|.gif|.png|.JPG|.GIF|.PNG", 'standard', $recurse)){ sort($imagelist); } $multi = ($multiple == "TRUE" || $multiple == "1") ? "multiple='multiple' style='height:{$height}'" : "style='float:left'"; $width = ($width) ? $width : "*"; $height = ($height) ? $height : "*"; $label = ($label) ? $label : " -- -- "; $text .= ""; $pvw_default = ($default) ? $path.$default : e_IMAGE."generic/blank.gif"; $text .= " \n"; return "\n\n\n\n".$text."\n\n\n\n";