- Timestamp:
- Oct 21, 2008, 4:15:52 PM (16 years ago)
- Location:
- types
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
types/GPS.php
r17 r18 20 20 global $Database; 21 21 22 $DbResult = $Database->query('SELECT * FROM `SystemGPS` WHERE `Id`='.$Item['Value']); 23 if($DbResult->num_rows > 0) 22 if($Item['Value'] != '') 24 23 { 25 $DbRow = $DbResult->fetch_assoc(); 24 $DbResult = $Database->query('SELECT * FROM `SystemGPS` WHERE `Id`='.$Item['Value']); 25 if($DbResult->num_rows > 0) 26 { 27 $DbRow = $DbResult->fetch_assoc(); 28 } else $DbRow = array('Longitude' => 0, 'Latitude' => 0); 26 29 } else $DbRow = array('Longitude' => 0, 'Latitude' => 0); 27 30 $Value = TypeGPSExplode($DbRow['Latitude']); -
types/Password.php
r11 r18 1 1 <?php 2 3 // SHA1 hash used 2 4 3 5 function TypePasswordOnView($Item) 4 6 { 5 7 $Output = ''; 6 for($I = 0; $I < strlen($Item['Value']); $I++)8 for($I = 0; $I < 6; $I++) 7 9 $Output .= '*'; 8 10 return($Output); … … 11 13 function TypePasswordOnEdit($Item) 12 14 { 13 $Output = '<input type="password" name="'.$Item['Name'].'" value=" '.$Item['Value'].'">';15 $Output = '<input type="password" name="'.$Item['Name'].'" value="">'; 14 16 return($Output); 15 17 } … … 17 19 function TypePasswordOnLoad($Item) 18 20 { 19 return($_POST[$Item['Name']]); 21 global $Database; 22 23 if(!array_key_exists('SourceItemId', $Item)) $Result = sha1($_POST[$Item['Name']]); 24 else 25 { 26 $DbRestult = $Database->query('SELECT '.$Item['Name'].' FROM '.$Item['SourceTable'].' WHERE Id='.$Item['SourceItemId']); 27 if($DbResult->num_rows > 0) 28 { 29 $DbRow = $DbResult->fetch_assoc(); 30 if($_POST[$Item['Name']] == '') $Result = $DbRow[$Item['Name']]; 31 else $Result = sha1($_POST[$Item['Name']]); 32 } else $Result = sha1($_POST[$Item['Name']]); 33 } 34 return($Result); 20 35 } 21 36 -
types/PointerOneToOne.php
r15 r18 34 34 if($DbResult->num_rows > 0) 35 35 { 36 $Result = array( );36 $Result = array(array('Name' => 'Žádný', 'Id' => 0, 'ItemId' => 0)); 37 37 while($DbRow = $DbResult->fetch_assoc()) 38 38 $Result[] = $DbRow;
Note:
See TracChangeset
for help on using the changeset viewer.