Пример #1
0
<?php

// content="text/plain; charset=utf-8"
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_NAVY);
Пример #2
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_led.php';
// By default each "LED" circle has a radius of 3 pixels. Change to 5 and slghtly smaller margin
$led = new DigitalLED74(6);
$led->SetSupersampling(2);
$led->StrokeNumber('123.', LEDC_RED);
Пример #3
0
<?php

// content="text/plain; charset=utf-8"
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels. Change to 5 and slghtly smaller margin
$led = new DigitalLED74(3);
$led->SetSupersampling(2);
$text = 'Р' . 'С' . 'Т' . 'У' . 'Ф' . 'Х' . 'Ц' . 'Ч' . 'Ш' . 'Щ' . 'Ъ' . 'Ы' . 'Ь' . 'Э' . 'Ю' . 'Я';
$led->StrokeNumber($text, LEDC_RED);
Пример #4
0
<?php

include "../jpgraph.php";
include "../jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_GREEN);
Пример #5
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_led.php';
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_CHOCOLATE);
Пример #6
0
if ($myTime >= $yesterday) {
    /* Look in IEM Access! */
    $dbconn = iemdb("access");
    $tbl = "current_log";
    $pcol = ", pres as alti";
    $rs = pg_prepare($dbconn, "SELECT", "SELECT * {$pcol} from {$tbl} c JOIN stations s ON (s.iemid = c.iemid)\n                 WHERE id = \$1 and date(valid) = \$2 ORDER by valid ASC");
} else {
    /* Dig in the archive for our data! */
    $dbconn = iemdb("snet");
    $tbl = sprintf("t%s", date("Y_m", $myTime));
    $pcol = "";
    $rs = pg_prepare($dbconn, "SELECT", "SELECT * {$pcol} from {$tbl} \n                 WHERE station = \$1 and date(valid) = \$2 ORDER by valid ASC");
}
$rs = pg_execute($dbconn, "SELECT", array($station, date("Y-m-d", $myTime)));
if (pg_num_rows($rs) == 0) {
    $led = new DigitalLED74();
    $led->StrokeNumber('NO DATA FOR THIS DATE', LEDC_GREEN);
    die;
}
$titleDate = strftime("%b %d, %Y", $myTime);
$cityname = $cities[$station]['name'];
/* BEGIN GOOD WORK HERE */
$times = array();
$temps = array();
$dewps = array();
$srad = array();
for ($i = 0; $row = @pg_fetch_array($rs, $i); $i++) {
    $ts = strtotime(substr($row["valid"], 0, 16));
    $times[] = $ts;
    $srad[] = $row["srad"] >= 0 ? $row["srad"] : "";
    $temps[] = $row["tmpf"] > -50 && $row["tmpf"] < 120 ? $row["tmpf"] : "";
Пример #7
0
<?php

// content="text/plain; charset=utf-8"
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_INVERTGRAY);
Пример #8
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_led.php';
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_GOLDENROD);
Пример #9
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_led.php';
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_YELLOW);
Пример #10
0
for ($i = 0; $row = @pg_fetch_array($rs, $i); $i++) {
    $times[$row["lane_id"]][] = strtotime(substr($row["valid"], 0, 16));
    $avg_speed[$row["lane_id"]][] = $row["avg_speed"];
    $normal_vol[$row["lane_id"]][] = $row["avg_headway"];
    $long_vol[$row["lane_id"]][] = $row["avg_headway"];
    $occupancy[$row["lane_id"]][] = $row["avg_headway"];
}
pg_close($dbconn);
pg_close($iemdb);
include "../../../include/jpgraph/jpgraph.php";
include "../../../include/jpgraph/jpgraph_line.php";
include "../../../include/jpgraph/jpgraph_bar.php";
include "../../../include/jpgraph/jpgraph_date.php";
include "../../../include/jpgraph/jpgraph_led.php";
if (pg_num_rows($rs) == 0) {
    $led = new DigitalLED74();
    $led->StrokeNumber('NO TRAFFIC DATA AVAILABLE', LEDC_GREEN);
    die;
}
include "../../../include/network.php";
$nt = new NetworkTable("IA_RWIS");
$cities = $nt->table;
// Create the graph. These two calls are always required
$graph = new Graph(650, 550, "example1");
$graph->SetScale("datlin");
$graph->SetMarginColor("white");
$graph->SetColor("lightyellow");
$graph->img->SetMargin(40, 55, 105, 105);
//$graph->xaxis->SetFont(FS_FONT1,FS_BOLD);
$graph->yaxis->SetTitle("Average Speed [mph]");
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD, 12);
Пример #11
0
<?php

include "../jpgraph.php";
include "../jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels. Change to 5 and slghtly smaller margin
$led = new DigitalLED74(5);
$led->StrokeNumber('ABC123.', LEDC_RED);
Пример #12
0
        $ts = strtotime(substr($row["valid"], 0, 16));
        if ($lts != $ts) {
            $times[] = $ts;
            $lts = $ts;
        }
        $data["s" . $row["sensor_id"] . "temp"][] = $row["temp"];
    }
    pg_close($dbconn);
}
include "../../../include/jpgraph/jpgraph.php";
include "../../../include/jpgraph/jpgraph_line.php";
include "../../../include/jpgraph/jpgraph_bar.php";
include "../../../include/jpgraph/jpgraph_date.php";
include "../../../include/jpgraph/jpgraph_led.php";
if (pg_num_rows($rs) == 0) {
    $led = new DigitalLED74();
    $led->StrokeNumber('NO SOIL DATA AVAILABLE', LEDC_GREEN);
    die;
}
include "../../../include/network.php";
$nt = new NetworkTable("IA_RWIS");
$cities = $nt->table;
// Create the graph. These two calls are always required
$graph = new Graph(650, 550, "example1");
$graph->SetScale("datlin");
$graph->SetMarginColor("white");
$graph->SetColor("lightyellow");
//$graph->img->SetMargin(40,55,105,105);
//$graph->xaxis->SetFont(FS_FONT1,FS_BOLD);
$graph->title->Set($cities[$station]['name'] . " RWIS Soil Probe Data");
$graph->subtitle->Set("Values at 15 different depths [inch] shown");
Пример #13
0
<?php

// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_led.php';
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_KHAKI);
Пример #14
0
<?php

// content="text/plain; charset=utf-8"
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_OLIVE);
Пример #15
0
<?php

// content="text/plain; charset=utf-8"
include "jpgraph/jpgraph.php";
include "jpgraph/jpgraph_led.php";
// By default each "LED" circle has a radius of 3 pixels
$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL', LEDC_STEELBLUE);