Changeset 540
- Timestamp:
- May 28, 2013, 10:19:39 PM (12 years ago)
- Files:
-
- 1 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Form.php
r538 r540 275 275 var $Type; 276 276 var $RootURL; 277 var $ShowRelation; 277 278 278 279 function __construct($Database) … … 282 283 $this->FormTypes = array(); 283 284 $this->Type = new Type($this); 285 $this->ShowRelation = false; 284 286 } 285 287 -
trunk/Common/Form/Types/OneToMany.php
r536 r540 12 12 if($Item['Value'] != '') 13 13 { 14 /*if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View'];15 else $Table = $Type['Parameters']['Table'];16 $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name'].17 ' AS `Name` FROM `'.$Table.'` WHERE `'.18 $Type['Parameters']['Id'].'`='.$Item['Value']);19 $DbRow = $DbResult->fetch_assoc();20 $Output = '<a href="?t='.$Type['Parameters']['Table'].'&a='.21 'view'.'&i='.$Item['Value'].'">'.$DbRow['Name'].'</a>';*/22 14 $Output = '<a href="?t='.$Type['Parameters']['Table'].'&a='. 23 15 'view'.'&i='.$Item['Value'].'">'.$Item['Filter'].'</a>'; … … 46 38 } 47 39 $Output .= '</select>'; 48 $Output .= '<img src="'.$this->FormManager->Root.'/images/select.png" alf="Vybrat" language="javascript" '. 49 'onclick="return popupwindow("'.$this->FormManager->Root.'/is/?a=select&t='.$Table.'&r='.$Item['Name'].'","test");" style="cursor:hand;cursor:pointer"/>'; 40 if($this->FormManager->ShowRelation) 41 $Output .= '<img src="'.$this->FormManager->Root.'/images/select.png" alf="Vybrat" language="javascript" '. 42 'onclick="return popupwindow("'.$this->FormManager->Root.'/is/?a=select&t='.$Table.'&r='.$Item['Name'].'","test");" style="cursor:hand;cursor:pointer"/>'; 50 43 return($Output); 51 44 } -
trunk/Common/Version.php
r538 r540 1 1 <?php 2 2 3 $Revision = 5 38; // Subversion revision3 $Revision = 540; // Subversion revision 4 4 $DatabaseRevision = 535; // SQL structure revision 5 $ReleaseTime = '2013-05- 18';5 $ReleaseTime = '2013-05-28'; 6 6 7 7 ?> -
trunk/FormClasses.php
r538 r540 180 180 ), 181 181 ), 182 'NewNetworkDevice' => array(183 'Title' => 'Vložit nové zařízení',184 'Table' => 'Product',185 'Items' => array(186 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''),187 'Price' => array('Type' => 'Float', 'Caption' => 'Cena', 'Default' => 0, 'Suffix' => 'Kč'),188 'Count' => array('Type' => 'Integer', 'Caption' => 'Počet', 'Default' => 1),189 'Date' => array('Type' => 'Time', 'Caption' => 'Datum zakoupení', 'Default' => 'Now'),190 'Segment' => array('Type' => 'TNetworkSegment', 'Caption' => 'Segment sítě', 'Default' => 0, 'Null' => true),191 'Date' => array('Type' => 'Time', 'Caption' => 'Datum zakoupení', 'Default' => 'Now'),192 'Used' => array('Type' => 'TNetworkDeviceState', 'Caption' => 'Stav', 'Default' => 0),193 'Consumption' => array('Type' => 'Integer', 'Caption' => 'Spotřeba', 'Default' => 0, 'Suffix' => 'Watt'),194 'Member' => array('Type' => 'TMember', 'Caption' => 'Subjekt', 'Default' => 0),195 'Info' => array('Type' => 'String', 'Caption' => 'Poznámky', 'Default' => ''),196 'Shop' => array('Type' => 'String', 'Caption' => 'Obchod', 'Default' => ''),197 'DeviceId' => array('Type' => 'String', 'Caption' => 'Sériové číslo', 'Default' => ''),198 ),199 ),200 182 'NewNetworkDeviceHistory' => array( 201 183 'Title' => 'Vložit záznam historie zařízení', -
trunk/Modules/Finance/Finance.php
r538 r540 459 459 'ReplaceId' => array('Type' => 'TFinanceCharge', 'Caption' => 'Cílová položka', 'Default' => '0', 'Null' => true), 460 460 ), 461 )); 462 463 461 )); 464 462 465 463 $this->System->AddModule(new Bill($this->System)); -
trunk/Modules/Finance/Manage.php
r537 r540 26 26 // $Output = $this->ImportOldData(); 27 27 // break; 28 case 'NewDeviceForm':29 $Output = $this->ShowNewDeviceForm();30 break;31 case 'NewDeviceInsert':32 $Output = $this->ShowNewDeviceInsert();33 break;34 case 'NewDeviceHistoryForm':35 $Output = $this->ShowNewDeviceHistoryForm();36 break;37 case 'NewDeviceHistoryInsert':38 $Output = $this->ShowNewDeviceHistoryInsert();39 break;40 28 case 'NewPaymentInsert': 41 29 $Output = $this->ShowNewPaymentInsert(); … … 64 52 break; 65 53 default: 66 $Output = '<a href="?Operation=NewDeviceForm">Přidat nové zařízení</a><br />'; 67 $Output .= '<a href="?Operation=NewDeviceHistoryForm">Přidat nový záznam historie zařízení</a><br />'; 68 $Output .= '<a href="?Operation=NewPaymentForm">Přidat novou platbu</a><br />'; 54 $Output = '<a href="?Operation=NewPaymentForm">Přidat novou platbu</a><br />'; 69 55 $Output .= '<a href="?Operation=NewInvoiceForm">Přidat novou fakturu</a><br />'; 70 56 $Output .= '<a href="?Operation=ConvertPDFToFile">Převést data z databáze do souborů</a><br />'; … … 187 173 } 188 174 189 function ShowNewDeviceForm() 190 { 191 $Form = new Form($this->System->FormManager); 192 $Form->SetClass('NewNetworkDevice'); 193 $Form->OnSubmit = '?Operation=NewDeviceInsert'; 194 $Output = $Form->ShowEditForm(); 195 return($Output); 196 } 197 198 function ShowNewDeviceInsert() 199 { 200 $Form = new Form($this->System->FormManager); 201 $Form->SetClass('NewNetworkDevice'); 202 $Form->LoadValuesFromForm(); 203 $Form->SaveValuesToDatabase(0); 204 $Output = $this->SystemMessage('Finance', 'Zařízení vloženo.'); 205 $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'NewDeviceInserted'); 206 return($Output); 207 } 208 209 function ShowNewDeviceHistoryForm() 210 { 211 $Form = new Form($this->System->FormManager); 212 $Form->SetClass('NewNetworkDeviceHistory'); 213 $Form->OnSubmit = '?Operation=NewDeviceHistoryInsert'; 214 $Output = $Form->ShowEditForm(); 215 return($Output); 216 } 217 218 function ShowNewDeviceHistoryInsert() 219 { 220 $Form = new Form($this->System->FormManager); 221 $Form->SetClass('NewNetworkDeviceHistory'); 222 $Form->LoadValuesFromForm(); 223 $Form->SaveValuesToDatabase(0); 224 $Output = $this->SystemMessage('Finance', 'Záznam historie zařízení vložen.'); 225 $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'NewDeviceHistoryInserted'); 226 return($Output); 227 } 228 229 function ShowNewPaymentForm() 175 function ShowNewPaymentForm() 230 176 { 231 177 $Form = new Form($this->System->FormManager); -
trunk/Modules/IS/IS.php
r538 r540 16 16 if(!$this->System->User->CheckPermission('IS', 'Manage')) 17 17 return('Nemáte oprávnění'); 18 $this->System->FormManager->ShowRelation = true; 18 19 19 20 if(array_key_exists('a', $_GET)) $Action = $_GET['a']; -
trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php
r522 r540 60 60 $Member['Name'] = RouterOSIdent($Member['Name'].'-'.$Member['Id'] ); 61 61 62 $ServiceIndex = 1; 62 63 echo('Zákazník '.$Member['Name']."\n"); 63 64 $DbResult4 = $System->Database->query('SELECT `Service`.*, `ServiceCustomerRel`.`Id` AS `RelId` FROM `ServiceCustomerRel` JOIN `Service` ON `Service`.`Id` = `ServiceCustomerRel`.`Service` '. … … 70 71 $UserMaxSpeedIn = round($Service['InternetSpeedMax'] / $InDivider) * 1000; 71 72 $UserMaxSpeedOut = round($Service['InternetSpeedMax'] / $OutDivider) * 1000; 72 $ItemsQueue[] = array('name' => $Member['Name'].'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out'); 73 $ItemsQueue[] = array('name' => $Member['Name'].'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in'); 73 if($ServiceIndex == 1) 74 { 75 $ItemsQueue[] = array('name' => $Member['Name'].'-out', 'limit-at' => $SpeedIn, 'max-limit' => $UserMaxSpeedIn, 'parent' => 'main-out'); 76 $ItemsQueue[] = array('name' => $Member['Name'].'-in', 'limit-at' => $SpeedOut, 'max-limit' => $UserMaxSpeedOut, 'parent' => 'main-in'); 77 } 74 78 75 79 $Filter = '(`Used` = 1) AND (`Service` = '.$Service['RelId'].')';
Note:
See TracChangeset
for help on using the changeset viewer.