diff --git a/config.php b/config.php
index f3c267a..a7d8cdc 100644
--- a/config.php
+++ b/config.php
@@ -8,6 +8,10 @@ $config = array(
'index_files' => array('index', 'default', 'main'),
'debug' => true,
+
+// File system settings
+
+ 'show_hidden' => true,
// Display settings
diff --git a/exec/core.exc.php b/exec/core.exc.php
index ef5bc9e..634c241 100644
--- a/exec/core.exc.php
+++ b/exec/core.exc.php
@@ -1,10 +1,10 @@
STAGE> init
//==========================
+
+//>Section> define_constants
+define('DIR_URL', $dir_url);
+define('DIR_PATH', $dir_path);
+define('QUERY_STRING', $query_string);
+
+define('DLIST_URL', $config['url']);
+define('TEMPLATE', $config['template']);
+define('TPL_URL', DLIST_URL.'templates/'.TEMPLATE.'/');
+
+
//>Section> port_correction
if ( stristr($_SERVER['HTTP_HOST'], ':') !== false ) {
$http_host = explode(':', $_SERVER['HTTP_HOST'], 2);
@@ -28,25 +39,30 @@ if ( stristr($_SERVER['HTTP_HOST'], ':') !== false ) {
preg_match("/(.*)Port [0-9]{2,8}(.*)/", $_SERVER['SERVER_SIGNATURE'], $serverinfo);
$_SERVER['SERVER_SIGNATURE'] = $serverinfo[1].'Port '.$_SERVER['SERVER_PORT'].$serverinfo[2];
+
//>Section> set_vars
$do_readdir = true;
$do_render = true;
+
//==========================
//>STAGE> main
//==========================
+
//>Section> init_dList
if ( $do_readdir ) {
$dlist = new dirlist();
-// $dlist->show_hidden = true;
- $dlist->read($dir_path);
+ if ($config['show_hidden']) $dlist->show_hidden = true;
+ $dlist->read(DIR_PATH);
}
+
//==========================
//>STAGE> render
//==========================
+
//>Section> echo
print_r($dlist->list);
diff --git a/libs/dirlist.lib.php b/libs/dirlist.lib.php
index 3f3936e..0b7b533 100644
--- a/libs/dirlist.lib.php
+++ b/libs/dirlist.lib.php
@@ -4,8 +4,9 @@ class dirlist {
/*
- dirlist v2.0 beta
- Copyright © 2006 Jim Myhrberg.
+ Class: dirlist v2.0 beta
+
+ Copyright © 2006 Jim Myhrberg. All rights reserved.
zynode@gmail.com
*/
diff --git a/libs/exechandler.lib.php b/libs/exechandler.lib.php
index abf9e9d..6bde4e6 100644
--- a/libs/exechandler.lib.php
+++ b/libs/exechandler.lib.php
@@ -4,8 +4,9 @@ class execHandler {
/*
- execHandler v0.7 beta
- Copyright © 2006 Jim Myhrberg.
+ Class: execHandler v0.7 beta
+
+ Copyright © 2006 Jim Myhrberg. All rights reserved.
zynode@gmail.com
*/
@@ -140,11 +141,20 @@ class execHandler {
$this->compiled_code = '';
$this->sort_stage_list();
foreach( $this->stages as $stage => $stage_priority ) {
- if( $this->debug ) $this->compiled_code .= "\n\n//==========================\n// Stage: ".$stage."\n//==========================\n";
+ if( $this->debug ) {
+ $this->compiled_code
+ .= "\n\n//==========================\n// Stage: ".$stage.":".$stage_priority."\n//==========================\n";
+ $new_stage = true;
+ }
foreach( $this->execution_order[$stage] as $key => $code ) {
if( $this->debug ) {
- $this->compiled_code .= "\n// Code Piece: ".$code."\n";
+ $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";
$this->compiled_code .= $this->clean_up_code($this->code[$stage][$code]);
+ $new_stage = false;
} else {
$this->compiled_code .= $this->code[$stage][$code];
}
diff --git a/resources/init.php b/resources/init.php
index 3a4f3bc..08bd6c3 100644
--- a/resources/init.php
+++ b/resources/init.php
@@ -2,7 +2,7 @@
/*
- Copyright © 2006 Jim Myhrberg.
+ Copyright © 2006 Jim Myhrberg. All rights reserved.
zynode@gmail.com
*/
@@ -37,7 +37,7 @@ if ( !empty($redirect) ) {
$scheme = parse_url($_SERVER['SCRIPT_URI']);
$scheme = $scheme['scheme'];
} else $scheme = $config['default_scheme'];
- if($query_string != '') $query_string = '?'.$query_string;
+ if( !empty($query_string) ) $query_string = '?'.$query_string;
header("Location: ".$scheme.'://'.$_SERVER['HTTP_HOST'].$dir_url.$redirect.$query_string);
exit;
}
diff --git a/templates/simple/render.exc.php b/templates/simple/render.exc.php
index c168e27..6aedcfa 100644
--- a/templates/simple/render.exc.php
+++ b/templates/simple/render.exc.php
@@ -1,10 +1,10 @@
STAGE> init
//==========================
-echo "hello";
+
+
//_END;
?>
\ No newline at end of file
diff --git a/view.php b/view.php
index 59a77c2..022a0a2 100644
--- a/view.php
+++ b/view.php
@@ -3,7 +3,8 @@
/*
dList v0.7 beta
- Copyright © 2006 Jim Myhrberg.
+
+ Copyright © 2006 Jim Myhrberg. All rights reserved.
zynode@gmail.com
*/
@@ -33,6 +34,8 @@ $exec->addPath(
$exec->cache();
include($exec->include_file);
+print_r($exec->execution_order);
+
$time->end();
if ($config['debug']) echo "
\npage generated in ".$time->time." sec.
\n";