Changeset 737
- Timestamp:
- Apr 14, 2015, 10:16:16 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/System.php
r730 r737 179 179 if($this->Setup->CheckState()) 180 180 { 181 $this->ModuleManager->Start(); 182 } 183 } 184 181 $this->ModuleManager->Start(); 182 } 183 } 184 185 185 function Run() 186 186 { … … 196 196 { 197 197 global $argv; 198 198 199 199 $this->RunCommon(); 200 if(count($argv) > 1) 200 if(count($argv) > 1) 201 201 { 202 202 if(array_key_exists($argv[1], $this->CommandLine)) … … 206 206 { 207 207 $Class = new $Command['Callback'][0]($this); 208 $Output = $Class->$Command['Callback'][1](); 208 $Output = $Class->$Command['Callback'][1](); 209 209 } else $Output = call_user_func($Command['Callback']); 210 210 echo($Output); 211 } else echo('Command "'.$argv[1].'" not supported.'."\n"); 211 } else echo('Command "'.$argv[1].'" not supported.'."\n"); 212 212 } else echo('No command was given as parameter'."\n"); 213 213 } 214 214 215 215 function RegisterCommandLine($Name, $Callback) 216 216 { 217 217 $this->CommandLine[$Name] = array('Name' => $Name, 'Callback' => $Callback); 218 218 } 219 219 220 220 function RegisterPageBar($Name) 221 221 { -
trunk/Common/Form/Form.php
r719 r737 49 49 ($this->FormManager->FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 50 50 { 51 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) 51 if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) 52 52 $this->Values[$Index] = $Item['Default']; 53 53 } … … 85 85 ); 86 86 foreach($this->Definition['Items'] as $Index => $Item) 87 if(!array_key_exists('Hidden', $Item) or ($Item['Hidden'] == false)) 87 if(!array_key_exists('Hidden', $Item) or ($Item['Hidden'] == false)) 88 88 if(!array_key_exists($Item['Type'], $this->FormManager->FormTypes) or 89 89 (array_key_exists($Item['Type'], $this->FormManager->FormTypes) and … … 302 302 $Parameters); 303 303 } 304 } else 304 } else 305 305 { 306 306 if(isset($Item['Default'])) { … … 418 418 unset($this->FormTypes[$Name]); 419 419 } 420 421 function UpdateSQLMeta() 422 { 423 $this->Database->query('DELETE FROM ModelField'); 424 $this->Database->query('DELETE FROM Model'); 425 $this->Database->query('DELETE FROM DataType WHERE Parent IS NOT NULL'); 426 $this->Database->query('DELETE FROM DataType'); 427 428 foreach($this->Type->TypeDefinitionList as $Name => $Type) 429 { 430 $DbResult = $this->Database->select('DataType', 'Id', 'Name="'.$Name.'"'); 431 if($DbResult->num_rows == 0) 432 { 433 $this->Database->insert('DataType', array('Name' => $Name, 434 'Title' => $Type['Class'])); 435 } else 436 { 437 $DbRow = $DbResult->fetch_assoc(); 438 $this->Database->update('DataType', 'Id='.$DbRow['Id'], array('Name' => $Name, 439 'Title' => $Type['Class'])); 440 } 441 } 442 443 foreach($this->Classes as $Class) 444 if(!array_key_exists('SQL', $Class) and ($Class['Table'] != '')) 445 { 446 $DbResult = $this->Database->query('SELECT * FROM information_schema.tables WHERE table_schema = "centrala_big" 447 AND table_name = "'.$Class['Table'].'" LIMIT 1'); 448 if($DbResult->num_rows == 0) continue; 449 450 echo($Class['Table'].'<br>'); 451 $Module = 1; 452 $DbResult = $this->Database->select('Model', 'Id', 'Name="'.$Class['Table'].'"'); 453 if($DbResult->num_rows == 0) 454 { 455 $this->Database->insert('Model', array('Name' => $Class['Table'], 'Title' => $Class['Title'], 'Module' => $Module)); 456 $Model = $this->Database->insert_id; 457 } else 458 { 459 $DbRow = $DbResult->fetch_assoc(); 460 $Model = $DbRow['Id']; 461 $this->Database->update('Model', 'Id='.$DbRow['Id'], array('Name' => $Class['Table'], 462 'Title' => $Class['Title'], 'Module' => $Module)); 463 } 464 465 foreach($Class['Items'] as $Name => $Field) 466 { 467 echo($Name.', '); 468 $DbResult = $this->Database->select('DataType', 'Id', 'Name="'.$Field['Type'].'"'); 469 if($DbResult->num_rows > 0) 470 { 471 $DbRow = $DbResult->fetch_assoc(); 472 $Type = $DbRow['Id']; 473 } else { 474 $Type = $this->FormTypes[$Field['Type']]; 475 476 // Search parent type 477 $DbResult = $this->Database->select('DataType', 'Id', 'Name="'.$Type['Type'].'"'); 478 if($DbResult->num_rows > 0) 479 { 480 $DbRow = $DbResult->fetch_assoc(); 481 $ParentType = $DbRow['Id']; 482 } else $ParentType = null; 483 484 $this->Database->insert('DataType', array('Name' => $Field['Type'], 485 'Title' => '', 'Parent' => $ParentType)); 486 $Type = $this->Database->insert_id; 487 } 488 489 $DbResult = $this->Database->select('ModelField', 'Id', '(Name="'.$Name.'") AND (Model='.$Model.')'); 490 if($DbResult->num_rows == 0) 491 { 492 $this->Database->insert('ModelField', array('Name' => $Name, 493 'Title' => $Field['Caption'], 'Model' => $Model, 'Type' => $Type)); 494 } else 495 { 496 $DbRow = $DbResult->fetch_assoc(); 497 $this->Database->update('ModelField', 'Id='.$DbRow['Id'], array('Name' => $Name, 498 'Title' => $Field['Caption'], 'Model' => $Model, 'Type' => $Type)); 499 } 500 } 501 echo('<br>'); 502 } 503 } 420 504 } -
trunk/Common/Form/Types/Type.php
r659 r737 60 60 'Image' => array('Name' => 'Image', 'Class' => 'Image', 'ParentType' => '', 'Parameters' => array()), 61 61 'TimeDiff' => array('Name' => 'TimeDiff', 'Class' => 'TimeDiff', 'ParentType' => 'Integer', 'Parameters' => array()), 62 'Reference' => array('Name' => 'Reference', 'Class' => 'Reference', 'ParentType' => 'Integer', 'Parameters' => array()), 63 'ManyToOne' => array('Name' => 'ManyToOne', 'Class' => 'ManyToOne', 'ParentType' => '', 'Parameters' => array()), 62 64 ); 63 65 } -
trunk/Common/Setup/Setup.php
r731 r737 15 15 var $Updates; 16 16 var $ConfigDir; 17 17 18 18 function __construct($System) 19 19 { … … 24 24 $this->ConfigDir = dirname(__FILE__).'/../..'; 25 25 } 26 26 27 27 function LoginPanel() 28 28 { … … 36 36 return($Output); 37 37 } 38 38 39 39 function ControlPanel() 40 40 { 41 41 global $YesNo; 42 42 $Output = ''; 43 43 44 44 $Output .= 'Je připojení k databázi: '.$YesNo[$this->UpdateManager->Database->Connected()].'<br/>'; 45 45 if($this->UpdateManager->Database->Connected()) … … 58 58 $Output .= '<a href="?action=uninstall">Odinstalovat</a> '; 59 59 $Output .= '<a href="?action=modules">Správa modulů</a> '; 60 $Output .= '<a href="?action=models">Přegenerovat modely</a> '; 60 61 } else $Output .= '<a href="?action=install">Instalovat</a> '; 61 62 } … … 65 66 return($Output); 66 67 } 67 68 68 69 function Show() 69 70 { 70 71 global $ConfigDefinition, $DatabaseRevision, $Config, $Updates; 71 72 72 73 $this->UpdateManager = $this->System->Setup->UpdateManager; 73 74 $DefaultConfig = new DefaultConfig(); 74 75 $this->ConfigDefinition = $DefaultConfig->Get(); 75 76 $this->DatabaseRevision = $DatabaseRevision; 76 $this->Config = &$Config; 77 $this->Config = &$Config; 77 78 78 79 $Output = ''; … … 85 86 $Output .= $this->LoginPanel(); 86 87 } else 87 { 88 { 88 89 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 89 90 else $Action = ''; … … 94 95 $Output .= $this->LoginPanel(); 95 96 } else 97 if($Action == 'models') 98 { 99 $this->System->FormManager->UpdateSQLMeta(); 100 } else 96 101 if($Action == 'upgrade') 97 102 { 98 103 $Output .= '<h3>Povýšení</h3>'; 99 try { 104 try { 100 105 $Output .= $this->System->Setup->Upgrade(); 101 106 } catch (Exception $E) { … … 134 139 if($Action == 'modules') 135 140 { 136 $Output .= $this->ShowModules(); 141 $Output .= $this->ShowModules(); 137 142 } else 138 143 if($Action == 'configure_save') … … 161 166 return($Output); 162 167 } 163 168 164 169 function ShowModules() 165 170 { … … 201 206 return($Output); 202 207 } 203 208 204 209 function ShowList() 205 210 { 206 211 global $YesNo; 207 212 208 213 $Output = ''; 209 214 210 215 $Pageing = new Paging(); 211 216 $Pageing->TotalCount = count($this->System->ModuleManager->Modules); … … 227 232 else $Dependencies = ' '; 228 233 $Actions = ''; 229 if($Module->Installed == true) 234 if($Module->Installed == true) 230 235 { 231 236 $Actions .= ' <a href="?action=modules&op=uninstall&name='.$Module->Name.'">Odinstalovat</a>'; … … 234 239 if($Module->InstalledVersion != $Module->Version) $Actions .= ' <a href="?action=modules&op=upgrade&name='.$Module->Name.'">Povýšit</a>'; 235 240 } else $Actions .= ' <a href="?action=modules&op=install&name='.$Module->Name.'">Instalovat</a>'; 236 241 237 242 $Table->Table->Cells[] = array($Module->Name, 238 $Module->Creator, $Module->Version, 243 $Module->Creator, $Module->Version, 239 244 $Module->License, $YesNo[$Module->Installed], 240 245 $YesNo[$Module->Enabled], $Module->Description, 241 246 $Dependencies, $Actions); 242 247 } 243 $Output .= $Pageing->Show(); 248 $Output .= $Pageing->Show(); 244 249 $Output .= $Table->Show(); 245 $Output .= $Pageing->Show(); 250 $Output .= $Pageing->Show(); 246 251 //$Output .= '<p><a href="?A=SaveToDb">Uložit do databáze</a></p>'; 247 252 return($Output); 248 253 } 249 254 250 255 function PrepareConfig($Config) 251 256 { … … 283 288 return($Output); 284 289 } 285 290 286 291 function ConfigSave($DefaultConfig) 287 292 { … … 319 324 return($Output); 320 325 } 321 326 322 327 function CreateConfig($Config) 323 328 { 324 329 $Output = "<?php\n\n". 325 330 "\$IsDeveloper = in_array(\$_SERVER['REMOTE_ADDR'], array('127.0.0.1'));\n\n"; 326 331 327 332 foreach($this->ConfigDefinition as $Def) 328 333 { … … 353 358 if(!$this->Database->Connected()) $Output .= 'Nelze se připojit k databázi.<br>'; 354 359 else { 355 if(!$this->System->Setup->UpdateManager->IsInstalled()) 360 if(!$this->System->Setup->UpdateManager->IsInstalled()) 356 361 $Output .= 'Systém vyžaduje instalaci databáze.<br>'; 357 362 else 358 if(!$this->System->Setup->UpdateManager->IsUpToDate()) 363 if(!$this->System->Setup->UpdateManager->IsUpToDate()) 359 364 $Output .= 'Systém vyžaduje aktualizaci databáze.<br>'; 360 365 } … … 367 372 { 368 373 var $UpdateManager; 369 374 370 375 function Start() 371 376 { 372 377 global $DatabaseRevision; 373 378 374 379 $this->System->RegisterPage('', 'PageSetupRedirect'); 375 380 $this->System->RegisterPage('setup', 'PageSetup'); … … 382 387 $this->UpdateManager->Trace = $Updates->Get(); 383 388 $this->UpdateManager->InstallMethod = 'FullInstall'; 384 } 385 389 } 390 386 391 function Stop() 387 392 { … … 390 395 $this->System->UnregisterPage('setup'); 391 396 } 392 397 393 398 function CheckState() 394 399 { … … 396 401 $this->UpdateManager->IsUpToDate()); 397 402 } 398 403 399 404 function Install() 400 405 { 401 406 global $DatabaseRevision; 402 407 403 408 $this->Database->query('CREATE TABLE IF NOT EXISTS `SystemVersion` ( 404 409 `Id` int(11) NOT NULL AUTO_INCREMENT, … … 415 420 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;"); 416 421 } 417 422 418 423 function Uninstall() 419 424 { … … 422 427 $this->Database->query('DROP TABLE `SystemVersion`'); 423 428 } 424 429 425 430 function IsInstalled() 426 431 { … … 428 433 return($DbResult->num_rows > 0); 429 434 } 430 435 431 436 function Upgrade() 432 437 { -
trunk/Modules/File/File.php
r721 r737 149 149 'Name' => 'Name', 150 150 'Filter' => '1', 151 )); 151 )); 152 152 $this->System->FormManager->RegisterFormType('TFile', array( 153 153 'Type' => 'Reference', -
trunk/Modules/Finance/Finance.php
r729 r737 222 222 'BeforeInsert' => array($this, 'BeforeInsertFinanceOperation'), 223 223 )); 224 224 225 225 $this->System->FormManager->RegisterClass('FinanceTreasuryIn', $this->System->FormManager->Classes['FinanceOperation']); 226 226 $this->System->FormManager->Classes['FinanceTreasuryIn']['Title'] = 'Pokladní příjmy'; … … 232 232 $this->System->FormManager->Classes['FinanceTreasuryIn']['Items']['DocumentLine']['Filter'] = true; 233 233 $this->System->FormManager->Classes['FinanceTreasuryIn']['Items']['BankAccount']['Hidden'] = true; 234 234 235 235 $this->System->FormManager->RegisterClass('FinanceTreasuryOut', $this->System->FormManager->Classes['FinanceOperation']); 236 236 $this->System->FormManager->Classes['FinanceTreasuryOut']['Title'] = 'Pokladní výdeje'; … … 242 242 $this->System->FormManager->Classes['FinanceTreasuryOut']['Items']['DocumentLine']['Filter'] = true; 243 243 $this->System->FormManager->Classes['FinanceTreasuryOut']['Items']['BankAccount']['Hidden'] = true; 244 244 245 245 $this->System->FormManager->RegisterClass('FinanceAccountIn', $this->System->FormManager->Classes['FinanceOperation']); 246 246 $this->System->FormManager->Classes['FinanceAccountIn']['Title'] = 'Příjmy na účet'; … … 252 252 $this->System->FormManager->Classes['FinanceAccountIn']['Items']['DocumentLine']['Filter'] = true; 253 253 $this->System->FormManager->Classes['FinanceAccountIn']['Items']['Treasury']['Hidden'] = true; 254 255 254 255 256 256 $this->System->FormManager->RegisterClass('FinanceAccountOut', $this->System->FormManager->Classes['FinanceOperation']); 257 257 $this->System->FormManager->Classes['FinanceAccountOut']['Title'] = 'Výdeje z účtu'; … … 263 263 $this->System->FormManager->Classes['FinanceAccountOut']['Items']['DocumentLine']['Filter'] = true; 264 264 $this->System->FormManager->Classes['FinanceAccountOut']['Items']['Treasury']['Hidden'] = true; 265 265 266 266 $this->System->FormManager->RegisterFormType('TFinanceOperationDirection', array( 267 267 'Type' => 'Enumeration', … … 303 303 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['DocumentLine']['Hidden'] = true; 304 304 $this->System->FormManager->Classes['FinanceInvoiceIn']['Items']['DocumentLine']['Filter'] = true; 305 305 306 306 $this->System->FormManager->RegisterClass('FinanceInvoiceOut', $this->System->FormManager->Classes['FinanceInvoice']); 307 307 $this->System->FormManager->Classes['FinanceInvoiceOut']['Title'] = 'Vydané faktury'; … … 317 317 'States' => array(-1 => 'Příjem', 1 => 'Výdej'), 318 318 )); 319 319 320 320 $this->System->FormManager->RegisterClass('Company', array( 321 321 'Title' => 'Firma', … … 333 333 'Description' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => 'Položka'), 334 334 'Price' => array('Type' => 'Float', 'Caption' => 'Částka', 'Default' => '0', 'Suffix' => 'Kč'), 335 'Quantity' => array('Type' => ' Integer', 'Caption' => 'Množství', 'Default' => '1'),335 'Quantity' => array('Type' => 'Float', 'Caption' => 'Množství', 'Default' => '1'), 336 336 'VAT' => array('Type' => 'Integer', 'Caption' => 'Daň', 'Default' => '21', 'Suffix' => '%'), 337 337 'Total' => array('Type' => 'Integer', 'Caption' => 'Celkem', 'Default' => '', 'Suffix' => 'Kč', … … 393 393 'Name' => 'Comment', 394 394 'Filter' => '1', 395 )); 395 )); 396 396 $this->System->FormManager->RegisterClass('FinanceBank', array( 397 397 'Title' => 'Banky', … … 495 495 '(SELECT `FinanceBank`.`Code` FROM `FinanceBank` WHERE `FinanceBank`.`Id`=`FinanceBankAccount`.`Bank`), ")")', 496 496 'Filter' => '1', 497 )); 497 )); 498 498 499 499 $this->System->AddModule(new Bill($this->System)); -
trunk/Modules/Portal/Portal.php
r686 r737 14 14 $this->Description = 'Community portal.'; 15 15 $this->Dependencies = array('News'); 16 } 16 } 17 17 18 18 function DoInstall() 19 19 { 20 20 } 21 21 22 22 function DoUninstall() 23 { 24 } 25 23 { 24 } 25 26 26 function DoStart() 27 27 { … … 29 29 $this->System->FormManager->RegisterClass('MemberOptions', array( 30 30 'Title' => 'Nastavení domácnosti', 31 'Table' => '(SELECT Member.Id, Member.FamilyMemberCount, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject)', 31 'SQL' => '(SELECT Member.Id, Member.FamilyMemberCount, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject)', 32 'Table' => 'MemberOptions', 32 33 'Items' => array( 33 34 'Name' => array('Type' => 'String', 'Caption' => 'Fakturační jméno', 'Default' => ''), … … 43 44 )); 44 45 $this->System->ModuleManager->Modules['User']->UserPanel[] = array('PagePortal', 'UserPanel'); 45 } 46 46 } 47 47 48 function DoStop() 48 { 49 } 49 { 50 } 50 51 } 51 52 … … 54 55 var $FullTitle = 'Zděchovský rozcestník'; 55 56 var $ShortTitle = 'Rozcestník'; 56 57 57 58 function ShowActions($ActionGroup) 58 59 { 59 $Output = ''; 60 $DbResult = $this->Database->query('SELECT `Id` FROM `Action` '. 60 $Output = ''; 61 $DbResult = $this->Database->query('SELECT `Id` FROM `Action` '. 61 62 'WHERE (`Action`.`Group`='.$ActionGroup['Id'].') AND (`Action`.`Enable` = 1)'); 62 63 while($Action = $DbResult->fetch_assoc()) … … 76 77 77 78 $DbResult = $this->Database->query('SELECT COUNT(*) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1)'); 78 $DbRow = $DbResult->fetch_array(); 79 $DbRow = $DbResult->fetch_array(); 79 80 $OnlineComputers = $DbRow[0]; 80 81 … … 115 116 { 116 117 $Output = '<a href="'.$this->System->Link('/user/?Action=UserOptions').'">Profil</a><br />'; 117 if($this->System->User->CheckPermission('Finance', 'MemberOptions')) 118 if($this->System->User->CheckPermission('Finance', 'MemberOptions')) 118 119 $Output .= '<a href="'.$this->System->Link('/?Action=MemberOptions').'">Domácnost</a><br />'; 119 if($this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) 120 if($this->System->User->CheckPermission('Finance', 'DisplaySubjectState')) 120 121 $Output .= '<a href="'.$this->System->Link('/finance/platby/').'">Finance</a><br />'; 121 if($this->System->User->CheckPermission('Network', 'RegistredHostList')) 122 if($this->System->User->CheckPermission('Network', 'RegistredHostList')) 122 123 $Output .= '<a href="'.$this->System->Link('/network/user-hosts/').'">Počítače</a><br />'; 123 if($this->System->User->CheckPermission('News', 'Insert')) 124 if($this->System->User->CheckPermission('News', 'Insert')) 124 125 $Output .= '<a href="'.$this->System->Link('/aktuality/?action=add').'">Vložení aktuality</a><br />'; 125 126 if($this->System->User->CheckPermission('EatingPlace', 'Edit')) … … 143 144 return($Output); 144 145 } 145 146 146 147 function OnlineHostList() 147 148 { … … 167 168 return($Output); 168 169 } 169 170 170 171 function Panel($Title, $Content, $Menu = array()) 171 172 { 172 if(count($Menu) > 0) 173 if(count($Menu) > 0) 173 174 foreach($Menu as $Item) 174 175 $Title .= '<div class="Action">'.$Item.'</div>'; … … 197 198 'Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, '. 198 199 'Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject '. 199 'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']); 200 'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']); 200 201 $DbRow = $DbResult->fetch_array(); 201 202 foreach($Form->Definition['Items'] as $Index => $Item) … … 216 217 if($Form->Values['BillingPeriodNext'] < 2) 217 218 $Form->Values['BillingPeriodNext'] = 2; 218 219 $DbResult = $this->Database->update('Member', 'Id='.$this->System->User->User['Member'], 220 array('FamilyMemberCount' => $Form->Values['FamilyMemberCount'], 219 220 $DbResult = $this->Database->update('Member', 'Id='.$this->System->User->User['Member'], 221 array('FamilyMemberCount' => $Form->Values['FamilyMemberCount'], 221 222 'BillingPeriodNext' => $Form->Values['BillingPeriodNext'])); 222 223 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->User->User['Member']); 223 224 $Member = $DbResult->fetch_assoc(); 224 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], 225 array('Name' => $Form->Values['Name'], 'AddressStreet' => $Form->Values['AddressStreet'], 225 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], 226 array('Name' => $Form->Values['Name'], 'AddressStreet' => $Form->Values['AddressStreet'], 226 227 'AddressTown' => $Form->Values['AddressTown'], 'AddressCountry' => $Form->Values['AddressCountry'], 227 'AddressPSC' => $Form->Values['AddressPSC'], 'IC' => $Form->Values['IC'], 228 'AddressPSC' => $Form->Values['AddressPSC'], 'IC' => $Form->Values['IC'], 228 229 'DIC' => $Form->Values['DIC'])); 229 230 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 230 $this->System->ModuleManager->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', 231 $this->System->ModuleManager->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', 231 232 $Form->Values['Name']); 232 233 $DbResult = $this->Database->query('SELECT Member.Id, Member.FamilyMemberCount, Member.BillingPeriodNext, '. … … 241 242 $Form->OnSubmit = '?Action=MemberOptionsSave'; 242 243 $Output .= $Form->ShowEditForm(); 243 } 244 } 244 245 } else $Output = $this->ShowMain(); 245 246 return($Output); 246 247 } 247 248 248 249 function ShowMain() 249 250 { … … 260 261 while($PanelColumn = $DbResult->fetch_assoc()) 261 262 { 262 if($PanelColumn != '') $Width = ' width="'.$PanelColumn['Width'].'"'; 263 if($PanelColumn != '') $Width = ' width="'.$PanelColumn['Width'].'"'; 263 264 else $Width = ''; 264 265 $Output .= '<td valign="top"'.$Width.'>'; … … 268 269 if($Panel['Module'] == 'ActionGroup') $Output .= $this->ShowActions($ActionGroups[$Panel['Parameters']]); 269 270 else if($Panel['Module'] == 'OnlineHostList') $Output .= $this->Panel('Online počítače', $this->OnlineHostList()); 270 else if($Panel['Module'] == 'UserOptions') 271 else if($Panel['Module'] == 'UserOptions') 271 272 { 272 273 //if($this->System->User->User['Id'] != null) $Output .= $this->Panel('Přihlášený uživatel', $this->UserPanel()); … … 274 275 if($Panel['Module'] == 'Webcam') $Output .= $this->Panel('Kamery', $this->WebcamPanel()); 275 276 if($Panel['Module'] == 'Meteo') $Output .= $this->Panel('Meteostanice', $this->MeteoPanel()); 276 else if($Panel['Module'] == 'NewsGroupList') 277 else if($Panel['Module'] == 'NewsGroupList') 277 278 $Output .= $this->Panel('Aktuality', $this->System->ModuleManager->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>')); 278 279 } 279 280 $Output .= '</td>'; 280 } 281 } 281 282 $Output .= '</tr></table>'; 282 283 return($Output); 283 } 284 } 284 285 } -
trunk/ToDo.txt
r607 r737 4 4 - Map: Aktualizovat na google maps api v3 5 5 - Meteostation: Čtení dat z meteostanice 6 - Finance: umožnit uzavření účetního roku7 6 - Finance: generovat doklady do podsložek dle roků 8 7 - Automatické blokování internetu při vyčerpání kreditu 9 8 - ServiceVPS: Modul pro správu VPS hostingu 10 - Meals: Osamostatnit web jídelny11 9 - Mail: Funkce pro rozesílání hromadných emailů 12 10 - Podpora pro inventůru -
trunk/temp/meteo/load_meteo.php
r733 r737 130 130 foreach($Collect as $Index => $Item) 131 131 { 132 sort($Collect[$Index]); 132 sort($Collect[$Index]); 133 133 } 134 134 file_get_contents($URL.'?MeasureId=28&Value='.median($Collect['Temperature']));
Note:
See TracChangeset
for help on using the changeset viewer.