Changeset 729 for trunk/Modules
- Timestamp:
- Jan 12, 2015, 12:20:30 AM (10 years ago)
- Location:
- trunk/Modules
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/Finance.php
r728 r729 380 380 'ReadOnly' => true, 'Suffix' => 'Kč', 'SQL' => '(SELECT SUM(`FinanceOperation`.`Value` * `FinanceOperation`.`Direction`) FROM `FinanceOperation` '. 381 381 'WHERE `FinanceOperation`.`BankAccount`=#Id)'), 382 'AutoImport' => array('Type' => 'Boolean', 'Caption' => 'Automaticky stahovat z banky', 'Default' => ''), 382 383 ), 383 384 'ItemActions' => array( -
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r639 r729 4 4 include_once(dirname(__FILE__).'/ImportPS.php'); 5 5 include_once(dirname(__FILE__).'/ImportFio.php'); 6 include_once(dirname(__FILE__).'/../Scheduler/Scheduler.php'); 6 7 7 8 class ModuleFinanceBankAPI extends AppModule … … 15 16 $this->License = 'GNU/GPLv3'; 16 17 $this->Description = 'Communication through API to various banks, manual file import'; 17 $this->Dependencies = array('Finance' );18 $this->Dependencies = array('Finance', 'Scheduler'); 18 19 } 19 20 … … 58 59 59 60 $this->System->RegisterPage(array('finance', 'import-api'), 'PageImportAPI'); 60 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 61 $this->System->RegisterPage(array('finance', 'import-soubor'), 'PageImportFile'); 61 62 } 62 63 … … 81 82 } 82 83 } 84 85 class ScheduleBankImport extends SchedulerTask 86 { 87 function Execute() 88 { 89 $Output = ''; 90 $DbResult = $this->Database->select('FinanceBankAccount', 'Id', '(AutoImport=1) AND ((TimeEnd IS NULL) OR (TimeEnd > NOW()))'); 91 while($DbRow = $DbResult->fetch_assoc()) 92 { 93 $Page = new PageImportAPI($this->System); 94 $Output .= $Page->Show(); 95 } 96 return($Output); 97 } 98 } -
trunk/Modules/User/User.php
r711 r729 66 66 $this->OnlineStateTimeout = 600; // in seconds 67 67 $this->PasswordHash = new PasswordHash(); 68 $this->User = array('Id' => null, 'Member' => null); 68 69 } 69 70 … … 694 695 function TopBarCallback() 695 696 { 696 if($this->System->User->User['Id'] == null) 697 if($this->System->User->User['Id'] == null) 698 { 697 699 $Output = '<a href="'.$this->System->Link('/user/?Action=LoginForm').'">Přihlášení</a> '. 698 700 '<a href="'.$this->System->Link('/user/?Action=UserRegister').'">Registrace</a>'; 699 else $Output = $this->System->User->User['Name']. 701 } else 702 { 703 $Output = $this->System->User->User['Name']. 700 704 ' <a href="'.$this->System->Link('/user/?Action=UserMenu').'">Nabídka</a>'. 701 705 ' <a href="'.$this->System->Link('/user/?Action=Logout').'">Odhlásit</a>'; 702 // <a href="'.$this->System->Link('/?Action=UserOptions').'">Nastavení</a>'; 706 // <a href="'.$this->System->Link('/?Action=UserOptions').'">Nastavení</a>'; 707 } 703 708 return($Output); 704 709 }
Note:
See TracChangeset
for help on using the changeset viewer.