- Timestamp:
- Oct 12, 2008, 8:43:23 PM (16 years ago)
- Location:
- types
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
types/Boolean.php
r8 r10 1 1 <?php 2 2 3 function TypeBoolean ViewHtml($Type,$Item)3 function TypeBooleanOnView($Item) 4 4 { 5 5 return('<input type="checkbox" name="'.$Item['Name'].'" value="'.$Item['Value'].'" disabled="1">'); 6 6 } 7 7 8 function TypeBoolean EditHtml($Type,$Item)8 function TypeBooleanOnEdit($Item) 9 9 { 10 10 return('<input type="checkbox" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'); -
types/Date.php
r8 r10 3 3 $MonthList = array('0', 'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'); 4 4 5 function TypeDate ViewHtml($Type,$Item)5 function TypeDateOnView($Item) 6 6 { 7 7 global $MonthList; … … 13 13 } 14 14 15 function TypeDate EditHtml($Type,$Item)15 function TypeDateOnEdit($Item) 16 16 { 17 17 global $MonthList; -
types/Enumeration.php
r8 r10 1 1 <?php 2 2 3 function TypeEnumeration ViewHtml($Type,$Item)3 function TypeEnumerationOnView($Item) 4 4 { 5 $Output = $Type['Parameters'][$Item['Value']]; 5 global $Types; 6 7 $Output = $Types[$Item['Type']]['Parameters'][$Item['Value']]; 6 8 return($Output); 7 9 } 8 10 9 function TypeEnumeration EditHtml($Type,$Item)11 function TypeEnumerationOnEdit($Item) 10 12 { 13 global $Types; 14 11 15 $Output = '<select name="'.$Item['Name'].'">'; 12 foreach($Type ['Parameters'] as $Index => $StateName)16 foreach($Types[$Item['Type']]['Parameters'] as $Index => $StateName) 13 17 { 14 18 if($Parameter == $Index) $Selected = ' selected="1"'; else $Selected = ''; -
types/Float.php
r8 r10 1 1 <?php 2 2 3 function TypeFloat ViewHtml($Type,$Item)3 function TypeFloatOnView($Item) 4 4 { 5 5 $Output = $Item['Value']; … … 7 7 } 8 8 9 function TypeFloatEditHtml($ Type, $Item)9 function TypeFloatEditHtml($Item) 10 10 { 11 11 $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'; -
types/Hyperlink.php
r9 r10 1 1 <?php 2 2 3 function TypeHyperlink ViewHtml($Type,$Item)3 function TypeHyperlinkOnView($Item) 4 4 { 5 5 $Output = '<a href="'.$Item['Value'].'">'.$Item['Value'].'</a>'; … … 7 7 } 8 8 9 function TypeHyperlink EditHtml($Type,$Item)9 function TypeHyperlinkOnEdit($Item) 10 10 { 11 11 $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'; -
types/IPv4Address.php
r8 r10 1 1 <?php 2 2 3 function TypeIPv4Address View($Type,$Item)3 function TypeIPv4AddressOnView($Item) 4 4 { 5 5 $Output = $Item['Value']; … … 7 7 } 8 8 9 function TypeIPv4Address Edit($Type,$Item)9 function TypeIPv4AddressOnEdit($Item) 10 10 { 11 11 $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'; … … 13 13 } 14 14 15 function TypeIPv4Address Check($Type,$Parameter, $Table, $Id)15 function TypeIPv4AddressOnCheck($Parameter, $Table, $Id) 16 16 { 17 17 return(true); -
types/Integer.php
r8 r10 1 1 <?php 2 2 3 function TypeInteger ViewHtml($Type,$Item)3 function TypeIntegerOnView($Item) 4 4 { 5 5 $Output = $Item['Value']; … … 7 7 } 8 8 9 function TypeInteger EditHtml($Type,$Item)9 function TypeIntegerOnEdit($Item) 10 10 { 11 11 $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'; -
types/Password.php
r9 r10 1 1 <?php 2 2 3 function TypePassword ViewHtml($Type,$Item)3 function TypePasswordOnView($Item) 4 4 { 5 5 $Output = ''; … … 9 9 } 10 10 11 function TypePassword EditHtml($Type,$Item)11 function TypePasswordOnEdit($Item) 12 12 { 13 13 $Output = '<input type="password" name="'.$Item['Name'].'" value="'.$Item['Value'].'">'; -
types/PointerOneToMany.php
r8 r10 1 1 <?php 2 2 3 function TypePointerOneToMany ViewHtml($Type,$Item)3 function TypePointerOneToManyOnView($Item) 4 4 { 5 5 $Output = '<a href="?Action=ShowList&TableId='.$Type['TypeDefinition'].'&ParentTable='.$Item['SourceTable'].'&ParentColumn='.$Item['SourceItemId'].'">Seznam</a>'; … … 7 7 } 8 8 9 function TypePointerOneToMany EditHtml($Type,$Item)9 function TypePointerOneToManyOnEdit($Item) 10 10 { 11 11 $Output = '<a href="?Action=ShowList&TableId='.$Type['TypeDefinition'].'&ParentTable='.$Item['SourceTable'].'&ParentColumn='.$Item['SourceItemId'].'">Seznam</a>'; -
types/PointerOneToOne.php
r9 r10 6 6 7 7 $Columns = ''; 8 $ItemType = explode(':', $Item['Type']); 9 $TargetTable = $ItemType[1]; 8 $TargetTable = $Type['Parameters'][0]; 10 9 11 10 foreach($Lists[$TargetTable]['Items'] as $ListItem) … … 25 24 26 25 $Columns = ''; 27 $ItemType = explode(':', $Item['Type']); 28 $TargetTable = $ItemType[1]; 26 $TargetTable = $Type['Parameters'][0]; 29 27 30 28 foreach($Lists[$TargetTable]['Items'] as $ListItem) … … 42 40 } 43 41 44 function TypePointerOneToOne ViewHtml($Type,$Item)42 function TypePointerOneToOneOnView($Item) 45 43 { 46 global $Database, $Lists ;44 global $Database, $Lists, $Types; 47 45 48 $ ItemType = explode(':', $Item['Type']);49 $TargetTable = $ ItemType[1];46 $Type = $Types[$Item['Type']]; 47 $TargetTable = $Type['Parameters'][0]; 50 48 $TargetName = GetTablePointerName($Type, $Item); 51 49 $Output = '<a href="?Action=ViewItem&Table='.$TargetTable.'&Item='.$TargetName['Id'].'">'.$TargetName['Name'].'</a>'; … … 53 51 } 54 52 55 function TypePointerOneToOne EditHtml($Type,$Item)53 function TypePointerOneToOneOnEdit($Item) 56 54 { 57 global $Database, $Lists ;55 global $Database, $Lists, $Types; 58 56 57 $Type = $Types[$Item['Type']]; 59 58 $Output = '<select name="'.$Item['Name'].'">'; 60 59 $TargetNameList = GetTablePointerNameList($Type, $Item); -
types/String.php
r8 r10 1 1 <?php 2 2 3 function TypeString ViewHtml($Type,$Item)3 function TypeStringOnView($Item) 4 4 { 5 5 $Output = $Item['Value']; … … 7 7 } 8 8 9 function TypeString EditHtml($Type,$Item)9 function TypeStringOnEdit($Item) 10 10 { 11 11 $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'">';
Note:
See TracChangeset
for help on using the changeset viewer.