Changeset 71 for trunk/www/Base/Types
- Timestamp:
- Aug 23, 2009, 6:14:01 PM (15 years ago)
- Location:
- trunk/www/Base/Types
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Base/Types/Base.php
r69 r71 1 1 <?php 2 2 3 class TypeBase 3 class TypeBase extends Module 4 4 { 5 5 var $DatabaseCompareOperators = array(); -
trunk/www/Base/Types/Include.php
r69 r71 42 42 function ExecuteTypeEvent($TypeName, $Event, $Parameters = array()) 43 43 { 44 global $TypeDefinitionList ;44 global $TypeDefinitionList, $System; 45 45 46 46 if(array_key_exists($TypeName, $TypeDefinitionList)) … … 48 48 $Type = $TypeDefinitionList[$TypeName]; 49 49 $TypeClass = 'Type'.$Type['Class']; 50 $TypeObject = new $TypeClass ;50 $TypeObject = new $TypeClass($System); 51 51 if(is_callable(array($TypeObject, $Event))) return($TypeObject->$Event($Parameters)); 52 52 else return($TypeName.'->'.$Event.'('.serialize($Parameters).')'); -
trunk/www/Base/Types/PointerOneToOne.php
r69 r71 5 5 function OnView($Item) 6 6 { 7 global $ Database, $TypeDefinitionList;7 global $TypeDefinitionList; 8 8 9 9 $Type = $TypeDefinitionList[$Item['Type']]; 10 $DbResult = $ Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name FROM `'.$Type['Parameters']['Table'].'` WHERE `'.$Type['Parameters']['Id'].'`='.$Item['Value']);10 $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name FROM `'.$Type['Parameters']['Table'].'` WHERE `'.$Type['Parameters']['Id'].'`='.$Item['Value']); 11 11 $DbRow = $DbResult->fetch_assoc(); 12 12 $Output = $DbRow['Name']; … … 24 24 function OnEdit($Item) 25 25 { 26 global $ Database, $TypeDefinitionList;26 global $TypeDefinitionList; 27 27 28 28 $Output = '<select name="'.$Item['Name'].'">'; … … 30 30 if(array_key_exists('Condition', $Type['Parameters'])) $Where = ' WHERE '.$Type['Parameters']['Condition']; 31 31 else $Where = ''; 32 $DbResult = $ Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name,'.$Type['Parameters']['Id'].' AS Id FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY Name DESC');32 $DbResult = $this->Database->query('SELECT '.$Type['Parameters']['Name'].' AS Name,'.$Type['Parameters']['Id'].' AS Id FROM `'.$Type['Parameters']['Table'].'`'.$Where.' ORDER BY Name DESC'); 33 33 while($DbRow = $DbResult->fetch_assoc()) 34 34 {
Note:
See TracChangeset
for help on using the changeset viewer.