Files
dlist/exec/core.exc.php
jim a8fe6d5a8c - added language support (still needs some tweaking, and swedish language file needs correct locale settings)
- removed timer.exc.php and put the needed intializer directly in view.php to get a more accurate reading from $timer->end()
- updated .htaccess settings to they for once work 100% as they should, and added httpd_dlist.conf to respository to keep track of any changes/updates needed to the .htaccess file or apache config file (depending how you implement dList)

git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@11 a5845835-ea0f-0410-a762-dd0bfe9bfde8
2006-04-01 23:24:32 +00:00

82 lines
1.7 KiB
PHP

<?php die();
//
// Exec: core
//
// Copyright © 2006 Jim Myhrberg. All rights reserved.
// zynode@gmail.com
//
//_HEAD;
/* --- Configuration ---
Name: core
Priority: 40
Author: Jim Myhrberg
Include: output.exc.php
*/
//_SCRIPT;
//==========================
//>STAGE> init
//==========================
//>Section> port_correction:20
if ( stristr($_SERVER['HTTP_HOST'], ':') !== false ) {
$http_host = explode(':', $_SERVER['HTTP_HOST'], 2);
$_SERVER['SERVER_PORT'] = $http_host[1];
unset($http_host);
}
preg_match("/(.*)Port [0-9]{2,8}(.*)/i", $_SERVER['SERVER_SIGNATURE'], $serverinfo);
$_SERVER['SERVER_SIGNATURE'] = $serverinfo[1].'Port '.$_SERVER['SERVER_PORT'].$serverinfo[2];
//>Section> define_constants:30
define('DIR_URL', $dir_url);
define('DIR_PATH', $dir_path);
define('QUERY_STRING', $query_string);
define('DLIST_URL', $config->dlist_url);
define('TEMPLATE', $config->template);
define('TPL_PATH', 'templates/'.TEMPLATE.'/');
define('TPL_URL', DLIST_URL.TPL_PATH);
//>Section> dynamic_vars
$do_readdir = true;
$do_render = true;
$do_sort_items = true;
$do_sort_reverse = false;
//==========================
//>STAGE> main
//==========================
//>Section> readdir
if ( $do_readdir ) {
//>Section> readdir.start
$dlist = new dirList();
//>Section> readdir.options
if ( empty($do_sort_items) ) {
$dlist->sort_items = false;
} elseif (!empty($do_sort_reverse)) $dlist->reverse = true;
if ($config->show_hidden) $dlist->show_hidden = true;
if ( !$config->smartdate ) $dlist->use_smartdate = false;
//>Section> readdir.read
$dlist->read(DIR_PATH);
//>Section> readdir.end
}
//==========================
//>STAGE> render
//==========================
//>Section> echo
//print_r($dlist->list);
//_END;
?>