Changeset 19 for trunk/CustomOutput.php
- Timestamp:
- Mar 1, 2010, 8:03:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CustomOutput.php
r16 r19 11 11 var $GlobalTitle; 12 12 var $Title; 13 var $ShowRuntimeInfo = false; 14 var $Charset = 'utf-8'; 15 var $FormatHTML = false; 16 var $Admin = 'admin'; 17 var $AdminEmail = 'admin@localhost'; 18 var $Style = 'Basic'; 13 var $ShowRuntimeInfo; 14 var $Charset; 15 var $FormatHTML; 16 var $Admin; 17 var $AdminEmail; 18 var $Style; 19 var $Keywords; 19 20 21 function __construct($System) 22 { 23 parent::__construct($System); 24 $this->Charset = 'utf-8'; 25 $this->ShowRuntimeInfo = false; 26 $this->FormatHTML = false; 27 $this->Admin = 'admin'; 28 $this->AdminEmail = 'admin@localhost'; 29 $this->Style = 'Basic'; 30 $this->Keywords = array(); 31 } 32 20 33 function TopMenu() 21 34 { … … 81 94 $this->Document->Encoding = $this->Charset; 82 95 $this->Document->Formated = $this->FormatHTML; 96 83 97 $Style = new XMLTag('link'); 84 98 $Style->Attributes = array('rel' => 'stylesheet', 'href' => 'Style/'.$this->Style.'/Style.css', 85 99 'type' => 'text/css', 'media' => 'all'); 86 100 $this->Document->HeadTag->SubElements[] = $Style; 101 87 102 $JavaScript = new XMLTag('script'); 88 103 $JavaScript->Attributes = array('type' => 'text/javascript', 'src' => 'Style/'.$this->Style.'/Global.js'); 89 104 $JavaScript->ShringEmpty = false; 90 105 $this->Document->HeadTag->SubElements[] = $JavaScript; 106 91 107 $JavaScript = new XMLTag('script'); 92 108 $JavaScript->Attributes = array('type' => 'text/javascript', 'src' => 'Style/'.$this->Style.'/jquery.js'); 93 109 $JavaScript->ShringEmpty = false; 94 110 $this->Document->HeadTag->SubElements[] = $JavaScript; 95 $this->Document->TitleTag->SubElements = $this->GlobalTitle; //.' - '.$this->Title; 96 $this->Document->BodyTag->SubElements = array($this->TopMenu(), $this->PageMenu(), $Content, $this->Footer()); 111 112 $Title = $this->GlobalTitle; 113 if($this->Title != '') $Title .= ' - '.$this->Title; 114 $this->Document->TitleTag->SubElements = $Title; 115 $Title = '<span class="GlobalTitle">'.$this->GlobalTitle.'</span>'; 116 if($this->Title != '') $Title .= ' - '.$this->Title; 117 118 $Keywords = new XMLTag('meta'); 119 $Keywords->Attributes = array('name' => 'keywords', 'content' => implode(',', $this->Keywords)); 120 $Keywords->ShringEmpty = false; 121 $this->Document->HeadTag->SubElements[] = $Keywords; 122 123 $this->Document->BodyTag->SubElements = array('<div class="Title">'.$Title.'</div>', 124 $this->TopMenu(), $this->PageMenu(), $Content, $this->Footer()); 97 125 echo($this->Document->GetOutput()); 98 126 }
Note:
See TracChangeset
for help on using the changeset viewer.