Changeset 590 for trunk/Common/Page.php
- Timestamp:
- Nov 2, 2013, 12:10:42 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Page.php
r578 r590 13 13 var $ShortTitle; 14 14 var $FullTitle; 15 var $Encoding; 16 var $Style; 15 17 16 18 function __construct($System) … … 18 20 parent::__construct($System); 19 21 20 $this->FormatHTML = $this->System->Config['Web']['FormatHTML']; 21 $this->ShowRuntimeInfo = $this->System->Config['Web']['ShowRuntimeInfo']; 22 $this->FormatHTML = false; 23 $this->ShowRuntimeInfo = false; 24 $this->Encoding = 'utf-8'; 25 $this->Style = 'new'; 26 27 // TODO: Move to external code 28 if(isset($this->System->Config['Web']['FormatHTML'])) 29 $this->FormatHTML = $this->System->Config['Web']['FormatHTML']; 30 if(isset($this->System->Config['Web']['ShowRuntimeInfo'])) 31 $this->ShowRuntimeInfo = $this->System->Config['Web']['ShowRuntimeInfo']; 32 if(isset($this->System->Config['Web']['Charset'])) 33 $this->Encoding = $this->System->Config['Web']['Charset']; 34 if(isset($this->System->Config['Web']['Style'])) 35 $this->Style = $this->System->Config['Web']['Style']; 22 36 } 23 37 … … 48 62 { 49 63 $Navigation = ' > <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Navigation; 50 51 if( $Page->ParentClass != '')64 65 if(class_exists($Page->ParentClass)) 52 66 { 53 67 $PageClass = $Page->ParentClass; … … 61 75 if(isset($this->Load)) $BodyParam .= ' onload="'.$this->Load.'"'; 62 76 if(isset($this->Unload)) $BodyParam .= ' onunload="'.$this->Unload.'"'; 63 $Output = '<?xml version="1.0" encoding="'.$this-> System->Config['Web']['Charset'].'"?>'."\n".77 $Output = '<?xml version="1.0" encoding="'.$this->Encoding.'"?>'."\n". 64 78 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'. 65 79 '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">'. 66 '<head><link rel="stylesheet" href="'.$this->System->Link('/style/').$this->S ystem->Config['Web']['Style'].'/style.css" type="text/css" media="all" />'.67 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this-> System->Config['Web']['Charset'].'" />'.68 '<script type="text/javascript" src="'.$this->System->Link('/style/').$this->S ystem->Config['Web']['Style'].'/global.js"></script>'.80 '<head><link rel="stylesheet" href="'.$this->System->Link('/style/').$this->Style.'/style.css" type="text/css" media="all" />'. 81 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->Encoding.'" />'. 82 '<script type="text/javascript" src="'.$this->System->Link('/style/').$this->Style.'/global.js"></script>'. 69 83 '<title>'.$this->System->Config['Web']['Title'].' - '.$Path.'</title> 70 84 </head><body'.$BodyParam.'>'; … … 75 89 if($this->System->Config['Web']['UserSupport'] == 1) 76 90 { 77 if( $this->System->User->User['Id'] == null)91 if(isset($this->System->User) and ($this->System->User->User['Id'] == null)) 78 92 $Output .= '<a href="'.$this->System->Link('/?Action=LoginForm').'">Přihlášení</a> '. 79 93 '<a href="'.$this->System->Link('/?Action=UserRegister').'">Registrace</a>';
Note:
See TracChangeset
for help on using the changeset viewer.