Changeset 44 for trunk/Application/Model/Measurement/MeasureClient.php
- Timestamp:
- Nov 24, 2009, 5:19:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Model/Measurement/MeasureClient.php
r43 r44 1 1 <?php 2 3 include_once(dirname(__FILE__).'/../../../Base/Model.php'); 2 4 3 5 class MeasureClient extends Model … … 8 10 while($MeasureClient = $DbResult->fetch_assoc()) 9 11 { 10 if(class_exists($MeasureClient['MeasureClass'])) 12 $DbResult2 = $this->Database->select('MeasureMethod', '*', 'Id='.$MeasureClient['Method']); 13 $MeasureMethod = $DbResult2->fetch_assoc(); 14 echo($MeasureClient['MeasureId'].','); 15 include_once(dirname(__FILE__).'/'.$MeasureMethod['MeasureClass'].'.php'); 16 $MeasureMethod['MeasureClass'] .= 'Measurement'; 17 if(class_exists($MeasureMethod['MeasureClass'])) 11 18 { 12 $MeasureClass = new $Measure Client['MeasureClass']();13 if(method_exists($MeasureClass, $Measure Class['Method']))19 $MeasureClass = new $MeasureMethod['MeasureClass']($this->System); 20 if(method_exists($MeasureClass, $MeasureMethod['Method'])) 14 21 { 15 if($MeasureClient['Parameter'] != '') $Value = $Measure->$MeasureClient['Method']($MeasureClient['Parameter']); 16 else $Value = $Measure->$MeasureClient['Method'](); 17 file_get_contents($MeasureClient['Host'].$MeasureClient['Path'].'/?MeasureId='.$MeasureClient['MeasureId'].'&Value='.addslashes($Value)); 18 } else echo('Metoda '.$MeasureClient['Method'].' neexistuje.'); 19 } else echo('Třída '.$MeasureClient['MeasureClass'].' neexistuje.'); 20 22 if($MeasureClient['Parameter'] != '') $Value = $Measure->$MeasureMethod['Method']($MeasureClient['Parameter']); 23 else $Value = $MeasureClass->$MeasureMethod['Method'](); 24 echo(file_get_contents('http://'.$MeasureClient['Host'].$MeasureClient['Path'].'/?M=Add&MeasureId='.$MeasureClient['MeasureId'].'&Value='.addslashes($Value))); 25 } else echo('Metoda '.$MeasureMethod['Method'].' neexistuje.'); 26 } else echo('Třída '.$MeasureMethod['MeasureClass'].' neexistuje.'); 21 27 } 22 28 }
Note:
See TracChangeset
for help on using the changeset viewer.