- Timestamp:
- Feb 7, 2013, 11:01:56 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Types/OneToMany.php
r448 r483 10 10 if($Item['Value'] != '') 11 11 { 12 if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View']; 13 else $Table = $Type['Parameters']['Table']; 12 14 $DbResult = $this->System->Database->query('SELECT '.$Type['Parameters']['Name']. 13 ' AS `Name` FROM `'.$Type['Parameters']['Table'].'`WHERE `'.15 ' AS `Name` FROM '.$Table.' WHERE `'. 14 16 $Type['Parameters']['Id'].'`='.$Item['Value']); 15 17 $DbRow = $DbResult->fetch_assoc(); … … 31 33 $Output .= '<option value=""'.$Selected.'></option>'; 32 34 } 33 $DbResult = $this->System->Database->query('SELECT '.$Type['Parameters']['Name'].' AS `Name`,'.$Type['Parameters']['Id'].' AS `Id` FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY `Name`'); 35 if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View']; 36 else $Table = $Type['Parameters']['Table']; 37 $DbResult = $this->System->Database->query('SELECT '.$Type['Parameters']['Name'].' AS `Name`,'.$Type['Parameters']['Id'].' AS `Id` FROM '.$Table.''.$Where.' ORDER BY `Name`'); 34 38 while($DbRow = $DbResult->fetch_assoc()) 35 39 { -
trunk/form_classes.php
r482 r483 16 16 17 17 $FormClasses = array( 18 'NetworkLink' => array( 19 'Title' => 'Síťové propojení', 20 'Table' => 'NetworkLink', 21 'Items' => array( 22 'Type' => array('Type' => 'Integer', 'Caption' => 'Typ', 'Default' => '1'), 23 'Interface1' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 1', 'Default' => ''), 24 'Interface2' => array('Type' => 'TNetworkInterface', 'Caption' => 'Rozhraní 2', 'Default' => ''), 25 ), 26 ), 18 27 'PermissionUserAssignment' => array( 19 28 'Title' => 'Oprávnění uživatelů', … … 421 430 'Online' => array('Type' => 'Boolean', 'Caption' => 'Běží', 'Default' => '0', 'ReadOnly' => true), 422 431 'LastOnline' => array('Type' => 'DateTime', 'Caption' => 'Naposledy běželo', 'Default' => '', 'ReadOnly' => true), 432 'Links1' => array('Type' => 'TNetworkLinkListInterface1', 'Caption' => 'Propojení 1', 'Default' => ''), 433 'Links2' => array('Type' => 'TNetworkLinkListInterface2', 'Caption' => 'Propojení 2', 'Default' => ''), 423 434 ), 424 435 ), … … 767 778 'Type' => 'Reference', 768 779 'Table' => 'NetworkInterface', 769 'Id' => 'Id', 770 'Name' => 'Name', 780 'View' => '(SELECT NetworkInterface.*, CONCAT(NetworkDevice.Name, "-", NetworkInterface.Name) AS DeviceName FROM NetworkInterface '. 781 'LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device) AS T', 782 'Id' => 'Id', 783 'Name' => 'DeviceName', 771 784 'Filter' => '1', 772 785 ), … … 1021 1034 'Id' => 'Id', 1022 1035 'Ref' => 'Category', 1036 'Filter' => '1', 1037 ), 1038 'TNetworkLinkListInterface1' => array( 1039 'Type' => 'ManyToOne', 1040 'Table' => 'NetworkLink', 1041 'Id' => 'Id', 1042 'Ref' => 'Interface1', 1043 'Filter' => '1', 1044 ), 1045 'TNetworkLinkListInterface2' => array( 1046 'Type' => 'ManyToOne', 1047 'Table' => 'NetworkLink', 1048 'Id' => 'Id', 1049 'Ref' => 'Interface2', 1023 1050 'Filter' => '1', 1024 1051 ),
Note:
See TracChangeset
for help on using the changeset viewer.