Changeset 71 for trunk/add.php


Ignore:
Timestamp:
Jul 8, 2016, 11:11:07 PM (8 years ago)
Author:
chronos
Message:
  • Added: Allow add new values with specified Time parameter.
  • Modified: Use database table columns with names with first capital letter.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/add.php

    r69 r71  
    1212  $MeasureId = addslashes($_GET['MeasureId']);
    1313  $Value = addslashes($_GET['Value']);
     14  if (array_key_exists('Time', $_GET)) $Time = $_GET['Time'] * 1;
     15    else $Time = time();
    1416  $Measure = new Measure($Core->Database);
    1517  $Measure->Load($MeasureId);
     
    1719  if(($HostName == $Measure->Data['PermissionAdd']) or ($_SERVER['REMOTE_ADDR'] == gethostbyname($Measure->Data['PermissionAdd'])))
    1820  {
    19     $Measure->AddValue($Value);
     21    $Measure->AddValue($Value, $Time);
    2022    echo('Hodnota '.$Value.' uložena');
    2123  } else echo('Nemáte oprávnění k aktualizaci zadané veličiny!<br>Vaše adresa: '.$HostName.'('.$_SERVER['REMOTE_ADDR'].')');
Note: See TracChangeset for help on using the changeset viewer.