Changeset 737 for trunk/Modules
- Timestamp:
- Apr 14, 2015, 10:16:16 PM (10 years ago)
- Location:
- trunk/Modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.