<?php
@version @since @author @copyright @package
require_once '../config/ApplicationCfg.php';
require_once PD_WEB_INCLUDES_ROOT. 'common.inc.php';
define('PAGE_ID' , 'contact'. PD_WEB_FILE_EXT);
define('PAGE_TR_ID' , 'contact');
define('_FILE_', basename(__FILE__));
define('DEFAULT_ACTION', 'CONTACT');
$Dbg->setAction(DEFAULT_ACTION);
require_once 'Text/Highlighter.php';
require_once 'Text/Highlighter/Renderer/Html.php';
require_once('Cache/Lite.php');
$options = array(
'cacheDir' => PD_WEB_TEMP,
'lifeTime' => 3600
);
$Cache_Lite = new Cache_Lite($options);
$rendOptions = array(
'numbers' => $htmlOptions['HTML_TABLE_view_source_numbers'],
'tabsize' => $htmlOptions['HTML_TABLE_view_source_tabsize'],
);
$renderer = new Text_Highlighter_Renderer_Html($rendOptions);
$phpHighlighter = Text_Highlighter::factory("PHP");
$phpHighlighter->setRenderer($renderer);
if ($phpDebugStart = $Cache_Lite->get('phpDebugStart')) {
$Dbg->add('Getting phpDebugStart from cache');
} else {
$phpDebugStart = $phpHighlighter->highlight('
<?php
$tab = "<table width=100%>";
function dbg($str)
{
$tab .= "<tr><td>$str</td></tr>">;
}
...
echo $tab. \'</table>\';
?>
');
$Dbg->add('Saving phpDebugStart to the cache');
$Cache_Lite->save($phpDebugStart);
}
$smarty->assign('phpDebugStart', $phpDebugStart);
$smarty->assign('file', PD_WEB_PHP_DEBUG_ROOT. DIRECTORY_SEPARATOR. PAGE_ID);
$smarty->assign('bodyTpl', PAGE_TR_ID);
$smarty->assign('debugBuffer', $Dbg->getOutput());
$smarty->display('index.tpl');
?> |