mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
created a configuration object model, and other minor changes...
git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@6 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
31
view.php
31
view.php
@@ -12,32 +12,45 @@
|
||||
require_once('config.php');
|
||||
require_once('resources/init.php');
|
||||
require_once('libs/speedometer.lib.php');
|
||||
require_once('libs/config.lib.php');
|
||||
require_once('libs/dirlist.lib.php');
|
||||
require_once('libs/exechandler.lib.php');
|
||||
|
||||
$time = new speedometer();
|
||||
|
||||
// initialize config object
|
||||
$config = new config($config);
|
||||
|
||||
|
||||
// initialize debug stopwatch
|
||||
if ($config->debug) $debug_time = new speedometer();
|
||||
|
||||
|
||||
// initialize execHandler and main scripts
|
||||
$exec = new execHandler();
|
||||
$exec->cache_dir = 'cache/exec/';
|
||||
if ( $config['debug'] ) {
|
||||
$exec->debug = true;
|
||||
$exec->update_frequency = 0;
|
||||
}
|
||||
|
||||
// debug?
|
||||
if ( $config->debug ) $exec->debug = true;
|
||||
|
||||
// paths to load
|
||||
$exec->addPath(
|
||||
array(
|
||||
'exec/core.exc.php',
|
||||
'templates/'.$config['template'].'/render.exc.php',
|
||||
'exec/*',
|
||||
'templates/'.$config->template.'/render.exc.php',
|
||||
'plugins/*.exc.php',
|
||||
)
|
||||
);
|
||||
$exec->cache();
|
||||
include($exec->include_file);
|
||||
|
||||
print_r($exec->execution_order);
|
||||
|
||||
|
||||
$time->end();
|
||||
if ($config['debug']) echo "<br />\npage generated in ".$time->time." sec.<br />\n";
|
||||
if ($config->debug) {
|
||||
$debug_time->end();
|
||||
echo "<br />\npage generated in ".$debug_time->time." sec.<br />\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user