コード例 #1
0
ファイル: ledex16.php プロジェクト: hcvcastro/pxp
<?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
ファイル: ledex4.1.php プロジェクト: Lazaro-Gallo/psmn
<?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
ファイル: ledex_cyrillic2.php プロジェクト: hcvcastro/pxp
<?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
ファイル: ledex1.php プロジェクト: JackPotte/xtools
<?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
ファイル: ledex7.php プロジェクト: Lazaro-Gallo/psmn
<?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
ファイル: 1min_T.php プロジェクト: muthulatha/iem
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
ファイル: ledex17.php プロジェクト: hcvcastro/pxp
<?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
ファイル: ledex9.php プロジェクト: Lazaro-Gallo/psmn
<?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
ファイル: ledex3.php プロジェクト: Lazaro-Gallo/psmn
<?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
ファイル: plot_traffic.php プロジェクト: muthulatha/iem
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
ファイル: ledex4.php プロジェクト: JackPotte/xtools
<?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
ファイル: plot_soil.php プロジェクト: muthulatha/iem
        $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
ファイル: ledex10.php プロジェクト: Lazaro-Gallo/psmn
<?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
ファイル: ledex11.php プロジェクト: hcvcastro/pxp
<?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
ファイル: ledex15.php プロジェクト: hcvcastro/pxp
<?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);