Changeset 721
- Timestamp:
- Jan 3, 2015, 7:34:55 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r720 r721 1 1 <?php 2 2 3 $Revision = 72 0; // Subversion revision3 $Revision = 721; // Subversion revision 4 4 $DatabaseRevision = 720; // SQL structure revision 5 $ReleaseTime = strtotime('2015-01-0 2');5 $ReleaseTime = strtotime('2015-01-03'); -
trunk/Modules/Customer/Customer.php
r719 r721 36 36 'Consumption' => array('Type' => 'TCustomerStockSerialNumber', 'Caption' => 'Spotřeba zařízení', 'Default' => ''), 37 37 ), 38 'ItemActions' => array( 39 array('Caption' => 'Klientská sekce', 'URL' => '/finance/platby/?i=#RowId'), 40 ), 38 41 )); 39 42 $this->System->FormManager->RegisterClass('MemberPayment', array( -
trunk/Modules/File/File.php
r708 r721 130 130 ), 131 131 'ItemActions' => array( 132 array('Caption' => 'Stáhnout', 'URL' => '/file '),132 array('Caption' => 'Stáhnout', 'URL' => '/file?i=#RowId'), 133 133 ), 134 134 )); -
trunk/Modules/Finance/Finance.php
r720 r721 454 454 ), 455 455 'ItemActions' => array( 456 array('Caption' => 'Import plateb z banky', 'URL' => '/finance/import-api/ '),457 array('Caption' => 'Import plateb ze souboru', 'URL' => '/finance/import-soubor/ '),456 array('Caption' => 'Import plateb z banky', 'URL' => '/finance/import-api/?i=#RowId'), 457 array('Caption' => 'Import plateb ze souboru', 'URL' => '/finance/import-soubor/?i=#RowId'), 458 458 ), 459 459 )); -
trunk/Modules/Finance/UserState.php
r720 r721 70 70 $this->System->Modules['Finance']->LoadTariffs(1); 71 71 72 if(array_key_exists('Subject', $_GET)) 72 // Determine which customer should be displayed 73 if(array_key_exists('i', $_GET)) 73 74 { 74 75 if(!$this->System->User->CheckPermission('Finance', 'Manage')) return('Nemáte oprávnění'); 75 $DbResult = $this->Database->query('SELECT * FROM Subject WHERE Id='.$_GET['Subject']); 76 if($DbResult->num_rows > 0) 77 $Subject = $DbResult->fetch_assoc(); 78 else return($this->SystemMessage('Chyba', 'Subjekt nenalezen')); 76 $CustomerId = $_GET['i']; 79 77 } else 80 78 { … … 85 83 { 86 84 $CustomerUserRel = $DbResult->fetch_assoc(); 87 $DbResult = $this->Database->query('SELECT * FROM Subject WHERE Id=(SELECT Subject FROM Member WHERE Id='.$CustomerUserRel['Customer'].')'); 88 $Subject = $DbResult->fetch_assoc(); 85 $CustomerId = $CustomerUserRel['Customer']; 89 86 } else return($this->SystemMessage('Chyba', 'Nejste zákazníkem')); 90 87 } 91 92 if(!array_key_exists('show', $_GET)) $_GET['show'] = ''; 93 $DbResult = $this->Database->query('SELECT Member.* '. 94 'FROM Member LEFT JOIN MemberPayment ON MemberPayment.Member=Member.Id WHERE Member.Subject='.$Subject['Id']); 95 if($DbResult->num_rows == 0) 88 89 // Load customer info 90 $DbResult = $this->Database->query('SELECT * FROM Member WHERE Id='.$CustomerId); 91 if($DbResult->num_rows == 1) 96 92 { 97 return($this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen')); 98 } 99 $Member = $DbResult->fetch_assoc(); 100 $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">'; 93 $Customer = $DbResult->fetch_assoc(); 94 } else return($this->SystemMessage('Položka nenalezena', 'Zákazník nenalezen')); 95 96 97 // Load subject info 98 $DbResult = $this->Database->query('SELECT * FROM Subject WHERE Id='.$Customer['Subject']); 99 if($DbResult->num_rows == 1) 100 { 101 $Subject = $DbResult->fetch_assoc(); 102 } else return($this->SystemMessage('Položka nenalezena', 'Subjekt nenalezen')); 103 104 105 $Output = '<table width="100%" border="0" cellspacing="0" cellpadding="3"><tr><td valign="top">'; 101 106 102 107 // Account state … … 131 136 $DbResult = $this->Database->query('SELECT Service.Name, Service.Price FROM ServiceCustomerRel '. 132 137 'LEFT JOIN Service ON Service.Id=ServiceCustomerRel.Service '. 133 'WHERE (ServiceCustomerRel.Customer='.$ Member['Id'].') AND (ServiceCustomerRel.Action IS NULL)');138 'WHERE (ServiceCustomerRel.Customer='.$Customer['Id'].') AND (ServiceCustomerRel.Action IS NULL)'); 134 139 while($DbRow = $DbResult->fetch_assoc()) 135 140 { 136 $Output .= '<tr><td>'.$DbRow['Name'].'</td><td>'.$DbRow['Price'].'</td></tr>';141 $Output .= '<tr><td>'.$DbRow['Name'].'</td><td>'.$DbRow['Price'].'</td></tr>'; 137 142 $Total += $DbRow['Price']; 138 143 } -
trunk/Modules/IS/IS.php
r719 r721 377 377 foreach($FormClass['ItemActions'] as $Action) 378 378 { 379 $URL = $this->System->Link($Action['URL']); 380 if(strpos($URL, '?') === false) $URL .= '?'; 381 else if((substr($URL, -5, 5) !== '&') and (substr($URL, -1, 1) !== '?')) $URL .= '&'; 382 $URL .= 'i='.$Id; 379 $URL = str_replace('#RowId', $Id, $this->System->Link($Action['URL'])); 383 380 $Actions[] = $this->ShowAction($Action['Caption'], $URL, 384 381 $this->System->Link('/images/action.png')); … … 643 640 { 644 641 $URL = $this->System->Link($Action['URL']); 645 if(strpos($URL, '?') === false) $URL .= '?';646 else if((substr($URL, -5, 5) !== '&') and (substr($URL, -1, 1) !== '?')) $URL .= '&';647 $URL .= 'i=#RowId';648 642 $RowActions .= '<a href="'.$URL.'"><img alt="'.$Action['Caption'].'" title="'.$Action['Caption'].'" src="'. 649 643 $this->System->Link('/images/action.png').'"/></a>'; -
trunk/Modules/Map/Map.php
r712 r721 221 221 ), 222 222 'ItemActions' => array( 223 array('Caption' => 'Ukázat na mapě', 'URL' => '/map/show-position '),223 array('Caption' => 'Ukázat na mapě', 'URL' => '/map/show-position?i=#RowId'), 224 224 ), 225 225 )); -
trunk/Modules/NetworkConfig/NetworkConfig.php
r644 r721 37 37 ), 38 38 'ItemActions' => array( 39 array('Caption' => 'Záznam', 'URL' => '/is/?a=view&t=NetworkConfigurationLog '),39 array('Caption' => 'Záznam', 'URL' => '/is/?a=view&t=NetworkConfigurationLog&i=#RowId'), 40 40 ), 41 41 ));
Note:
See TracChangeset
for help on using the changeset viewer.