Changeset 7 for trunk/Packages/Common/Form/Types/Base.php
- Timestamp:
- Apr 14, 2020, 11:13:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Form/Types/Base.php
r1 r7 17 17 function OnView($Item) 18 18 { 19 return ('');19 return ''; 20 20 } 21 21 22 22 function OnEdit($Item) 23 23 { 24 return ('');24 return ''; 25 25 } 26 26 27 27 function OnLoad($Item) 28 28 { 29 return ('');29 return ''; 30 30 } 31 31 32 32 function OnLoadDb($Item) 33 33 { 34 return ($Item['Value']);34 return $Item['Value']; 35 35 } 36 36 37 37 function OnSaveDb($Item) 38 38 { 39 return ($Item['Value']);39 return $Item['Value']; 40 40 } 41 41 42 42 function DatabaseEscape($Value) 43 43 { 44 return (addslashes($Value));44 return addslashes($Value); 45 45 } 46 46 47 47 function OnFilterName($Item) 48 48 { 49 if (array_key_exists('SQL', $Item) and ($Item['SQL'] != ''))49 if (array_key_exists('SQL', $Item) and ($Item['SQL'] != '')) 50 50 $SQL = '('.$Item['SQL'].') AS '; 51 51 else $SQL = ''; 52 return ($SQL.'`'.$Item['Name'].'`');52 return $SQL.'`'.$Item['Name'].'`'; 53 53 } 54 54 55 55 function OnFilterNameQuery($Item) 56 56 { 57 if (array_key_exists('SQL', $Item) and ($Item['SQL'] != ''))57 if (array_key_exists('SQL', $Item) and ($Item['SQL'] != '')) 58 58 $Output = '('.$Item['SQL'].') AS `'.$Item['Name'].'`, ('.$Item['SQL'].') AS `'.$Item['Name'].'_Filter`'; 59 59 else $Output = '`'.$Item['Name'].'`, `'.$Item['Name'].'` AS `'.$Item['Name'].'_Filter`'; 60 return ($Output);60 return $Output; 61 61 } 62 62 63 63 function Validate($Item) 64 64 { 65 return (true);65 return true; 66 66 } 67 67 68 68 function GetValidationFormat() 69 69 { 70 return ('');70 return ''; 71 71 } 72 72 }
Note:
See TracChangeset
for help on using the changeset viewer.