Changeset 764 for trunk/Modules/FinanceBankAPI
- Timestamp:
- Nov 5, 2015, 11:19:31 PM (9 years ago)
- Location:
- trunk/Modules/FinanceBankAPI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FinanceBankAPI/FileImport.php
r755 r764 69 69 var $ParentClass = 'PageFinance'; 70 70 71 function Show()71 function Import($Id) 72 72 { 73 73 $Output = ''; 74 if(!$this->System->User->CheckPermission('Finance', 'SubjectList')) return('Nemáte oprávnění');75 74 76 $DbResult = $this->Database->select('FinanceBankAccount', '*', 'Id='.$ _GET['i']);75 $DbResult = $this->Database->select('FinanceBankAccount', '*', 'Id='.$Id); 77 76 $BankAccount = $DbResult->fetch_assoc(); 78 77 … … 90 89 $Import->PairOperations(); 91 90 } 91 return($Output); 92 } 93 94 function Show() 95 { 96 if(!$this->System->User->CheckPermission('Finance', 'SubjectList')) 97 return('Nemáte oprávnění'); 98 99 $Output = $this->Import($_GET['i']); 92 100 return($Output); 93 101 } -
trunk/Modules/FinanceBankAPI/FinanceBankAPI.php
r761 r764 101 101 { 102 102 $Output = ''; 103 $DbResult = $this->Database->select('FinanceBankAccount', 'Id, Comment', 104 '(`AutoImport`=1) AND ((`TimeEnd` IS NULL) OR (`TimeEnd` > NOW()))'); 103 $DbResult = $this->Database->select('FinanceBankAccount', '`Id`, `Comment`', 104 '(`AutoImport`=1) AND (`TimeCreate` < NOW()) AND '. 105 '((`TimeEnd` IS NULL) OR (`TimeEnd` > NOW()))'); 105 106 while($DbRow = $DbResult->fetch_assoc()) 106 107 { 107 108 echo($DbRow['Comment']."\n"); 108 109 $Page = new PageImportAPI($this->System); 109 $Output .= $Page-> Show();110 $Output .= $Page->Import($DbRow['Id']); 110 111 } 111 112 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.