Changeset 62 for trunk/add.php


Ignore:
Timestamp:
Jan 1, 2016, 12:13:34 PM (9 years ago)
Author:
chronos
Message:
  • Modified: stat_functions changed to PHP class.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/add.php

    r51 r62  
    77  $MeasureId = addslashes($_GET['MeasureId']);
    88  $Value = addslashes($_GET['Value']);
    9   $Measure = GetMeasureById($MeasureId);
    10   if(gethostbyaddr($_SERVER['REMOTE_ADDR']) == $Measure['PermissionAdd'])
     9  $Measure = new Measure($Database);
     10  $Measure->Load($MeasureId);
     11  if(gethostbyaddr($_SERVER['REMOTE_ADDR']) == $Measure->Data['PermissionAdd'])
    1112  {
    12     AddValue($Measure, $Value);
     13    $Measure->AddValue($Value);
    1314    echo('Hodnota '.$Value.' uložena');
    1415  } else echo('Nemáte oprávnění k aktualizaci zadané veličiny!<br>Vaše adresa: '.gethostbyaddr($_SERVER['REMOTE_ADDR']).'('.$_SERVER['REMOTE_ADDR'].')');
Note: See TracChangeset for help on using the changeset viewer.