Changeset 553
- Timestamp:
- Jul 7, 2013, 11:38:22 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r550 r553 51 51 include_once(dirname(__FILE__).'/../Modules/Stock/Stock.php'); 52 52 include_once(dirname(__FILE__).'/../Modules/Search/Search.php'); 53 include_once(dirname(__FILE__).'/../Modules/EmailQueue/EmailQueue.php'); 53 54 54 55 function GlobalInit() … … 97 98 $System->ModuleManager->RegisterModule(new ModuleFile($System)); 98 99 $System->ModuleManager->RegisterModule(new ModuleUser($System)); 100 $System->ModuleManager->RegisterModule(new ModuleEmailQueue($System)); 99 101 $System->ModuleManager->RegisterModule(new ModuleMeteostation($System)); 100 102 $System->ModuleManager->RegisterModule(new ModulePortal($System)); -
trunk/Common/System.php
r548 r553 1 1 <?php 2 3 include_once(dirname(__FILE__).'/EmailQueue.php');4 2 5 3 class System … … 15 13 var $PathItems; 16 14 var $RootURLFolder; 17 var $EmailQueue;18 15 19 16 function __construct() … … 24 21 $this->Database = new Database(); 25 22 $this->FormManager = new FormManager($this->Database); 26 $this->EmailQueue = new EmailQueue($this);27 23 } 28 24 -
trunk/Common/Version.php
r552 r553 1 1 <?php 2 2 3 $Revision = 55 2; // Subversion revision3 $Revision = 553; // Subversion revision 4 4 $DatabaseRevision = 551; // SQL structure revision 5 5 $ReleaseTime = '2013-07-07'; -
trunk/FormClasses.php
r548 r553 58 58 ), 59 59 ), 60 'EmailQueue' => array(61 'Title' => 'Fronta e-mailů',62 'Table' => 'EmailQueue',63 'Items' => array(64 'Time' => array('Type' => 'DateTime', 'Caption' => 'Vytvořeno'),65 'To' => array('Type' => 'String', 'Caption' => 'Příjemce', 'Default' => ''),66 'Subject' => array('Type' => 'String', 'Caption' => 'Předmět', 'Default' => ''),67 'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''),68 'Headers' => array('Type' => 'String', 'Caption' => 'Hlavička', 'Default' => ''),69 'Archive' => array('Type' => 'Boolean', 'Caption' => 'Odesláno', 'Default' => '0'),70 'From' => array('Type' => 'String', 'Caption' => 'Odesílatel', 'Default' => ''),71 'AttachmentFile' => array('Type' => 'TFile', 'Caption' => 'Příloha', 'Default' => '', 'Null' => true),72 ),73 'Actions' => array(74 array('Caption' => 'Odeslat nové', 'URL' => ''),75 ),76 ),77 60 'UserCustomerRel' => array( 78 61 'Title' => 'Vztahy uživatel - zákazník', … … 190 173 ), 191 174 ), 192 'Email' => array(193 'Title' => 'Nový email',194 'Table' => 'EmailQueue',195 'SubmitText' => 'Odeslat',196 'Items' => array(197 'Address' => array('Type' => 'String', 'Caption' => 'Adresa', 'Default' => ''),198 'Subject' => array('Type' => 'String', 'Caption' => 'Předmět', 'Default' => ''),199 'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''),200 ),201 ),202 175 'ServiceCategory' => array( 203 176 'Title' => 'Kategorie služeb', -
trunk/Modules/EmailQueue/EmailQueue.php
r549 r553 1 1 <?php 2 3 class PageEmailQueueProcess extends Page 4 { 5 var $FullTitle = 'Odeslání pošty z fronty'; 6 var $ShortTitle = 'Fronta pošty'; 7 var $ParentClass = 'PagePortal'; 2 8 3 class EmailQueue extends Module 4 { 9 function Show() 10 { 11 $Output = $this->System->EmailQueue->Process(); 12 $Output = $this->SystemMessage('Zpracování fronty emailů', 'Nové emaily byly odeslány').$Output; 13 return($Output); 14 } 15 } 16 17 class ModuleEmailQueue extends AppModule 18 { 19 function __construct($System) 20 { 21 parent::__construct($System); 22 $this->Name = 'EmailQueue'; 23 $this->Version = '1.0'; 24 $this->Creator = 'Chronos'; 25 $this->License = 'GNU/GPLv3'; 26 $this->Description = 'Queue for delayed email sending and history'; 27 $this->Dependencies = array('Log'); 28 } 29 30 function Install() 31 { 32 parent::Install(); 33 } 34 35 function UnInstall() 36 { 37 parent::UnInstall(); 38 } 39 40 function Start() 41 { 42 parent::Start(); 43 $this->System->RegisterPage('fronta-posty', 'PageEmailQueueProcess'); 44 $this->System->FormManager->RegisterClass('Email', array( 45 'Title' => 'Nový email', 46 'Table' => 'EmailQueue', 47 'SubmitText' => 'Odeslat', 48 'Items' => array( 49 'Address' => array('Type' => 'String', 'Caption' => 'Adresa', 'Default' => ''), 50 'Subject' => array('Type' => 'String', 'Caption' => 'Předmět', 'Default' => ''), 51 'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''), 52 ), 53 )); 54 $this->System->FormManager->RegisterClass('EmailQueue', array( 55 'Title' => 'Fronta e-mailů', 56 'Table' => 'EmailQueue', 57 'Items' => array( 58 'Time' => array('Type' => 'DateTime', 'Caption' => 'Vytvořeno'), 59 'To' => array('Type' => 'String', 'Caption' => 'Příjemce', 'Default' => ''), 60 'Subject' => array('Type' => 'String', 'Caption' => 'Předmět', 'Default' => ''), 61 'Content' => array('Type' => 'Text', 'Caption' => 'Obsah', 'Default' => ''), 62 'Headers' => array('Type' => 'String', 'Caption' => 'Hlavička', 'Default' => ''), 63 'Archive' => array('Type' => 'Boolean', 'Caption' => 'Odesláno', 'Default' => '0'), 64 'From' => array('Type' => 'String', 'Caption' => 'Odesílatel', 'Default' => ''), 65 'AttachmentFile' => array('Type' => 'TFile', 'Caption' => 'Příloha', 'Default' => '', 'Null' => true), 66 ), 67 'Actions' => array( 68 array('Caption' => 'Odeslat nové', 'URL' => '/fronta-posty/'), 69 ), 70 )); 71 } 72 73 function Stop() 74 { 75 parent::Stop(); 76 } 77 5 78 function AddItem($To, $Subject, $Content, $From, $AttachmentFileId = '') 6 79 { … … 32 105 $Mail->Send(); 33 106 $this->Database->update('EmailQueue', 'Id='.$DbRow['Id'], array('Archive' => 1)); 34 $this-> ModuleManager->Modules['Log']->NewRecord('System', 'SendEmail', $DbRow['Id']);107 $this->System->ModuleManager->Modules['Log']->NewRecord('System', 'SendEmail', $DbRow['Id']); 35 108 $Output .= 'To: '.$DbRow['To'].' Subject: '.$DbRow['Subject'].'<br />'; 36 109 } … … 38 111 } 39 112 } 113 -
trunk/Modules/Finance/Finance.php
r551 r553 299 299 $this->License = 'GNU/GPLv3'; 300 300 $this->Description = 'Base module for finance management'; 301 $this->Dependencies = array('File' );301 $this->Dependencies = array('File', 'EmailQueue'); 302 302 } 303 303 -
trunk/Modules/Finance/Manage.php
r552 r553 359 359 360 360 $Content .= '<br />Tento email je generován automaticky. V případě zjištění nesrovnalostí napište zpět.'; 361 $this->System-> EmailQueue->AddItem($User['Name'].' <'.$User['Email'].'>', $Title, $Content,361 $this->System->ModuleManager->Modules['EmailQueue']->AddItem($User['Name'].' <'.$User['Email'].'>', $Title, $Content, 362 362 $Config['Web']['Admin'].' <'.$Config['Web']['AdminEmail'].'>'); 363 363 $Output = ''; -
trunk/Modules/FinanceBankAPI/FileImport.php
r551 r553 40 40 $DbResult3 = $this->Database->insert('FinanceOperation', array('Subject' => $DbRow2['Id'], 'Cash' => 0, 41 41 'Value' => $DbRow['Value'], 'Taxable' => 1, 'BankAccount' => $DbRow['BankAccount'], 'Network' => 1, 42 'Time' => $DbRow['Time'], 'Text' => $DbRow['Description'], 'BillCode' => $BillCode ));42 'Time' => $DbRow['Time'], 'Text' => $DbRow['Description'], 'BillCode' => $BillCode, 'DocumentLine' => $DocumentLine)); 43 43 $this->Database->update('FinanceBankImport', 'Id='.$DbRow['Id'], array('FinanceOperation' => $this->Database->insert_id)); 44 44 } -
trunk/Modules/Portal/Portal.php
r548 r553 83 83 if($this->System->User->CheckPermission('Finance', 'Manage')) 84 84 $Output .= '<a href="'.$this->System->Link('/finance/sprava/').'">Správa financí</a><br />'; 85 if($this->System->User->CheckPermission('Network', 'Administration'))86 $Output .= '<a href="'.$this->System->Link('/network/administration/').'">Správa sítě</a><br />';87 85 if($this->System->User->CheckPermission('IS', 'Manage')) 88 86 $Output .= '<a href="'.$this->System->Link('/is/').'">Správa dat</a><br />';
Note:
See TracChangeset
for help on using the changeset viewer.