Changeset 521
- Timestamp:
- Apr 14, 2013, 9:04:17 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 8 edited
- 12 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r518 r521 22 22 include_once(dirname(__FILE__).'/Page.php'); 23 23 include_once(dirname(__FILE__).'/Form/Form.php'); 24 include_once(dirname(__FILE__).'/../finance/bills.php');25 include_once(dirname(__FILE__).'/../finance/finance.php');26 24 include_once(dirname(__FILE__).'/../form_classes.php'); 27 25 … … 70 68 function RegisterPage($Path, $Handler) 71 69 { 72 $this->Pages[$Path] = $Handler; 70 if(is_array($Path)) 71 { 72 $Page = &$this->Pages; 73 $LastKey = array_pop($Path); 74 foreach($Path as $PathItem) 75 { 76 $Page = &$Page[$PathItem]; 77 } 78 if(!is_array($Page)) $Page = array('' => $Page); 79 $Page[$LastKey] = $Handler; 80 } else $this->Pages[$Path] = $Handler; 73 81 } 74 82 75 83 function SearchPage($PathItems, $Pages) 76 84 { 77 $PathItem = $PathItems[0]; 85 if(count($PathItems) > 0) $PathItem = $PathItems[0]; 86 else $PathItem = ''; 78 87 if(array_key_exists($PathItem, $Pages)) 79 88 { … … 86 95 } 87 96 97 function PageNotFound() 98 { 99 return('Page '.implode('/', $this->PathItems).' not found.'); 100 } 101 88 102 function ShowPage() 89 103 { … … 96 110 $Page->Database = &$this->Database; 97 111 $Page->GetOutput(); 98 } else echo( 'Page '.implode('/', $this->PathItems).' not found.');112 } else echo($this->PageNotFound()); 99 113 } 100 114 -
trunk/Common/Page.php
r519 r521 33 33 while(strpos($ScriptName, '//') !== false) 34 34 $ScriptName = str_replace('//', '/', $ScriptName); 35 if(strpos($ScriptName, '?') !== false) 36 $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '?')); 35 37 $ScriptName = substr($ScriptName, strlen($this->System->Link(''))); 36 38 if(substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1); -
trunk/Common/Version.php
r519 r521 1 1 <?php 2 2 3 $Revision = 5 19; // Subversion revision4 $DatabaseRevision = 517; 5 $ReleaseTime = '2013-04-1 3';3 $Revision = 521; // Subversion revision 4 $DatabaseRevision = 517; // SQL structure revision 5 $ReleaseTime = '2013-04-14'; 6 6 7 7 ?> -
trunk/Modules/Finance/Consumption.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceConsumption extends Page 3 class PageFinanceConsumption extends Page 6 4 { 7 5 var $FullTitle = 'Spotřeba energie'; 8 6 var $ShortTitle = 'Spotřeba'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function Show() … … 30 29 } 31 30 32 $System->AddModule(new FinanceConsumption());33 $System->Modules['FinanceConsumption']->GetOutput();34 35 31 ?> -
trunk/Modules/Finance/Customers.php
r519 r521 1 1 <?php 2 include_once('../Common/Global.php');3 2 4 class FinanceUserListextends Page3 class PageFinanceCustomers extends Page 5 4 { 6 var $FullTitle = 'Seznam účastníků sítě'; 7 var $ShortTitle = 'Seznam účastníků'; 5 var $FullTitle = 'Seznam zákazníků sítě'; 6 var $ShortTitle = 'Zákazníci'; 7 var $ParentClass = 'PageFinance'; 8 8 9 9 function Show() … … 79 79 } 80 80 81 $System->AddModule(new FinanceUserList());82 $System->Modules['FinanceUserList']->GetOutput();83 84 81 ?> -
trunk/Modules/Finance/Devices.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceDeviceListPage extends Page 3 class PageFinanceDeviceList extends Page 6 4 { 7 5 var $FullTitle = 'Zařízení sítě'; 8 6 var $ShortTitle = 'Zařízení'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function Show() … … 35 34 } 36 35 37 $System->AddModule(new FinanceDeviceListPage());38 $System->Modules['FinanceDeviceListPage']->GetOutput()39 40 36 ?> -
trunk/Modules/Finance/Finance.php
r505 r521 1 1 <?php 2 3 include_once(dirname(__FILE__).'/Overview.php'); 4 include_once(dirname(__FILE__).'/Consumption.php'); 5 include_once(dirname(__FILE__).'/Devices.php'); 6 include_once(dirname(__FILE__).'/Bill.php'); 7 include_once(dirname(__FILE__).'/Services.php'); 8 include_once(dirname(__FILE__).'/Customers.php'); 9 include_once(dirname(__FILE__).'/MonthlyOverall.php'); 10 include_once(dirname(__FILE__).'/Manage.php'); 11 include_once(dirname(__FILE__).'/UserState.php'); 12 include_once(dirname(__FILE__).'/Import.php'); 13 include_once(dirname(__FILE__).'/Zivnost.php'); 14 include_once(dirname(__FILE__).'/finance.php'); 2 15 3 16 class ModuleFinance extends AppModule … … 25 38 { 26 39 parent::Start(); 40 $this->System->RegisterPage('finance', 'PageFinance'); 41 $this->System->RegisterPage(array('finance', 'spotreba'), 'PageFinanceConsumption'); 42 $this->System->RegisterPage(array('finance', 'zarizeni'), 'PageFinanceDeviceList'); 43 $this->System->RegisterPage(array('finance', 'sluzby'), 'PageFinanceServices'); 44 $this->System->RegisterPage(array('finance', 'mesicni-prehledy'), 'PageFinanceMonthlyOverall'); 45 $this->System->RegisterPage(array('finance', 'zakaznici'), 'PageFinanceCustomers'); 46 $this->System->RegisterPage(array('finance', 'sprava'), 'PageFinanceManage'); 47 $this->System->RegisterPage(array('finance', 'platby'), 'PageFinanceUserState'); 48 $this->System->RegisterPage(array('finance', 'import'), 'PageFinanceImportPayment'); 49 $this->System->RegisterPage(array('finance', 'zivnost'), 'PageFinanceTaxFiling'); 27 50 } 28 51 -
trunk/Modules/Finance/Import.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceImportPayment extends Page 3 class PageFinanceImportPayment extends Page 6 4 { 7 5 var $FullTitle = 'Import plateb'; 8 6 var $ShortTitle = 'Import plateb'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function Show() … … 146 145 } 147 146 148 $System->AddModule(new FinanceImportPayment());149 $System->Modules['FinanceImportPayment']->GetOutput();150 151 147 ?> -
trunk/Modules/Finance/Manage.php
r519 r521 1 1 <?php 2 2 3 include_once(dirname(__FILE__).'/../Common/Global.php'); 4 5 class FinanceManagePage extends Page 3 class PageFinanceManage extends Page 6 4 { 7 5 var $FullTitle = 'Správa financí'; 8 6 var $ShortTitle = 'Správa financí'; 9 7 var $ParentClass = 'PageFinance'; 8 10 9 function Show() 11 10 { … … 74 73 $Output .= '<a href="?Operation=ShowMonthlyPayment">Měsíční vyúčtování</a><br />'; 75 74 //$Output .= '<a href="clenove.php">Seznam členů</a><br />'; 76 $Output .= '<a href=" zivnost.php">Živnost</a><br />';75 $Output .= '<a href="'.$this->System->Link('/finance/zivnost/').'">Živnost</a><br />'; 77 76 $Output .= '<a href="?Operation=GenerateBills">Generovat chybějící doklady</a><br />'; 78 $Output .= '<a href=" import.php">Import plateb</a><br />';77 $Output .= '<a href="'.$this->System->Link('/finance/import/').'">Import plateb</a><br />'; 79 78 } 80 79 return($Output); … … 632 631 } 633 632 634 $System->AddModule(new FinanceManagePage());635 $System->Modules['FinanceManagePage']->GetOutput();636 637 633 ?> -
trunk/Modules/Finance/MonthlyOverall.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceMonthlyOverallPage extends Page 3 class PageFinanceMonthlyOverall extends Page 6 4 { 7 5 var $FullTitle = 'Měsíční přehledy'; 8 6 var $ShortTitle = 'Měsíční přehledy'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function Show() … … 33 32 } 34 33 35 $System->AddModule(new FinanceMonthlyOverallPage());36 $System->Modules['FinanceMonthlyOverallPage']->GetOutput();37 38 34 ?> -
trunk/Modules/Finance/Overview.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceOverview extends Page 3 class PageFinance extends Page 6 4 { 7 5 var $FullTitle = 'Přehled financování sítě'; … … 14 12 $Output = '<table><tr><td valign="top">'; 15 13 16 $Output .= '<a href=" monthly_overall.php">Měsíční přehledy</a><br />';17 $Output .= '<a href=" tarify.php">Tarify</a><br />';18 $Output .= '<a href=" zarizeni.php">Výpis zařízení</a><br />';19 if($this->System->Modules['User']->CheckPermission('Finance', 'SubjectList')) $Output .= '<a href="clenove.php">Seznam členů</a><br />';20 $Output .= '<a href="spotreba.php">Spotřeba energie</a><br />';21 $Output .= '<a href="'.$this->System-> Config['Web']['RootFolder'].'/aktuality/index.php?category=9">Investice v síti</a><br />';22 //$Output .= '<a href=" faktury/">Faktury za internet</a><br />';14 $Output .= '<a href="'.$this->System->Link('/finance/mesicni-prehledy/').'">Měsíční přehledy</a><br />'; 15 $Output .= '<a href="'.$this->System->Link('/finance/sluzby/').'">Přehled nabízených služeb</a><br />'; 16 $Output .= '<a href="'.$this->System->Link('/finance/zarizeni/').'">Výpis zařízení</a><br />'; 17 if($this->System->Modules['User']->CheckPermission('Finance', 'SubjectList')) 18 $Output .= '<a href="'.$this->System->Link('/finance/zakaznici/').'">Seznam zákazníků</a><br />'; 19 $Output .= '<a href="'.$this->System->Link('/finance/spotreba/').'">Spotřeba energie</a><br />'; 20 //$Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/index.php?category=9">Investice v síti</a><br />'; 23 21 24 22 $Output .= '<br /><strong>Souhrn:</strong><br />'; … … 95 93 } 96 94 97 $System->AddModule(new FinanceOverview());98 $System->Modules['FinanceOverview']->GetOutput();99 100 95 ?> -
trunk/Modules/Finance/Services.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceTarrifsPage extends Page 3 class PageFinanceServices extends Page 6 4 { 7 5 var $FullTitle = 'Přehled tarifů'; 8 6 var $ShortTitle = 'Tarify'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function TariffTable() … … 69 68 } 70 69 71 $System->AddModule(new FinanceTarrifsPage());72 $System->Modules['FinanceTarrifsPage']->GetOutput();73 74 70 ?> -
trunk/Modules/Finance/UserState.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceUserState extends Page 3 class PageFinanceUserState extends Page 6 4 { 7 5 var $FullTitle = 'Stav financí účastníka'; 8 6 var $ShortTitle = 'Stav financí'; 7 var $ParentClass = 'PageFinance'; 9 8 10 9 function Show() … … 150 149 } 151 150 152 $System->AddModule(new FinanceUserState());153 $System->Modules['FinanceUserState']->GetOutput();154 155 151 ?> -
trunk/Modules/Finance/Zivnost.php
r519 r521 1 1 <?php 2 2 3 include_once('../Common/Global.php'); 4 5 class FinanceTaxFilingPage extends Page 3 class PageFinanceTaxFiling extends Page 6 4 { 7 5 var $FullTitle = 'Daňová evidence'; 8 6 var $ShortTitle = 'Daňová evidence'; 7 var $ParentClass = 'PageFinance'; 9 8 var $ExternalSubject = 96; 10 9 var $StartEvidence = 0; … … 376 375 } 377 376 378 $System->AddModule(new FinanceTaxFilingPage());379 $System->Modules['FinanceTaxFilingPage']->GetOutput();380 381 377 ?> -
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r502 r521 39 39 ); 40 40 $this->System->FormManager->RegisterClass('ImportBankFile', $FormClass); 41 $this->System->RegisterPage( 'finance', array('import-api' => 'PageImportAPI',42 'import-soubor' => 'PageImportFile'));41 $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI'); 42 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 43 43 } 44 44 -
trunk/Modules/Network/Network.php
r519 r521 8 8 include_once(dirname(__FILE__).'/UserHosts.php'); 9 9 10 class Page Networkextends Page10 class PageFrequencyPlan extends Page 11 11 { 12 var $FullTitle = ' Technické informace o síti';13 var $ShortTitle = ' Síť';14 var $ParentClass = 'Page Portal';12 var $FullTitle = 'Výpis obsazení frekvenčních kanálů'; 13 var $ShortTitle = 'Frekvenční plán'; 14 var $ParentClass = 'PageNetwork'; 15 15 16 16 function Show() 17 17 { 18 if(count($this->System->PathItems) > 1)19 {20 $this->ClearPage = true;21 if($this->System->PathItems[1] == 'administration') $Output = $this->NewPage('PageNetworkAdministration')->GetOutput();22 else if($this->System->PathItems[1] == 'availability') $Output = $this->NewPage('PageAvailability')->GetOutput();23 else if($this->System->PathItems[1] == 'subnet') $Output = $this->NewPage('PageSubnet')->GetOutput();24 else if($this->System->PathItems[1] == 'user_hosts') $Output = $this->NewPage('PageNetworkHostList')->GetOutput();25 else if($this->System->PathItems[1] == 'hosting') $Output = $this->NewPage('PageHosting')->GetOutput();26 else if($this->System->PathItems[1] == 'hosts') $Output = $this->NewPage('PageHostList')->GetOutput();27 else {28 $this->ClearPage = false;29 $Output = $this->ShowInformation();30 }31 } else $Output = $this->ShowInformation();32 return($Output);33 }34 35 function ShowInformation()36 {37 $Output = '';38 if(!array_key_exists('section', $_GET)) $_GET['section'] = '';39 switch($_GET['section'])40 {41 case 'obsazeni_wifi_kanalu':42 18 // http://en.wikipedia.org/wiki/List_of_WLAN_channels 43 19 //$ChannelList = array(2412 => 1, 2417 => 2, 2422 => 3, 2427 => 4, 2432 => 5, 2437 => 6, 2442 => 7, 2447 => 8, 2452 => 9, 2457 => 10, 2462 => 11, 2467 => 12, 2472 => 13, 5200 => 40, 5205 => 41, 5210 => 42, 5215 => 43, 5220 => 44, 5225 => 45, 5230 => 46, 5235 => 47, 5240 => 48, 5245 => 49, 5250 => 50, 5255 => 51, 5260 => 52, 5265 => 53, 5270 => 54, 5275 => 55, 5280 => 56, 5285 => 57, 5290 => 58, 5295 => 59, 5300 => 60, 5500 => 100, 5520 => 104, 5540 => 108, 5560 => 112, 5580 => 116, 5600 => 120, 5620 => 124, 5640 => 128, 5660 => 132, 5700 => 140, 5720 => 144); 44 $Output .= '<div align="center">'.20 $Output = '<div align="center">'. 45 21 '<a href="?section=obsazeni_wifi_kanalu&range=a">Pásmo 2,4 GHz (a)</a> '. 46 22 '<a href="?section=obsazeni_wifi_kanalu&range=bc">Pásmo 5 GHz dolní (b, c)</a> '. … … 94 70 } 95 71 $Output .= '</table>'; 96 break; 97 default: 98 $Output .= '<a href="?section=obsazeni_wifi_kanalu">Obsazení Wi-Fi kanálů</a><br />'; 99 $Output .= '<a href="'.$this->System->Link('/network/availability/').'">Měření dostupnosti zařízení</a><br />'; 100 $Output .= '<a href="'.$this->System->Link('/network/subnet/').'">Výpis registrovaných podsítí</a><br />'; 101 //$Output .= '<a href="tkr.php">Kanály kabelové televize</a>'; 102 } 72 return($Output); 73 } 74 } 75 76 class PageNetwork extends Page 77 { 78 var $FullTitle = 'Technické informace o síti'; 79 var $ShortTitle = 'Síť'; 80 var $ParentClass = 'PagePortal'; 81 82 function Show() 83 { 84 if(count($this->System->PathItems) > 1) 85 { 86 $Output = $this->PageNotFound(); 87 } else $Output = $this->ShowInformation(); 88 return($Output); 89 } 90 91 function ShowInformation() 92 { 93 $Output = '<a href="'.$this->System->Link('/network/frequency-plan/').'">Frekvenční plán</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 />'; 96 $Output .= '<a href="'.$this->System->Link('/network/hosts/').'">Registrované zařízení</a><br />'; 103 97 return($Output); 104 98 } … … 130 124 parent::Start(); 131 125 $this->System->RegisterPage('network', 'PageNetwork'); 126 $this->System->RegisterPage(array('network', 'administration'), 'PageNetworkAdministration'); 127 $this->System->RegisterPage(array('network', 'availability'), 'PageAvailability'); 128 $this->System->RegisterPage(array('network', 'subnet'), 'PageSubnet'); 129 $this->System->RegisterPage(array('network', 'user-hosts'), 'PageNetworkHostList'); 130 $this->System->RegisterPage(array('network', 'hosting'),'PageHosting'); 131 $this->System->RegisterPage(array('network', 'hosts'), 'PageHostList'); 132 $this->System->RegisterPage(array('network', 'frequency-plan'), 'PageFrequencyPlan'); 132 133 } 133 134 -
trunk/Modules/News/NewsPage.php
r515 r521 7 7 var $FullTitle = 'Aktualní informace'; 8 8 var $ShortTitle = 'Aktuality'; 9 var $ParentClass = 'PagePortal'; 9 10 var $UploadedFilesFolder = 'uploads/'; 10 11 -
trunk/Modules/Portal/Portal.php
r519 r521 75 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->Link('/finance/ user_state.php').'">Finance</a><br />';77 $Output .= '<a href="'.$this->System->Link('/finance/platby/').'">Finance</a><br />'; 78 78 if($this->System->Modules['User']->CheckPermission('Network', 'RegistredHostList')) 79 $Output .= '<a href="'.$this->System->Link('/network/user _hosts/').'">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 81 $Output .= '<a href="'.$this->System->Link('/aktuality/?action=add').'">Vložení aktuality</a><br />'; … … 83 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->Link('/finance/ manage.php').'">Správa financí</a><br />';85 $Output .= '<a href="'.$this->System->Link('/finance/sprava/').'">Správa financí</a><br />'; 86 86 if($this->System->Modules['User']->CheckPermission('Network', 'Administration')) 87 87 $Output .= '<a href="'.$this->System->Link('/network/administration/').'">Správa sítě</a><br />';
Note:
See TracChangeset
for help on using the changeset viewer.