Changeset 782
- Timestamp:
- Jan 9, 2016, 11:10:49 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/System.php
r781 r782 7 7 include_once(dirname(__FILE__).'/../Common/Global.php'); 8 8 include_once(dirname(__FILE__).'/FormClasses.php'); 9 include_once(dirname(__FILE__).'/FullInstall.php'); 10 include_once(dirname(__FILE__).'/UpdateTrace.php'); 11 include_once(dirname(__FILE__).'/View.php'); 9 12 10 13 class Core extends Application … … 80 83 function ShowPage() 81 84 { 85 $this->BaseView = new BaseView($this); 86 82 87 /* @var $Page Page */ 83 88 $ClassName = $this->SearchPage($this->PathItems, $this->Pages); … … 85 90 { 86 91 $Page = new $ClassName($this); 87 $Page->GetOutput();88 92 } else { 89 93 $Page = new PageMissing($this); 90 $Page->GetOutput();91 }94 } 95 echo($this->BaseView->GetOutput($Page)); 92 96 } 93 97 … … 99 103 function AddModule($Module) 100 104 { 101 //echo('Přidávám modul '.get_class($Module).'<br />');102 105 $this->Modules[get_class($Module)] = $Module; 103 106 } -
trunk/Application/View.php
r780 r782 3 3 define('PAGE_NOT_FOUND', 'Stránka nenalezena'); 4 4 5 class Page extends Model5 class BaseView extends View 6 6 { 7 7 var $TimeStart; … … 36 36 } 37 37 38 function Show()39 {40 return('');41 }42 43 38 function SystemMessage($Title, $Text) 44 39 { … … 48 43 } 49 44 50 function Show Header($Title, $Path)45 function ShowNavigation($Page) 51 46 { 52 47 if(array_key_exists('REQUEST_URI', $_SERVER)) … … 59 54 $ScriptName = substr($ScriptName, strlen($this->System->Link(''))); 60 55 if(substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1); 61 $Page = $this; 62 $ Navigation= '';56 57 $Output = ''; 63 58 while($Page) 64 59 { 65 $ Navigation = ' > <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Navigation;60 $Output = ' > <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Output; 66 61 67 62 if(class_exists($Page->ParentClass)) … … 72 67 } else $Page = null; 73 68 } 74 $Navigation = substr($Navigation, 6); 69 $Output = substr($Output, 6); 70 return($Output); 71 } 72 73 function ShowHeader($Page) 74 { 75 $Title = $Page->FullTitle; 76 $Path = $Page->ShortTitle; 77 78 $Navigation = $this->ShowNavigation($Page); 75 79 76 80 $BodyParam = ''; … … 83 87 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->Encoding.'" />'. 84 88 '<script type="text/javascript" src="'.$this->System->Link('/style/').$this->Style.'/global.js"></script>'. 85 '<title>'.$this->System->Config['Web']['Title'].' - '.$Path.'</title> 86 </head><body'.$BodyParam.'>'; 89 '<title>'.$this->System->Config['Web']['Title'].' - '.$Path.'</title>'; 90 $Output .= $this->System->ModuleManager->Modules['RSS']->ShowRSSHeader(); 91 $Output .= '</head><body'.$BodyParam.'>'; 87 92 if($this->BasicHTML == false) 88 93 { … … 118 123 } 119 124 120 function GetOutput( )125 function GetOutput($Page) 121 126 { 122 //try { 123 $Output = $this->Show(); 124 //} catch (Exception $E) { 125 // $Output = 'Chyba: '.$E->getMessage(); 126 //} 127 if($this->ClearPage == false) 127 $Output = $Page->Show(); 128 if($Page->ClearPage == false) 128 129 { 129 $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle).$Output; 130 $Output .= $this->ShowFooter(); 130 $Output = $this->ShowHeader($Page).$Output.$this->ShowFooter(); 131 131 if($this->FormatHTML == true) $Output = $this->FormatOutput($Output); 132 132 } 133 echo($Output);133 return($Output); 134 134 } 135 135 -
trunk/Common/Global.php
r781 r782 11 11 include_once(dirname(__FILE__).'/Table.php'); 12 12 include_once(dirname(__FILE__).'/Form/Form.php'); 13 include_once(dirname(__FILE__).'/Config.php');14 13 include_once(dirname(__FILE__).'/Setup/Setup.php'); 15 14 include_once(dirname(__FILE__).'/VCL/General.php'); -
trunk/Common/Setup/Setup.php
r780 r782 3 3 include_once(dirname(__FILE__).'/Update.php'); 4 4 include_once(dirname(__FILE__).'/DefaultConfig.php'); 5 include_once(dirname(__FILE__).'/FullInstall.php');6 include_once(dirname(__FILE__).'/Updates.php');7 5 8 6 class PageSetup extends Page -
trunk/Modules/RSS/RSS.php
r738 r782 43 43 foreach($this->RSSChannels as $Channel) 44 44 { 45 if($this->System->User->Licence($Channel['Permission']))45 //if($this->System->User->Licence($Channel['Permission'])) 46 46 $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'. 47 47 $this->System->Link('/rss/?channel='.$Channel['Channel']).'" type="application/rss+xml" />'; -
trunk/Packages/Common/Common.php
r779 r782 12 12 include_once(dirname(__FILE__).'/Application.php'); 13 13 include_once(dirname(__FILE__).'/AppModule.php'); 14 include_once(dirname(__FILE__).'/Config.php'); 14 15 15 16 class PackageCommon extends Package
Note:
See TracChangeset
for help on using the changeset viewer.