2 /*=====================================================================*
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright ©2002-[#]year[#] Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Printer Root Element: Page (PrinterRootElementPage.php)
28 require_once('ISSO/PrinterRootElement.php');
31 * Printer Root Element: Page
33 * This root element represents the entire page and is usually used for all
34 * printer applications
37 * @copyright Copyright (c)2002 - [#]year[#], Blue Static
42 class BSPrinterRootElementPage
extends BSPrinterRootElement
51 * Language information array: ('langcode' =>, 'direction' =>, 'charset' =>)
54 private $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8');
62 // ###################################################################
66 * @param string Page title
68 function __construct($title)
70 $this->title
= $title;
73 // ###################################################################
75 * Sets the language array information
77 * @param array Language array
79 public function setLanguageInformation($lang)
81 $this->language
= $lang;
84 // ###################################################################
86 * Sets the path to the CSS style sheet
90 public function setStylesheet($stylesheet)
92 $this->stylesheet
= $stylesheet;
95 // ###################################################################
97 * Returns the HTML for all printed children elements
99 * @return string Printed HTML
101 protected function _paintChildren()
105 foreach ($this->children
AS $child)
107 $this->builder
.= "\n" . $child->paint() . "\n";
110 return $this->builder
;
113 // ###################################################################
115 * Tells the element to paint itself (and any children)
117 public function paint()
119 echo("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
120 echo("<html xml:lang=\"" . $this->language
['langcode'] . "\" lang=\"" . $this->language
['langcode'] . "\" dir=\"" . $this->language
['direction'] . "\">\n<head>");
121 echo("\n\t<title>" . sprintf(_('%1$s - %2$s'), BSRegister
::GetApplication(), $this->title
) . "</title>");
122 echo("\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $this->language
['charset'] . "\" />");
123 echo("\n\t<link rel=\"stylesheet\" href=\"" . $this->stylesheet
. "\" />");
125 echo("\n</head>\n<body>\n");
127 if (BSRegister
::GetType('PrinterNavigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR (defined('ISSO_PRINTER_NO_NAVIGATION') AND constant('ISSO_PRINTER_NO_NAVIGATION') != true
)))
129 echo BSRegister
::GetType('PrinterNavigation')->generate_header_html();
132 echo($this->_paintChildren());
134 if (BSRegister
::GetDebug() AND isset($_GET['query']))
139 if (is_array($this->registry
->modules
[ISSO_DB_LAYER
]->history
))
141 foreach ($this->registry
->modules
[ISSO_DB_LAYER
]->history
AS $query)
143 echo $this->registry
->modules
[ISSO_DB_LAYER
]->construct_query_debug($query);
149 if (BSRegister
::GetType('PrinterNavigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR (defined('ISSO_PRINTER_NO_NAVIGATION') AND constant('ISSO_PRINTER_NO_NAVIGATION') != true
)))
151 echo BSRegister
::GetType('PrinterNavigation')->generate_footer_html();
154 $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t<a href=\"http://www.bluestatic.org\" target=\"_blank\">" . BSRegister
::GetApplication() . ' ' . BSRegister
::GetAppVersion() . ", ©2002 - " . gmdate('Y') . " Blue Static</a>\n</p>";
156 if (!defined('ISSO_PRINTER_HIDE_SETUP'))
158 echo("\n$copyright");
159 //echo $this->registry->construct_debug_block(false);
162 echo("\n\n</body>\n</html>");
168 /*=====================================================================*
169 || ###################################################################
172 || ###################################################################
173 \*=====================================================================*/