<?php
@version @since @author @copyright @package
require_once '../config/ApplicationCfg.php';
require_once PD_WEB_INCLUDES_ROOT. 'common.inc.php';
define('PAGE_ID' , 'install'. PD_WEB_FILE_EXT);
define('PAGE_TR_ID' , 'install');
define('_FILE_', basename(__FILE__));
define('DEFAULT_ACTION', 'INSTALLATION_NOTES');
$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 ($minExample = $Cache_Lite->get('minExample')) {
$Dbg->add('Getting $minExample from cache');
} else {
$minExample = $phpHighlighter->highlight(file_get_contents(PD_WEB_TESTS_ROOT. DIRECTORY_SEPARATOR. 'PHP_Debug_test'. PD_WEB_FILE_EXT));
$Dbg->add('Saving $minExample to the cache');
$Cache_Lite->save($minExample);
}
if ($fullExample = $Cache_Lite->get('fullExample')) {
$Dbg->add('Getting $fullExample from cache');
} else {
$fullExample = $phpHighlighter->highlight(file_get_contents(PD_WEB_TESTS_ROOT. DIRECTORY_SEPARATOR. 'PHP_Debug_HTML_Div_test'. PD_WEB_FILE_EXT));
$Dbg->add('Saving $fullExample to the cache');
$Cache_Lite->save($fullExample);
}
if ($arrayExample = $Cache_Lite->get('arrayExample')) {
$Dbg->add('Getting $arrayExample from cache');
} else {
$arrayExample = $phpHighlighter->highlight("
<?php
/**
* Options array for Debug object
*/
static private $options = array(
'DEBUG_restrict_access' => false,
'DEBUG_allow_url_access' => true,
'DEBUG_url_key' => 'pdw',
'DEBUG_url_pass' => 'pdw',
'DEBUG_enable_watch' => false,
'DEBUG_replace_errorhandler' => true,
'DEBUG_lang' => 'FR',
'HTML_TABLE_view_source_script_name' => 'PHP_Debug_ShowSource.php',
'HTML_TABLE_view_source_excluded_template' => array('')
);
?>");
$Dbg->add('Saving $arrayExample to the cache');
$Cache_Lite->save($arrayExample);
}
$smarty->assign('arrayExample', $arrayExample);
$smarty->assign('minExample', $minExample);
$smarty->assign('fullExample', $fullExample);
$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');
?> |