function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice($page->controller->_tabs, -2, 1); $p = new HTML_Page(array('lineend' => OS_WINDOWS ? 'win' : 'unix', 'doctype' => "XHTML 1.0 Strict", 'language' => 'en', 'cache' => 'false')); $p->disableXmlProlog(); $p->setTitle("PEAR::HTML_Progress - Generator"); $p->setMetaData("author", "Laurent Laville"); $css = new HTML_CSS(); $css->setStyle('body', 'background-color', '#7B7B88'); $css->setStyle('body', 'font-family', 'Verdana, Arial, helvetica'); $css->setStyle('body', 'font-size', '10pt'); $css->setStyle('h1', 'color', '#FFC'); $css->setStyle('h1', 'text-align', 'center'); $css->setStyle('.maintable', 'width', '100%'); $css->setStyle('.maintable', 'border-width', '0'); $css->setStyle('.maintable', 'border-style', 'thin dashed'); $css->setStyle('.maintable', 'border-color', '#D0D0D0'); $css->setStyle('.maintable', 'background-color', '#EEE'); $css->setStyle('.maintable', 'cellspacing', '2'); $css->setStyle('.maintable', 'cellspadding', '3'); $css->setStyle('th', 'text-align', 'center'); $css->setStyle('th', 'color', '#FFC'); $css->setStyle('th', 'background-color', '#AAA'); $css->setStyle('th', 'white-space', 'nowrap'); $css->setStyle('input', 'font-family', 'Verdana, Arial, helvetica'); $css->setStyle('input.flat', 'border-style', 'solid'); $css->setStyle('input.flat', 'border-width', '2px 2px 0px 2px'); $css->setStyle('input.flat', 'border-color', '#996'); // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); $p->addStyleDeclaration($css->toString() . $bar->getStyle()); $p->addScriptDeclaration($bar->getScript()); $barElement =& $page->getElement('progressBar'); $barElement->setText($bar->toHtml()); } else { $p->addStyleDeclaration($css->toString()); } $renderer =& $page->defaultRenderer(); $renderer->setFormTemplate('<table class="maintable"><form{attributes}>{content}</form></table>'); $renderer->setHeaderTemplate('<tr><th colspan="2">{header}</th></tr>'); $renderer->setGroupTemplate('<table><tr>{content}</tr></table>', 'name'); $renderer->setGroupElementTemplate('<td>{element}<br /><span style="font-size:10px;"><span class="label">{label}</span></span></td>', 'name'); $page->accept($renderer); $p->addBodyContent($renderer->toHtml()); $p->display(); }
function display() { $this->toHTML(); parent::display(); }
if (isset($vars['Sources'])) { require_once "HTML/Page.php"; require_once "../inc/html_settings.php"; // récupérer le répertoire ou se trouve le source ... $page = new HTML_Page(array('lineend' => 'unix', 'charset' => 'ISO-8859-1', 'doctype' => 'XHTML 1.0 Strict', 'language' => 'fr', 'cache' => 'false')); $page->setTitle('Phpaie -(SOurces)-'); $page->addBodyContent("<p align=\"center\"><font face=\"Arial\"><b><a href=\"Javascript:history.go(-1)\">retour</a></b></font></p>\n"); $page->addBodyContent("<table border=\"0\" bgcolor=\"#CCCCFF\" width=\"100%\"><caption>Objet :" . $this->getVar("PNAME") . " (Package :" . $dirName . ")</caption><tbody><tr><td>" . $this->getVar("PNAME") . "_def.php</td></tr></tbody></table>"); $dispFileName = "../" . $dirName . "/" . $this->getVar("PNAME") . "_def.php"; if (file_exists($dispFileName)) { $page->addBodyContent(highlight_file($dispFileName, 1)); } $page->addBodyContent("<table border=\"0\" bgcolor=\"#CCCCFF\" width=\"100%\"><caption>Objet :" . $this->getVar("PNAME") . " (Package :" . $dirName . ")</caption><tbody><tr><td>" . strtolower($this->getVar("PNAME")) . ".php</td></tr></tbody></table>"); $dispFileName = "../" . $dirName . "/" . strtolower($this->getVar("PNAME")) . ".php"; if (file_exists($dispFileName)) { $page->addBodyContent(highlight_file($dispFileName, 1)); } $page->addBodyContent("<table border=\"0\" bgcolor=\"#CCCCFF\" width=\"100%\"><caption>Objet :" . $this->getVar("PNAME") . " (Package :" . $dirName . ")</caption><tbody><tr><td>Business_" . strtolower($this->getVar("PNAME")) . ".php</td></tr></tbody></table>"); $dispFileName = "../" . $dirName . "/Business_" . strtolower($this->getVar("PNAME")) . ".php"; if (file_exists($dispFileName)) { $page->addBodyContent(highlight_file($dispFileName, 1)); } $page->addBodyContent("<p align=\"center\"><font face=\"Arial\"><b><a href=\"Javascript:history.go(-1)\">retour</a></b></font></p>\n"); $page->display(); // Sortie $status = -1; } } } } }
function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice($page->controller->_tabs, -2, 1); $tab = ' '; $p = new HTML_Page(array('lineend' => OS_WINDOWS ? 'win' : 'unix', 'tab' => $tab, 'doctype' => "XHTML 1.0 Strict", 'language' => 'en', 'cache' => 'false')); $p->disableXmlProlog(); $p->setTitle("PEAR::HTML_Progress - Generator"); $p->setMetaData("author", "Laurent Laville"); $css = ' body { background-color: #7B7B88; font-family: Verdana, Arial, helvetica; font-size: 10pt; } h1 { color: #FFC; text-align: center; } .maintable { width: 100%; border-width: 0; border-style: thin dashed; border-color: #D0D0D0; background-color: #EEE; cellspacing: 2; cellspadding: 3; } th { text-align: center; color: #FFC; background-color: #AAA; white-space: nowrap; } input { font-family: Verdana, Arial, helvetica; } input.flat { border-style: solid; border-width: 2px 2px 0px 2px; border-color: #996; } '; // on preview tab, add progress bar javascript and stylesheet if ($pageName == $tabPreview[0][0]) { $bar = $page->controller->createProgressBar(); $ui =& $bar->getUI(); $ui->setTab($tab); $p->addStyleDeclaration($css . $bar->getStyle()); $p->addScriptDeclaration($bar->getScript()); $barElement =& $page->getElement('progressBar'); $barElement->setText($bar->toHtml()); } else { $p->addStyleDeclaration($css); } $renderer =& $page->defaultRenderer(); $renderer->setFormTemplate('<table class="maintable"><form{attributes}>{content}</form></table>'); $renderer->setHeaderTemplate('<tr><th colspan="2">{header}</th></tr>'); $renderer->setGroupTemplate('<table><tr>{content}</tr></table>', 'name'); $renderer->setGroupElementTemplate('<td>{element}<br /><span style="font-size:10px;"><span class="label">{label}</span></span></td>', 'name'); $page->accept($renderer); $p->addBodyContent($renderer->toHtml()); $p->display(); }
function navDefaultDisplay($action, $part) { require_once "HTML/Page.php"; require_once "../inc/html_settings.php"; $page = new HTML_Page(array('lineend' => 'unix', 'doctype' => 'XHTML 1.0 Strict', 'language' => 'fr', 'cache' => 'false')); $page->addStyleSheet($css_style); $page->setTitle('Phpaie (NAV)'); $vars = $this->vars; $titles = $this->titles; // foreach ( $vars as $key=>$value ) // { // print "<li>\$key $key => \$value $value</li>\n"; // } //Callback method de vérification if ($this->isFormValidated() && $action != "") { $this->{$action}(); } if (($ret_ba = $this->businessAction()) != 0) { return $ret_ba; } // $Id: NAV_def.php,v 1.2 2004/07/20 21:33:14 j-charles Exp $ require_once 'conf3.php'; require_once 'DB/DB.php'; $dbc = DB::connect($liveuserConfig['permContainer']['dsn'], TRUE); $dbc->setFetchMode('DB_FETCHMODE_ASSOC'); // get the area_define_name and the area_name of each area in current language. $res = $dbc->query('SELECT A.area_define_name, AN.area_name FROM liveuser_areas AS A INNER JOIN liveuser_area_names AS AN ON A.area_id = AN.area_id INNER JOIN liveuser_languages AS L ON AN.language_id = L.language_id WHERE L.two_letter_name = ' . $dbc->quote($_GET['NAV_LANGUAGE']) . ' ORDER BY A.area_id'); $page->addBodyContent("<h3>Navigation</h3>\n"); $page->addBodyContent("<table border=\"0\" cellpadding=\"5\">\n"); // print navigation while ($row = $res->fetchRow()) { $page->addBodyContent(' <tr>'); $page->addBodyContent(' <td><li></td>'); $page->addBodyContent(' <td><a href="' . strtolower($row[0]) . '.php" target="main">' . $row[1] . '</a></td>'); $page->addBodyContent(' </tr>'); } $page->addBodyContent("</table>\n"); $page->addBodyContent("<p> </p>\n"); $page->addBodyContent("<form method=\"POST\" action=\"liveuser3login.php\" target=\"_parent\">\n"); $page->addBodyContent(" <select size=\"1\" onChange=\"submit()\" NAME=\"NAV_LANGUAGE\" >\n"); $res = $dbc->query('SELECT two_letter_name, native_name FROM liveuser_languages'); // print language options while ($row = $res->fetchRow()) { $page->addBodyContent(" <option value=\"" . $row[0] . "\" " . ($row['two_letter_name'] == $_GET['NAV_LANGUAGE'] ? 'selected' : '') . " >\n" . $row[1] . "\n</option>"); } $page->addBodyContent(" </select>\n"); //* @@@@FK_SET_VARS_INSERT_BEGINS_HERE@@@@ //* @@@@FK_SET_VARS_INSERT_ENDS_HERE@@@@ // $id_name = $this->getIdName(); //HTMSET.pl 498 $page->addBodyContent("<input type=\"hidden\" name=\"RETURN_STATUS\" VALUE=\"" . (isset($vars['RETURN_STATUS']) ? $vars['RETURN_STATUS'] : "") . "\">\n"); $page->addBodyContent("<input type=\"hidden\" name=\"{$id_name}\" readonly=\"readonly\" VALUE=\"" . (isset($vars[$id_name]) ? $vars[$id_name] : "") . "\">\n"); $page->addBodyContent("</form>\n"); $page->addBodyContent("<p> </p>\n"); $page->addBodyContent("<p> </p>\n"); $page->display(); return 0; }
/* vim: set expandtab tabstop=4 shiftwidth=4: */ // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997 - 2003 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 3.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | 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 world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Author: Klaus Guenther <*****@*****.**> | // +----------------------------------------------------------------------+ // // $Id: Page_NoDoctype.php,v 1.4 2003/07/13 00:18:45 thesaur Exp $ require_once "HTML/Page.php"; // With no initial settings, the following defaults are set: // -> lineends = unix (\12) // -> doctype = XHTML 1.0 Transitional // (if set to "none", doctype and language are not set) // -> language = en // -> cache = false $p = new HTML_Page('doctype="none"'); // "simple" Page title defaults to "New HTML Page" $p->addBodyContent("<h1>Headline</h1>"); $p->addBodyContent("<p>Some text</p>"); $p->display();