Changeset 482
- Timestamp:
- Feb 7, 2013, 9:45:02 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r474 r482 61 61 while($Link = $DbResult->fetch_assoc()) 62 62 { 63 $DbResult2 = $this->Database->query('SELECT * FROM NetworkDevice WHERE NetworkDevice.Id = (SELECTDevice FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface1'].')');64 $DbResult3 = $this->Database->query('SELECT * FROM NetworkDevice WHERE NetworkDevice.Id = (SELECTDevice FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface2'].')');63 $DbResult2 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Latitude, MapPosition.Longitude FROM NetworkDevice JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface1'].')'); 64 $DbResult3 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Latitude, MapPosition.Longitude FROM NetworkDevice JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id = '.$Link['Interface2'].')'); 65 65 if(($DbResult2->num_rows > 0) and ($DbResult3->num_rows > 0)) 66 66 { … … 68 68 $Device2 = $DbResult3->fetch_assoc(); 69 69 if(($Device1['Used'] == 1) and ($Device2['Used'] == 1)) 70 $Output .= 'new GPolyline([new GLatLng('.$Device1[' PositionLatitude'].', '.$Device1['PositionLongitude'].'),new GLatLng('.$Device2['PositionLatitude'].', '.$Device2['PositionLongitude'].')], "#4F4FBF", 3, 0.8), ';70 $Output .= 'new GPolyline([new GLatLng('.$Device1['Latitude'].', '.$Device1['Longitude'].'),new GLatLng('.$Device2['Latitude'].', '.$Device2['Longitude'].')], "#4F4FBF", 3, 0.8), '; 71 71 } 72 72 } … … 99 99 NetworkDevices = ['; 100 100 101 $DbResult = $this->Database->query('SELECT * FROM NetworkDevice WHERE Used=1'); 101 $DbResult = $this->Database->query('SELECT GROUP_CONCAT(NetworkDevice.Name SEPARATOR ",") AS Name, '. 102 'MapPosition.Latitude AS Latitude, MapPosition.Longitude AS Longitude, MapPosition.Name AS NodeName '. 103 'FROM NetworkDevice LEFT JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition '. 104 'WHERE (NetworkDevice.Used=1) AND (NetworkDevice.MapPosition IS NOT NULL) '. 105 'GROUP BY NetworkDevice.MapPosition'); 102 106 while($Device = $DbResult->fetch_assoc()) 103 107 { 104 $Output .= 'new GMarker(new GLatLng('.$Device['PositionLatitude'].', '.$Device['PositionLongitude'].'), {title: "'.$Device['Name'].'", icon:tinyIcon }), '; 108 $Output .= 'new GMarker(new GLatLng('.$Device['Latitude'].', '. 109 $Device['Longitude'].'), {title: "'.$Device['NodeName'].': '.$Device['Name'].'", icon:tinyIcon }), '; 105 110 } 106 111 $Output .= ']; -
trunk/finance/manage.php
r480 r482 301 301 'FROM MemberPayment JOIN Member ON Member.Id=MemberPayment.Member JOIN Subject '. 302 302 'ON Subject.Id=Member.Subject LEFT JOIN FinanceBillingPeriod ON '. 303 'FinanceBillingPeriod.Id=Member.BillingPeriodNext'; 303 'FinanceBillingPeriod.Id=Member.BillingPeriodNext WHERE (Member.Blocked = 0)'. 304 'AND (Member.BillingPeriodNext > 1)'; 304 305 305 306 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$SQL.') AS T'); … … 483 484 // Restart traffic shaping 484 485 //$this->Database->update('NetworkConfiguration', 'Id = 3', array('Changed' => 1)); 486 //flush(); 487 //$this->GenerateBills(); 485 488 } 486 489 return($Output); -
trunk/form_classes.php
r480 r482 396 396 'PermanentOnline' => array('Type' => 'Boolean', 'Caption' => 'Běží stále', 'Default' => '0'), 397 397 'Interfaces' => array('Type' => 'TInterfaceList', 'Caption' => 'Rozhraní', 'Default' => ''), 398 'MapPosition' => array('Type' => 'TMapPosition', 'Caption' => 'Pozice na mapě', 'Default' => '0'), 398 399 ), 399 400 ), … … 453 454 ), 454 455 ), 456 'MapPosition' => array( 457 'Title' => 'Pozice na mapě', 458 'Table' => 'MapPosition', 459 'Items' => array( 460 'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''), 461 'Latitude' => array('Type' => 'Float', 'Caption' => 'Zeměpisná šířka', 'Default' => '0'), 462 'Longitude' => array('Type' => 'Float', 'Caption' => 'Zeměpisná výška', 'Default' => '0'), 463 ), 464 ), 455 465 'NewPayment' => array( 456 466 'Title' => 'Nová platba', … … 705 715 'Filter' => '1', 706 716 ), 717 'TMapPosition' => array( 718 'Type' => 'Reference', 719 'Table' => 'MapPosition', 720 'Id' => 'Id', 721 'Name' => 'Name', 722 'Filter' => '1', 723 ), 707 724 'TUser' => array( 708 725 'Type' => 'Reference', -
trunk/sql/updates/479.sql
r479 r482 1 1 ALTER TABLE SystemVersion CHANGE COLUMN Rev478 Rev479 bit; 2 3 ALTER TABLE `ServiceCustomerRel` ADD `Period` INT NOT NULL4 2 5 3 CREATE TABLE IF NOT EXISTS `ServiceCustomerRel` ( … … 7 5 `Service` int(11) NOT NULL, 8 6 `Customer` int(11) NOT NULL, 7 `Period` INT NOT NULL , 9 8 PRIMARY KEY (`Id`), 10 9 KEY `Service` (`Service`), … … 16 15 ADD CONSTRAINT `ServiceCustomerRel_ibfk_1` FOREIGN KEY (`Service`) REFERENCES `Service` (`Id`); 17 16 18 DROP TABLE `ServiceInternet`; 19 DROP TABLE `ServiceConsumption`; 20 DROP TABLE `ServiceVPS`; 17 ALTER TABLE `ServiceCustomerRel` DROP FOREIGN KEY `ServiceCustomerRel_ibfk_1` ; 18 21 19 DROP TABLE `Service`; 22 20
Note:
See TracChangeset
for help on using the changeset viewer.