diff --git a/config.php b/config.php index f211e9d..48dde7d 100644 --- a/config.php +++ b/config.php @@ -29,7 +29,7 @@ $config = array( // dList internal path settings - 'path_plugins' => array('plugins'), + 'path_plugins' => array('plugins/*'), 'path_cache' => 'cache', diff --git a/exec/core.exc.php b/exec/core.exc.php index a45aae9..7890491 100644 --- a/exec/core.exc.php +++ b/exec/core.exc.php @@ -12,6 +12,7 @@ Name: core Priority: 40 Author: Jim Myhrberg +Include: output.exc.php */ //_SCRIPT; @@ -26,7 +27,7 @@ if ( stristr($_SERVER['HTTP_HOST'], ':') !== false ) { $_SERVER['SERVER_PORT'] = $http_host[1]; unset($http_host); } -preg_match("/(.*)Port [0-9]{2,8}(.*)/", $_SERVER['SERVER_SIGNATURE'], $serverinfo); +preg_match("/(.*)Port [0-9]{2,8}(.*)/i", $_SERVER['SERVER_SIGNATURE'], $serverinfo); $_SERVER['SERVER_SIGNATURE'] = $serverinfo[1].'Port '.$_SERVER['SERVER_PORT'].$serverinfo[2]; @@ -73,7 +74,7 @@ if ( $do_readdir ) { //>Section> echo -print_r($dlist->list); +//print_r($dlist->list); //_END; diff --git a/exec/icons.exc.php b/exec/icons.exc.php index 5e19f7e..03b6814 100644 --- a/exec/icons.exc.php +++ b/exec/icons.exc.php @@ -21,11 +21,46 @@ Author: Jim Myhrberg //>After> core.define_constants -define('ICONS_PATH', '/icons/'.$config->iconset.'/'); +define('ICONS_PATH', 'icons/'.$config->iconset.'/'); define('ICONS_URL', DLIST_URL.ICONS_PATH); +//>Section> load_config:35 +$config->parse(ICONS_PATH.'config.ini', true, 'icons_'); +//>Section> functions +function icons_get_url ($ext, $size, $type) { + global $config; + if ( $size == 'large' || $size == 'big' ) { + $size = $config->icons_large; + } else { + $size = $config->icons_small; + } + $icons_path = ICONS_PATH.$size.'/'; + $icons_url = ICONS_URL.$size.'/'; + if ( $type == 'file' ) { + if ( file_exists($icons_path.$ext.$config->icons_ext) ) { + return $icons_url.$ext.$config->icons_ext; + } else { + return $icons_url.'_file'.$config->icons_ext; + } + } elseif ( $type == 'dir' || $type == 'folder' ) { + if ( file_exists($icons_path.'_folder.'.$ext.$config->icons_ext) ) { + return $icons_url.'_folder.'.$ext.$config->icons_ext; + } else { + return $icons_url.'_folder'.$config->icons_ext; + } + } +} +function icons_get_parent ($size) { + global $config; + if ( $size == 'large' || $size == 'big' ) { + $size = $config->icons_large; + } else { + $size = $config->icons_small; + } + return ICONS_URL.$size.'/_parent'.$config->icons_ext; +} //_END; ?> \ No newline at end of file diff --git a/exec/output.exc.php b/exec/output.exc.php new file mode 100644 index 0000000..282f8ba --- /dev/null +++ b/exec/output.exc.php @@ -0,0 +1,33 @@ +STAGE> init +//========================== + + +//========================== +//>STAGE> render +//========================== + +//>Section> do_render:5 +if ( $do_render ) { +//>Section> do_render.end:95 +} + +//_END; +?> \ No newline at end of file diff --git a/icons/osx/16x16/3gp.gif b/icons/osx/16x16/3gp.gif new file mode 100644 index 0000000..6ab4329 Binary files /dev/null and b/icons/osx/16x16/3gp.gif differ diff --git a/icons/osx/16x16/_file.gif b/icons/osx/16x16/_file.gif new file mode 100644 index 0000000..9090c67 Binary files /dev/null and b/icons/osx/16x16/_file.gif differ diff --git a/icons/osx/16x16/_folder.gif b/icons/osx/16x16/_folder.gif new file mode 100644 index 0000000..3cc8492 Binary files /dev/null and b/icons/osx/16x16/_folder.gif differ diff --git a/icons/osx/16x16/_parent.gif b/icons/osx/16x16/_parent.gif new file mode 100644 index 0000000..75231ac Binary files /dev/null and b/icons/osx/16x16/_parent.gif differ diff --git a/icons/osx/16x16/acc.gif b/icons/osx/16x16/acc.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/acc.gif differ diff --git a/icons/osx/16x16/ai.gif b/icons/osx/16x16/ai.gif new file mode 100644 index 0000000..0e19e2f Binary files /dev/null and b/icons/osx/16x16/ai.gif differ diff --git a/icons/osx/16x16/aif.gif b/icons/osx/16x16/aif.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/aif.gif differ diff --git a/icons/osx/16x16/aiff.gif b/icons/osx/16x16/aiff.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/aiff.gif differ diff --git a/icons/osx/16x16/as.gif b/icons/osx/16x16/as.gif new file mode 100644 index 0000000..6e974e8 Binary files /dev/null and b/icons/osx/16x16/as.gif differ diff --git a/icons/osx/16x16/avi.gif b/icons/osx/16x16/avi.gif new file mode 100644 index 0000000..27caa34 Binary files /dev/null and b/icons/osx/16x16/avi.gif differ diff --git a/icons/osx/16x16/bmp.gif b/icons/osx/16x16/bmp.gif new file mode 100644 index 0000000..0b5c5ee Binary files /dev/null and b/icons/osx/16x16/bmp.gif differ diff --git a/icons/osx/16x16/bz2.gif b/icons/osx/16x16/bz2.gif new file mode 100644 index 0000000..52aea23 Binary files /dev/null and b/icons/osx/16x16/bz2.gif differ diff --git a/icons/osx/16x16/css.gif b/icons/osx/16x16/css.gif new file mode 100644 index 0000000..a067fb3 Binary files /dev/null and b/icons/osx/16x16/css.gif differ diff --git a/icons/osx/16x16/dmg.gif b/icons/osx/16x16/dmg.gif new file mode 100644 index 0000000..c795ef8 Binary files /dev/null and b/icons/osx/16x16/dmg.gif differ diff --git a/icons/osx/16x16/dng.gif b/icons/osx/16x16/dng.gif new file mode 100644 index 0000000..e42d94b Binary files /dev/null and b/icons/osx/16x16/dng.gif differ diff --git a/icons/osx/16x16/doc.gif b/icons/osx/16x16/doc.gif new file mode 100644 index 0000000..50f750a Binary files /dev/null and b/icons/osx/16x16/doc.gif differ diff --git a/icons/osx/16x16/dv.gif b/icons/osx/16x16/dv.gif new file mode 100644 index 0000000..188b3b9 Binary files /dev/null and b/icons/osx/16x16/dv.gif differ diff --git a/icons/osx/16x16/dwg.gif b/icons/osx/16x16/dwg.gif new file mode 100644 index 0000000..58fc832 Binary files /dev/null and b/icons/osx/16x16/dwg.gif differ diff --git a/icons/osx/16x16/dxf.gif b/icons/osx/16x16/dxf.gif new file mode 100644 index 0000000..4e87ee6 Binary files /dev/null and b/icons/osx/16x16/dxf.gif differ diff --git a/icons/osx/16x16/emf.gif b/icons/osx/16x16/emf.gif new file mode 100644 index 0000000..76b1005 Binary files /dev/null and b/icons/osx/16x16/emf.gif differ diff --git a/icons/osx/16x16/eps.gif b/icons/osx/16x16/eps.gif new file mode 100644 index 0000000..be155f1 Binary files /dev/null and b/icons/osx/16x16/eps.gif differ diff --git a/icons/osx/16x16/exe.gif b/icons/osx/16x16/exe.gif new file mode 100644 index 0000000..f25205c Binary files /dev/null and b/icons/osx/16x16/exe.gif differ diff --git a/icons/osx/16x16/fla.gif b/icons/osx/16x16/fla.gif new file mode 100644 index 0000000..aa3ef59 Binary files /dev/null and b/icons/osx/16x16/fla.gif differ diff --git a/icons/osx/16x16/flv.gif b/icons/osx/16x16/flv.gif new file mode 100644 index 0000000..cf6abe0 Binary files /dev/null and b/icons/osx/16x16/flv.gif differ diff --git a/icons/osx/16x16/gif.gif b/icons/osx/16x16/gif.gif new file mode 100644 index 0000000..6bda784 Binary files /dev/null and b/icons/osx/16x16/gif.gif differ diff --git a/icons/osx/16x16/htm.gif b/icons/osx/16x16/htm.gif new file mode 100644 index 0000000..48f63d4 Binary files /dev/null and b/icons/osx/16x16/htm.gif differ diff --git a/icons/osx/16x16/html.gif b/icons/osx/16x16/html.gif new file mode 100644 index 0000000..48f63d4 Binary files /dev/null and b/icons/osx/16x16/html.gif differ diff --git a/icons/osx/16x16/icns.gif b/icons/osx/16x16/icns.gif new file mode 100644 index 0000000..2f17d02 Binary files /dev/null and b/icons/osx/16x16/icns.gif differ diff --git a/icons/osx/16x16/ico.gif b/icons/osx/16x16/ico.gif new file mode 100644 index 0000000..690b4ac Binary files /dev/null and b/icons/osx/16x16/ico.gif differ diff --git a/icons/osx/16x16/indd.gif b/icons/osx/16x16/indd.gif new file mode 100644 index 0000000..3acb83e Binary files /dev/null and b/icons/osx/16x16/indd.gif differ diff --git a/icons/osx/16x16/jp2.gif b/icons/osx/16x16/jp2.gif new file mode 100644 index 0000000..8f4f14c Binary files /dev/null and b/icons/osx/16x16/jp2.gif differ diff --git a/icons/osx/16x16/jpeg.gif b/icons/osx/16x16/jpeg.gif new file mode 100644 index 0000000..87b027e Binary files /dev/null and b/icons/osx/16x16/jpeg.gif differ diff --git a/icons/osx/16x16/jpg.gif b/icons/osx/16x16/jpg.gif new file mode 100644 index 0000000..87b027e Binary files /dev/null and b/icons/osx/16x16/jpg.gif differ diff --git a/icons/osx/16x16/js.gif b/icons/osx/16x16/js.gif new file mode 100644 index 0000000..a067fb3 Binary files /dev/null and b/icons/osx/16x16/js.gif differ diff --git a/icons/osx/16x16/lzh.gif b/icons/osx/16x16/lzh.gif new file mode 100644 index 0000000..8ca5952 Binary files /dev/null and b/icons/osx/16x16/lzh.gif differ diff --git a/icons/osx/16x16/m3u.gif b/icons/osx/16x16/m3u.gif new file mode 100644 index 0000000..ff6e01c Binary files /dev/null and b/icons/osx/16x16/m3u.gif differ diff --git a/icons/osx/16x16/m4a.gif b/icons/osx/16x16/m4a.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/m4a.gif differ diff --git a/icons/osx/16x16/m4b.gif b/icons/osx/16x16/m4b.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/m4b.gif differ diff --git a/icons/osx/16x16/m4p.gif b/icons/osx/16x16/m4p.gif new file mode 100644 index 0000000..d52ed34 Binary files /dev/null and b/icons/osx/16x16/m4p.gif differ diff --git a/icons/osx/16x16/mid.gif b/icons/osx/16x16/mid.gif new file mode 100644 index 0000000..e082a19 Binary files /dev/null and b/icons/osx/16x16/mid.gif differ diff --git a/icons/osx/16x16/midi.gif b/icons/osx/16x16/midi.gif new file mode 100644 index 0000000..e082a19 Binary files /dev/null and b/icons/osx/16x16/midi.gif differ diff --git a/icons/osx/16x16/mov.gif b/icons/osx/16x16/mov.gif new file mode 100644 index 0000000..3eae3ea Binary files /dev/null and b/icons/osx/16x16/mov.gif differ diff --git a/icons/osx/16x16/mp2.gif b/icons/osx/16x16/mp2.gif new file mode 100644 index 0000000..e4df024 Binary files /dev/null and b/icons/osx/16x16/mp2.gif differ diff --git a/icons/osx/16x16/mp3.gif b/icons/osx/16x16/mp3.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/mp3.gif differ diff --git a/icons/osx/16x16/mp4.gif b/icons/osx/16x16/mp4.gif new file mode 100644 index 0000000..fe49cc6 Binary files /dev/null and b/icons/osx/16x16/mp4.gif differ diff --git a/icons/osx/16x16/mpe.gif b/icons/osx/16x16/mpe.gif new file mode 100644 index 0000000..c0d5abe Binary files /dev/null and b/icons/osx/16x16/mpe.gif differ diff --git a/icons/osx/16x16/mpeg.gif b/icons/osx/16x16/mpeg.gif new file mode 100644 index 0000000..c0d5abe Binary files /dev/null and b/icons/osx/16x16/mpeg.gif differ diff --git a/icons/osx/16x16/mpg.gif b/icons/osx/16x16/mpg.gif new file mode 100644 index 0000000..c0d5abe Binary files /dev/null and b/icons/osx/16x16/mpg.gif differ diff --git a/icons/osx/16x16/ogg.gif b/icons/osx/16x16/ogg.gif new file mode 100644 index 0000000..5c02841 Binary files /dev/null and b/icons/osx/16x16/ogg.gif differ diff --git a/icons/osx/16x16/pdf.gif b/icons/osx/16x16/pdf.gif new file mode 100644 index 0000000..403f4e8 Binary files /dev/null and b/icons/osx/16x16/pdf.gif differ diff --git a/icons/osx/16x16/pict.gif b/icons/osx/16x16/pict.gif new file mode 100644 index 0000000..b7c5b13 Binary files /dev/null and b/icons/osx/16x16/pict.gif differ diff --git a/icons/osx/16x16/pls.gif b/icons/osx/16x16/pls.gif new file mode 100644 index 0000000..ff6e01c Binary files /dev/null and b/icons/osx/16x16/pls.gif differ diff --git a/icons/osx/16x16/png.gif b/icons/osx/16x16/png.gif new file mode 100644 index 0000000..ffc864f Binary files /dev/null and b/icons/osx/16x16/png.gif differ diff --git a/icons/osx/16x16/pps.gif b/icons/osx/16x16/pps.gif new file mode 100644 index 0000000..86645f4 Binary files /dev/null and b/icons/osx/16x16/pps.gif differ diff --git a/icons/osx/16x16/ps.gif b/icons/osx/16x16/ps.gif new file mode 100644 index 0000000..6bd3368 Binary files /dev/null and b/icons/osx/16x16/ps.gif differ diff --git a/icons/osx/16x16/psd.gif b/icons/osx/16x16/psd.gif new file mode 100644 index 0000000..d55f6bc Binary files /dev/null and b/icons/osx/16x16/psd.gif differ diff --git a/icons/osx/16x16/raw.gif b/icons/osx/16x16/raw.gif new file mode 100644 index 0000000..04824d1 Binary files /dev/null and b/icons/osx/16x16/raw.gif differ diff --git a/icons/osx/16x16/rtf.gif b/icons/osx/16x16/rtf.gif new file mode 100644 index 0000000..c97171f Binary files /dev/null and b/icons/osx/16x16/rtf.gif differ diff --git a/icons/osx/16x16/rtx.gif b/icons/osx/16x16/rtx.gif new file mode 100644 index 0000000..c97171f Binary files /dev/null and b/icons/osx/16x16/rtx.gif differ diff --git a/icons/osx/16x16/sit.gif b/icons/osx/16x16/sit.gif new file mode 100644 index 0000000..ba9b706 Binary files /dev/null and b/icons/osx/16x16/sit.gif differ diff --git a/icons/osx/16x16/sitx.gif b/icons/osx/16x16/sitx.gif new file mode 100644 index 0000000..e149078 Binary files /dev/null and b/icons/osx/16x16/sitx.gif differ diff --git a/icons/osx/16x16/svg.gif b/icons/osx/16x16/svg.gif new file mode 100644 index 0000000..3929a4a Binary files /dev/null and b/icons/osx/16x16/svg.gif differ diff --git a/icons/osx/16x16/svgz.gif b/icons/osx/16x16/svgz.gif new file mode 100644 index 0000000..b0b134f Binary files /dev/null and b/icons/osx/16x16/svgz.gif differ diff --git a/icons/osx/16x16/swf.gif b/icons/osx/16x16/swf.gif new file mode 100644 index 0000000..09daf91 Binary files /dev/null and b/icons/osx/16x16/swf.gif differ diff --git a/icons/osx/16x16/tar.gif b/icons/osx/16x16/tar.gif new file mode 100644 index 0000000..0f6d7c6 Binary files /dev/null and b/icons/osx/16x16/tar.gif differ diff --git a/icons/osx/16x16/tbz.gif b/icons/osx/16x16/tbz.gif new file mode 100644 index 0000000..19525aa Binary files /dev/null and b/icons/osx/16x16/tbz.gif differ diff --git a/icons/osx/16x16/tga.gif b/icons/osx/16x16/tga.gif new file mode 100644 index 0000000..cb2e17f Binary files /dev/null and b/icons/osx/16x16/tga.gif differ diff --git a/icons/osx/16x16/tgz.gif b/icons/osx/16x16/tgz.gif new file mode 100644 index 0000000..f096758 Binary files /dev/null and b/icons/osx/16x16/tgz.gif differ diff --git a/icons/osx/16x16/tif.gif b/icons/osx/16x16/tif.gif new file mode 100644 index 0000000..7592204 Binary files /dev/null and b/icons/osx/16x16/tif.gif differ diff --git a/icons/osx/16x16/tiff.gif b/icons/osx/16x16/tiff.gif new file mode 100644 index 0000000..7592204 Binary files /dev/null and b/icons/osx/16x16/tiff.gif differ diff --git a/icons/osx/16x16/txt.gif b/icons/osx/16x16/txt.gif new file mode 100644 index 0000000..fae19e1 Binary files /dev/null and b/icons/osx/16x16/txt.gif differ diff --git a/icons/osx/16x16/uu.gif b/icons/osx/16x16/uu.gif new file mode 100644 index 0000000..f24a450 Binary files /dev/null and b/icons/osx/16x16/uu.gif differ diff --git a/icons/osx/16x16/wav.gif b/icons/osx/16x16/wav.gif new file mode 100644 index 0000000..28903d2 Binary files /dev/null and b/icons/osx/16x16/wav.gif differ diff --git a/icons/osx/16x16/wmf.gif b/icons/osx/16x16/wmf.gif new file mode 100644 index 0000000..bc4220b Binary files /dev/null and b/icons/osx/16x16/wmf.gif differ diff --git a/icons/osx/16x16/xls.gif b/icons/osx/16x16/xls.gif new file mode 100644 index 0000000..3aeba8f Binary files /dev/null and b/icons/osx/16x16/xls.gif differ diff --git a/icons/osx/16x16/zip.gif b/icons/osx/16x16/zip.gif new file mode 100644 index 0000000..2703e47 Binary files /dev/null and b/icons/osx/16x16/zip.gif differ diff --git a/icons/osx/48x48/3gp.gif b/icons/osx/48x48/3gp.gif new file mode 100644 index 0000000..4dc8078 Binary files /dev/null and b/icons/osx/48x48/3gp.gif differ diff --git a/icons/osx/48x48/_file.gif b/icons/osx/48x48/_file.gif new file mode 100644 index 0000000..03a374e Binary files /dev/null and b/icons/osx/48x48/_file.gif differ diff --git a/icons/osx/48x48/_folder.gif b/icons/osx/48x48/_folder.gif new file mode 100644 index 0000000..f40752f Binary files /dev/null and b/icons/osx/48x48/_folder.gif differ diff --git a/icons/osx/48x48/_parent.gif b/icons/osx/48x48/_parent.gif new file mode 100644 index 0000000..81ce15e Binary files /dev/null and b/icons/osx/48x48/_parent.gif differ diff --git a/icons/osx/48x48/acc.gif b/icons/osx/48x48/acc.gif new file mode 100644 index 0000000..9ab56ec Binary files /dev/null and b/icons/osx/48x48/acc.gif differ diff --git a/icons/osx/48x48/ai.gif b/icons/osx/48x48/ai.gif new file mode 100644 index 0000000..f526205 Binary files /dev/null and b/icons/osx/48x48/ai.gif differ diff --git a/icons/osx/48x48/aif.gif b/icons/osx/48x48/aif.gif new file mode 100644 index 0000000..fac4d4d Binary files /dev/null and b/icons/osx/48x48/aif.gif differ diff --git a/icons/osx/48x48/aiff.gif b/icons/osx/48x48/aiff.gif new file mode 100644 index 0000000..fac4d4d Binary files /dev/null and b/icons/osx/48x48/aiff.gif differ diff --git a/icons/osx/48x48/as.gif b/icons/osx/48x48/as.gif new file mode 100644 index 0000000..01417f6 Binary files /dev/null and b/icons/osx/48x48/as.gif differ diff --git a/icons/osx/48x48/avi.gif b/icons/osx/48x48/avi.gif new file mode 100644 index 0000000..24c8d21 Binary files /dev/null and b/icons/osx/48x48/avi.gif differ diff --git a/icons/osx/48x48/bmp.gif b/icons/osx/48x48/bmp.gif new file mode 100644 index 0000000..f3739f5 Binary files /dev/null and b/icons/osx/48x48/bmp.gif differ diff --git a/icons/osx/48x48/bz2.gif b/icons/osx/48x48/bz2.gif new file mode 100644 index 0000000..0c25255 Binary files /dev/null and b/icons/osx/48x48/bz2.gif differ diff --git a/icons/osx/48x48/css.gif b/icons/osx/48x48/css.gif new file mode 100644 index 0000000..8011942 Binary files /dev/null and b/icons/osx/48x48/css.gif differ diff --git a/icons/osx/48x48/dmg.gif b/icons/osx/48x48/dmg.gif new file mode 100644 index 0000000..787e8b3 Binary files /dev/null and b/icons/osx/48x48/dmg.gif differ diff --git a/icons/osx/48x48/dng.gif b/icons/osx/48x48/dng.gif new file mode 100644 index 0000000..26d5deb Binary files /dev/null and b/icons/osx/48x48/dng.gif differ diff --git a/icons/osx/48x48/doc.gif b/icons/osx/48x48/doc.gif new file mode 100644 index 0000000..a70e4b2 Binary files /dev/null and b/icons/osx/48x48/doc.gif differ diff --git a/icons/osx/48x48/dv.gif b/icons/osx/48x48/dv.gif new file mode 100644 index 0000000..02c0fef Binary files /dev/null and b/icons/osx/48x48/dv.gif differ diff --git a/icons/osx/48x48/dwg.gif b/icons/osx/48x48/dwg.gif new file mode 100644 index 0000000..2ec05f7 Binary files /dev/null and b/icons/osx/48x48/dwg.gif differ diff --git a/icons/osx/48x48/dxf.gif b/icons/osx/48x48/dxf.gif new file mode 100644 index 0000000..60dbbb7 Binary files /dev/null and b/icons/osx/48x48/dxf.gif differ diff --git a/icons/osx/48x48/emf.gif b/icons/osx/48x48/emf.gif new file mode 100644 index 0000000..c0b14b0 Binary files /dev/null and b/icons/osx/48x48/emf.gif differ diff --git a/icons/osx/48x48/eps.gif b/icons/osx/48x48/eps.gif new file mode 100644 index 0000000..d54ef7d Binary files /dev/null and b/icons/osx/48x48/eps.gif differ diff --git a/icons/osx/48x48/exe.gif b/icons/osx/48x48/exe.gif new file mode 100644 index 0000000..fa60213 Binary files /dev/null and b/icons/osx/48x48/exe.gif differ diff --git a/icons/osx/48x48/fla.gif b/icons/osx/48x48/fla.gif new file mode 100644 index 0000000..d85e6e2 Binary files /dev/null and b/icons/osx/48x48/fla.gif differ diff --git a/icons/osx/48x48/flv.gif b/icons/osx/48x48/flv.gif new file mode 100644 index 0000000..af4b978 Binary files /dev/null and b/icons/osx/48x48/flv.gif differ diff --git a/icons/osx/48x48/gif.gif b/icons/osx/48x48/gif.gif new file mode 100644 index 0000000..5c76e5c Binary files /dev/null and b/icons/osx/48x48/gif.gif differ diff --git a/icons/osx/48x48/htm.gif b/icons/osx/48x48/htm.gif new file mode 100644 index 0000000..95acea1 Binary files /dev/null and b/icons/osx/48x48/htm.gif differ diff --git a/icons/osx/48x48/html.gif b/icons/osx/48x48/html.gif new file mode 100644 index 0000000..95acea1 Binary files /dev/null and b/icons/osx/48x48/html.gif differ diff --git a/icons/osx/48x48/icns.gif b/icons/osx/48x48/icns.gif new file mode 100644 index 0000000..e5b41b8 Binary files /dev/null and b/icons/osx/48x48/icns.gif differ diff --git a/icons/osx/48x48/ico.gif b/icons/osx/48x48/ico.gif new file mode 100644 index 0000000..8fd661f Binary files /dev/null and b/icons/osx/48x48/ico.gif differ diff --git a/icons/osx/48x48/indd.gif b/icons/osx/48x48/indd.gif new file mode 100644 index 0000000..05f9976 Binary files /dev/null and b/icons/osx/48x48/indd.gif differ diff --git a/icons/osx/48x48/jp2.gif b/icons/osx/48x48/jp2.gif new file mode 100644 index 0000000..d7cc648 Binary files /dev/null and b/icons/osx/48x48/jp2.gif differ diff --git a/icons/osx/48x48/jpeg.gif b/icons/osx/48x48/jpeg.gif new file mode 100644 index 0000000..d810af9 Binary files /dev/null and b/icons/osx/48x48/jpeg.gif differ diff --git a/icons/osx/48x48/jpg.gif b/icons/osx/48x48/jpg.gif new file mode 100644 index 0000000..d810af9 Binary files /dev/null and b/icons/osx/48x48/jpg.gif differ diff --git a/icons/osx/48x48/js.gif b/icons/osx/48x48/js.gif new file mode 100644 index 0000000..8011942 Binary files /dev/null and b/icons/osx/48x48/js.gif differ diff --git a/icons/osx/48x48/lzh.gif b/icons/osx/48x48/lzh.gif new file mode 100644 index 0000000..fc4f222 Binary files /dev/null and b/icons/osx/48x48/lzh.gif differ diff --git a/icons/osx/48x48/m3u.gif b/icons/osx/48x48/m3u.gif new file mode 100644 index 0000000..f6fdc22 Binary files /dev/null and b/icons/osx/48x48/m3u.gif differ diff --git a/icons/osx/48x48/m4a.gif b/icons/osx/48x48/m4a.gif new file mode 100644 index 0000000..d116775 Binary files /dev/null and b/icons/osx/48x48/m4a.gif differ diff --git a/icons/osx/48x48/m4b.gif b/icons/osx/48x48/m4b.gif new file mode 100644 index 0000000..d116775 Binary files /dev/null and b/icons/osx/48x48/m4b.gif differ diff --git a/icons/osx/48x48/m4p.gif b/icons/osx/48x48/m4p.gif new file mode 100644 index 0000000..0dc639b Binary files /dev/null and b/icons/osx/48x48/m4p.gif differ diff --git a/icons/osx/48x48/mid.gif b/icons/osx/48x48/mid.gif new file mode 100644 index 0000000..e911d8b Binary files /dev/null and b/icons/osx/48x48/mid.gif differ diff --git a/icons/osx/48x48/midi.gif b/icons/osx/48x48/midi.gif new file mode 100644 index 0000000..e911d8b Binary files /dev/null and b/icons/osx/48x48/midi.gif differ diff --git a/icons/osx/48x48/mov.gif b/icons/osx/48x48/mov.gif new file mode 100644 index 0000000..95acae6 Binary files /dev/null and b/icons/osx/48x48/mov.gif differ diff --git a/icons/osx/48x48/mp2.gif b/icons/osx/48x48/mp2.gif new file mode 100644 index 0000000..26a67ce Binary files /dev/null and b/icons/osx/48x48/mp2.gif differ diff --git a/icons/osx/48x48/mp3.gif b/icons/osx/48x48/mp3.gif new file mode 100644 index 0000000..9b657bc Binary files /dev/null and b/icons/osx/48x48/mp3.gif differ diff --git a/icons/osx/48x48/mp4.gif b/icons/osx/48x48/mp4.gif new file mode 100644 index 0000000..e3b3f0d Binary files /dev/null and b/icons/osx/48x48/mp4.gif differ diff --git a/icons/osx/48x48/mpe.gif b/icons/osx/48x48/mpe.gif new file mode 100644 index 0000000..115f3a4 Binary files /dev/null and b/icons/osx/48x48/mpe.gif differ diff --git a/icons/osx/48x48/mpeg.gif b/icons/osx/48x48/mpeg.gif new file mode 100644 index 0000000..115f3a4 Binary files /dev/null and b/icons/osx/48x48/mpeg.gif differ diff --git a/icons/osx/48x48/mpg.gif b/icons/osx/48x48/mpg.gif new file mode 100644 index 0000000..115f3a4 Binary files /dev/null and b/icons/osx/48x48/mpg.gif differ diff --git a/icons/osx/48x48/ogg.gif b/icons/osx/48x48/ogg.gif new file mode 100644 index 0000000..d8895ad Binary files /dev/null and b/icons/osx/48x48/ogg.gif differ diff --git a/icons/osx/48x48/pdf.gif b/icons/osx/48x48/pdf.gif new file mode 100644 index 0000000..ce1273a Binary files /dev/null and b/icons/osx/48x48/pdf.gif differ diff --git a/icons/osx/48x48/pict.gif b/icons/osx/48x48/pict.gif new file mode 100644 index 0000000..386ad98 Binary files /dev/null and b/icons/osx/48x48/pict.gif differ diff --git a/icons/osx/48x48/pls.gif b/icons/osx/48x48/pls.gif new file mode 100644 index 0000000..f6fdc22 Binary files /dev/null and b/icons/osx/48x48/pls.gif differ diff --git a/icons/osx/48x48/png.gif b/icons/osx/48x48/png.gif new file mode 100644 index 0000000..b33945c Binary files /dev/null and b/icons/osx/48x48/png.gif differ diff --git a/icons/osx/48x48/pps.gif b/icons/osx/48x48/pps.gif new file mode 100644 index 0000000..447ec6b Binary files /dev/null and b/icons/osx/48x48/pps.gif differ diff --git a/icons/osx/48x48/ps.gif b/icons/osx/48x48/ps.gif new file mode 100644 index 0000000..45fa5ec Binary files /dev/null and b/icons/osx/48x48/ps.gif differ diff --git a/icons/osx/48x48/psd.gif b/icons/osx/48x48/psd.gif new file mode 100644 index 0000000..80cb700 Binary files /dev/null and b/icons/osx/48x48/psd.gif differ diff --git a/icons/osx/48x48/raw.gif b/icons/osx/48x48/raw.gif new file mode 100644 index 0000000..b6d37b6 Binary files /dev/null and b/icons/osx/48x48/raw.gif differ diff --git a/icons/osx/48x48/rtf.gif b/icons/osx/48x48/rtf.gif new file mode 100644 index 0000000..3cb92c4 Binary files /dev/null and b/icons/osx/48x48/rtf.gif differ diff --git a/icons/osx/48x48/rtx.gif b/icons/osx/48x48/rtx.gif new file mode 100644 index 0000000..3cb92c4 Binary files /dev/null and b/icons/osx/48x48/rtx.gif differ diff --git a/icons/osx/48x48/sit.gif b/icons/osx/48x48/sit.gif new file mode 100644 index 0000000..22f10f2 Binary files /dev/null and b/icons/osx/48x48/sit.gif differ diff --git a/icons/osx/48x48/sitx.gif b/icons/osx/48x48/sitx.gif new file mode 100644 index 0000000..38745a3 Binary files /dev/null and b/icons/osx/48x48/sitx.gif differ diff --git a/icons/osx/48x48/svg.gif b/icons/osx/48x48/svg.gif new file mode 100644 index 0000000..fd9d05f Binary files /dev/null and b/icons/osx/48x48/svg.gif differ diff --git a/icons/osx/48x48/svgz.gif b/icons/osx/48x48/svgz.gif new file mode 100644 index 0000000..1794ba4 Binary files /dev/null and b/icons/osx/48x48/svgz.gif differ diff --git a/icons/osx/48x48/swf.gif b/icons/osx/48x48/swf.gif new file mode 100644 index 0000000..ea0a4d2 Binary files /dev/null and b/icons/osx/48x48/swf.gif differ diff --git a/icons/osx/48x48/tar.gif b/icons/osx/48x48/tar.gif new file mode 100644 index 0000000..7e64592 Binary files /dev/null and b/icons/osx/48x48/tar.gif differ diff --git a/icons/osx/48x48/tbz.gif b/icons/osx/48x48/tbz.gif new file mode 100644 index 0000000..bada9c6 Binary files /dev/null and b/icons/osx/48x48/tbz.gif differ diff --git a/icons/osx/48x48/tga.gif b/icons/osx/48x48/tga.gif new file mode 100644 index 0000000..9f9130a Binary files /dev/null and b/icons/osx/48x48/tga.gif differ diff --git a/icons/osx/48x48/tgz.gif b/icons/osx/48x48/tgz.gif new file mode 100644 index 0000000..fa44e6a Binary files /dev/null and b/icons/osx/48x48/tgz.gif differ diff --git a/icons/osx/48x48/tif.gif b/icons/osx/48x48/tif.gif new file mode 100644 index 0000000..7abb065 Binary files /dev/null and b/icons/osx/48x48/tif.gif differ diff --git a/icons/osx/48x48/tiff.gif b/icons/osx/48x48/tiff.gif new file mode 100644 index 0000000..7abb065 Binary files /dev/null and b/icons/osx/48x48/tiff.gif differ diff --git a/icons/osx/48x48/txt.gif b/icons/osx/48x48/txt.gif new file mode 100644 index 0000000..2275cc5 Binary files /dev/null and b/icons/osx/48x48/txt.gif differ diff --git a/icons/osx/48x48/uu.gif b/icons/osx/48x48/uu.gif new file mode 100644 index 0000000..d9b09be Binary files /dev/null and b/icons/osx/48x48/uu.gif differ diff --git a/icons/osx/48x48/wav.gif b/icons/osx/48x48/wav.gif new file mode 100644 index 0000000..386a5d2 Binary files /dev/null and b/icons/osx/48x48/wav.gif differ diff --git a/icons/osx/48x48/wmf.gif b/icons/osx/48x48/wmf.gif new file mode 100644 index 0000000..4e5a1ca Binary files /dev/null and b/icons/osx/48x48/wmf.gif differ diff --git a/icons/osx/48x48/xls.gif b/icons/osx/48x48/xls.gif new file mode 100644 index 0000000..ef48599 Binary files /dev/null and b/icons/osx/48x48/xls.gif differ diff --git a/icons/osx/48x48/zip.gif b/icons/osx/48x48/zip.gif new file mode 100644 index 0000000..9ab95b1 Binary files /dev/null and b/icons/osx/48x48/zip.gif differ diff --git a/icons/osx/config.ini b/icons/osx/config.ini new file mode 100644 index 0000000..262438b --- /dev/null +++ b/icons/osx/config.ini @@ -0,0 +1,9 @@ +; Small icons, generally used in +; detailed views. +small = 16x16 + +; Large icons... +large = 48x48 + +; File extension of icon files +ext = .gif \ No newline at end of file diff --git a/libs/config.lib.php b/libs/config.lib.php index 2d3ec02..ae611c7 100644 --- a/libs/config.lib.php +++ b/libs/config.lib.php @@ -4,7 +4,7 @@ class config { /* - Class: config v0.1 beta + Class: config v0.2 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -17,7 +17,8 @@ class config { } // Main function - function parse ($input, $overwrite=true) { + function parse ($input, $overwrite=true, $pad=false) { + if ( !empty($pad) ) $this->_config_pad = $pad; if ( is_array($input) ) { $this->parse_array($input, $overwrite); } elseif ( is_string($input) ) { @@ -27,6 +28,7 @@ class config { $this->parse_ini_file($input); } } + unset($this->_config_pad); } // Parse settings from an array @@ -36,10 +38,12 @@ class config { if ( is_array($value) ) { foreach( $value as $k => $v ) { if ( ($empty = empty($this->$key)) || $overwrite ) { + if ( !empty($this->_config_pad) ) $k = $this->_config_pad.$k; $this->$key = ( $empty ) ? array($k=>$v) : array_merge($this->$key, array($k=>$v)) ; } } - } else { + } else { + if ( !empty($this->_config_pad) ) $key = $this->_config_pad.$key; if ( $overwrite || empty($this->$key) ) $this->$key = $value; } } diff --git a/libs/dirlist.lib.php b/libs/dirlist.lib.php index 7100616..c3e4961 100644 --- a/libs/dirlist.lib.php +++ b/libs/dirlist.lib.php @@ -4,7 +4,7 @@ class dirList { /* - Class: dirList v2.0 beta + Class: dirList v2.0.2 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -21,14 +21,16 @@ class dirList { var $reverse = false; // Smart date formatting + var $use_smartdate = true; var $smartdate = '{date}, {time}'; var $smartdate_date = 'F d, Y'; var $smartdate_time = 'H:i'; + var $standard_date_format = 'F d, Y, H:i'; // Internals var $error = false; - var $this_dir; + var $parent; var $list = array(); var $sort_by = array(); @@ -37,7 +39,8 @@ class dirList { var $stats_folders = 0; var $stats_totalsize = 0; - // Construtor + // Construtor - does nothing, but is here just + // incase it might do something in the future... function dirlist() { } @@ -50,7 +53,7 @@ class dirList { if(!preg_match("/\/$/", $dir)) $dir .= '/'; $this->sort_by = explode(',', $this->default_sort); if($dh = @opendir($dir)) { - $this->this_dir = $this->getDetails($dir); + $this->parent = $this->getDetails($dir); while(false !== ($item = readdir($dh))) { $hidden_item = ( $this->show_hidden ) ? false : preg_match("/^\./", $item) ; if( ($item != '.' && $item != '..') && !$hidden_item ) { @@ -64,12 +67,17 @@ class dirList { $this->stats_folders++; } // sorting - $list_key = ( $this->folders_first ) ? $item_details['type'].'|' : '' ; - foreach( $this->sort_by as $v ) { - if ( $v == 'size' ) $v = 'size_raw'; - $list_key .= ( $v == 'size_raw' || $v == 'mtime' ) ? str_pad($item_details[$v], 28, '0', STR_PAD_LEFT).'|' : $item_details[$v].'|' ; + if ( $this->sort_items ) { + $list_key = ( $this->folders_first ) ? $item_details['type'].'|' : '' ; + foreach( $this->sort_by as $v ) { + if ( $v == 'size' ) $v = 'size_raw'; + if ( $v == 'mtime' ) $v = 'mtime_raw'; + $list_key .= ( $v == 'size_raw' || $v == 'mtime' ) ? str_pad($item_details[$v], 28, '0', STR_PAD_LEFT).'|' : $item_details[$v].'|' ; + } + $this->list[strtolower($list_key)] = $item_details; + } else { + $this->list[] = $item_details; } - $this->list[$list_key] = $this->getDetails($dir.$item); } } if ( $this->sort_items ) { @@ -80,43 +88,64 @@ class dirList { closedir($dh); } - function getDetails ($item) { - $item = str_replace("\\", '/', $item); - $return['name'] = ( preg_match("/^.*\/(.*)/", $item, $name) ) ? $name[1] : $item ; - - // Owner and Group - if ( ($group = $this->getGroup($item)) != false ) $return = array_merge($return, $group); - if ( ($owner = $this->getOwner($item)) != false ) $return = array_merge($return, $owner); - - // Last Modified - $return['mtime'] = filemtime($item); - $return['mtimef'] = $this->smartDate($return['mtime'], $this->smartdate_date, $this->smartdate_time, $this->smartdate); - - // Permissions and CHMOD value - $return['perms'] = $this->format_perms(fileperms($item)); - $return['chmod'] = substr(sprintf('%o', fileperms($item)), -4); - - $return['type_raw'] = filetype($item); - - if ( is_file($item) ) { - $return['type'] = 'file'; - $return['ext'] = ( preg_match("/^.*\.(.*)/", $return['name'], $ext) ) ? $ext[1] : '' ; - $return['size_raw'] = filesize($item); - $return['size'] = $this->format_filesize($return['size_raw']); - } elseif ( is_dir($item) ) { - $return['type'] = 'dir'; - $return['ext'] = ''; - $return['size_raw'] = ''; - $return['size'] = '-'; - } - return $return; - } // ============================================== // ----- [ Internal Functions ] ----------------- // ============================================== + function getDetails ($item) { + $item = str_replace("\\", '/', $item); + $return['name'] = basename($item); + + // Owner and Group + if ( ($group = $this->getGroup($item)) != false ) $return = array_merge($return, $group); + if ( ($owner = $this->getOwner($item)) != false ) $return = array_merge($return, $owner); + + // Last Modified + $return['mtime_raw'] = filemtime($item); + if ( $this->use_smartdate ) { + $return['mtime'] = $this->smartDate($return['mtime_raw'], $this->smartdate_date, $this->smartdate_time, $this->smartdate); + } else { + $return['mtime'] = date($this->standard_date_format, $return['mtime_raw']); + } + + // Permissions and CHMOD value + $return['perms'] = $this->format_perms(fileperms($item)); + $return['chmod'] = substr(sprintf('%o', fileperms($item)), -4); + + $return['type_raw'] = filetype($item); + + $return['ext'] = ( preg_match("/^.*\.(.*)/", $return['name'], $ext) ) ? $ext[1] : '' ; + + if ( is_file($item) ) { + $return['type'] = 'file'; + $return['size_raw'] = filesize($item); + $return['size'] = $this->format_filesize($return['size_raw']); + } elseif ( is_dir($item) ) { + $return['type'] = 'dir'; + $return['size_raw'] = ''; + $return['size'] = '-'; + } + return $return; + } + + function getOwner ($item) { + if ( function_exists('posix_getpwuid') ) { + $id = fileowner($item); + $name = posix_getpwuid($id); + return array('ownerid'=>$id, 'owner'=>$name['name']); + } else { return false; } + } + + function getGroup ($item) { + if ( function_exists('posix_getgrgid') ) { + $id = filegroup($item); + $name = posix_getgrgid($id); + return array('groupid'=>$id, 'group'=>$name['name']); + } else { return false; } + } + function format_filesize($bytes) { $types = array('bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); for($n = 0; $bytes >= 1024; $n++) $bytes = $bytes / 1024; @@ -171,22 +200,6 @@ class dirList { return $info; } - function getOwner ($item) { - if ( function_exists('posix_getpwuid') ) { - $id = fileowner($item); - $name = posix_getpwuid($id); - return array('ownerid'=>$id, 'owner'=>$name['name']); - } else { return false; } - } - - function getGroup ($item) { - if ( function_exists('posix_getgrgid') ) { - $id = filegroup($item); - $name = posix_getgrgid($id); - return array('groupid'=>$id, 'group'=>$name['name']); - } else { return false; } - } - } ?> \ No newline at end of file diff --git a/libs/exechandler.lib.php b/libs/exechandler.lib.php index 93ac004..657ddf5 100644 --- a/libs/exechandler.lib.php +++ b/libs/exechandler.lib.php @@ -4,7 +4,7 @@ class execHandler { /* - Class: execHandler v0.7 beta + Class: execHandler v0.7.3 beta Copyright © 2006 Jim Myhrberg. All rights reserved. zynode@gmail.com @@ -88,6 +88,7 @@ class execHandler { var $compiled_code = false; var $include_file = false; var $stages = array(); + var $parsing_order = array(); // Construct Function @@ -109,7 +110,7 @@ class execHandler { function cache ($force=false) { if ( $force || $this->debug || !$this->check_cache() ) { - echo "reloading\n"; + if ( $this->debug ) echo "reloading\n"; $this->loadFile($this->files_to_load); $this->compile(); $this->save_cache(); @@ -129,14 +130,16 @@ class execHandler { } function loadFile ($input) { + $return = true; if ( is_array($input) ) { foreach( $input as $file ) { $result = $this->load_file($file); - if ( $result == false ) return false; + if ( $result == false ) $return = false; } } elseif ( is_string($input) ) { return $this->load_file($input); } + return $return; } function compile () { @@ -153,8 +156,7 @@ class execHandler { $pr = explode('|', $key, 2); $pr = $pr[0]; $this->compiled_code - .= ( $new_stage ) ? "\n// Code Piece: ".$code.":".$pr."\n" : "\n\n// Code Piece: ".$code.":".$pr."\n" ; - //$this->compiled_code .= "\n// Code Piece: ".$code."\n"; + .= ( $new_stage ) ? "\n// Section: ".$code.":".$pr."\n" : "\n\n// Section: ".$code.":".$pr."\n" ; $this->compiled_code .= $this->clean_up_code($this->code[$stage][$code]); $new_stage = false; } else { @@ -184,9 +186,9 @@ class execHandler { $content['file'] = $file; if ( $included ) $content['included'] = true; $this->files[$file] = $content; - return true; - }else return false; - } + } else return false; + } + return true; } function sort_stage_list () { @@ -199,6 +201,10 @@ class execHandler { } function parse ($string, $file) { + + // parse order statistics + $this->parsing_order[] = $file; + // Filter Out Main Content $file_start = $this->addslashes($this->file_start); $code_delim = $this->addslashes($this->code_delim); @@ -215,6 +221,7 @@ class execHandler { // Stage Loop $n = '001'; foreach ( $code as $value ) { + $sort_name = str_pad($settings['name'], 24, '_', STR_PAD_RIGHT); preg_match("/^(.*?)$(?s)(.*)/im", $value, $stage_code); if ( preg_match("/(.*)".$this->priority_delim."([0-9]{1,2})/i", trim($stage_code[1]), $stage) ) { $stage_priority = $stage[2]; @@ -231,14 +238,15 @@ class execHandler { $stage_code[0] = $this->clean_up_code($stage_code[0]); if ( !empty($stage_code[0]) ) { $this->code[$stage][$settings['name'].'.'.$this->default_stage_code] = "\n".$stage_code[0]; - $this->execution_order[$stage][$this->default_priority.'|'.$settings['name'].':'.$n.':'.$this->default_stage_code.'__main'] + $this->execution_order[$stage][$this->default_priority.'|'.$sort_name.':'.$n.':'.$this->default_stage_code.'__main'] = $settings['name'].'.'.$this->default_stage_code; $this->order_id[$stage][$settings['name'].'.'.$this->default_stage_code] - = $this->default_priority.'|'.$settings['name'].':'.$n.':'.'.'.$this->default_stage_code.'__main'; + = $this->default_priority.'|'.$sort_name.':'.$n.':'.'.'.$this->default_stage_code.'__main'; $n = str_pad($n+1, 3, '0', STR_PAD_LEFT); } array_shift($stage_code); + // Section Loop foreach( $stage_code as $value ) { preg_match("/^(.*?)$(?s)(.*)/im", $value, $section_code); @@ -259,6 +267,8 @@ class execHandler { } $section_code = $this->clean_up_code($section_code[2]); + $priority = str_pad($priority, 2, '0', STR_PAD_LEFT); + $section_sort_name = str_pad($section, 24, '_', STR_PAD_RIGHT); if ( !empty($section_code) ) { @@ -270,15 +280,15 @@ class execHandler { elseif ( $handler == $this->insert_before || $handler == $this->insert_after ) { $placement = ( $handler == $this->insert_before ) ? '___before' : '_zafter' ; $this->code[$stage][$settings['name'].'.'.$section] = "\n".$section_code; - $this->execution_order[$stage][$this->order_id[$stage][$section].$placement.'|'.$priority.'|'.$settings['name'].':'.$n] + $this->execution_order[$stage][$this->order_id[$stage][$section].$placement.'|'.$priority.'|'.$sort_name.':'.$n] = $settings['name'].'.'.$section; } // section elseif ( $handler == $this->section_delim || $handler == '' ) { $this->code[$stage][$settings['name'].'.'.$section] = "\n".$section_code; - $this->execution_order[$stage][$priority.'|'.$settings['name'].':'.$n.':'.$section.'__main'] + $this->execution_order[$stage][$priority.'|'.$sort_name.':'.$n.':'.$section_sort_name.'__main'] = $settings['name'].'.'.$section; - $this->order_id[$stage][$settings['name'].'.'.$section] = $priority.'|'.$settings['name'].':'.$n.':'.$section; + $this->order_id[$stage][$settings['name'].'.'.$section] = $priority.'|'.$sort_name.':'.$n.':'.$section_sort_name; } } $n = str_pad($n+1, 3, '0', STR_PAD_LEFT); @@ -329,6 +339,9 @@ class execHandler { function save_cache ($force_compile=false) { if(!preg_match("/\/$/", $this->cache_dir)) $this->cache_dir .= '/'; if ( is_writeable($this->cache_dir) ) { + if ( !file_exists($this->cache_dir.'.htaccess') ) { + $this->write2file($this->cache_dir.'.htaccess', 'Deny from all'); + } $cache_details = ''; foreach( $this->files as $key => $value ) { $cache_details .= $value['file'].'='.$value['md5']; @@ -411,6 +424,7 @@ class execHandler { function include_files ($input, $dirname='.') { $include_files = explode($this->include_seperator, $input); foreach( $include_files as $key => $value ) { + $value = trim($value); if ( $dirname == '.' && is_readable($value) ) { $this->load_file($value, true); } elseif ( is_readable($dirname.'/'.$value) ) { @@ -425,7 +439,7 @@ class execHandler { function clean_up_code ($string, $comments=true, $emptylines=true, $indents=false) { if ( $comments ) $string = $this->remove_comments($string); if ( $emptylines ) $string = $this->remove_empty_lines($string); - if ( $indents ) $string = $this->remove_indents($string); + if ( $indents && $this->debug != true) $string = $this->remove_indents($string); return trim($string); } diff --git a/resources/init.php b/resources/init.php index 7a989a9..1266725 100644 --- a/resources/init.php +++ b/resources/init.php @@ -15,8 +15,6 @@ $config['index_files'] = array('index.html', 'index.php', 'index.htm'); $config['default_scheme'] = 'http'; - - // process requested path if ( stristr($_SERVER['REQUEST_URI'], '?') !== false ) { $dir_url = explode('?', $_SERVER['REQUEST_URI']); diff --git a/templates/simple/index.phtml b/templates/simple/index.phtml new file mode 100644 index 0000000..a80a9c9 --- /dev/null +++ b/templates/simple/index.phtml @@ -0,0 +1,51 @@ + + +
+ +| + | Name | +Size | +Date Modified | +Permissions | +Owner | +
|---|---|---|---|---|---|
| =$parent['name']?> | +=$parent['size']?> | +=$parent['mtime']?> | +=$parent['perms']?> | +=$parent['owner']?> | +|
| =$item['name']?> | +=$item['size']?> | +=$item['mtime']?> | +=$item['perms']?> | +=$item['owner']?> | +