Changeset 385
- Timestamp:
- Jan 24, 2012, 11:40:43 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Page.php
r384 r385 12 12 var $ShowRuntimeInfo = false; 13 13 var $SimplePage = false; 14 var $PathTree = array('Rozcestník', 15 'index.php' => '', 16 'missing.php' => '', 17 'manualy.php' => 'Manuály', 18 'is' => array('', 19 'topologie.php' => 'Topologie sítě', 20 'dostupnost.php' => 'Dostupnost zařízení', 21 ), 22 'network.php' => 'Technické informace', 23 'map' => array('', 24 'index.php' => 'Mapa sítě', 25 ), 26 'network' => array('', 27 'administration.php' => 'Administrace sítě', 28 'dostupnost.php' => 'Dostupnost zařízení', 29 'restart.php' => 'Restart služeb', 30 ), 31 'nabidky_pripojeni.php' => 'Nabídky připojení', 32 'telseznam.php' => 'Telefonní seznam', 33 'merak.php' => 'Měřič spotřeby', 34 'tkr.php' => 'Kanály kabelové televize', 35 'LogShow.php' => 'Záznamy operací', 36 'share' => array('Prohledat sdílení', 37 'index.php' => '', 38 'firefox.php' => 'Integrace do prohlížeče', 39 ), 40 'hostlist.php' => 'Seznam počítačů', 41 'userlist.php' => 'Seznam uživatelů', 42 'farnost' => array('', 43 'index.php' => 'Rozpis mší', 44 ), 45 'finance' => array('Finance', 46 'index.php' => '', 47 'spotreba.php' => 'Spotřeba', 48 'zivnost.php' => 'Daňová evidence', 49 'prepocet.php' => 'Přepočet financí', 50 'changes.php' => 'Změny', 51 'tarify.php' => 'Tarify', 52 'inventory.php' => 'Skladové zásoby', 53 'clenove.php' => 'Seznam členů', 54 'zarizeni.php' => 'Zařízení', 55 'strom.php' => 'Strom zařízení', 56 'srovnani.php' => 'Porovnání tarifů s konkurencí', 57 'bills_manage.php' => 'Faktury', 58 'monthly_overall.php' => 'Měsíční přehledy', 59 'manage.php' => 'Správa financí', 60 'faktury' => array('', 61 'index.php' => 'Faktury za internet', 62 ), 63 ), 64 'statistic' => array('', 65 'trafficview.php' => 'Vytížení internetu', 66 'index.php' => 'Statistika', 67 'trafficview2.php' => 'Statistika', 68 'bandwidth.php' => 'Zatížení internetu', 69 'bandwidth_full.php' => 'Zatížení internetu všech počítačů', 70 ), 71 'fotbal.php' => 'Fotbal', 72 'webcam' => array('', 73 'index.php' => 'Web kamera', 74 ), 75 'navody.php' => 'Návody', 76 'ukoly.php' => 'Plánované projekty', 77 'otevreno.php' => 'Otvírací doby', 78 'aktuality' => array('', 79 'index.php' => 'Aktuality', 80 'subscription.php' => 'RSS aktuality', 81 ), 82 'sluzby.php' => 'Služby', 83 'history.php' => 'Historie', 84 'docs' => array('', 85 'zapisy' => array('', 86 'zapisy.php' => 'Zápisy ze schůzí', 87 ), 88 ), 89 'jidelna' => array('', 90 'index.php' => 'Jídelníček', 91 'menuedit.php' => 'Editace jídelníčku', 92 ), 93 'backup' => array('', 94 'index.php' => 'Nastavení zálohování', 95 ), 96 'mapa.php' => 'Mapa webu', 97 ); 98 99 function __construct() 14 var $NavigationPath = array(); 15 16 function __construct() 100 17 { 101 18 global $Config; … … 103 20 $this->FormatHTML = $Config['Web']['FormatHTML']; 104 21 $this->ShowRuntimeInfo = $Config['Web']['ShowRuntimeInfo']; 22 $this->NavigationPath[] = array('Name' => 'Rozcestník', 'URL' => ''); 105 23 } 106 24 … … 114 32 function ShowHeader($Title, $Path) 115 33 { 116 $ScriptName = $_SERVER['SCRIPT_NAME']; 117 while(strpos($ScriptName, '//') !== false) 118 $ScriptName = str_replace('//', '/', $ScriptName); 119 $PathTreePath = '/'; 120 $PathTreeItem = $this->PathTree; 121 $Navigation = '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > '; 122 $ScriptName = substr($ScriptName, strlen($this->System->Config['Web']['RootFolder'])); 123 $ScriptNameParts = explode('/', $ScriptName); 124 array_shift($ScriptNameParts); 125 foreach($ScriptNameParts as $ScriptNamePart) 126 { 127 //echo($ScriptNamePart.'<br />'); 128 if(array_key_exists($ScriptNamePart, $PathTreeItem)) 129 { 130 if(is_array($PathTreeItem[$ScriptNamePart])) 131 { 132 $PathTreeItem = $PathTreeItem[$ScriptNamePart]; 133 $PathTreePath .= $ScriptNamePart.'/'; 134 if($PathTreeItem[0] != '') 135 $Navigation .= '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> > '; 136 } else 137 { 138 if($PathTreeItem[$ScriptNamePart] != '') 139 $Navigation .= '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.$ScriptNamePart.'">'.$PathTreeItem[$ScriptNamePart].'</a> > '; 140 } 141 } 142 } 143 $Navigation = substr($Navigation, 0, -6); 34 $Navigation = ''; 35 $URL = ''; 36 foreach($this->NavigationPath as $Index => $PathItem) 37 { 38 if($URL != '') $URL .= '/'.$PathItem['URL']; 39 if($Index > 0) $Navigation .= ' > '; 40 $Navigation .= '<a href="'.$this->System->Config['Web']['RootFolder']. 41 $URL.'">'.$PathItem['Name'].'</a>'; 42 } 144 43 145 44 $BodyParam = ''; -
trunk/Common/Types/Type.php
r383 r385 7 7 include(dirname(__FILE__).'/String.php'); 8 8 include(dirname(__FILE__).'/Text.php'); 9 include(dirname(__FILE__).'/ PointerOneToMany.php');10 include(dirname(__FILE__).'/ PointerOneToOne.php');9 include(dirname(__FILE__).'/OneToMany.php'); 10 include(dirname(__FILE__).'/OneToMany2.php'); 11 11 include(dirname(__FILE__).'/Date.php'); 12 12 include(dirname(__FILE__).'/Time.php'); … … 46 46 'GPS' => array('Name' => 'GPS', 'Class' => 'GPS', 'ParentType' => '', 'Parameters' => array()), 47 47 'IPv4Address' => array('Name' => 'IPv4Address', 'Class' => 'IPv4Address', 'ParentType' => '', 'Parameters' => array()), 48 ' PointerOneToOne' => array('Name' => 'PointerOneToOne', 'Class' => 'PointerOneToOne', 'ParentType' => '', 'Parameters' => array()),49 ' PointerOneToMany' => array('Name' => 'PointerOneToMany', 'Class' => 'PointerOneToMany', 'ParentType' => '', 'Parameters' => array()),48 'OneToOne' => array('Name' => 'OneToOne', 'Class' => 'OneToOne', 'ParentType' => '', 'Parameters' => array()), 49 'OneToMany' => array('Name' => 'OneToMany', 'Class' => 'OneToMany', 'ParentType' => '', 'Parameters' => array()), 50 50 'Color' => array('Name' => 'Color', 'Class' => 'Color', 'ParentType' => '', 'Parameters' => array()), 51 51 ); -
trunk/Common/ViewList.php
r383 r385 124 124 'Type' => ViewItemTypeString, 'SQL' => $Name); 125 125 } 126 127 function AddItemText($Name, $Title) 128 { 129 $this->Columns[$Name] = array('Name' => $Name, 'Title' => $Title, 130 'Type' => ViewItemTypeText, 'SQL' => $Name); 131 } 132 133 function AddItemDateTime($Name, $Title) 134 { 135 $this->Columns[$Name] = array('Name' => $Name, 'Title' => $Title, 136 'Type' => ViewItemTypeDateTime, 'SQL' => $Name); 137 } 138 139 function AddItemOneToMany($Name, $Title, $TargetTable) 140 { 141 $this->Columns[$Name] = array('Name' => $Name, 'Title' => $Title, 142 'Type' => ViewItemTypeOneToMany, 'SQL' => $Name, 'TargetTable' => $TargetTable); 143 } 126 144 } 127 145 -
trunk/Modules/Chat/Chat.php
r378 r385 3 3 class ChatHistory extends Page 4 4 { 5 var $FullTitle = 'Výpis z historie chatu'; 6 var $ShortTitle = 'Historie chatu'; 7 5 function __construct() 6 { 7 parent::__construct(); 8 $this->FullTitle = 'Výpis z historie chatu'; 9 $this->ShortTitle = 'Historie chatu'; 10 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'chat'); 11 } 12 8 13 function dechexr($Num) 9 14 { … … 16 21 global $MonthNames; 17 22 18 if(!$this->System->Mod els['User']->CheckPermission('Chat', 'Display')) return('Nemáte oprávnění');23 if(!$this->System->Modules['User']->Models['User']->CheckPermission('Chat', 'Display')) return('Nemáte oprávnění'); 19 24 20 25 if(array_key_exists('date', $_GET)) $Date = $_GET['date']; -
trunk/Modules/Network/Dostupnost.php
r371 r385 14 14 //array('Column' => 'TenYear', 'Title' => 'Desetiletí', 'Period' => 87600), // 365 * 24 * 10 15 15 ); 16 17 function __construct() 18 { 19 parent::__construct(); 20 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'dostupnost'); 21 } 16 22 17 23 function Show() -
trunk/Modules/Network/HostList.php
r364 r385 5 5 var $FullTitle = 'Seznam registrovaných počítačů'; 6 6 var $ShortTitle = 'Seznam počítačů'; 7 8 function __construct() 9 { 10 parent::__construct(); 11 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'pocitace'); 12 } 7 13 8 14 function Show() -
trunk/Modules/Network/Network.php
r379 r385 12 12 class NetworkPage extends Page 13 13 { 14 var $FullTitle = 'Síť'; 15 var $ShortTitle = 'Síť'; 16 var $RowPerPage = 20; 17 14 function __construct() 15 { 16 parent::__construct(); 17 $this->FullTitle = 'Síť'; 18 $this->ShortTitle = 'Síť'; 19 $this->RowPerPage = 20; 20 $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'sit'); 21 } 22 18 23 function Show() 19 24 { … … 36 41 $Page->Config = &$this->Config; 37 42 $Page->System = &$this->System; 38 return($Page->Show()); 43 $Output = $Page->Show(); 44 array_shift($Page->NavigationPath); 45 $this->NavigationPath = array_merge($this->NavigationPath, $Page->NavigationPath); 46 return($Output); 39 47 } 40 48 } -
trunk/Modules/Project/Project.php
r383 r385 20 20 parent::__construct($System); 21 21 $this->Name = 'Project'; 22 //$this->AddPropertyDateTime('TimeSchedule'); 23 //$this->AddPropertyOneToMany('UserAssignedTo', 'User'); 24 //$this->AddPropertyText('Description'); 25 $this->AddItemString('Description', 'Description'); 22 $this->AddItemDateTime('TimeSchedule', 'Time schedule'); 23 $this->AddItemOneToMany('UserAssignedTo', 'User assigned to', 'User'); 24 $this->AddItemText('Description', 'Description'); 26 25 } 27 26 }
Note:
See TracChangeset
for help on using the changeset viewer.