Changeset 536 for trunk/Common/Form/Types
- Timestamp:
- May 18, 2013, 6:51:10 PM (12 years ago)
- Location:
- trunk/Common/Form/Types
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Types/Base.php
r501 r536 44 44 return(addslashes($Value)); 45 45 } 46 47 function OnFilterName($Item) 48 { 49 return('`'.$Item['Name'].'`'); 50 } 51 52 function OnFilterNameQuery($Item) 53 { 54 return('`'.$Item['Name'].'`, `'.$Item['Name'].'` AS `'.$Item['Name'].'_Filter`'); 55 } 46 56 } 47 57 -
trunk/Common/Form/Types/OneToMany.php
r531 r536 12 12 if($Item['Value'] != '') 13 13 { 14 if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View'];14 /*if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View']; 15 15 else $Table = $Type['Parameters']['Table']; 16 16 $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name']. 17 ' AS `Name` FROM '.$Table.'WHERE `'.17 ' AS `Name` FROM `'.$Table.'` WHERE `'. 18 18 $Type['Parameters']['Id'].'`='.$Item['Value']); 19 19 $DbRow = $DbResult->fetch_assoc(); 20 20 $Output = '<a href="?t='.$Type['Parameters']['Table'].'&a='. 21 'view'.'&i='.$Item['Value'].'">'.$DbRow['Name'].'</a>'; 22 } else $Output = ''; 21 'view'.'&i='.$Item['Value'].'">'.$DbRow['Name'].'</a>';*/ 22 $Output = '<a href="?t='.$Type['Parameters']['Table'].'&a='. 23 'view'.'&i='.$Item['Value'].'">'.$Item['Filter'].'</a>'; 24 } else $Output = ''; 23 25 return($Output); 24 26 } … … 60 62 else return($Item['Value']); 61 63 } 64 65 function OnFilterName($Item) 66 { 67 return('`'.$Item['Name'].'_Filter`'); 68 } 69 70 function OnFilterNameQuery($Item) 71 { 72 $Type = $this->FormManager->Type->TypeDefinitionList[$Item['Type']]; 73 //if($Item['Value'] != '') 74 //{ 75 if(array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View']; 76 else $Table = $Type['Parameters']['Table']; 77 $Output = '`'.$Item['Name'].'`, (SELECT '.$Type['Parameters']['Name']. 78 ' AS `Name` FROM `'.$Table.'` WHERE `'. 79 $Type['Parameters']['Id'].'`=`'.$Item['Name'].'`) AS `'.$Item['Name'].'_Filter`'; 80 //} else $Output = '`'.$Item['Name'].'`, `'.$Item['Name'].'` AS `'.$Item['Name'].'_Filter`'; 81 return($Output); 82 } 62 83 } 63 84
Note:
See TracChangeset
for help on using the changeset viewer.