Changeset 518
- Timestamp:
- Apr 14, 2013, 5:15:25 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 4 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r517 r518 56 56 var $ModuleManager; 57 57 var $PathItems; 58 var $RootURLFolder; 58 59 59 60 function __construct() … … 153 154 function Link($Target) 154 155 { 155 global $Config; 156 157 return($Config['Web']['RootFolder'].$Target); 156 return($this->RootURLFolder.$Target); 158 157 } 159 158 } … … 182 181 $System->Database->ShowSQLError = $Config['Web']['ShowSQLError']; 183 182 $System->Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery']; 183 $System->RootURLFolder = $Config['Web']['RootFolder']; 184 184 185 185 // Check database persistence structure -
trunk/Common/Page.php
r501 r518 188 188 echo($Output); 189 189 } 190 191 function NewPage($ClassName) 192 { 193 $Page = new $ClassName(); 194 $Page->System = $this->System; 195 $Page->Database = $this->Database; 196 return($Page); 197 } 190 198 191 199 // Funkce formatovani vystupu -
trunk/Modules/Network/Administration.php
r516 r518 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class NetworkAdministrationPage extends Page 3 class PageNetworkAdministration extends Page 6 4 { 7 var $FullTitle = 'Administrace sítě'; 8 var $ShortTitle = 'Administrace sítě'; 5 function __construct() 6 { 7 parent::__construct(); 8 $this->FullTitle = 'Administrace sítě'; 9 $this->ShortTitle = 'Administrace sítě'; 10 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'sprava'); 11 } 9 12 10 13 function Show() … … 43 46 } 44 47 45 $System->AddModule(new NetworkAdministrationPage());46 $System->Modules['NetworkAdministrationPage']->GetOutput();47 48 48 ?> -
trunk/Modules/Network/Availability.php
r516 r518 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class Availability extends Page 3 class PageAvailability extends Page 6 4 { 7 5 var $FullTitle = 'Dostupnost aktivních prvků sítě'; … … 113 111 } 114 112 115 $System->AddModule(new Availability());116 $System->Modules['Availability']->GetOutput();117 118 113 ?> -
trunk/Modules/Network/Hosting.php
r516 r518 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class HostingPage extends Page 3 class PageHosting extends Page 6 4 { 7 5 var $FullTitle = 'Hostované projekty'; … … 21 19 } 22 20 23 $System->AddModule(new HostingPage());24 $System->Modules['HostingPage']->GetOutput();25 26 21 ?> -
trunk/Modules/Network/Network.php
r479 r518 1 1 <?php 2 2 3 include_once('HostList.php'); 3 include_once(dirname(__FILE__).'/HostList.php'); 4 include_once(dirname(__FILE__).'/Administration.php'); 5 include_once(dirname(__FILE__).'/Availability.php'); 6 include_once(dirname(__FILE__).'/Subnet.php'); 7 include_once(dirname(__FILE__).'/Hosting.php'); 8 include_once(dirname(__FILE__).'/UserHosts.php'); 4 9 5 class PageNetwork Informationextends Page10 class PageNetwork extends Page 6 11 { 7 12 var $FullTitle = 'Technické informace o síti'; … … 9 14 10 15 function Show() 16 { 17 if(count($this->System->PathItems) > 1) 18 { 19 if($this->System->PathItems[1] == 'administration') $Output = $this->NewPage('PageNetworkAdministration')->Show(); 20 else if($this->System->PathItems[1] == 'availability') $Output = $this->NewPage('PageAvailability')->Show(); 21 else if($this->System->PathItems[1] == 'subnet') $Output = $this->NewPage('PageSubnet')->Show(); 22 else if($this->System->PathItems[1] == 'user_hosts') $Output = $this->NewPage('PageNetworkHostList')->Show(); 23 else if($this->System->PathItems[1] == 'hosting') $Output = $this->NewPage('PageHosting')->Show(); 24 else if($this->System->PathItems[1] == 'hosts') $Output = $this->NewPage('PageHostList')->Show(); 25 else $Output = $this->ShowInformation(); 26 } else $Output = $this->ShowInformation(); 27 return($Output); 28 } 29 30 function ShowInformation() 11 31 { 12 32 $Output = ''; … … 72 92 default: 73 93 $Output .= '<a href="?section=obsazeni_wifi_kanalu">Obsazení Wi-Fi kanálů</a><br />'; 74 $Output .= '<a href=" network/dostupnost.php">Měření dostupnosti zařízení</a><br />';75 $Output .= '<a href=" network/subnet.php">Výpis registrovaných podsítí</a><br />';94 $Output .= '<a href="'.$this->System->Link('/network/availability/').'">Měření dostupnosti zařízení</a><br />'; 95 $Output .= '<a href="'.$this->System->Link('/network/subnet/').'">Výpis registrovaných podsítí</a><br />'; 76 96 //$Output .= '<a href="tkr.php">Kanály kabelové televize</a>'; 77 97 } … … 104 124 { 105 125 parent::Start(); 106 $this->System->RegisterPage('hostlist.php', 'PageHostList'); 107 $this->System->RegisterPage('network.php', 'PageNetworkInformation'); 126 $this->System->RegisterPage('network', 'PageNetwork'); 108 127 } 109 128 -
trunk/Modules/Network/Subnet.php
r516 r518 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class HostingPage extends Page 3 class PageSubnet extends Page 6 4 { 7 var $FullTitle = 'Informace o podsítích'; 8 var $ShortTitle = 'Podsítě'; 5 function __construct() 6 { 7 parent::__construct(); 8 $this->FullTitle = 'Informace o podsítích'; 9 $this->ShortTitle = 'Podsítě'; 10 } 9 11 10 12 function Show() … … 55 57 } 56 58 57 $System->AddModule(new HostingPage());58 $System->Modules['HostingPage']->GetOutput();59 60 59 ?> -
trunk/Modules/Network/UserHosts.php
r516 r518 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class NetworkHostList extends Page 3 class PageNetworkHostList extends Page 6 4 { 7 var $FullTitle = 'Registrované počítače'; 8 var $ShortTitle = 'Registrované počítače'; 5 function __construct() 6 { 7 parent::__construct(); 8 $this->FullTitle = 'Registrované počítače'; 9 $this->ShortTitle = 'Registrované počítače'; 10 } 9 11 10 12 function Show() … … 36 38 } 37 39 38 $System->AddModule(new NetworkHostList());39 $System->Modules['NetworkHostList']->GetOutput();40 41 40 ?> -
trunk/Modules/Portal/Portal.php
r515 r518 71 71 function UserPanel() 72 72 { 73 $Output = '<a href="'.$this->System-> Config['Web']['RootFolder'].'/?Action=UserOptions">Profil</a><br />';73 $Output = '<a href="'.$this->System->Link('/?Action=UserOptions').'">Profil</a><br />'; 74 74 if($this->System->Modules['User']->CheckPermission('Finance', 'MemberOptions')) 75 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'?Action=MemberOptions">Domácnost</a><br />';75 $Output .= '<a href="'.$this->System->Link('/?Action=MemberOptions').'">Domácnost</a><br />'; 76 76 if($this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState')) 77 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/finance/user_state.php">Finance</a><br />';77 $Output .= '<a href="'.$this->System->Link('/finance/user_state.php').'">Finance</a><br />'; 78 78 if($this->System->Modules['User']->CheckPermission('Network', 'RegistredHostList')) 79 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/network/user_hosts.php">Počítače</a><br />';79 $Output .= '<a href="'.$this->System->Link('/network/user_hosts/').'">Počítače</a><br />'; 80 80 if($this->System->Modules['User']->CheckPermission('News', 'Insert')) 81 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />';81 $Output .= '<a href="'.$this->System->Link('/aktuality/?action=add').'">Vložení aktuality</a><br />'; 82 82 if($this->System->Modules['User']->CheckPermission('EatingPlace', 'Edit')) 83 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/jidelna/menuedit.php">Editacejídelníčků</a><br />';83 $Output .= '<a href="'.$this->System->Link('/jidelna/menuedit.php').'">Úprava jídelníčků</a><br />'; 84 84 if($this->System->Modules['User']->CheckPermission('Finance', 'Manage')) 85 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/finance/manage.php">Správa financí</a><br />';85 $Output .= '<a href="'.$this->System->Link('/finance/manage.php').'">Správa financí</a><br />'; 86 86 if($this->System->Modules['User']->CheckPermission('Network', 'Administration')) 87 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/network/administration.php">Správa sítě</a><br />';87 $Output .= '<a href="'.$this->System->Link('/network/administration/').'">Správa sítě</a><br />'; 88 88 if($this->System->Modules['User']->CheckPermission('IS', 'Manage')) 89 89 $Output .= '<a href="'.$this->System->Link('/is/').'">Správa dat</a><br />';
Note:
See TracChangeset
for help on using the changeset viewer.