Changeset 14785 for trunk/FACT++


Ignore:
Timestamp:
01/21/13 13:43:37 (12 years ago)
Author:
tbretz
Message:
Added the possibility to request scheduling data of a single source for a given date.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.php

    r14783 r14785  
    135135
    136136    return;
    137 
     137}
     138
     139if (isset($_GET['source']) && isset($_GET['time']))
     140{
     141    // $args = "filename":label --arg:"key1=value" --arg:"key2=value"
     142    $cmd = $path.'/makedata '.escapeshellarg($_GET['source']).' '.escapeshellarg($_GET['time']);
     143
     144    // Execute
     145    passthru($cmd, $str);
     146
     147    // Logging (mainly for debugging)
     148    $d = date("Y/m");
     149    $path = "log/".$d;
     150    if (!file_exists($path))
     151        mkdir($path, 0777, true);
     152    $file = fopen($path."/exec.log", "a");
     153    fwrite($file, $cmd."\n".$str."\n\n");
     154    fclose($file);
     155
     156    print_r($str);
     157
     158    return;
    138159}
    139160
Note: See TracChangeset for help on using the changeset viewer.