X-Git-Url: https://git.llucax.com/software/bife/base.git/blobdiff_plain/778ce089e6282126a7003291ec93e3557ad6df2d..95271ba1e01d8ed30952e77692c4a185e16855ca:/examples/index.php diff --git a/examples/index.php b/examples/index.php index 656561b..5377064 100644 --- a/examples/index.php +++ b/examples/index.php @@ -26,40 +26,7 @@ // $Id$ // -// Inicialization {{{ -ini_set('include_path', '../src:../../hit/src:../../bife/src:'. - ini_get('include_path')); -umask('002'); -require_once 'HTML/Template/HIT.php'; -require_once 'BIFE/Parser.php'; -require_once 'BIFE/Translate.php'; -// }}} - -// Selects the file to view {{{ -$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf'; -#$file = isset($_SERVER['PATH_INFO']) ? ".{$_SERVER['PATH_INFO']}" : 'index.xbf'; -// }}} - -// Looks if we want to show the source {{{ -if (@$_REQUEST['S']) { - if (@$_REQUEST['B']) { - // We want to see the BIFE file source. - echo '
';
-        echo htmlentities(join('', file($file)));
-    } else {
-        // We want to see the php file source.
-        highlight_file($_SERVER['SCRIPT_FILENAME']);
-    }
-    exit;
-}
-// }}}
-
-// If we are not looking at the source, we use BIFE to show the page {{{
-$template =& new HTML_Template_HIT('templates');
-$parser   =& new BIFE_Parser('BIFE_Translate');
-$page     =& $parser->parseFile($file);
-$parser->__destruct();
-echo $page->render($template);
-// }}}
+// Starts bife.
+header('Location: bife/');
 
 ?>