芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp80/includes/HTML/Progress/generator/default.php
* @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: default.php,v 1.4 2005/07/25 13:00:37 farell Exp $ * @link http://pear.php.net/package/HTML_Progress */ /** * The ActionDisplay class provides the default form rendering. * * PHP versions 4 and 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category HTML * @package HTML_Progress * @subpackage Progress_UI * @author Laurent Laville
* @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.2.6 * @link http://pear.php.net/package/HTML_Progress */ class ActionDisplay extends HTML_QuickForm_Action_Display { function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); $header = ' '; // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); $ui =& $bar->getUI(); $ui->setTab(' '); $header .= ' '; $placeHolders = array('{%style%}', '{%javascript%}'); $htmlElement = array( $bar->getStyle(), $bar->getScript() ); $header = str_replace($placeHolders, $htmlElement, $header); $barElement =& $page->getElement('progressBar'); $barElement->setText( $bar->toHtml() ); } else { $header = str_replace('{%style%}', '', $header); } $renderer =& $page->defaultRenderer(); $renderer->setFormTemplate($header.'
{content}
'); $renderer->setHeaderTemplate('
{header}
'); $renderer->setGroupTemplate('
{content}
', 'name'); $renderer->setGroupElementTemplate('
{element}
{label}
', 'name'); $page->accept($renderer); echo $renderer->toHtml(); } } ?>