Files
dlist/view.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

68 lines
1.3 KiB
PHP

<?php
/*
dList v2.1.1 beta
Copyright © 2006 Jim Myhrberg. All rights reserved.
zynode@gmail.com
*/
// initialization script - checks for index files
require_once('resources/init.php');
// initialize config object
require_once('libs/config.lib.php');
$config = new config($config);
$config->parse_php_file('config.php');
// include required libs
require_once('libs/speedometer.lib.php');
require_once('libs/dirlist.lib.php');
require_once('libs/exechandler.lib.php');
// initialize $timer
$timer = new speedometer();
// autodetect dList's install URL if not set
if ( empty($config->dlist_url) ) $config->dlist_url = preg_replace("/(.*)\/(.*?)$/i", "$1/", $_SERVER['SCRIPT_NAME']);
// initialize execHandler and main scripts
$exec = new execHandler();
$exec->update_frequency = 0;
$exec->show_debug_msg = false;
// configure cache dir for compiled code
$exec->cache_dir = $config->path_cache.'/exec/';
// debug?
if ( $config->debug ) $exec->debug = true;
// paths to load
$exec->addPath(
array(
'exec/core.exc.php',
'exec/*',
'templates/'.$config->template.'/*.exc.php',
)
);
foreach( $config->path_plugins as $key => $value ) {
$exec->addPath($value.'/*.exc.php');
}
$exec->cache();
include($exec->include_file);
if ($config->debug) {
echo "<br />\npage generated in ".$timer->end(8)." sec.<br />\n";
}
?>