Source for file SystemView.php
Documentation is available at SystemView.php
* DotBoost Technologies Inc.
* DotKernel Application Framework
* @copyright Copyright (c) 2009 DotBoost Technologies (http://www.dotboost.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @version $Id: SystemView.php 158 2010-06-25 08:59:20Z teo $
* class that prepare output related to User controller
* @author DotKernel Team <team@dotkernel.com>
* @param Dot_Template $tpl
* @param string $templateFile
$this->tpl->setFile('tpl_main', 'system/' . $templateFile . '.tpl');
$db = Zend_Registry::get('database');
$t= $db->fetchRow('select version() as ve');
$this->tpl->setVar('MYSQL',$t['ve']);
$this->tpl->setVar('ZFVERSION', Zend_Version::VERSION);
* @param string $templateFile
$this->tpl->setFile('tpl_main', 'system/' . $templateFile . '.tpl');
$this->tpl->setBlock('tpl_main', 'textarea', 'textarea_row');
$this->tpl->setBlock('tpl_main', 'options', 'options_row');
$this->tpl->setBlock('tpl_main', 'option', 'option_row');
$this->tpl->setBlock('tpl_main', 'radios', 'radios_row');
$this->tpl->setBlock('tpl_main', 'radio', 'radio_row');
$this->tpl->setVar('NAME', $v['title']);
$this->tpl->setVar('VARIABLE', $v['key']);
$this->tpl->setVar('DEFAULT', $v['possibleValues']);
$this->tpl->setVar('EXPLANATION', $v['comment']);
$this->tpl->setVar('CURRENT_VALUE', $v['value']);
$this->tpl->parse('textarea_row', 'textarea', true);
$this->tpl->parse('options_row', '');
$options = explode(';', $v['possibleValues']);
foreach ($options as $opt)
$this->tpl->setVar('LIST_OPTION', $opt);
$optionSelect = ($v['value'] == $opt) ? 'selected' : '';
$this->tpl->setVar('SELECTED_OPTION', $optionSelect);
$this->tpl->parse('options_row', 'options', true);
$this->tpl->parse('option_row', 'option', true);
$this->tpl->parse('radios_row', '');
$radios = explode(';', $v['possibleValues']);
foreach ($radios as $val)
$this->tpl->setVar('POSIBLE_VALUE', $val);
$radioTxt = ($val == 1) ? 'Yes' : 'No';
$this->tpl->setVar('POSIBLE_VALUE_TXT', $radioTxt);
$radioCheck = ($v['value'] == $val) ? 'checked' : '';
$this->tpl->setVar('CHECKED_OPTION', $radioCheck);
$this->tpl->parse('radios_row', 'radios', true);
$this->tpl->parse('radio_row', 'radio', true);
* @param string $templateFile
$this->tpl->setFile('tpl_main', 'system/' . $templateFile . '.tpl');
preg_match( "#<body>(.*)</body>#is" , $parsed, $match1 );
// PREVENT WRAP: Most cookies
// PREVENT WRAP: Very long string cookies
// PREVENT WRAP: Serialized array string cookies
$phpBody = str_replace( ";i:", ";<br />i:" , $phpBody );
$phpBody = preg_replace('#<table#', '<table class="grey" align="center"', $phpBody);
$phpBody = preg_replace('#<th#', '<th class="bgmain"', $phpBody);
$phpBody = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $phpBody);
$this->tpl->setVar("PHPINFO", $phpBody);
|