Folder reorganize 1
41
overviews/.github/copilot-instructions.md
vendored
@@ -1,41 +0,0 @@
|
||||
# LASUCA Controls – Copilot Instructions
|
||||
|
||||
## Architecture snapshot
|
||||
- `index.php` is the live overview: PrototypeJS `Ajax.Updater` polls `data/main.php` every second and swaps the entire dashboard fragment into `<div id="overview_values">`.
|
||||
- Feature pages under `boilers/`, `tanks/`, `vertical/`, etc. copy the same pattern but point to their own `*main.php` include stacks.
|
||||
- Each `data/*.php` partial renders a table-driven widget and assumes pre-populated arrays such as `$value`, `$ID`, `$rounded1`; these now come from the shared loaders in `includes/items.php` and `includes/items2dec.php`, which hydrate process tag values from the historians/PLCs before the fragment renders.
|
||||
- Legacy alternates live in `data/OLD/` for reference—verify changes against their modern counterparts before deleting behavior.
|
||||
|
||||
## Data sources & globals
|
||||
- MySQL connectivity is centralized in `includes/dbinfo.php` / `includes/dbconnect.php`; fragments build short queries (e.g. `includes/w15minavg.php`, `includes/record.php`) with raw `mysqli` calls—close handles once done.
|
||||
- Sugar-cane totals (`includes/tonsin.php`) come from SQL Server via `sqlsrv_connect`; the PHP `sqlsrv` extension must be installed locally.
|
||||
- Expect `items.php` to return associative arrays keyed by SCADA tag names (uppercase with spaces or underscores). When adding new metrics, extend that upstream fetch first or guard against missing keys with `isset()`.
|
||||
|
||||
## Working with dashboard modules
|
||||
- New UI blocks belong in `data/` and should mirror the existing table markup + inline PHP echoes; keep row comments (`ROW START/END`) to stay navigable.
|
||||
- Progress bars rely on CSS IDs declared in `style.css` (`#progressmills`, `#progresstanks`, etc.); reuse existing IDs to inherit sizing.
|
||||
- Automation/manual status chips are rendered by branching on numeric flags (`0` auto, `1` manual). Follow the color scheme already in `data/boilers*.php` and `data/tablesandtd.php`.
|
||||
- When you need downtime banners, look at `data/maintenence.php` for the minimal markup.
|
||||
|
||||
## Polling & client behavior
|
||||
- Prototype's `PeriodicalExecuter` schedules refreshes; any new async endpoint should output a full HTML fragment ready for innerHTML replacement and avoid emitting `<html>` or `<body>` tags.
|
||||
- Avoid long-running queries—each partial runs every second, so cache expensive math in SQL views or upstream collectors.
|
||||
|
||||
## Local run & verification
|
||||
- There is no build step; serve locally with PHP's built-in server from the repo root, e.g. `php -S localhost:8000 -t v:\overviews`. Hit `/index.php` to smoke-test.
|
||||
- Before shipping, lint touched PHP with `php -l path/to/file.php`; broken includes surface only at runtime, so exercise the page you changed.
|
||||
- Provide sanitized credentials via environment-driven includes when committing—current repo stores plaintext, so redact them if you regenerate config files.
|
||||
|
||||
## Gotchas & tips
|
||||
- Missing `includes/items.php` or `includes/items2dec.php` will fatal—stub them with dummy arrays when running in isolation.
|
||||
- Data fragments expect to step up one directory (`../includes/...`) to reach shared helpers; when adding new modules keep that relative pathing consistent.
|
||||
- Fonts and viewport sizing depend on vw units; test in a 4K display mode if you tweak CSS spacing.
|
||||
- Keep Ajax endpoints PHP-only—switching to JSON would require rewriting the Prototype update pipeline, so stick with HTML fragments unless you plan a broader refactor.
|
||||
|
||||
## Developer tools
|
||||
- `testall/` - Shows all modular dashboard sections on one page for easier editing. Use this when working on individual modules to see changes in context.
|
||||
|
||||
## Deprecated/experimental (ignore)
|
||||
- `jpowered/` - Unused experiment
|
||||
- `loaddata/` - Experiment, should be moved to OLD/
|
||||
- `OLD/` - Legacy files
|
||||
@@ -1,152 +0,0 @@
|
||||
<?php
|
||||
$delay = 15; // time in seconds
|
||||
header("Refresh: $delay; URL=" . $_SERVER['PHP_SELF']);
|
||||
|
||||
/**
|
||||
* Refresh truck dump stats cache.
|
||||
*
|
||||
* Run via cron every 60 seconds:
|
||||
* * * * * * php /path/to/refresh_truckdump_cache.php
|
||||
*
|
||||
* Or call from truckdump.php with stale-check.
|
||||
*/
|
||||
|
||||
// Ensure PHP uses the same timezone as MySQL/local server
|
||||
date_default_timezone_set('America/Chicago');
|
||||
|
||||
$con = mysqli_connect('192.168.0.10', 'corey', '41945549', 'controls');
|
||||
|
||||
if (!$con) {
|
||||
error_log('refresh_truckdump_cache: DB connection failed');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format seconds as HH:MM:SS
|
||||
*/
|
||||
function formatDuration($seconds)
|
||||
{
|
||||
if ($seconds <= 0) {
|
||||
return '00:00:00';
|
||||
}
|
||||
$hours = floor($seconds / 3600);
|
||||
$minutes = floor(($seconds % 3600) / 60);
|
||||
$secs = $seconds % 60;
|
||||
return sprintf('%02d:%02d:%02d', $hours, $minutes, $secs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dump timestamps for a given counter column.
|
||||
* Finds when the counter value changed (i.e., when a dump occurred).
|
||||
* Returns array of up to 10 timestamps (most recent first).
|
||||
*/
|
||||
function getDumpTimestamps($con, $counterColumn)
|
||||
{
|
||||
// Find the first occurrence of each counter value (when it incremented)
|
||||
// by getting the MIN(DATE) for each distinct counter value
|
||||
$query = "
|
||||
SELECT MIN(DATE) AS dump_time
|
||||
FROM plc
|
||||
GROUP BY {$counterColumn}
|
||||
ORDER BY {$counterColumn} DESC
|
||||
LIMIT 10
|
||||
";
|
||||
$result = mysqli_query($con, $query);
|
||||
|
||||
if (!$result) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$timestamps = [];
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$ts = strtotime($row['dump_time']);
|
||||
if ($ts) {
|
||||
$timestamps[] = $ts;
|
||||
}
|
||||
}
|
||||
return $timestamps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate stats for a dump location.
|
||||
*/
|
||||
function calculateDumpStats($con, $counterColumn)
|
||||
{
|
||||
$timestamps = getDumpTimestamps($con, $counterColumn);
|
||||
$now = time();
|
||||
|
||||
$sinceLast = '00:00:00';
|
||||
$betweenDumps = '00:00:00';
|
||||
$avg10 = '00:00:00';
|
||||
|
||||
if (count($timestamps) >= 1) {
|
||||
// Time since the most recent dump
|
||||
$sinceLast = formatDuration($now - $timestamps[0]);
|
||||
}
|
||||
|
||||
if (count($timestamps) >= 2) {
|
||||
// Time between the last two dumps
|
||||
$betweenDumps = formatDuration($timestamps[0] - $timestamps[1]);
|
||||
}
|
||||
|
||||
if (count($timestamps) >= 10) {
|
||||
// Average time between 10 dumps = (first - tenth) / 9 intervals
|
||||
$avgSeconds = ($timestamps[0] - $timestamps[9]) / 9;
|
||||
$avg10 = formatDuration((int) $avgSeconds);
|
||||
}
|
||||
|
||||
return [
|
||||
'since_last' => $sinceLast,
|
||||
'between_dumps' => $betweenDumps,
|
||||
'avg_10' => $avg10,
|
||||
];
|
||||
}
|
||||
|
||||
// Calculate all stats
|
||||
$east = calculateDumpStats($con, 'totnorth');
|
||||
$west1 = calculateDumpStats($con, 'totsouth');
|
||||
$west2 = calculateDumpStats($con, 'totwest2');
|
||||
|
||||
// Update cache table
|
||||
$sql = "
|
||||
UPDATE truckdump_stats_cache SET
|
||||
east_since_last = ?,
|
||||
east_between_dumps = ?,
|
||||
east_avg_10 = ?,
|
||||
west1_since_last = ?,
|
||||
west1_between_dumps = ?,
|
||||
west1_avg_10 = ?,
|
||||
west2_since_last = ?,
|
||||
west2_between_dumps = ?,
|
||||
west2_avg_10 = ?,
|
||||
updated_at = NOW()
|
||||
WHERE id = 1
|
||||
";
|
||||
|
||||
$stmt = mysqli_prepare($con, $sql);
|
||||
mysqli_stmt_bind_param(
|
||||
$stmt,
|
||||
'sssssssss',
|
||||
$east['since_last'],
|
||||
$east['between_dumps'],
|
||||
$east['avg_10'],
|
||||
$west1['since_last'],
|
||||
$west1['between_dumps'],
|
||||
$west1['avg_10'],
|
||||
$west2['since_last'],
|
||||
$west2['between_dumps'],
|
||||
$west2['avg_10']
|
||||
);
|
||||
|
||||
$success = mysqli_stmt_execute($stmt);
|
||||
|
||||
mysqli_stmt_close($stmt);
|
||||
mysqli_close($con);
|
||||
|
||||
if ($success) {
|
||||
echo "Cache refreshed at " . date('Y-m-d H:i:s') . "\n";
|
||||
exit(0);
|
||||
} else {
|
||||
error_log('refresh_truckdump_cache: Update failed');
|
||||
exit(1);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
WARNING [2] Undefined variable $logfilehandle
|
||||
|
||||
|
||||
WARNING [2] Undefined variable $logfilehandle
|
||||
|
||||
|
||||
WARNING [2] Undefined variable $logfilehandle
|
||||
|
||||
@@ -1,773 +0,0 @@
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config3.txt) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data3.txt) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt?saveimage=areagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt?saveimage=areagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt?saveimage=..%2F..%2Ftest%2Fareagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt?saveimage=..%2F..%2Ftest%2Fareagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Unable to open '../../test/areagraph.png' for writing: No such file or directory
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt?saveimage=..%2F..%2Ftest%2Fareagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt?saveimage=..%2F..%2Ftest%2Fareagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Unable to open '../../test/areagraph.png' for writing: No such file or directory
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt?saveimage=C%3A%5C1stNeutron%5CProducts%5CPHPGraphs%5Ctest&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt?saveimage=C%3A%5C1stNeutron%5CProducts%5CPHPGraphs%5Ctest&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] imagepng() [<a href='function.imagepng'>function.imagepng</a>]: Unable to open 'C:\1stNeutron\Products\PHPGraphs\test' for writing: Permission denied
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/config1.txt?saveimage=C%3A%5C1stNeutron%5CProducts%5CPHPGraphs%5Ctest%5Careagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
WARNING [2] file(http://127.0.0.1:80/advgraphext/jpowered/demo/areagraph/data1.txt?saveimage=C%3A%5C1stNeutron%5CProducts%5CPHPGraphs%5Ctest%5Careagraph.png&PHPSESSID=7uohsgsvrnk3biqg2nvimrs4t6) [<a href='function.file'>function.file</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
|
||||
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textangle is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textangle is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendlabels is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendseriescolors is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined array key 2
|
||||
|
||||
|
||||
Unknown error type: [8192] trim(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined array key 2
|
||||
|
||||
|
||||
Unknown error type: [8192] trim(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined array key 2
|
||||
|
||||
|
||||
Unknown error type: [8192] trim(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textY is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legenddisplay is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendstyle is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendbgcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendbordercolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendtextcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendtitle is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendfontsize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legenditalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriestype is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriesColor is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$pointSymbol
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$pointSize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriestype is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriesColor is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$pointSymbol
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$pointSize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriestype is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$seriesColor is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$pointSymbol
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$pointSize is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$dataArray is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$nDataItems
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$nDataItems is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$dataArray is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$nDataItems
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$nDataItems is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$dataArray is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPseriesObj::$nDataItems
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPseriesObj::$nDataItems is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$dataSeqNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$valueX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$isNullValue is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPdataItemObj::$seriesNumber is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textbold is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textitalic is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textangle is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textY is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined variable $R8725029EA89712EED8670BAE64D30E47
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined variable $R8725029EA89712EED8670BAE64D30E47
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined variable $R8725029EA89712EED8670BAE64D30E47
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendwidth is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$basegap
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPlegend::$legendheight is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$legendxpos
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$legendypos
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$legendypos
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPlegend::$legendypos
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textX
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textY
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textX
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textstring
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textY is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textX
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textY
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textY
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textstring
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textY is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
Unknown error type: [8192] imagefilledrectangle(): Passing null to parameter #4 ($x2) of type int is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textstring is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textfontfamily is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textcolor is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textX is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textY is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textbold
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textitalic
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$usettf is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #4 ($string) of type string is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textboundBox is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textWidth is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] Creation of dynamic property JPtext::$textHeight is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] strlen(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textbold
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textitalic
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPtext::$textfontsize
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #1 ($size) of type float is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] imagettfbbox(): Passing null to parameter #4 ($string) of type string is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] strlen(): Passing null to parameter #1 ($string) of type string is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
Unknown error type: [8192] imagefilledrectangle(): Passing null to parameter #4 ($x2) of type int is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] imagefilledrectangle(): Passing null to parameter #5 ($y2) of type int is deprecated
|
||||
|
||||
|
||||
Unknown error type: [8192] imagefilledrectangle(): Passing null to parameter #6 ($color) of type int is deprecated
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
|
||||
WARNING [2] Undefined property: JPdraw::$jpconfig
|
||||
|
||||
|
||||
WARNING [2] Trying to access array offset on value of type null
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT DISTINCT CropDay FROM LoadData ORDER BY CropDay DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
echo "<select name='cropday' id='cropday'>";
|
||||
echo '<option selected disabled value="">Crop Day...</option>';
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
echo "<option value='" . $row['CropDay'] . "' >" . $row['CropDay'] . "</option>";
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
|
||||
//end
|
||||
?>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
|
||||
if (!file_exists($dbName)) {
|
||||
die("Could not find database file.");
|
||||
}
|
||||
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
|
||||
|
||||
//select data from db
|
||||
$day = "SELECT DISTINCT `Crop Day` FROM `Load Data` ORDER BY `Crop Day` DESC";
|
||||
|
||||
|
||||
$cd = $db->query($day);
|
||||
//end
|
||||
|
||||
|
||||
echo "<select name='cropday'>";
|
||||
echo '<option selected disabled value="">Crop Day...</option>';
|
||||
while ($row = $cd->fetch()) {
|
||||
echo "<option value='" . $row['Crop Day'] . "' >" . $row['Crop Day'] . "</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
@@ -1,3 +0,0 @@
|
||||
<div class="footer">
|
||||
<p>Copyright © 2015, Louisiana Sugarcane Cooperative, Inc</p>
|
||||
</div>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT DISTINCT AccountName FROM Tract";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
echo "<select name='grower' id='grower'>";
|
||||
echo '<option selected disabled value="">Select Farmer...</option>';
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
echo "<option value='" . $row['AccountName'] . "' >" . $row['AccountName'] . "</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
//end
|
||||
?>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
|
||||
if (!file_exists($dbName)) {
|
||||
die("Could not find database file.");
|
||||
}
|
||||
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
|
||||
|
||||
//select data from db
|
||||
$grower = "SELECT DISTINCT farmer FROM INSCALE";
|
||||
|
||||
|
||||
$cows = $db->query($grower);
|
||||
//end
|
||||
|
||||
echo "<select name='term'>";
|
||||
echo '<option selected disabled value="">Select Farmer...</option>';
|
||||
while ($row = $cows->fetch()) {
|
||||
echo "<option value='" . $row['farmer'] . "' >" . $row['farmer'] . "</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
|
Before Width: | Height: | Size: 46 B |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 109 KiB |
@@ -1,163 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Load Data</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center">
|
||||
|
||||
<div class="header">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3 right">
|
||||
<div class="aside">
|
||||
<?php include("tonsin.php");?>
|
||||
<?php include("tonsintot.php");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
||||
|
||||
<?php
|
||||
if(isset($_GET['submit'])){
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
//select data from db
|
||||
$sql = "SELECT LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountId_Pk
|
||||
WHERE CropDay LIKE ".$cropday." OR AccountName LIKE ".$grower."
|
||||
GROUP BY LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
LoadData.DateOut,
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
ORDER by LoadId_Pk DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
|
||||
$tonsin = 0;
|
||||
$tonsin2 = 0;
|
||||
|
||||
}
|
||||
?>
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th>
|
||||
<form action="" method="GET">
|
||||
<?php include("dayselect.php");?>
|
||||
<?php include("growerselect.php");?>
|
||||
<br>
|
||||
<input id="option" type="checkbox" name="over" value="100000">
|
||||
<label for="option"><span></span>OVERLOADS</label>
|
||||
<input type="submit" name="submit" value="Search" />
|
||||
</form>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="margin: 0px auto;" class="stat">
|
||||
<tr>
|
||||
<th>Live Scale Load Data</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="stat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Load</th>
|
||||
<th>Day</th>
|
||||
<th>Tract</th>
|
||||
<th>Grower</th>
|
||||
<th>Gross</th>
|
||||
<th>Tare</th>
|
||||
<th>Tons</th>
|
||||
<th>Out Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
$tonsin += $row['Tons'];
|
||||
echo "<tr>";
|
||||
echo "<td>".$row ['LoadId_Pk']."</td>";
|
||||
echo "<td><b>".$row ['CropDay']."</b></td>";
|
||||
echo "<td>".$row ['TractId_Fk']."</td>";
|
||||
echo "<td>".$row ['AccountName']."</td>";
|
||||
echo "<td>".$row ['GrossWt']." </td>";
|
||||
echo "<td>".$row ['TareWt']." </td>";
|
||||
echo "<td>".$row ['Tons']." </td>";
|
||||
echo "<td>".$row ['TIME']." </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//end
|
||||
sqlsrv_free_stmt( $stmt);
|
||||
sqlsrv_close( $conn);
|
||||
?>
|
||||
</table>
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th id="vtitle" id="padded">Total Tons:</th>
|
||||
<th align="right" id="sum-count"><?php echo $tonsin; ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<a href="#" class="back-to-top">Back to Top</a>
|
||||
</div>
|
||||
<?php include 'footer.php';?>
|
||||
<script type="text/javascript">
|
||||
// create the back to top button
|
||||
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
|
||||
|
||||
var amountScrolled = 300;
|
||||
|
||||
$(window).scroll(function() {
|
||||
if ($(window).scrollTop() > amountScrolled) {
|
||||
$('a.back-to-top').fadeIn('slow');
|
||||
} else {
|
||||
$('a.back-to-top').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
|
||||
$('a.back-to-top, a.simple-back-to-top').click(function() {
|
||||
$('body').animate({
|
||||
scrollTop: 0
|
||||
}, 'fast');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,135 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Load Data</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center">
|
||||
|
||||
<div class="header">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3 right">
|
||||
<div class="aside">
|
||||
<?php include("tonsin.php");?>
|
||||
<?php include("tonsintot.php");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
|
||||
if (!file_exists($dbName)) {
|
||||
die("Could not find database file.");
|
||||
}
|
||||
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
|
||||
|
||||
//select data from db
|
||||
$sql = "SELECT `Load Data`.`Load No`,
|
||||
`Load Data`.`Crop Day`,
|
||||
`Load Data`.`Tract No`,
|
||||
`Load Data`.`Gross Wt`,
|
||||
`Load Data`.`In Tare`,
|
||||
`Load Data`.Tons,
|
||||
`Load Data`.`In Time`,
|
||||
`Load Data`.`Out Time`,
|
||||
INSCALE.farmer,
|
||||
INSCALE.REMTONs,
|
||||
INSCALE.hauled
|
||||
FROM `Load Data` RIGHT JOIN INSCALE ON `Load Data`.`Load No` = INSCALE.Load
|
||||
WHERE `Crop Day` = ( SELECT Max(`Crop Day`)FROM `Load Data`)
|
||||
ORDER BY `Crop Day`, `Load No` DESC";
|
||||
|
||||
|
||||
$result = $db->query($sql);
|
||||
$tonsin = 0;
|
||||
$tonsin2 = 0;
|
||||
|
||||
?>
|
||||
<div class="col-6">
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th>
|
||||
<form action="search.php">
|
||||
<?php include("dayselect.php");?>
|
||||
<?php include("growerselect.php");?><br>
|
||||
<input id="option" type="checkbox" name="over" value="100000">
|
||||
<label for="option"><span></span>OVERLOAD</label>
|
||||
<input type="submit" value="Search" />
|
||||
</form>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="margin: 0px auto;" class="stat">
|
||||
<tr>
|
||||
<th>Live Scale Load Data</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="stat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Load</th>
|
||||
<th>Day</th>
|
||||
<th>Tract</th>
|
||||
<th>Grower</th>
|
||||
<th>Gross</th>
|
||||
<th>Tare</th>
|
||||
<th>Tons</th>
|
||||
<th>Hauled</th>
|
||||
<th>Remaining</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
while ($row = $result->fetch())
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$row [ 'Load No' ]."</td>";
|
||||
echo "<td><b>".$row [ 'Crop Day' ]."</b></td>";
|
||||
echo "<td>".$row [ 'Tract No' ]."</td>";
|
||||
echo "<td>".$row [ 'farmer' ]."</td>";
|
||||
echo "<td>".$row [ 'Gross Wt' ]." </td>";
|
||||
echo "<td>".$row [ 'In Tare' ]." </td>";
|
||||
echo "<td>".$row [ 'Tons' ]."</td>";
|
||||
echo "<td>".$row [ 'hauled' ]." Tons</td>";
|
||||
echo "<td>".$row [ 'REMTONs' ]." Tons</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<a href="#" class="back-to-top">Back to Top</a>
|
||||
</div>
|
||||
<?php include 'footer.php';?>
|
||||
<script type="text/javascript">
|
||||
// create the back to top button
|
||||
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
|
||||
|
||||
var amountScrolled = 300;
|
||||
|
||||
$(window).scroll(function() {
|
||||
if ($(window).scrollTop() > amountScrolled) {
|
||||
$('a.back-to-top').fadeIn('slow');
|
||||
} else {
|
||||
$('a.back-to-top').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
|
||||
$('a.back-to-top, a.simple-back-to-top').click(function() {
|
||||
$('body').animate({
|
||||
scrollTop: 0
|
||||
}, 'fast');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +0,0 @@
|
||||
<div class="col-3 menu">
|
||||
<ul>
|
||||
<li>Factory info</li>
|
||||
|
||||
<li>Production</li>
|
||||
<li>Grower Login</li>
|
||||
<li>Contact & Personnel</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "LASUCA2K8\CBM";
|
||||
$uid = "cbm";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT TOP 20 LoadId_Pk, CropDay, TractId_Fk, TareIN, GrossWt, Tons, FarmerId_Fk, DateOut, SplitPercent
|
||||
FROM LoadData
|
||||
WHERE FarmerId_Fk
|
||||
LIKE 32002
|
||||
ORDER by LoadId_Pk DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
echo $row['LoadId_Pk'].", ".$row['TareIN'].", ".$row['GrossWt'].", ".$row['Tons'].", ".$row['GrossWt'].", ".$row['FarmerId_Fk']."<br />";
|
||||
}
|
||||
|
||||
/* Free statement and connection resources. */
|
||||
sqlsrv_free_stmt( $stmt);
|
||||
sqlsrv_close( $conn);
|
||||
?>
|
||||
@@ -1,158 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Load Data</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center">
|
||||
|
||||
<div class="header">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3 right">
|
||||
<div class="aside">
|
||||
<?php include("tonsin.php");?>
|
||||
<?php include("tonsintot.php");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th>
|
||||
<form method="POST" action="search.php">
|
||||
<?php include("dayselect.php");?>
|
||||
<?php include("growerselect.php");?><br>
|
||||
<input id="option" type="checkbox" name="over" value="100000">
|
||||
<label for="option"><span></span>OVERLOADS</label>
|
||||
<input type="submit" value="Search" />
|
||||
</form>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
//select data from db
|
||||
$sql = "SELECT LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountId_Pk
|
||||
WHERE CropDay = 90
|
||||
GROUP BY LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
LoadData.DateOut,
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
ORDER by LoadId_Pk DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
|
||||
$tonsin = 0;
|
||||
$tonsin2 = 0;
|
||||
?>
|
||||
<table style="margin: 0px auto;" class="stat">
|
||||
<tr>
|
||||
<th>Live Scale Load Data</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="stat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Load</th>
|
||||
<th>Day</th>
|
||||
<th>Tract</th>
|
||||
<th>Grower</th>
|
||||
<th>Gross</th>
|
||||
<th>Tare</th>
|
||||
<th>Tons</th>
|
||||
<th>Out Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
$tonsin += $row['Tons'];
|
||||
echo "<tr>";
|
||||
echo "<td>".$row ['LoadId_Pk']."</td>";
|
||||
echo "<td><b>".$row ['CropDay']."</b></td>";
|
||||
echo "<td>".$row ['TractId_Fk']."</td>";
|
||||
echo "<td>".$row ['AccountName']."</td>";
|
||||
echo "<td>".$row ['GrossWt']." </td>";
|
||||
echo "<td>".$row ['TareWt']." </td>";
|
||||
echo "<td>".$row ['Tons']." </td>";
|
||||
echo "<td>".$row ['TIME']." </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//end
|
||||
sqlsrv_free_stmt( $stmt);
|
||||
sqlsrv_close( $conn);
|
||||
?>
|
||||
</table>
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th id="vtitle" id="padded">Total Tons:</th>
|
||||
<th align="right" id="sum-count"><?php echo $tonsin; ?></th>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<a href="#" class="back-to-top">Back to Top</a>
|
||||
</div>
|
||||
<?php include 'footer.php';?>
|
||||
<script type="text/javascript">
|
||||
// create the back to top button
|
||||
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
|
||||
|
||||
var amountScrolled = 300;
|
||||
|
||||
$(window).scroll(function() {
|
||||
if ($(window).scrollTop() > amountScrolled) {
|
||||
$('a.back-to-top').fadeIn('slow');
|
||||
} else {
|
||||
$('a.back-to-top').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
|
||||
$('a.back-to-top, a.simple-back-to-top').click(function() {
|
||||
$('body').animate({
|
||||
scrollTop: 0
|
||||
}, 'fast');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,163 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Load Data</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center">
|
||||
|
||||
<div class="header">
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3 right">
|
||||
<div class="aside">
|
||||
<?php include("tonsin.php");?>
|
||||
<?php include("tonsintot.php");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<table style="margin: 0px auto;">
|
||||
<tr>
|
||||
<th>
|
||||
<form action="index.php">
|
||||
<?php include("dayselect.php");?>
|
||||
<?php include("growerselect.php");?><br>
|
||||
<input id="option" type="checkbox" name="over" value="100000">
|
||||
<label for="option"><span></span>OVERLOADS</label>
|
||||
<input type="submit" value="Reset Search" />
|
||||
</form>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
print_r($_POST);
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
//select data from db
|
||||
|
||||
$grower = $_POST['grower'];
|
||||
$cropday = $_POST['cropday'];
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountName
|
||||
WHERE CropDay LIKE '%".$cropday."%' OR AccountName LIKE '%".$grower."%'
|
||||
GROUP BY LoadData.LoadId_Pk,
|
||||
LoadData.CropDay,
|
||||
LoadData.TractId_Fk,
|
||||
LoadData.TareWt,
|
||||
LoadData.GrossWt,
|
||||
LoadData.Tons,
|
||||
LoadData.FarmerId_Fk,
|
||||
LoadData.DateOut,
|
||||
LoadData.Parked,
|
||||
Tract.AccountName
|
||||
ORDER by LoadId_Pk DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
|
||||
$tonsin = 0;
|
||||
$tonsin2 = 0;
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<table style="margin: 0px auto;" class="stat">
|
||||
<tr>
|
||||
<th>Live Scale Load Data</th>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="stat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Load</th>
|
||||
<th>Day</th>
|
||||
<th>Tract</th>
|
||||
<th>Grower</th>
|
||||
<th>Gross</th>
|
||||
<th>Tare</th>
|
||||
<th>Tons</th>
|
||||
<th>Out Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
|
||||
$tonsin += $row['Tons'];
|
||||
echo "<tr>";
|
||||
echo "<td>".$row ['LoadId_Pk']."</td>";
|
||||
echo "<td><b>".$row ['CropDay']."</b></td>";
|
||||
echo "<td>".$row ['TractId_Fk']."</td>";
|
||||
echo "<td>".$row ['AccountName']."</td>";
|
||||
echo "<td>".$row ['GrossWt']." </td>";
|
||||
echo "<td>".$row ['TareWt']." </td>";
|
||||
echo "<td>".$row ['Tons']." </td>";
|
||||
echo "<td>".$row ['TIME']." </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
//end
|
||||
sqlsrv_free_stmt( $stmt);
|
||||
sqlsrv_close( $conn);
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<a href="#" class="back-to-top">Back to Top</a>
|
||||
</div>
|
||||
<?php include 'footer.php';?>
|
||||
<script type="text/javascript">
|
||||
// create the back to top button
|
||||
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
|
||||
|
||||
var amountScrolled = 300;
|
||||
|
||||
$(window).scroll(function() {
|
||||
if ($(window).scrollTop() > amountScrolled) {
|
||||
$('a.back-to-top').fadeIn('slow');
|
||||
} else {
|
||||
$('a.back-to-top').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
|
||||
$('a.back-to-top, a.simple-back-to-top').click(function() {
|
||||
$('body').animate({
|
||||
scrollTop: 0
|
||||
}, 'fast');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,232 +0,0 @@
|
||||
body{
|
||||
max-width: 1080px;
|
||||
margin: 0 auto !important;
|
||||
float: none !important;
|
||||
background-image: url("images/bg.gif");
|
||||
background-color: #000;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.center {
|
||||
background-color: #fff;
|
||||
}
|
||||
.row:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: block;
|
||||
}
|
||||
[class*="col-"] {
|
||||
float: left;
|
||||
padding: 15px;
|
||||
}
|
||||
html, html a {
|
||||
font-family: Arial, "Lucida Sans", sans-serif;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
|
||||
}
|
||||
.header {
|
||||
background-image: url("images/fulllogo.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-color: #474719;
|
||||
height: 100px;
|
||||
color: #ffffff;
|
||||
padding: 15px;
|
||||
}
|
||||
h1 {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
p{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
.menu ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.menu li {
|
||||
padding: 8px;
|
||||
margin-bottom: 7px;
|
||||
background-color :#333300;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
.menu li:hover {
|
||||
background-color: #333333;
|
||||
}
|
||||
.aside {
|
||||
background-color: #474719;
|
||||
padding: 2px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
.footer {
|
||||
background-color: #474719;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding: 15px;
|
||||
}
|
||||
/* For desktop: */
|
||||
.col-1 {width: 8.33%;}
|
||||
.col-2 {width: 16.66%;}
|
||||
.col-3 {width: 20%;}
|
||||
.col-4 {width: 33.33%;}
|
||||
.col-5 {width: 41.66%;}
|
||||
.col-6 {width: 80%;}
|
||||
.col-7 {width: 58.33%;}
|
||||
.col-8 {width: 66.66%;}
|
||||
.col-9 {width: 75%;}
|
||||
.col-10 {width: 83.33%;}
|
||||
.col-11 {width: 91.66%;}
|
||||
.col-12 {width: 100%;}
|
||||
|
||||
/*
|
||||
Max width before this PARTICULAR table gets nasty
|
||||
This query will take effect for any screen smaller than 760px
|
||||
and also iPads specifically.
|
||||
*/
|
||||
|
||||
@media
|
||||
only screen and (max-width: 760px),
|
||||
(min-device-width: 768px) and (max-device-width: 1024px) {
|
||||
/* For mobile phones: */
|
||||
[class*="col-"] {
|
||||
width: 100%;
|
||||
}
|
||||
/* Force table to not be like tables anymore */
|
||||
table, thead, tbody, th, td, tr {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Hide table headers (but not display: none;, for accessibility) */
|
||||
thead tr {
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
tr { border: 1px solid #ccc; }
|
||||
|
||||
td {
|
||||
/* Behave like a "row" */
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
position: relative;
|
||||
padding-left: 50%;
|
||||
}
|
||||
|
||||
td:before {
|
||||
/* Now like a table header */
|
||||
position: absolute;
|
||||
/* Top/left values mimic padding */
|
||||
top: 6px;
|
||||
left: 6px;
|
||||
width: 45%;
|
||||
padding-right: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*
|
||||
Label the data
|
||||
*/
|
||||
td:nth-of-type(1):before { content: "Load Number"; }
|
||||
td:nth-of-type(2):before { content: "Crop DaY"; }
|
||||
td:nth-of-type(3):before { content: "Tract No"; }
|
||||
td:nth-of-type(4):before { content: "Grower"; }
|
||||
td:nth-of-type(5):before { content: "Gross Wt"; }
|
||||
td:nth-of-type(6):before { content: "Tare Wt"; }
|
||||
td:nth-of-type(7):before { content: "Tons"; }
|
||||
td:nth-of-type(8):before { content: "Tons Hauled"; }
|
||||
td:nth-of-type(9):before { content: "Tons Remaining"; }
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: grey;
|
||||
color: white;
|
||||
text-align: center;
|
||||
vertical-align: center;
|
||||
}
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background: #6C6C47;
|
||||
color: white;
|
||||
}
|
||||
tr:nth-child(odd) {
|
||||
background: #FFF;
|
||||
color: black;
|
||||
}
|
||||
|
||||
input[type=checkbox]:not(old),
|
||||
input[type=radio ]:not(old){aa
|
||||
width : 2em;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
font-size : 1em;
|
||||
opacity : 0;
|
||||
}
|
||||
input[type=checkbox]:not(old) + label,
|
||||
input[type=radio ]:not(old) + label{
|
||||
display : inline-block;
|
||||
margin-left : -2em;
|
||||
line-height : 1.5em;
|
||||
}
|
||||
input[type=checkbox]:not(old) + label > span,
|
||||
input[type=radio ]:not(old) + label > span{
|
||||
display : inline-block;
|
||||
width : 0.875em;
|
||||
height : 0.875em;
|
||||
margin : 0.05em 0.2em 0.35em 0.9em;
|
||||
border : 0.0625em solid rgb(192,192,192);
|
||||
border-radius : 0.25em;
|
||||
background : rgb(224,224,224);
|
||||
background-image : -moz-linear-gradient(rgb(240,240,240),rgb(224,224,224));
|
||||
background-image : -ms-linear-gradient(rgb(240,240,240),rgb(224,224,224));
|
||||
background-image : -o-linear-gradient(rgb(240,240,240),rgb(224,224,224));
|
||||
background-image : -webkit-linear-gradient(rgb(240,240,240),rgb(224,224,224));
|
||||
background-image : linear-gradient(rgb(240,240,240),rgb(224,224,224));
|
||||
vertical-align : bottom;
|
||||
}
|
||||
input[type=checkbox]:not(old):checked + label > span:before{
|
||||
content : '✓';
|
||||
display : block;
|
||||
width : 1em;
|
||||
color : rgb(153,204,102);
|
||||
font-size : 0.875em;
|
||||
line-height : 1em;
|
||||
text-align : center;
|
||||
text-shadow : 0 0 0.0714em rgb(115,153,77);
|
||||
font-weight : bold;
|
||||
}
|
||||
a.back-to-top {
|
||||
display: none;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
text-indent: -9999px;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
background: #27AE61 url("up-arrow.png") no-repeat center 43%;
|
||||
-webkit-border-radius: 30px;
|
||||
-moz-border-radius: 30px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
a:hover.back-to-top {
|
||||
background-color: #000;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
//New Join Query
|
||||
|
||||
$sql = "SELECT `Load Data`.`Load No`,
|
||||
`Load Data`.`Crop Day`,
|
||||
`Load Data`.`Tract No`,
|
||||
`Load Data`.`Gross Wt`,
|
||||
`Load Data`.`In Tare`,
|
||||
`Load Data`.Tons,
|
||||
`Load Data`.`In Time`,
|
||||
`Load Data`.`Out Time`,
|
||||
INSCALE.Hauler
|
||||
FROM `Load Data` RIGHT JOIN INSCALE ON `Load Data`.`Load No` = INSCALE.Load ORDER BY `Crop Day` DESC,`In Time` DESC";
|
||||
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$row [ 'load' ]."</td>";
|
||||
echo "<td>".$row [ 'cropday' ]."</td>";
|
||||
echo "<td>".$row [ 'tractno' ]."</td>";
|
||||
echo "<td>".$row [ 'gross' ]." </td>";
|
||||
echo "<td>".$row [ 'intare' ]." </td>";
|
||||
echo "<td>".$row [ 'tons' ]." Tons</td>";
|
||||
echo "<td>".$row [ 'intime' ]." </td>";
|
||||
echo "<td>".$row [ 'outtime' ]." </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
|
||||
//Original Query
|
||||
|
||||
$sql = "SELECT * FROM `Load Data` ORDER BY `Crop Day` DESC,`In Time` DESC";
|
||||
|
||||
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$row [ 'Load No' ]."</td>";
|
||||
echo "<td>".$row [ 'Crop Day' ]."</td>";
|
||||
echo "<td>".$row [ 'Tract No' ]."</td>";
|
||||
echo "<td>".$row [ 'Gross Wt' ]." </td>";
|
||||
echo "<td>".$row [ 'In Tare' ]." </td>";
|
||||
echo "<td>".$row [ 'Tons' ]." Tons</td>";
|
||||
echo "<td>".$row [ 'In Time' ]." </td>";
|
||||
echo "<td>".$row [ 'Out Time' ]." </td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT Tons FROM LoadData WHERE CropDay = ( SELECT Max(CropDay) FROM LoadData)";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
$tonsin = 0;
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
|
||||
{
|
||||
$tonsin += $row['Tons'];
|
||||
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
<h2>Tons In Today</h2>
|
||||
<p><?php echo $tonsin; ?></p>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT Tons FROM LoadData WHERE CropDay = ( SELECT Max(CropDay)-1 FROM LoadData)";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
$tonsin = 0;
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
|
||||
{
|
||||
$tonsin += $row['Tons'];
|
||||
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
<h2>Tons In Today</h2>
|
||||
<p><?php echo $tonsin; ?></p>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM LoadData ORDER BY DateIn DESC";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
$tonsin = 0;
|
||||
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
|
||||
{
|
||||
$tonsin += $row['Tons'];
|
||||
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
<h2>Tons In Total</h2>
|
||||
<p><?php echo $tonsin; ?></p>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 299 B |
511
overviews/dashboard.css
Normal file
@@ -0,0 +1,511 @@
|
||||
:root {
|
||||
--board-bg: #05070d;
|
||||
--board-panel: #101321;
|
||||
--board-panel-alt: #161a2c;
|
||||
--board-border: rgba(255, 255, 255, 0.08);
|
||||
--board-accent: #2dd4bf;
|
||||
--board-accent-soft: rgba(45, 212, 191, 0.12);
|
||||
--board-text: #e5e7eb;
|
||||
--board-text-muted: #94a3b8;
|
||||
--board-text-faint: #64748b;
|
||||
--panel-radius: 16px;
|
||||
--panel-shadow: 0 12px 36px rgba(2, 6, 23, 0.38);
|
||||
--transition-base: 200ms ease;
|
||||
font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.15), transparent 55%),
|
||||
radial-gradient(circle at 80% 0%, rgba(45, 212, 191, 0.12), transparent 50%),
|
||||
var(--board-bg);
|
||||
color: var(--board-text);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-size: 18px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.board-shell {
|
||||
min-height: 100vh;
|
||||
padding: 1.75rem clamp(1rem, 5vw, 2.75rem) 2.25rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.board-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.board-header__title {
|
||||
font-size: clamp(2.25rem, 3vw, 3.1rem);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.035em;
|
||||
}
|
||||
|
||||
.board-header__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.65rem 1.5rem;
|
||||
font-size: 1rem;
|
||||
color: var(--board-text-muted);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.board-header__meta span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.board-header__status {
|
||||
gap: 1.25rem;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.board-header__status time {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 600;
|
||||
color: var(--board-text);
|
||||
}
|
||||
|
||||
.board-header__error {
|
||||
color: var(--board-warn);
|
||||
font-weight: 600;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.board-header__error[aria-hidden="false"] {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
|
||||
.board-content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(540px, 1fr));
|
||||
gap: 1.75rem;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.board-loader {
|
||||
min-height: 40vh;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--board-text-muted);
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.board-stack {
|
||||
display: grid;
|
||||
gap: 1.75rem;
|
||||
}
|
||||
|
||||
.section {
|
||||
display: grid;
|
||||
gap: 1.1rem;
|
||||
}
|
||||
|
||||
.section__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.section__title {
|
||||
font-size: clamp(1.5rem, 2.4vw, 1.9rem);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.section__meta {
|
||||
color: var(--board-text-muted);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.meta-banner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem 1.5rem;
|
||||
background: rgba(45, 212, 191, 0.1);
|
||||
border: 1px solid rgba(45, 212, 191, 0.25);
|
||||
border-radius: var(--panel-radius);
|
||||
padding: 0.85rem 1.15rem;
|
||||
font-size: 1rem;
|
||||
color: var(--board-text-muted);
|
||||
}
|
||||
|
||||
.meta-banner strong {
|
||||
color: var(--board-text);
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.stat-grid {
|
||||
display: grid;
|
||||
gap: 0.9rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: var(--panel-radius);
|
||||
padding: 1.05rem 1.2rem;
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
min-height: 140px;
|
||||
}
|
||||
|
||||
.stat-card__label {
|
||||
font-size: 0.95rem;
|
||||
text-transform: uppercase;
|
||||
color: var(--board-text-muted);
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
|
||||
.stat-card__value {
|
||||
font-size: clamp(2.2rem, 3.5vw, 2.7rem);
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.stat-card__unit {
|
||||
color: var(--board-text-faint);
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.stat-card__note {
|
||||
color: var(--board-text-muted);
|
||||
font-size: 0.95rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.tandem-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.stage-card {
|
||||
background: var(--board-panel);
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: var(--panel-radius);
|
||||
padding: 1rem 1.05rem 1.1rem;
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.stage-card__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.stage-card__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.stage-card__badge {
|
||||
display: inline-flex;
|
||||
width: 1.85rem;
|
||||
height: 1.85rem;
|
||||
border-radius: 50%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(96, 165, 250, 0.2);
|
||||
border: 1px solid rgba(96, 165, 250, 0.45);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
border-radius: 999px;
|
||||
padding: 0.35rem 0.85rem;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
background: rgba(148, 163, 184, 0.18);
|
||||
border: 1px solid rgba(148, 163, 184, 0.35);
|
||||
color: var(--board-text);
|
||||
}
|
||||
|
||||
.status-pill--ok {
|
||||
background: rgba(52, 211, 153, 0.18);
|
||||
border-color: rgba(52, 211, 153, 0.42);
|
||||
color: #bbf7d0;
|
||||
}
|
||||
|
||||
.status-pill--warn {
|
||||
background: rgba(251, 191, 36, 0.18);
|
||||
border-color: rgba(251, 191, 36, 0.42);
|
||||
color: #fef3c7;
|
||||
}
|
||||
|
||||
.status-pill--alert {
|
||||
background: rgba(248, 113, 113, 0.2);
|
||||
border-color: rgba(248, 113, 113, 0.42);
|
||||
color: #fecaca;
|
||||
}
|
||||
|
||||
.status-pill--info {
|
||||
background: rgba(96, 165, 250, 0.2);
|
||||
border-color: rgba(96, 165, 250, 0.45);
|
||||
color: #bfdbfe;
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.progress__track {
|
||||
position: relative;
|
||||
height: 0.8rem;
|
||||
border-radius: 999px;
|
||||
background: rgba(148, 163, 184, 0.2);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress__bar {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 0;
|
||||
background: linear-gradient(90deg, rgba(45, 212, 191, 0.85), rgba(45, 212, 191, 0.45));
|
||||
transition: width 900ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.progress__label {
|
||||
font-size: 0.95rem;
|
||||
color: var(--board-text-muted);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.metric-list {
|
||||
display: grid;
|
||||
gap: 0.65rem;
|
||||
}
|
||||
|
||||
.metric {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 0.65rem;
|
||||
}
|
||||
|
||||
.metric__label {
|
||||
font-size: 1rem;
|
||||
color: var(--board-text-muted);
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.metric__value {
|
||||
font-size: 1.2rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.metric__value em {
|
||||
font-size: 0.95rem;
|
||||
color: var(--board-text-faint);
|
||||
font-style: normal;
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
|
||||
.mini-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: 0.7rem;
|
||||
}
|
||||
|
||||
.mini-card {
|
||||
background: var(--board-panel-alt);
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: 14px;
|
||||
padding: 0.75rem 0.9rem;
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
.mini-card__label {
|
||||
color: var(--board-text-muted);
|
||||
font-size: 0.95rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mini-card__value {
|
||||
font-size: 1.55rem;
|
||||
font-weight: 600;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.tank-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 0.9rem;
|
||||
}
|
||||
|
||||
.tank-card {
|
||||
background: var(--board-panel);
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: var(--panel-radius);
|
||||
padding: 0.85rem 1rem;
|
||||
display: grid;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.tank-card__title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.tank-card__meta {
|
||||
font-size: 0.95rem;
|
||||
color: var(--board-text-faint);
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.tank-card[data-level="low"] .progress__bar {
|
||||
background: linear-gradient(90deg, rgba(248, 113, 113, 0.9), rgba(248, 113, 113, 0.55));
|
||||
}
|
||||
|
||||
.tank-card[data-level="caution"] .progress__bar {
|
||||
background: linear-gradient(90deg, rgba(251, 191, 36, 0.85), rgba(251, 191, 36, 0.5));
|
||||
}
|
||||
|
||||
.equipment-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.equipment-card {
|
||||
background: var(--board-panel);
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: var(--panel-radius);
|
||||
padding: 1rem 1.1rem;
|
||||
display: grid;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
.equipment-card__title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.equipment-card__rows {
|
||||
display: grid;
|
||||
gap: 0.7rem;
|
||||
}
|
||||
|
||||
.equipment-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.equipment-row__label {
|
||||
color: var(--board-text-muted);
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.equipment-row__value {
|
||||
font-size: 1.2rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.equipment-row__value small {
|
||||
font-size: 0.85rem;
|
||||
color: var(--board-text-faint);
|
||||
letter-spacing: 0.08em;
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
|
||||
.equipment-subgrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.equipment-mini {
|
||||
background: var(--board-panel-alt);
|
||||
border: 1px solid var(--board-border);
|
||||
border-radius: 14px;
|
||||
padding: 0.8rem 0.95rem;
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
}
|
||||
|
||||
.equipment-mini__title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
[data-refresh-error="true"] {
|
||||
filter: saturate(0.5);
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
.board-content {
|
||||
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.board-shell {
|
||||
padding-inline: clamp(1rem, 3vw, 1.5rem);
|
||||
}
|
||||
.board-content {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
.board-header {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.board-header__meta {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
95
overviews/dashboard.js
Normal file
@@ -0,0 +1,95 @@
|
||||
(() => {
|
||||
const REFRESH_INTERVAL = 5000;
|
||||
const root = document.querySelector('[data-board-root]');
|
||||
const statusEl = document.querySelector('[data-refresh-status]');
|
||||
const errorEl = document.querySelector('[data-refresh-error]');
|
||||
const clockEl = document.querySelector('[data-board-clock]');
|
||||
|
||||
if (!root) {
|
||||
return;
|
||||
}
|
||||
|
||||
const formatTime = (date) =>
|
||||
date.toLocaleTimeString([], {
|
||||
hour: 'numeric',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
|
||||
const setError = (message) => {
|
||||
if (!errorEl) return;
|
||||
if (message) {
|
||||
errorEl.textContent = message;
|
||||
errorEl.setAttribute('aria-hidden', 'false');
|
||||
} else {
|
||||
errorEl.textContent = '';
|
||||
errorEl.setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
};
|
||||
|
||||
const updateStatus = (timestamp) => {
|
||||
if (!statusEl) return;
|
||||
if (timestamp) {
|
||||
const parsed = new Date(timestamp);
|
||||
if (!Number.isNaN(parsed.getTime())) {
|
||||
statusEl.textContent = formatTime(parsed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
statusEl.textContent = formatTime(new Date());
|
||||
};
|
||||
|
||||
const updateClock = () => {
|
||||
if (!clockEl) return;
|
||||
clockEl.textContent = new Date().toLocaleString([], {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
};
|
||||
|
||||
const refresh = async () => {
|
||||
try {
|
||||
const response = await fetch('data/main.php', {
|
||||
cache: 'no-store',
|
||||
headers: { 'X-Requested-With': 'XMLHttpRequest' },
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Request failed: ${response.status}`);
|
||||
}
|
||||
|
||||
const html = await response.text();
|
||||
root.innerHTML = html;
|
||||
|
||||
const generatedAt = root.querySelector('[data-generated-at]');
|
||||
if (generatedAt) {
|
||||
updateStatus(generatedAt.getAttribute('data-generated-at'));
|
||||
} else {
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
setError('');
|
||||
root.removeAttribute('data-refresh-error');
|
||||
} catch (error) {
|
||||
console.error('Failed to refresh overview data', error);
|
||||
setError('Connection lost — retrying');
|
||||
root.setAttribute('data-refresh-error', 'true');
|
||||
}
|
||||
};
|
||||
|
||||
refresh();
|
||||
updateClock();
|
||||
|
||||
setInterval(refresh, REFRESH_INTERVAL);
|
||||
setInterval(updateClock, 1000);
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (!document.hidden) {
|
||||
refresh();
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
include("../../items.php");
|
||||
?>
|
||||
|
||||
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BOILERS vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
|
||||
@@ -34,9 +34,9 @@ include("../includes/items.php");
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($value['FT_601']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00050']),0); ?></font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00046']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00078']),0); ?></font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00074']),0); ?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -71,14 +71,14 @@ include("../includes/items.php");
|
||||
<?php
|
||||
$color = "#FFFFFF";
|
||||
|
||||
if (($ID['00302'] >= 0) && ($ID['00302'] <= 9))
|
||||
if (($ID['00192'] >= 0) && ($ID['00192'] <= 9))
|
||||
$color = "#FF0000";
|
||||
else if (($ID['00192'] >= 6) && ($ID['00302'] <= 13))
|
||||
else if (($ID['00192'] >= 6) && ($ID['00192'] <= 13))
|
||||
$color = "#FFFF00";
|
||||
else if ($ID['00192'] >= 14)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"right\" width=\"75\"><font color=\"$color\"><b>". $ID['V'] ."</b></font></td>";
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"right\" width=\"75\"><font color=\"$color\"><b>". $ID['00192'] ."</b></font></td>";
|
||||
?>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
|
||||
@@ -1,245 +1,194 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$steamFlowTotal = module_numeric($value['TTL_STEAMFLOW2']);
|
||||
$liveSteam = module_numeric($value['PT_001']);
|
||||
|
||||
if ($liveSteam === null) {
|
||||
$liveSteamPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($liveSteam < 156) {
|
||||
$liveSteamPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($liveSteam <= 165) {
|
||||
$liveSteamPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$liveSteamPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$exhaustMode = module_mode(isset($ID['00242']) ? (int) $ID['00242'] : null, 0);
|
||||
$exhaustPressure = module_numeric($ID['00244'] ?? null);
|
||||
if ($exhaustPressure === null) {
|
||||
$exhaustPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 6) {
|
||||
$exhaustPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 14) {
|
||||
$exhaustPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$exhaustPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$vaporHeader = module_numeric($value['VAPOR HDR PRES']);
|
||||
|
||||
$boilers = [
|
||||
[
|
||||
'label' => 'Boiler 1',
|
||||
'steam' => ['value' => module_numeric($ID['00252'] ?? null), 'capacity' => 110],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_102'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_103'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_105'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_104'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 2',
|
||||
'steam' => ['value' => module_numeric($ID['00256'] ?? null), 'capacity' => 105],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_202'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_203'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_205'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_204'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 3',
|
||||
'steam' => ['value' => module_numeric($value['FT_301'] ?? null), 'capacity' => 100],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_302'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_303'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_305'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_304'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 4',
|
||||
'steam' => ['value' => module_numeric($value['FT_401'] ?? null), 'capacity' => 60],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_402'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_403'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_405'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_404'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 5',
|
||||
'steam' => ['value' => module_numeric($value['FT_501'] ?? null), 'capacity' => 55],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_502'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_503'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_505'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_504'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 6',
|
||||
'steam' => ['value' => module_numeric($value['FT_601'] ?? null), 'capacity' => 90],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($value['LT_602'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($value['FT_603'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($value['PT_605'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($value['SIT_604'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 7',
|
||||
'steam' => ['value' => module_numeric($ID['00046'] ?? null), 'capacity' => 270],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($ID['00004'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($ID['00014'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($ID['00010'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($ID['00020'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
[
|
||||
'label' => 'Boiler 8',
|
||||
'steam' => ['value' => module_numeric($ID['00074'] ?? null), 'capacity' => 270],
|
||||
'metrics' => [
|
||||
['label' => 'Drum Level', 'value' => module_numeric($ID['00032'] ?? null), 'unit' => '%', 'decimals' => 0],
|
||||
['label' => 'Feed Water', 'value' => module_numeric($ID['00042'] ?? null), 'unit' => 'kpph', 'decimals' => 0],
|
||||
['label' => 'Drum Pressure', 'value' => module_numeric($ID['00038'] ?? null), 'unit' => 'psi', 'decimals' => 0],
|
||||
['label' => 'ID Fan Speed', 'value' => module_numeric($ID['00048'] ?? null), 'unit' => 'rpm', 'decimals' => 0],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$boilerGroups = array_chunk($boilers, 4);
|
||||
?>
|
||||
|
||||
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BOILERS vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="1000%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>BOILERS</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
<section class="module-card">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Boiler Performance</h2>
|
||||
<span class="module-heading__meta">Detailed steam and drum metrics</span>
|
||||
</div>
|
||||
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
<td colspan="2"><font color="#e0e0e0">Total Steam Flow:</font></td>
|
||||
<td align="right" width="75"><font color="00FF00"><b><?php echo round(($value['TTL_STEAMFLOW2']),0); ?></b></font></td>
|
||||
<td><font color="#e0e0e0">Kpph</font></td>
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Total Steam Flow</span>
|
||||
<span class="module-metric__value"><?php echo module_number($steamFlowTotal); ?></span>
|
||||
<span class="module-metric__note">kpph</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Live Steam Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($liveSteam, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $liveSteamPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Exhaust Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($exhaustPressure, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $exhaustPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Vapor Header Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($vaporHeader, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan="2"><font color="#e0e0e0">Vapor Header Pressure:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right" width="75" id="lsp"><font color="00FF00"><b><?php echo $value ['VAPOR HDR PRES']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">PSI</font></td>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Exhaust Control</span>
|
||||
<div class="module-row__value"><?php echo $exhaustMode; ?></div>
|
||||
</div>
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0">Live Steam Pressure:</font></td>
|
||||
<?php
|
||||
$color = "#e0e0e0";
|
||||
<div class="module-divider"></div>
|
||||
|
||||
if (($value['PT_001'] >= 0) && ($value['PT_001'] <= 155))
|
||||
$color = "#FF0000";
|
||||
else if (($value['PT_001'] >= 156) && ($value['PT_001'] <= 165))
|
||||
$color = "#FFFF00";
|
||||
else if ($value['PT_001'] >= 165)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td align=\"right\" width=\"75\"><font color=\"$color\"><b> ".$value['PT_001']." </b></font></td>";
|
||||
?>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td><font color="#e0e0e0">Exhaust Pressure:</font></td>
|
||||
<?php
|
||||
if ($ID['00302'] == 0)
|
||||
echo "<td align=\"center\" bgcolor=\"#0B3B17\"><font color=\"#e0e0e0\">A</font></td>";
|
||||
if ($ID['00302'] == 1)
|
||||
echo "<td align=\"center\" bgcolor=\"#8A0808\"><font color=\"#e0e0e0\">M</font></td>";
|
||||
?>
|
||||
<?php
|
||||
$color = "#e0e0e0";
|
||||
|
||||
if (($ID['00302'] >= 0) && ($ID['00302'] <= 5))
|
||||
$color = "#FF0000";
|
||||
else if (($ID['00302'] >= 6) && ($ID['00302'] <= 13))
|
||||
$color = "#FFFF00";
|
||||
else if ($ID['00302'] >= 14)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td align=\"right\"><font color=\"$color\"><b> ".$ID['00302']." </b></font></td>";
|
||||
?>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan="2"><font color="#e0e0e0"></font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0"></font></td>
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0"></font></td>
|
||||
<td align="right"><font color="00FF00"><b></b></font></td>
|
||||
<td><font color="#e0e0e0"></font></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ START OF BOILERS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
<table class="tftable5" border="1">
|
||||
<tr>
|
||||
<td colspan="4" bgcolor="#e06b04" align="center" width="25%"><font color="#000000">Boiler 1</font></td>
|
||||
<td colspan="4" bgcolor="#b36537" align="center" width="25%"><font color="#000000">Boiler 2</font></td>
|
||||
<td colspan="4" bgcolor="#e06b04" align="center" width="25%"><font color="#000000">Boiler 3</font></td>
|
||||
<td colspan="4" bgcolor="#b36537" align="center" width="25%"><font color="#000000">Boiler 4</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="110" value="<?php echo $ID['00310']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $ID['00310']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="105" value="<?php echo $ID['00314']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $ID['00314']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="100" value="<?php echo $value['FT_301']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $value['FT_301']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="60" value="<?php echo $value['FT_401']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $value['FT_401']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_102']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_202']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_302']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_402']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_103']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_203']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_303']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_403']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_105']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_205']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_305']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_405']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_104']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_204']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_304']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_404']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tftable5" border="1">
|
||||
<tr>
|
||||
<td colspan="4" bgcolor="#b36537" align="center" width="25%"><font color="#000000">Boiler 5</font></td>
|
||||
<td colspan="4" bgcolor="#e06b04" align="center" width="25%"><font color="#000000">Boiler 6</font></td>
|
||||
<td colspan="4" bgcolor="#b36537" align="center" width="25%"><font color="#000000">Boiler 7</font></td>
|
||||
<td colspan="4" bgcolor="#e06b04" align="center" width="25%"><font color="#000000">Boiler 8</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="55" value="<?php echo $value['FT_501']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $value['FT_501']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="90" value="<?php echo $value['FT_601']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $value['FT_601']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="270" value="<?php echo $ID['00048']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $ID['00048']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left"><font color="#e0e0e0">Steam Flow</font></td>
|
||||
<td align="left" width="100"><progress id="progressboilers" max="270" value="<?php echo $ID['00078']; ?>"></progress></td>
|
||||
<td align="right" width="80"><font color="#e60000"><?php echo $ID['00078']; ?></font></td>
|
||||
<td align="left" width="65"><font color="#e0e0e0">kpph</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_502']; ?><font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $value['LT_602']; ?><font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $ID['00004']; ?><font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Level</font></td>
|
||||
<td align="right" width="50"><font color="#12bd5a"><?php echo $ID['00032']; ?><font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">%</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_503']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $value['FT_603']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $ID['00014']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Feed Water</font></td>
|
||||
<td align="right" width="50"><font color="#129dbd"><?php echo $ID['00042']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">kpph</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_505']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $value['PT_605']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $ID['00010']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">Drum Pressure</font></td>
|
||||
<td align="right" width="50"><font color="#e2c211"><?php echo $ID['00038']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">psi</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_504']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $value['SIT_604']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $ID['00020']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
<td align="left" colspan="2"><font color="#e0e0e0">ID Fan Speed</font></td>
|
||||
<td align="right" width="50"><font color="#0c7300"><?php echo $ID['00048']; ?></font></td>
|
||||
<td align="left" width="50"><font color="#e0e0e0">rpm</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF BOILERS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF PAGE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
<div class="module-grid module-grid--two">
|
||||
<?php foreach ($boilerGroups as $group) : ?>
|
||||
<div class="module-stack">
|
||||
<?php foreach ($group as $boiler) : ?>
|
||||
<?php
|
||||
$steamValue = $boiler['steam']['value'];
|
||||
$steamCapacity = $boiler['steam']['capacity'];
|
||||
$steamPercent = 0.0;
|
||||
if ($steamValue !== null && $steamCapacity > 0) {
|
||||
$steamPercent = max(0.0, min(100.0, ($steamValue / $steamCapacity) * 100));
|
||||
}
|
||||
?>
|
||||
<div class="module-subcard">
|
||||
<div class="module-subcard__title"><?php echo module_html($boiler['label']); ?></div>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Steam Flow</span>
|
||||
<span class="module-row__value"><?php echo module_number($steamValue, 0); ?> kpph</span>
|
||||
</div>
|
||||
<div class="module-progress">
|
||||
<div class="module-bar">
|
||||
<div class="module-bar__fill" style="width: <?php echo number_format($steamPercent, 2); ?>%;"></div>
|
||||
</div>
|
||||
<span class="module-notes">Capacity <?php echo number_format($steamCapacity); ?> kpph</span>
|
||||
</div>
|
||||
<?php foreach ($boiler['metrics'] as $metric) : ?>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label"><?php echo module_html($metric['label']); ?></span>
|
||||
<span class="module-row__value"><?php echo module_number($metric['value'], $metric['decimals'] ?? 0); ?> <?php echo module_html($metric['unit']); ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,98 +1,94 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$steamFlowTotal = module_numeric($value['TTL_STEAMFLOW2']);
|
||||
$liveSteam = module_numeric($value['PT_001']);
|
||||
|
||||
if ($liveSteam === null) {
|
||||
$liveSteamPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($liveSteam < 156) {
|
||||
$liveSteamPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($liveSteam <= 165) {
|
||||
$liveSteamPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$liveSteamPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$exhaustMode = module_mode(isset($value['ExhaustAM']) ? (int) $value['ExhaustAM'] : null, 0);
|
||||
$exhaustPressure = module_numeric($ID['00244'] ?? null);
|
||||
if ($exhaustPressure === null) {
|
||||
$exhaustPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 10) {
|
||||
$exhaustPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 14) {
|
||||
$exhaustPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$exhaustPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$vaporHeader = module_numeric($value['VAPOR HDR PRES']);
|
||||
|
||||
$boilers = [
|
||||
['label' => 'Boiler 1', 'value' => module_numeric($ID['00252'] ?? null)],
|
||||
['label' => 'Boiler 2', 'value' => module_numeric($ID['00256'] ?? null)],
|
||||
['label' => 'Boiler 3', 'value' => module_numeric($value['FT_301'] ?? null)],
|
||||
['label' => 'Boiler 4', 'value' => module_numeric($value['FT_401'] ?? null)],
|
||||
['label' => 'Boiler 5', 'value' => module_numeric($value['FT_501'] ?? null)],
|
||||
['label' => 'Boiler 6', 'value' => module_numeric($value['FT_601'] ?? null)],
|
||||
['label' => 'Boiler 7', 'value' => module_numeric($ID['00046'] ?? null)],
|
||||
['label' => 'Boiler 8', 'value' => module_numeric($ID['00074'] ?? null)],
|
||||
];
|
||||
?>
|
||||
|
||||
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BOILERS vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="1000%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>BOILERS</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Boilers</h2>
|
||||
<span class="module-heading__meta">Steam production overview</span>
|
||||
</div>
|
||||
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan="2"><font color="#e0e0e0">Total Steam Flow:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right" width="75"><font color="00FF00"><b><?php echo round(($value['TTL_STEAMFLOW2']),0); ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Kpph</font></td>
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Total Steam Flow</span>
|
||||
<span class="module-metric__value"><?php echo module_number($steamFlowTotal); ?></span>
|
||||
<span class="module-metric__note">kpph</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Live Steam Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($liveSteam, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $liveSteamPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Exhaust Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($exhaustPressure, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $exhaustPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Vapor Header Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($vaporHeader, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0">Live Steam Pressure:</font></td>
|
||||
<?php
|
||||
$color = "#FFFFFF";
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Exhaust Control</span>
|
||||
<div class="module-row__value"><?php echo $exhaustMode; ?></div>
|
||||
</div>
|
||||
|
||||
if (($value['PT_001'] >= 0) && ($value['PT_001'] <= 155))
|
||||
$color = "#c46666ff";
|
||||
else if (($value['PT_001'] >= 156) && ($value['PT_001'] <= 165))
|
||||
$color = "#FFFF00";
|
||||
else if ($value['PT_001'] >= 165)
|
||||
$color = "#00FF00";
|
||||
<div class="module-divider"></div>
|
||||
|
||||
echo "<td align=\"right\" width=\"75\"><font color=\"$color\"><b>". $value['PT_001'] ."</b></font></td>";
|
||||
?>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Exhaust Pressure:</font></td>
|
||||
<?php
|
||||
if ($value['ExhaustAM'] == 0)
|
||||
echo "<td align=\"center\" bgcolor=\"#0B3B17\"><font color=\"#e0e0e0\">A</font></td>";
|
||||
if ($value['ExhaustAM'] == 1)
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"center\" bgcolor=\"#8A0808\"><font color=\"#e0e0e0\">M</font></td>";
|
||||
?>
|
||||
<?php
|
||||
$color = "#FFFFFF";
|
||||
|
||||
if (($ID['00302'] >= 0) && ($ID['00302'] <= 9))
|
||||
$color = "#FF0000";
|
||||
else if (($ID['00302'] >= 6) && ($ID['00302'] <= 13))
|
||||
$color = "#FFFF00";
|
||||
else if ($ID['00302'] >= 14)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"right\" width=\"75\"><font color=\"$color\"><b>". $ID['00302'] ."</b></font></td>";
|
||||
?>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0">Vapor Header Pressure:</font></td>
|
||||
<td align="right" width="75" id="lsp"><font color="00FF00"><b><?php echo $value['VAPOR HDR PRES']; ?></b></font></td>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="tftable1" border="1">
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 1</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12,5%"><font color="#000000">Boiler 2</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 3</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 4</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 5</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 6</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 7</font></td>
|
||||
<td colspan="2" bgcolor="#DF9401" align="center" width="12.5%"><font color="#000000">Boiler 8</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00310']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00314']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($value['FT_301']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($value['FT_401']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($value['FT_501']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($value['FT_601']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00050']),0); ?></font></td>
|
||||
<td bgcolor="#DF9401" align="center"><font color="#000000">Steam Flow</font></td>
|
||||
<td width="40" bgcolor="#DF9401" align="center"><font color="#009900"><?php echo round(($ID['00078']),0); ?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF BOILERS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
|
||||
<?php
|
||||
|
||||
?>
|
||||
<div class="module-metric-grid">
|
||||
<?php foreach ($boilers as $boiler) : ?>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label"><?php echo module_html($boiler['label']); ?></span>
|
||||
<span class="module-metric__value"><?php echo module_number($boiler['value']); ?></span>
|
||||
<span class="module-metric__note">kpph</span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
include("../../items.php");
|
||||
?>
|
||||
<table width="100%" class="tftable1" border="1" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
@@ -157,7 +157,8 @@ include("../includes/items.php");
|
||||
echo "<td width=\"6.66%\" id=\"dryersoff\">ERROR</td>";
|
||||
}
|
||||
//A15
|
||||
if ($value['A15Running'] == 1) {
|
||||
echo "<td width=\"6.66%\" id=\"dryersonoffblank\" align=\"center\">A15</td>";
|
||||
/* if ($value['A15Running'] == 1) {
|
||||
echo "<td width=\"6.66%\" id=\"dryerson\">A15</td>";
|
||||
}
|
||||
else if ($value['A15Running'] == 0) {
|
||||
@@ -165,7 +166,7 @@ include("../includes/items.php");
|
||||
}
|
||||
else {
|
||||
echo "<td width=\"6.66%\" id=\"dryersoff\">ERROR</td>";
|
||||
}
|
||||
}*/
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include("../includes/itemsAI.php");
|
||||
include("../../items.php");
|
||||
?>
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
@@ -134,23 +134,23 @@ include("../includes/itemsAI.php");
|
||||
<td colspan="1" bgcolor="#404040" align="center"><font color="#FFFFFF">Heater 8</font></td>
|
||||
</tr>
|
||||
<td colspan="1" width="11.11%" bgcolor="#404040" align="center"><font color="#FFFFFF">Temp</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 1 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 2 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 3 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 4 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 5 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 6 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 7 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 8 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater1Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater2Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater3Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater4Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater5Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater6Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater7Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater8TempPV']; ?></font></td>
|
||||
<tr>
|
||||
<td colspan="1" bgcolor="#404040" align="center"><font color="#FFFFFF">Setpoint</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 2 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 2 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 3 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 4 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 5 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 6 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 7 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 8 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater1SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater2SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater3SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater4SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater5SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater6SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater7SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater8TempSP']; ?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -3,7 +3,7 @@
|
||||
</head>
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
<td width="50%" align="left" border="0"><font color="#00BFFF"><i>LASUCA CONTROLS  <?php date_default_timezone_set('America/Chicago'); $date = date('M j, Y g:i:s A'); echo "$date";?>   Crop Day <?php include("../includes/cropday.php");?></i></font></td>
|
||||
<td width="50%" align="left" border="0"><font color="#00BFFF"><i>LASUCA CONTROLS  <?php date_default_timezone_set('America/Chicago'); $date = date('M j, Y g:i:s A'); echo "$date";?>   Crop Day <?php include("cropday.php");?></i></font></td>
|
||||
<td width="50%" align="right" border="0"><font color="#00BFFF"><i>CONTROLS OVERVIEW</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include("../includes/itemsAI.php");
|
||||
include("../../items.php");
|
||||
?>
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
@@ -14,24 +14,24 @@ include("../includes/itemsAI.php");
|
||||
<td colspan="1" bgcolor="#404040" align="center"><font color="#FFFFFF">Heater 8</font></td>
|
||||
</tr>
|
||||
<td colspan="1" width="11.11%" bgcolor="#404040" align="center"><font color="#FFFFFF">Temp</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 1 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 2 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 3 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 4 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 5 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 6 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 7 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['Heater 8 Temp']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater1Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater2Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater3Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater4Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater5Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater6Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater7Temp']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $rounded['TubeHeater8TempPV']; ?></font></td>
|
||||
<tr>
|
||||
<td colspan="1" bgcolor="#404040" align="center"><font color="#FFFFFF">Setpoint</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 2 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 2 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 3 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 4 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 5 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 6 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 7 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['Heater 8 SP']; ?>°</font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater1SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater2SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater3SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater4SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater5SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater6SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater7SP']; ?></font></td>
|
||||
<td colspan="1" width="11.11%" bgcolor="#272727" align="center"><font color="#FFFFFF"><?php echo $value['TubeHeater8TempSP']; ?></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -1,7 +1,951 @@
|
||||
<?php include("header.php");?>
|
||||
<?php // include("maintenence.php");?>
|
||||
<?php include("newgeneral.php");?>
|
||||
<?php include("newmills.php");?>
|
||||
<?php include("boilersslim.php");?>
|
||||
<?php include("tanklevelswrap.php");?>
|
||||
<?php include("tablesandtd.php");?>
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// phpcs:disable
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
date_default_timezone_set('America/Chicago');
|
||||
|
||||
/**
|
||||
* Capture the rendered output of a partial include and return it as a string.
|
||||
*/
|
||||
function capture_include(string $relativePath): string
|
||||
{
|
||||
ob_start();
|
||||
include __DIR__ . '/' . $relativePath;
|
||||
|
||||
return trim(ob_get_clean());
|
||||
}
|
||||
|
||||
/**
|
||||
* Safely fetch a value from an array.
|
||||
*
|
||||
* @param array<mixed> $source
|
||||
*/
|
||||
function array_value(array $source, string $key)
|
||||
{
|
||||
return array_key_exists($key, $source) ? $source[$key] : null;
|
||||
}
|
||||
|
||||
function numeric_or_null($value): ?float
|
||||
{
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is_numeric($value)) {
|
||||
return (float) $value;
|
||||
}
|
||||
|
||||
$normalised = str_replace([',', ' '], '', (string) $value);
|
||||
$normalised = preg_replace('/[^0-9.\-]/', '', $normalised ?? '');
|
||||
|
||||
if ($normalised === '' || !is_numeric($normalised)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (float) $normalised;
|
||||
}
|
||||
|
||||
function format_number($value, int $decimals = 0): string
|
||||
{
|
||||
$numeric = numeric_or_null($value);
|
||||
|
||||
return $numeric === null ? '—' : number_format($numeric, $decimals);
|
||||
}
|
||||
|
||||
function format_with_unit($value, string $unit, int $decimals = 0): string
|
||||
{
|
||||
$formatted = format_number($value, $decimals);
|
||||
|
||||
return $formatted === '—' ? $formatted : $formatted . ' ' . $unit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<float|null> $values
|
||||
*/
|
||||
function sum_numeric(array $values): ?float
|
||||
{
|
||||
$total = 0.0;
|
||||
$found = false;
|
||||
|
||||
foreach ($values as $value) {
|
||||
$numeric = numeric_or_null($value);
|
||||
if ($numeric === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$total += $numeric;
|
||||
$found = true;
|
||||
}
|
||||
|
||||
return $found ? $total : null;
|
||||
}
|
||||
|
||||
function clamp_percent(?float $value): float
|
||||
{
|
||||
if ($value === null) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return max(0.0, min(100.0, $value));
|
||||
}
|
||||
|
||||
function percent_label($value, int $decimals = 0): string
|
||||
{
|
||||
$numeric = numeric_or_null($value);
|
||||
|
||||
return $numeric === null ? '—' : format_number($numeric, $decimals) . '%';
|
||||
}
|
||||
|
||||
function html(string $value): string
|
||||
{
|
||||
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<mixed> $source
|
||||
*/
|
||||
function value_num(array $source, string $key): ?float
|
||||
{
|
||||
return numeric_or_null(array_value($source, $key));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<mixed> $source
|
||||
*/
|
||||
function value_as_int(array $source, string $key): ?int
|
||||
{
|
||||
$numeric = value_num($source, $key);
|
||||
|
||||
return $numeric === null ? null : (int) round($numeric);
|
||||
}
|
||||
|
||||
function build_status(?int $rawValue, bool $autoIsZero = true): ?array
|
||||
{
|
||||
if ($rawValue === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$isAuto = $autoIsZero ? $rawValue === 0 : $rawValue === 1;
|
||||
|
||||
return [
|
||||
'label' => $isAuto ? 'Auto' : 'Manual',
|
||||
'class' => $isAuto ? 'status-pill--ok' : 'status-pill--alert',
|
||||
];
|
||||
}
|
||||
|
||||
function build_switch(?int $rawValue, string $labelOn = 'On', string $labelOff = 'Off'): ?array
|
||||
{
|
||||
if ($rawValue === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$isOn = $rawValue === 0;
|
||||
|
||||
return [
|
||||
'label' => $isOn ? $labelOn : $labelOff,
|
||||
'class' => $isOn ? 'status-pill--ok' : 'status-pill--warn',
|
||||
];
|
||||
}
|
||||
|
||||
function classify_live_steam(?float $value): ?array
|
||||
{
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value <= 155) {
|
||||
return ['label' => 'Low', 'class' => 'status-pill--alert'];
|
||||
}
|
||||
|
||||
if ($value <= 165) {
|
||||
return ['label' => 'Watch', 'class' => 'status-pill--warn'];
|
||||
}
|
||||
|
||||
return ['label' => 'Stable', 'class' => 'status-pill--ok'];
|
||||
}
|
||||
|
||||
function classify_exhaust(?float $value): ?array
|
||||
{
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value <= 9) {
|
||||
return ['label' => 'Low', 'class' => 'status-pill--alert'];
|
||||
}
|
||||
|
||||
if ($value <= 13) {
|
||||
return ['label' => 'Watch', 'class' => 'status-pill--warn'];
|
||||
}
|
||||
|
||||
return ['label' => 'Stable', 'class' => 'status-pill--ok'];
|
||||
}
|
||||
|
||||
function tank_level_state(?float $value): ?string
|
||||
{
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value <= 20) {
|
||||
return 'low';
|
||||
}
|
||||
|
||||
if ($value >= 90) {
|
||||
return 'caution';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
include '../../items.php';
|
||||
|
||||
$valuesZero = $value ?? [];
|
||||
$roundedZero = $rounded ?? [];
|
||||
$idsZero = $ID ?? [];
|
||||
$roundedOneZero = $rounded1 ?? [];
|
||||
|
||||
include '../../items2dec.php';
|
||||
|
||||
$valuesTwo = $value ?? [];
|
||||
$idsTwo = $ID ?? [];
|
||||
|
||||
$value = $valuesZero;
|
||||
$rounded = $roundedZero;
|
||||
$ID = $idsZero;
|
||||
$rounded1 = $roundedOneZero;
|
||||
|
||||
$now = new DateTimeImmutable('now', new DateTimeZone('America/Chicago'));
|
||||
$generatedAt = $now->format(DateTimeInterface::RFC3339);
|
||||
|
||||
$cropDayRaw = capture_include('cropday.php');
|
||||
$cropDay = $cropDayRaw !== '' ? $cropDayRaw : null;
|
||||
$tonsIn = numeric_or_null(capture_include('tonsin.php'));
|
||||
$recordTons = numeric_or_null(capture_include('record.php'));
|
||||
$recordDateRaw = capture_include('recorddate.php');
|
||||
$recordDate = $recordDateRaw !== '' ? $recordDateRaw : null;
|
||||
$westAvg = numeric_or_null(capture_include('west15minavg.php'));
|
||||
|
||||
$groundToday = sum_numeric([
|
||||
value_num($value, 'CANETOT'),
|
||||
value_num($value, 'W TONS GROUND'),
|
||||
]);
|
||||
|
||||
$groundYesterday = sum_numeric([
|
||||
value_num($value, 'PREVTONS'),
|
||||
value_num($value, 'WPREVGROUND'),
|
||||
]);
|
||||
|
||||
$runHours = value_num($value, 'RUNHRSTODAY');
|
||||
$prevRunHours = value_num($value, 'PREVTIME');
|
||||
$totalTonsPerHour = sum_numeric([
|
||||
value_num($value, 'TONS_PER_HOUR'),
|
||||
value_num($value, 'RATE'),
|
||||
]);
|
||||
|
||||
$lossTime = value_num($value, 'LOSSTIME');
|
||||
$eastAverage = value_num($value, 'AVG_TONS_PER_HOUR');
|
||||
|
||||
$summaryCards = [
|
||||
[
|
||||
'label' => 'Cane In Today',
|
||||
'value' => format_number($tonsIn),
|
||||
'unit' => 'tons',
|
||||
],
|
||||
[
|
||||
'label' => 'Ground Today',
|
||||
'value' => format_number($groundToday),
|
||||
'unit' => 'tons',
|
||||
],
|
||||
[
|
||||
'label' => 'Total Ground Yesterday',
|
||||
'value' => format_number($groundYesterday),
|
||||
'unit' => 'tons',
|
||||
],
|
||||
[
|
||||
'label' => 'Run Hours',
|
||||
'value' => format_number($runHours, 1),
|
||||
'unit' => 'hours',
|
||||
],
|
||||
[
|
||||
'label' => 'Prev Run Hours',
|
||||
'value' => format_number($prevRunHours, 1),
|
||||
'unit' => 'hours',
|
||||
],
|
||||
[
|
||||
'label' => 'Total Tons per Hour',
|
||||
'value' => format_number($totalTonsPerHour),
|
||||
'unit' => 'tons/hr',
|
||||
],
|
||||
[
|
||||
'label' => 'East 15 Minute Avg',
|
||||
'value' => format_number($eastAverage),
|
||||
'unit' => 'tons/hr',
|
||||
],
|
||||
[
|
||||
'label' => 'West 15 Minute Avg',
|
||||
'value' => format_number($westAvg),
|
||||
'unit' => 'tons/hr',
|
||||
],
|
||||
[
|
||||
'label' => 'Loss Time Today',
|
||||
'value' => format_number($lossTime, 2),
|
||||
'unit' => 'hours',
|
||||
],
|
||||
[
|
||||
'label' => 'Record Day',
|
||||
'value' => format_number($recordTons),
|
||||
'unit' => 'tons',
|
||||
'note' => $recordDate ? 'on ' . $recordDate : null,
|
||||
],
|
||||
];
|
||||
|
||||
$levelThroughputSwitch = value_as_int($value, 'LEVEL_THROUGHPUT_SWITCH');
|
||||
$millFourUnit = $levelThroughputSwitch === 1 ? 'tons/hr' : '%';
|
||||
|
||||
$eastStages = [
|
||||
[
|
||||
'label' => 'Mill 1',
|
||||
'stage' => '1',
|
||||
'level' => value_num($value, 'MILL1LVLPV'),
|
||||
'setpoint' => value_num($value, 'MILL1SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL1RPM'),
|
||||
'outputLabel' => 'Mill 1 OP',
|
||||
'outputValue' => value_num($value, 'MILL1OUTPUT'),
|
||||
'outputUnit' => '%',
|
||||
'mode' => build_status(value_as_int($value, 'MILL1AUTOMAN'), true),
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 2',
|
||||
'stage' => '2',
|
||||
'level' => value_num($value, 'M2LVL'),
|
||||
'setpoint' => value_num($value, 'MILL2SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL2RPM'),
|
||||
'outputLabel' => 'MCC Output',
|
||||
'outputValue' => value_num($value, 'MCCOUTPUT'),
|
||||
'outputUnit' => '%',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 3',
|
||||
'stage' => '3',
|
||||
'level' => value_num($value, 'MIL3LVL'),
|
||||
'setpoint' => value_num($value, 'MILL3SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL3RPM'),
|
||||
'outputLabel' => 'MCC Tons',
|
||||
'outputValue' => value_num($rounded1, 'MCCTONS'),
|
||||
'outputUnit' => 'tons',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 4',
|
||||
'stage' => '4',
|
||||
'level' => value_num($value, 'MIL4LVL'),
|
||||
'setpoint' => value_num($value, 'MILL4SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL4RPM'),
|
||||
'outputLabel' => 'Mill 1 SP',
|
||||
'outputValue' => value_num($value, 'WEIGHT_WSP'),
|
||||
'outputUnit' => $millFourUnit,
|
||||
'mode' => build_status(value_as_int($value, 'MILL1AUTOMAN1'), false),
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 5',
|
||||
'stage' => '5',
|
||||
'level' => value_num($value, 'MIL5LVL'),
|
||||
'setpoint' => value_num($value, 'MILL5SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL5RPM'),
|
||||
'outputLabel' => 'Grinding Rate',
|
||||
'outputValue' => value_num($value, 'TONS_PER_HOUR'),
|
||||
'outputUnit' => 'tons/hr',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 6',
|
||||
'stage' => '6',
|
||||
'level' => value_num($value, 'MIL6LVL'),
|
||||
'setpoint' => value_num($value, 'MILL6SP'),
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($value, 'EMILL6RPM'),
|
||||
'outputLabel' => 'Average Rate',
|
||||
'outputValue' => value_num($value, 'AVG_TONS_PER_HOUR'),
|
||||
'outputUnit' => 'tons/15 min',
|
||||
'mode' => null,
|
||||
],
|
||||
];
|
||||
|
||||
$eastFooterMetrics = [
|
||||
['label' => 'Imbibition 6 Flow', 'value' => format_with_unit(value_num($value, 'IMBFLOW'), 'gpm')],
|
||||
['label' => 'Imbibition 6 SP', 'value' => format_with_unit(value_num($value, 'IMBSP'), 'gpm')],
|
||||
['label' => 'Imbibition 5 Flow', 'value' => format_with_unit(value_num($value, 'IMBFLOW'), 'gpm')],
|
||||
['label' => 'Imbibition 5 SP', 'value' => format_with_unit(value_num($value, 'IMB5SP'), 'gpm')],
|
||||
];
|
||||
|
||||
$westStages = [
|
||||
[
|
||||
'label' => 'Mill 1',
|
||||
'stage' => '1',
|
||||
'level' => value_num($ID, '00654'),
|
||||
'setpoint' => null,
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($ID, '00666'),
|
||||
'outputLabel' => 'MCC FPM',
|
||||
'outputValue' => value_num($value, 'Feet/Minute'),
|
||||
'outputUnit' => 'fpm',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 2',
|
||||
'stage' => '2',
|
||||
'level' => value_num($ID, '00656'),
|
||||
'setpoint' => null,
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($ID, '00670'),
|
||||
'outputLabel' => 'MCC Output',
|
||||
'outputValue' => value_num($ID, '00638'),
|
||||
'outputUnit' => '%',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 4',
|
||||
'stage' => '4',
|
||||
'level' => value_num($ID, '00658'),
|
||||
'setpoint' => null,
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($ID, '00674'),
|
||||
'outputLabel' => 'Mill 1 SP',
|
||||
'outputValue' => null,
|
||||
'outputUnit' => '%',
|
||||
'mode' => null,
|
||||
],
|
||||
[
|
||||
'label' => 'Mill 5',
|
||||
'stage' => '5',
|
||||
'level' => value_num($ID, '00660'),
|
||||
'setpoint' => null,
|
||||
'setpointUnit' => '%',
|
||||
'rpm' => value_num($ID, '00680'),
|
||||
'outputLabel' => 'Grinding Rate',
|
||||
'outputValue' => value_num($value, 'RATE'),
|
||||
'outputUnit' => 'tons/hr',
|
||||
'mode' => null,
|
||||
],
|
||||
];
|
||||
|
||||
$westFooterMetrics = [
|
||||
['label' => 'Imbibition Flow', 'value' => format_with_unit(value_num($ID, '00624'), 'gpm')],
|
||||
['label' => 'Average Rate', 'value' => format_with_unit($westAvg, 'tons/15 min')],
|
||||
];
|
||||
|
||||
$steamFlow = value_num($value, 'TTL_STEAMFLOW2');
|
||||
$liveSteam = value_num($value, 'PT_001');
|
||||
$exhaustPressure = value_num($ID, '00244');
|
||||
$exhaustMode = build_status(value_as_int($value, 'ExhaustAM'), true);
|
||||
$vaporHeader = value_num($value, 'VAPOR HDR PRES');
|
||||
|
||||
$boilerOverview = [
|
||||
[
|
||||
'label' => 'Total Steam Flow',
|
||||
'value' => format_number($steamFlow),
|
||||
'unit' => 'kpph',
|
||||
],
|
||||
[
|
||||
'label' => 'Live Steam Pressure',
|
||||
'value' => format_number($liveSteam),
|
||||
'unit' => 'psi',
|
||||
'status' => classify_live_steam($liveSteam),
|
||||
],
|
||||
[
|
||||
'label' => 'Exhaust Pressure',
|
||||
'value' => format_number($exhaustPressure),
|
||||
'unit' => 'psi',
|
||||
'status' => classify_exhaust($exhaustPressure),
|
||||
'mode' => $exhaustMode,
|
||||
],
|
||||
[
|
||||
'label' => 'Vapor Header Pressure',
|
||||
'value' => format_number($vaporHeader),
|
||||
'unit' => 'psi',
|
||||
],
|
||||
];
|
||||
|
||||
$boilerFlows = [
|
||||
['label' => 'Boiler 1', 'value' => format_number(value_num($ID, '00252'))],
|
||||
['label' => 'Boiler 2', 'value' => format_number(value_num($ID, '00256'))],
|
||||
['label' => 'Boiler 3', 'value' => format_number(value_num($value, 'FT_301'))],
|
||||
['label' => 'Boiler 4', 'value' => format_number(value_num($value, 'FT_401'))],
|
||||
['label' => 'Boiler 5', 'value' => format_number(value_num($value, 'FT_501'))],
|
||||
['label' => 'Boiler 6', 'value' => format_number(value_num($value, 'FT_601'))],
|
||||
['label' => 'Boiler 7', 'value' => format_number(value_num($ID, '00046'))],
|
||||
['label' => 'Boiler 8', 'value' => format_number(value_num($ID, '00074'))],
|
||||
];
|
||||
|
||||
$syrupOverflow = value_num($value, 'Syrup Overflow Lvl');
|
||||
$syrupReceiver = value_num($value, 'Syrup RCVR');
|
||||
$totalSyrup = null;
|
||||
|
||||
if ($syrupOverflow !== null || $syrupReceiver !== null) {
|
||||
$totalSyrup = 0.0;
|
||||
if ($syrupOverflow !== null) {
|
||||
$totalSyrup += $syrupOverflow * 0.82569;
|
||||
}
|
||||
if ($syrupReceiver !== null) {
|
||||
$totalSyrup += $syrupReceiver * 0.17431;
|
||||
}
|
||||
}
|
||||
|
||||
$tankLevels = [
|
||||
['label' => 'Juice Tank 1', 'value' => value_num($value, 'Juice Tank1')],
|
||||
['label' => 'Juice Tank 2', 'value' => value_num($value, 'Juice Tank2')],
|
||||
['label' => 'Syrup Receiver', 'value' => $syrupReceiver],
|
||||
['label' => 'Syrup Overflow', 'value' => $syrupOverflow],
|
||||
['label' => 'Total Syrup', 'value' => $totalSyrup],
|
||||
['label' => 'Condensate Water', 'value' => value_num($value, 'CondensateWater')],
|
||||
['label' => 'Sweet Water', 'value' => value_num($value, 'SweetwaterTank')],
|
||||
['label' => 'Cold Water INJ', 'value' => value_num($value, 'Cold Water Injection LVL')],
|
||||
['label' => 'A1 Receiver', 'value' => value_num($value, 'A1 RCVR')],
|
||||
['label' => 'A1 Overflow', 'value' => value_num($value, 'A1 Molasses Overflow Lvl')],
|
||||
['label' => 'A2 Receiver', 'value' => value_num($value, 'A2 RCVR')],
|
||||
['label' => 'A2 Overflow', 'value' => value_num($value, 'A2 Molasses Overflow Lvl')],
|
||||
['label' => 'B Receiver', 'value' => value_num($value, 'B RCVR')],
|
||||
['label' => 'B Overflow', 'value' => value_num($value, 'B Molasses Overflow Lvl')],
|
||||
['label' => 'Flash Tank', 'value' => value_num($value, 'FlashTankLVL')],
|
||||
];
|
||||
|
||||
$truckDumpState = build_status(value_as_int($value, 'LATCHON'), true);
|
||||
$truckDumpMetrics = [
|
||||
['label' => 'PV', 'value' => format_number(value_num($valuesTwo, 'TD INPUT'), 1)],
|
||||
[
|
||||
'label' => 'Setpoint',
|
||||
'value' => format_number(
|
||||
value_as_int($value, 'TD SP3 ON/OFF') === 1
|
||||
? value_num($valuesTwo, 'TD SP3')
|
||||
: value_num($valuesTwo, 'TD SP1'),
|
||||
1
|
||||
),
|
||||
'suffix' => value_as_int($value, 'TD SP3 ON/OFF') === 1 ? 'SP3' : 'SP',
|
||||
],
|
||||
['label' => 'Output', 'value' => format_with_unit(value_num($valuesTwo, 'TD OUTPUT'), '%', 1)],
|
||||
['label' => 'Ratio', 'value' => format_number(value_num($valuesTwo, 'TD RATIO'), 2)],
|
||||
['label' => 'Belt Scale', 'value' => format_with_unit(value_num($valuesTwo, 'TDBELTSCALE'), 'lbs', 0)],
|
||||
[
|
||||
'label' => 'Belt State',
|
||||
'status' => build_switch(value_as_int($value, 'TDBELTSCALEONOFF'), 'Scale On', 'Scale Off'),
|
||||
],
|
||||
[
|
||||
'label' => 'Mode',
|
||||
'value' => value_as_int($value, 'TD MILLGROUND') === null
|
||||
? '—'
|
||||
: (
|
||||
value_as_int($value, 'TD MILLGROUND') === 0
|
||||
? 'Dump Mill'
|
||||
: 'Dump Ground'
|
||||
),
|
||||
],
|
||||
];
|
||||
|
||||
$tables = [
|
||||
[
|
||||
'label' => 'S Table',
|
||||
'pv' => format_number(value_num($valuesTwo, 'SE SCALE'), 1),
|
||||
'sp' => format_number(
|
||||
value_as_int($value, 'STABLE SP3 ON/OFF') === 1
|
||||
? value_num($valuesTwo, 'STABLE SP1')
|
||||
: value_num($valuesTwo, 'SE SETPOINT'),
|
||||
1
|
||||
),
|
||||
'spLabel' => value_as_int($value, 'STABLE SP3 ON/OFF') === 1 ? 'SP3' : 'SP',
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'SE OUTPUT'), '%', 1),
|
||||
'mode' => build_status(value_as_int($value, 'SAM'), true),
|
||||
],
|
||||
[
|
||||
'label' => 'NE Table',
|
||||
'pv' => format_number(value_num($valuesTwo, 'NE SCALE'), 1),
|
||||
'sp' => format_number(
|
||||
value_as_int($value, 'NE SP SWITCH') === 1
|
||||
? value_num($valuesTwo, 'NE SETPOINT2')
|
||||
: value_num($valuesTwo, 'NE SETPOINT'),
|
||||
1
|
||||
),
|
||||
'spLabel' => value_as_int($value, 'NE SP SWITCH') === 1 ? 'SP3' : 'SP',
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'NE OUTPUT'), '%', 1),
|
||||
'mode' => build_status(value_as_int($value, 'NAM'), true),
|
||||
],
|
||||
[
|
||||
'label' => 'W Table',
|
||||
'pv' => format_number(value_num($valuesTwo, 'W SCALE'), 1),
|
||||
'sp' => format_number(
|
||||
value_as_int($value, 'W SP SWITCH') === 1
|
||||
? value_num($valuesTwo, 'W SETPOINT2')
|
||||
: value_num($valuesTwo, 'W SETPOINT'),
|
||||
1
|
||||
),
|
||||
'spLabel' => value_as_int($value, 'W SP SWITCH') === 1 ? 'SP3' : 'SP',
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'W OUTPUT'), '%', 1),
|
||||
'mode' => build_status(value_as_int($value, 'WAM'), true),
|
||||
],
|
||||
];
|
||||
|
||||
$knives = [
|
||||
[
|
||||
'label' => 'Knife 1',
|
||||
'pressure' => format_with_unit(value_num($valuesTwo, 'KNF1PRES'), 'psi', 1),
|
||||
'speed' => format_with_unit(value_num($valuesTwo, 'K1SPD'), 'rpm', 0),
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'KNIFE1OP'), '%', 1),
|
||||
'mode' => value_as_int($value, 'KC1') === null
|
||||
? null
|
||||
: (
|
||||
value_as_int($value, 'KC1') === 1
|
||||
? ['label' => 'Control', 'class' => 'status-pill--ok']
|
||||
: ['label' => 'Knife', 'class' => 'status-pill--warn']
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Knife 2',
|
||||
'pressure' => format_with_unit(value_num($valuesTwo, 'KNF2PRES'), 'psi', 1),
|
||||
'speed' => format_with_unit(value_num($valuesTwo, 'KNF2SPD'), 'rpm', 0),
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'KNIFE2OP'), '%', 1),
|
||||
'mode' => value_as_int($value, 'KC2') === null
|
||||
? null
|
||||
: (
|
||||
value_as_int($value, 'KC2') === 1
|
||||
? ['label' => 'Control', 'class' => 'status-pill--ok']
|
||||
: ['label' => 'Knife', 'class' => 'status-pill--warn']
|
||||
),
|
||||
],
|
||||
[
|
||||
'label' => 'Knife 3',
|
||||
'pressure' => format_with_unit(value_num($valuesTwo, 'KNF3PRES'), 'psi', 1),
|
||||
'speed' => format_with_unit(value_num($valuesTwo, 'KNF3SPD'), 'rpm', 0),
|
||||
'output' => format_with_unit(value_num($valuesTwo, 'KNIFE3OP'), '%', 1),
|
||||
'mode' => value_as_int($value, 'KC3') === null
|
||||
? null
|
||||
: (
|
||||
value_as_int($value, 'KC3') === 1
|
||||
? ['label' => 'Control', 'class' => 'status-pill--ok']
|
||||
: ['label' => 'Knife', 'class' => 'status-pill--warn']
|
||||
),
|
||||
],
|
||||
];
|
||||
?>
|
||||
<div class="board-stack" data-generated-at="<?php echo html($generatedAt); ?>">
|
||||
<div class="meta-banner">
|
||||
<?php if ($cropDay !== null) { ?>
|
||||
<span>Crop Day <strong><?php echo html($cropDay); ?></strong></span>
|
||||
<?php } ?>
|
||||
<span>Server time <strong><?php echo html($now->format('M j, Y g:i:s A')); ?></strong></span>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">Key Production Metrics</h2>
|
||||
<p class="section__meta">Plant-wide summary</p>
|
||||
</header>
|
||||
<div class="stat-grid">
|
||||
<?php foreach ($summaryCards as $card) { ?>
|
||||
<article class="stat-card">
|
||||
<p class="stat-card__label"><?php echo html($card['label']); ?></p>
|
||||
<p class="stat-card__value"><?php echo html($card['value']); ?></p>
|
||||
<?php if (!empty($card['unit'])) { ?>
|
||||
<p class="stat-card__unit"><?php echo html($card['unit']); ?></p>
|
||||
<?php } ?>
|
||||
<?php if (!empty($card['note'])) { ?>
|
||||
<p class="stat-card__note"><?php echo html($card['note']); ?></p>
|
||||
<?php } ?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">East Tandem</h2>
|
||||
<p class="section__meta">Six-mill train status</p>
|
||||
</header>
|
||||
<div class="tandem-grid">
|
||||
<?php foreach ($eastStages as $stage) { ?>
|
||||
<article class="stage-card">
|
||||
<div class="stage-card__header">
|
||||
<div class="stage-card__title">
|
||||
<span class="stage-card__badge"><?php echo html($stage['stage']); ?></span>
|
||||
<span><?php echo html($stage['label']); ?></span>
|
||||
</div>
|
||||
<?php if (!empty($stage['mode'])) { ?>
|
||||
<span class="status-pill <?php echo html($stage['mode']['class']); ?>">
|
||||
<?php echo html($stage['mode']['label']); ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress__track">
|
||||
<div
|
||||
class="progress__bar"
|
||||
style="width: <?php echo clamp_percent(numeric_or_null($stage['level'])); ?>%;"
|
||||
></div>
|
||||
</div>
|
||||
<div class="progress__label">
|
||||
<span>Level</span>
|
||||
<span><?php echo html(percent_label($stage['level'])); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="metric-list">
|
||||
<div class="metric">
|
||||
<span class="metric__label">Setpoint</span>
|
||||
<span class="metric__value">
|
||||
<?php echo html(format_number($stage['setpoint'])); ?>
|
||||
<em><?php echo html($stage['setpointUnit']); ?></em>
|
||||
</span>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span class="metric__label">RPM</span>
|
||||
<span class="metric__value">
|
||||
<?php echo html(format_with_unit($stage['rpm'], 'rpm')); ?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span class="metric__label"><?php echo html($stage['outputLabel']); ?></span>
|
||||
<span class="metric__value">
|
||||
<?php echo html(format_with_unit($stage['outputValue'], $stage['outputUnit'])); ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="mini-grid">
|
||||
<?php foreach ($eastFooterMetrics as $metric) { ?>
|
||||
<div class="mini-card">
|
||||
<span class="mini-card__label"><?php echo html($metric['label']); ?></span>
|
||||
<span class="mini-card__value"><?php echo html($metric['value']); ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">West Tandem</h2>
|
||||
<p class="section__meta">Grinding performance</p>
|
||||
</header>
|
||||
<div class="tandem-grid">
|
||||
<?php foreach ($westStages as $stage) { ?>
|
||||
<article class="stage-card">
|
||||
<div class="stage-card__header">
|
||||
<div class="stage-card__title">
|
||||
<span class="stage-card__badge"><?php echo html($stage['stage']); ?></span>
|
||||
<span><?php echo html($stage['label']); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress__track">
|
||||
<div
|
||||
class="progress__bar"
|
||||
style="width: <?php echo clamp_percent(numeric_or_null($stage['level'])); ?>%;"
|
||||
></div>
|
||||
</div>
|
||||
<div class="progress__label">
|
||||
<span>Level</span>
|
||||
<span><?php echo html(percent_label($stage['level'])); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="metric-list">
|
||||
<div class="metric">
|
||||
<span class="metric__label">RPM</span>
|
||||
<span class="metric__value"><?php echo html(format_with_unit($stage['rpm'], 'rpm')); ?></span>
|
||||
</div>
|
||||
<div class="metric">
|
||||
<span class="metric__label"><?php echo html($stage['outputLabel']); ?></span>
|
||||
<span class="metric__value"><?php echo html(format_with_unit($stage['outputValue'], $stage['outputUnit'])); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="mini-grid">
|
||||
<?php foreach ($westFooterMetrics as $metric) { ?>
|
||||
<div class="mini-card">
|
||||
<span class="mini-card__label"><?php echo html($metric['label']); ?></span>
|
||||
<span class="mini-card__value"><?php echo html($metric['value']); ?></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">Boilers</h2>
|
||||
<p class="section__meta">Steam generation health</p>
|
||||
</header>
|
||||
<div class="stat-grid">
|
||||
<?php foreach ($boilerOverview as $card) { ?>
|
||||
<article class="stat-card">
|
||||
<p class="stat-card__label"><?php echo html($card['label']); ?></p>
|
||||
<p class="stat-card__value"><?php echo html($card['value']); ?></p>
|
||||
<p class="stat-card__unit"><?php echo html($card['unit']); ?></p>
|
||||
<?php if (!empty($card['status'])) { ?>
|
||||
<p class="stat-card__note">
|
||||
<span class="status-pill <?php echo html($card['status']['class']); ?>">
|
||||
<?php echo html($card['status']['label']); ?>
|
||||
</span>
|
||||
</p>
|
||||
<?php } ?>
|
||||
<?php if (!empty($card['mode'])) { ?>
|
||||
<p class="stat-card__note">
|
||||
<span class="status-pill <?php echo html($card['mode']['class']); ?>">
|
||||
<?php echo html($card['mode']['label']); ?>
|
||||
</span>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="mini-grid">
|
||||
<?php foreach ($boilerFlows as $boiler) { ?>
|
||||
<div class="mini-card">
|
||||
<span class="mini-card__label"><?php echo html($boiler['label']); ?></span>
|
||||
<span class="mini-card__value"><?php echo html($boiler['value']); ?> <small>kpph</small></span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">Tank Levels</h2>
|
||||
<p class="section__meta">Percent of capacity</p>
|
||||
</header>
|
||||
<div class="tank-grid">
|
||||
<?php foreach ($tankLevels as $tank) { ?>
|
||||
<?php $state = tank_level_state($tank['value']); ?>
|
||||
<article
|
||||
class="tank-card"
|
||||
<?php if ($state !== null) { ?>data-level="<?php echo html($state); ?>"<?php } ?>
|
||||
>
|
||||
<div class="tank-card__title">
|
||||
<span><?php echo html($tank['label']); ?></span>
|
||||
<span class="tank-card__meta"><?php echo html(percent_label($tank['value'])); ?></span>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progress__track">
|
||||
<div
|
||||
class="progress__bar"
|
||||
style="width: <?php echo clamp_percent(numeric_or_null($tank['value'])); ?>%;"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<header class="section__header">
|
||||
<h2 class="section__title">Truck Dump & Tables</h2>
|
||||
<p class="section__meta">Front-end preparation</p>
|
||||
</header>
|
||||
<div class="equipment-grid">
|
||||
<article class="equipment-card">
|
||||
<div class="equipment-card__title">
|
||||
<span>Truck Dump</span>
|
||||
<?php if ($truckDumpState !== null) { ?>
|
||||
<span class="status-pill <?php echo html($truckDumpState['class']); ?>">
|
||||
<?php echo html($truckDumpState['label']); ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="equipment-card__rows">
|
||||
<?php foreach ($truckDumpMetrics as $metric) { ?>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label"><?php echo html($metric['label']); ?></span>
|
||||
<span class="equipment-row__value">
|
||||
<?php if (!empty($metric['status'])) { ?>
|
||||
<span class="status-pill <?php echo html($metric['status']['class']); ?>">
|
||||
<?php echo html($metric['status']['label']); ?>
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
<?php echo html($metric['value'] ?? '—'); ?>
|
||||
<?php if (!empty($metric['suffix'])) { ?>
|
||||
<small><?php echo html($metric['suffix']); ?></small>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<?php foreach ($tables as $table) { ?>
|
||||
<article class="equipment-card">
|
||||
<div class="equipment-card__title">
|
||||
<span><?php echo html($table['label']); ?></span>
|
||||
<?php if ($table['mode'] !== null) { ?>
|
||||
<span class="status-pill <?php echo html($table['mode']['class']); ?>">
|
||||
<?php echo html($table['mode']['label']); ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="equipment-card__rows">
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">PV</span>
|
||||
<span class="equipment-row__value"><?php echo html($table['pv']); ?></span>
|
||||
</div>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">Setpoint</span>
|
||||
<span class="equipment-row__value">
|
||||
<?php echo html($table['sp']); ?>
|
||||
<small><?php echo html($table['spLabel']); ?></small>
|
||||
</span>
|
||||
</div>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">Output</span>
|
||||
<span class="equipment-row__value"><?php echo html($table['output']); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="equipment-card">
|
||||
<div class="equipment-card__title">
|
||||
<span>Knife Train</span>
|
||||
</div>
|
||||
<div class="equipment-subgrid">
|
||||
<?php foreach ($knives as $knife) { ?>
|
||||
<div class="equipment-mini">
|
||||
<div class="equipment-mini__title">
|
||||
<span><?php echo html($knife['label']); ?></span>
|
||||
<?php if ($knife['mode'] !== null) { ?>
|
||||
<span class="status-pill <?php echo html($knife['mode']['class']); ?>">
|
||||
<?php echo html($knife['mode']['label']); ?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">Pressure</span>
|
||||
<span class="equipment-row__value"><?php echo html($knife['pressure']); ?></span>
|
||||
</div>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">Speed</span>
|
||||
<span class="equipment-row__value"><?php echo html($knife['speed']); ?></span>
|
||||
</div>
|
||||
<div class="equipment-row">
|
||||
<span class="equipment-row__label">Output</span>
|
||||
<span class="equipment-row__value"><?php echo html($knife['output']); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<?php // phpcs:enable ?>
|
||||
109
overviews/data/module-helpers.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// phpcs:disable
|
||||
|
||||
function module_numeric($value): ?float
|
||||
{
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is_numeric($value)) {
|
||||
return (float) $value;
|
||||
}
|
||||
|
||||
$normalised = str_replace([',', ' '], '', (string) $value);
|
||||
$normalised = preg_replace('/[^0-9.\-]/', '', $normalised ?? '');
|
||||
|
||||
if ($normalised === '' || !is_numeric($normalised)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (float) $normalised;
|
||||
}
|
||||
|
||||
function module_number($value, int $decimals = 0, string $placeholder = '—'): string
|
||||
{
|
||||
$numeric = module_numeric($value);
|
||||
|
||||
return $numeric === null ? $placeholder : number_format($numeric, $decimals);
|
||||
}
|
||||
|
||||
function module_with_unit($value, string $unit, int $decimals = 0, string $placeholder = '—'): string
|
||||
{
|
||||
$formatted = module_number($value, $decimals, $placeholder);
|
||||
|
||||
return $formatted === $placeholder ? $formatted : $formatted . ' ' . $unit;
|
||||
}
|
||||
|
||||
function module_percent($value, int $decimals = 0, string $placeholder = '—'): string
|
||||
{
|
||||
$numeric = module_numeric($value);
|
||||
|
||||
if ($numeric === null) {
|
||||
return $placeholder;
|
||||
}
|
||||
|
||||
return number_format($numeric, $decimals) . '%';
|
||||
}
|
||||
|
||||
function module_clamp_percent($value): float
|
||||
{
|
||||
$numeric = module_numeric($value);
|
||||
|
||||
if ($numeric === null) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return max(0.0, min(100.0, $numeric));
|
||||
}
|
||||
|
||||
function module_status(string $label, string $class): string
|
||||
{
|
||||
return '<span class="module-pill ' . htmlspecialchars($class, ENT_QUOTES, 'UTF-8') . '">' .
|
||||
htmlspecialchars($label, ENT_QUOTES, 'UTF-8') .
|
||||
'</span>';
|
||||
}
|
||||
|
||||
function module_html(string $value): string
|
||||
{
|
||||
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function module_wrap(string $content, string $class): string
|
||||
{
|
||||
return '<div class="' . module_html($class) . '">' . $content . '</div>';
|
||||
}
|
||||
|
||||
function module_if(bool $condition, callable $callback): string
|
||||
{
|
||||
return $condition ? (string) $callback() : '';
|
||||
}
|
||||
|
||||
function module_non_empty(?string $value, string $fallback = '—'): string
|
||||
{
|
||||
return $value === null || $value === '' ? $fallback : $value;
|
||||
}
|
||||
|
||||
function module_capture(string $path): string
|
||||
{
|
||||
ob_start();
|
||||
include $path;
|
||||
|
||||
return trim((string) ob_get_clean());
|
||||
}
|
||||
|
||||
function module_mode(?int $value, int $autoValue = 1, string $fallback = '—'): string
|
||||
{
|
||||
if ($value === null) {
|
||||
return $fallback;
|
||||
}
|
||||
|
||||
$isAuto = (int) $value === $autoValue;
|
||||
$label = $isAuto ? 'Auto' : 'Manual';
|
||||
$class = $isAuto ? 'module-pill--success' : 'module-pill--warn';
|
||||
|
||||
return module_status($label, $class);
|
||||
}
|
||||
|
||||
// phpcs:enable
|
||||
@@ -1,78 +1,89 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$caneToday = module_numeric(module_capture(__DIR__ . '/tonsin.php')) ?? 0.0;
|
||||
$recordDate = module_capture(__DIR__ . '/recorddate.php');
|
||||
$recordTonnage = module_numeric(module_capture(__DIR__ . '/record.php')) ?? 0.0;
|
||||
$runHours = module_numeric($value['RUNHRSTODAY']);
|
||||
|
||||
$groundToday = (module_numeric($value['CANETOT']) ?? 0.0) + (module_numeric($value['W TONS GROUND']) ?? 0.0);
|
||||
$groundYesterday = (module_numeric($value['PREVTONS']) ?? 0.0) + (module_numeric($value['WPREVGROUND']) ?? 0.0);
|
||||
$prevRunHours = module_numeric($value['PREVTIME']);
|
||||
|
||||
$eastAvg = module_numeric($value['AVG_TONS_PER_HOUR']);
|
||||
$westAvg = module_numeric(module_capture(__DIR__ . '/west15minavg.php'));
|
||||
$totalTph = (module_numeric($value['TONS_PER_HOUR']) ?? 0.0) + (module_numeric($value['RATE']) ?? 0.0);
|
||||
$lossTime = module_numeric($value['LOSSTIME']);
|
||||
?>
|
||||
|
||||
<table class="tftable1">
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">General Data</h2>
|
||||
<span class="module-heading__meta">Live production snapshot</span>
|
||||
</div>
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Cane In Today</span>
|
||||
<span class="module-metric__value"><?php echo module_number($caneToday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Daily Record</span>
|
||||
<span class="module-metric__value"><?php echo module_number($recordTonnage); ?></span>
|
||||
<span class="module-metric__note"><?php echo module_html($recordDate); ?></span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Run Hours</span>
|
||||
<span class="module-metric__value"><?php echo module_number($runHours, 1); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Cane In Today:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php include("../includes/tonsin.php");?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Ground Today</span>
|
||||
<span class="module-metric__value"><?php echo module_number($groundToday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Total Ground Yesterday</span>
|
||||
<span class="module-metric__value"><?php echo module_number($groundYesterday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Prev Run Hours</span>
|
||||
<span class="module-metric__value"><?php echo module_number($prevRunHours, 1); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td colspan=""><font color="#e0e0e0">Record On:<font size="" color="0eb31d"><b><?php include("../includes/recorddate.php");?></font></font></td>
|
||||
<td align="right"><font color="00FF00"><b><?php include("../includes/record.php");?></b></font></td>
|
||||
<td><font color="#e0e0e0">Tons</font></td>
|
||||
<div class="module-divider"></div>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Run Hours:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['RUNHRSTODAY']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
</tr>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Total Tons per Hour</span>
|
||||
<span class="module-row__value"><?php echo module_number($totalTph, 1); ?></span>
|
||||
</div>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Ground Today:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo ($value['CANETOT'] + $value['W TONS GROUND']); ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
<td colspan=""><font color="#e0e0e0">Total Ground Yesterday:</font></td>
|
||||
<td align="right"><font color="00FF00"><b><?php echo ($value['PREVTONS'] + $value['WPREVGROUND']); ?></b></font></td>
|
||||
<td><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Prev Run Hours:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['PREVTIME']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">E 15 Min Avg:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['AVG_TONS_PER_HOUR']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
<td rowspan="2" colspan="" align="center" id="generalTPH"><font color="#e0e0e0">Total Tons/Hr:</font></td>
|
||||
<td rowspan="2" colspan="2" align="center" id="generalTPH"><font color="00FFFF"><b><?php echo ($ID['00560'] + $value['RATE']); ?></b></font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Today's Loss Time:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right" id="lsp"><font color="00FF00"><b><?php echo $value['LOSSTIME']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">W 15 Min Avg:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php include("../includes/west15minavg.php");?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0"></font></td>
|
||||
<td bgcolor="#2E2E2E" colspan="2" align="right" id="lsp"><font color="00FF00"><b></b></font></td>
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF PAGE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">East 15 Min Avg</span>
|
||||
<span class="module-metric__value"><?php echo module_number($eastAvg, 1); ?></span>
|
||||
<span class="module-metric__note">tons/hr</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">West 15 Min Avg</span>
|
||||
<span class="module-metric__value"><?php echo module_number($westAvg, 1); ?></span>
|
||||
<span class="module-metric__note">tons/hr</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Today's Loss Time</span>
|
||||
<span class="module-metric__value"><?php echo module_number($lossTime, 2); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,125 +1,155 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$caneToday = module_numeric(module_capture(__DIR__ . '/tonsin.php')) ?? 0.0;
|
||||
$recordDate = module_capture(__DIR__ . '/recorddate.php');
|
||||
$recordTonnage = module_numeric(module_capture(__DIR__ . '/record.php')) ?? 0.0;
|
||||
$runHours = module_numeric($value['RUNHRSTODAY']);
|
||||
|
||||
$groundToday = (module_numeric($value['CANETOT']) ?? 0.0) + (module_numeric($value['W TONS GROUND']) ?? 0.0);
|
||||
$groundYesterday = (module_numeric($value['PREVTONS']) ?? 0.0) + (module_numeric($value['WPREVGROUND']) ?? 0.0);
|
||||
$prevRunHours = module_numeric($value['PREVTIME']);
|
||||
|
||||
$eastAvg = module_numeric($value['AVG_TONS_PER_HOUR']);
|
||||
$westAvg = module_numeric($value['New Mill Avg1']);
|
||||
$totalTph = (module_numeric($value['TONS_PER_HOUR']) ?? 0.0) + (module_numeric($value['RATE']) ?? 0.0);
|
||||
$lossTime = module_numeric($value['LOSSTIME']);
|
||||
|
||||
$steamFlow = module_numeric($value['TTL_STEAMFLOW2']);
|
||||
$liveSteam = module_numeric($value['PT_001']);
|
||||
|
||||
if ($liveSteam === null) {
|
||||
$liveSteamPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($liveSteam < 156) {
|
||||
$liveSteamPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($liveSteam <= 165) {
|
||||
$liveSteamPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$liveSteamPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$exhaustMode = (int) ($value['ExhaustAM'] ?? 0);
|
||||
$exhaustModeLabel = $exhaustMode === 0 ? 'Auto' : 'Manual';
|
||||
$exhaustModeClass = $exhaustMode === 0 ? 'module-pill--success' : 'module-pill--warn';
|
||||
|
||||
$exhaustPressure = module_numeric($ID['00244'] ?? null);
|
||||
if ($exhaustPressure === null) {
|
||||
$exhaustPill = module_status('No Signal', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 10) {
|
||||
$exhaustPill = module_status('Low', 'module-pill--alert');
|
||||
} elseif ($exhaustPressure < 14) {
|
||||
$exhaustPill = module_status('Watch', 'module-pill--warn');
|
||||
} else {
|
||||
$exhaustPill = module_status('Optimal', 'module-pill--success');
|
||||
}
|
||||
|
||||
$vaporHeader = module_numeric($value['VAPOR HDR PRES']);
|
||||
?>
|
||||
<table class="tftable1">
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">General & Steam Data</h2>
|
||||
<span class="module-heading__meta">Throughput with live steam signals</span>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Cane In Today:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php include("../includes/tonsin.php");?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
<div class="module-grid module-grid--two">
|
||||
<div class="module-stack">
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Cane In Today</span>
|
||||
<span class="module-metric__value"><?php echo module_number($caneToday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Daily Record</span>
|
||||
<span class="module-metric__value"><?php echo module_number($recordTonnage); ?></span>
|
||||
<span class="module-metric__note"><?php echo module_html($recordDate); ?></span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Run Hours</span>
|
||||
<span class="module-metric__value"><?php echo module_number($runHours, 1); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td colspan=""><font color="#e0e0e0">Record On:<font size="" color="0eb31d"><b><?php include("../includes/recorddate.php");?></font></font></td>
|
||||
<td align="right"><font color="00FF00"><b><?php include("../includes/record.php");?></b></font></td>
|
||||
<td><font color="#e0e0e0">Tons</font></td>
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Ground Today</span>
|
||||
<span class="module-metric__value"><?php echo module_number($groundToday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Total Ground Yesterday</span>
|
||||
<span class="module-metric__value"><?php echo module_number($groundYesterday); ?></span>
|
||||
<span class="module-metric__note">tons</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Prev Run Hours</span>
|
||||
<span class="module-metric__value"><?php echo module_number($prevRunHours, 1); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Run Hours:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['RUNHRSTODAY']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
</tr>
|
||||
<div class="module-divider"></div>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Total Tons per Hour</span>
|
||||
<span class="module-row__value"><?php echo module_number($totalTph, 1); ?></span>
|
||||
</div>
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">East 15 Min Avg</span>
|
||||
<span class="module-metric__value"><?php echo module_number($eastAvg, 1); ?></span>
|
||||
<span class="module-metric__note">tons/hr</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">West 15 Min Avg</span>
|
||||
<span class="module-metric__value"><?php echo module_number($westAvg, 1); ?></span>
|
||||
<span class="module-metric__note">tons/hr</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Today's Loss Time</span>
|
||||
<span class="module-metric__value"><?php echo module_number($lossTime, 2); ?></span>
|
||||
<span class="module-metric__note">hours</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Ground Today:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo ($value['CANETOT'] + $value['W TONS GROUND']); ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
<div class="module-stack">
|
||||
<div class="module-metric-grid">
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Total Steam Flow</span>
|
||||
<span class="module-metric__value"><?php echo module_number($steamFlow); ?></span>
|
||||
<span class="module-metric__note">kpph</span>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Live Steam Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($liveSteam, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $liveSteamPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Exhaust Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($exhaustPressure, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
<div><?php echo $exhaustPill; ?></div>
|
||||
</div>
|
||||
<div class="module-metric">
|
||||
<span class="module-metric__label">Vapor Header Pressure</span>
|
||||
<span class="module-metric__value"><?php echo module_number($vaporHeader, 1); ?></span>
|
||||
<span class="module-metric__note">psi</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<td colspan=""><font color="#e0e0e0">Total Ground Yesterday:</font></td>
|
||||
<td align="right"><font color="00FF00"><b><?php echo ($value['PREVTONS'] + $value['WPREVGROUND']); ?></b></font></td>
|
||||
<td><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Prev Run Hours:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['PREVTIME']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">E 15 Min Avg:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['AVG_TONS_PER_HOUR']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
<td rowspan="2" colspan="" align="center" id="generalTPH"><font color="#e0e0e0">Total Tons/Hr:</font></td>
|
||||
<td rowspan="2" colspan="2" align="center" id="generalTPH"><font color="00FFFF"><b><?php echo ($ID['00560'] + $value['RATE']); ?></b></font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Today's Loss Time:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right" id="lsp"><font color="00FF00"><b><?php echo $value['LOSSTIME']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
<!-- ****************************************** ROW START ******************************************** -->
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">W 15 Min Avg:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $value['New Mill Avg1']; ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
||||
|
||||
|
||||
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0"></font></td>
|
||||
<td bgcolor="#2E2E2E" colspan="2" align="right" id="lsp"><font color="00FF00"><b></b></font></td>
|
||||
</tr>
|
||||
|
||||
<!-- ****************************************** ROW END ******************************************** -->
|
||||
|
||||
</table>
|
||||
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan="2"><font color="#e0e0e0">Total Steam Flow:</font></td>
|
||||
<td bgcolor="#2E2E2E" align="right" width="75"><font color="00FF00"><b><?php echo round(($value['TTL_STEAMFLOW2']),0); ?></b></font></td>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Kpph</font></td>
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0">Live Steam Pressure:</font></td>
|
||||
<?php
|
||||
$color = "#FFFFFF";
|
||||
|
||||
if (($value['PT_001'] >= 0) && ($value['PT_001'] <= 155))
|
||||
$color = "#FF0000";
|
||||
else if (($value['PT_001'] >= 156) && ($value['PT_001'] <= 165))
|
||||
$color = "#FFFF00";
|
||||
else if ($value['PT_001'] >= 165)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td align=\"right\" width=\"75\"><font color=\"$color\"><b>". $value['PT_001'] ."</b></font></td>";
|
||||
?>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Exhaust Pressure:</font></td>
|
||||
<?php
|
||||
if ($value['ExhaustAM'] == 0)
|
||||
echo "<td align=\"center\" bgcolor=\"#0B3B17\"><font color=\"#e0e0e0\">A</font></td>";
|
||||
if ($value['ExhaustAM'] == 1)
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"center\" bgcolor=\"#8A0808\"><font color=\"#e0e0e0\">M</font></td>";
|
||||
?>
|
||||
<?php
|
||||
$color = "#FFFFFF";
|
||||
|
||||
if (($ID['00302'] >= 0) && ($ID['00302'] <= 9))
|
||||
$color = "#FF0000";
|
||||
else if (($ID['00302'] >= 6) && ($ID['00302'] <= 13))
|
||||
$color = "#FFFF00";
|
||||
else if ($ID['00302'] >= 14)
|
||||
$color = "#00FF00";
|
||||
|
||||
echo "<td bgcolor=\"#2E2E2E\" align=\"right\" width=\"75\"><font color=\"$color\"><b>". $ID['00302'] ."</b></font></td>";
|
||||
?>
|
||||
<td bgcolor="#2E2E2E"><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
|
||||
<td colspan="2"><font color="#e0e0e0">Vapor Header Pressure:</font></td>
|
||||
<td align="right" width="75" id="lsp"><font color="00FF00"><b><?php echo $value['VAPOR HDR PRES']; ?></b></font></td>
|
||||
<td><font color="#e0e0e0">PSI</font></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF PAGE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Exhaust Control</span>
|
||||
<div class="module-row__value"><?php echo module_status($exhaustModeLabel, $exhaustModeClass); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,521 +1,261 @@
|
||||
<?php
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
$configuredBaseUrl = getenv('LASUCA_FEED_URL');
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$roundedid = [];
|
||||
$rounded = [];
|
||||
$rounded1 = [];
|
||||
$ID = [];
|
||||
$value = [];
|
||||
$eastMillMode = module_mode(isset($value['MILL1AUTOMAN']) ? (int) $value['MILL1AUTOMAN'] : null, 0);
|
||||
$eastMillRows = [
|
||||
[
|
||||
'stage' => '1',
|
||||
'level' => module_numeric($value['MILL1LVLPV']),
|
||||
'sp' => module_numeric($value['MILL1SP']),
|
||||
'rpm' => module_numeric($value['EMILL1RPM']),
|
||||
'metric' => 'MCC FPM',
|
||||
'metric_value' => module_numeric($value['MAINSPD']),
|
||||
'metric_unit' => 'fpm',
|
||||
],
|
||||
[
|
||||
'stage' => '2',
|
||||
'level' => module_numeric($value['M2LVL']),
|
||||
'sp' => module_numeric($value['MILL2SP']),
|
||||
'rpm' => module_numeric($value['EMILL2RPM']),
|
||||
'metric' => 'MCC Output',
|
||||
'metric_value' => module_numeric($value['MCCOUTPUT']),
|
||||
'metric_unit' => '%',
|
||||
],
|
||||
[
|
||||
'stage' => '3',
|
||||
'level' => module_numeric($value['MIL3LVL']),
|
||||
'sp' => module_numeric($value['MILL3SP']),
|
||||
'rpm' => module_numeric($value['EMILL3RPM']),
|
||||
'metric' => 'MCC Tons',
|
||||
'metric_value' => module_numeric($rounded1['MCCTONS'] ?? null),
|
||||
'metric_unit' => 'tons',
|
||||
],
|
||||
[
|
||||
'stage' => '4',
|
||||
'level' => module_numeric($value['MIL4LVL']),
|
||||
'sp' => module_numeric($value['MILL4SP']),
|
||||
'rpm' => module_numeric($value['EMILL4RPM']),
|
||||
'metric' => 'Mill 1 SP',
|
||||
'metric_value' => module_numeric($value['WEIGHT_WSP']),
|
||||
'metric_unit' => ($value['LEVEL_THROUGHPUT_SWITCH'] ?? 0) == 1 ? 'tons/hr' : '%',
|
||||
'mode' => module_mode(isset($value['MILL1AUTOMAN1']) ? (int) $value['MILL1AUTOMAN1'] : null, 1),
|
||||
],
|
||||
[
|
||||
'stage' => '5',
|
||||
'level' => module_numeric($value['MIL5LVL']),
|
||||
'sp' => module_numeric($value['MILL5SP']),
|
||||
'rpm' => module_numeric($value['EMILL5RPM']),
|
||||
'metric' => 'Grinding Rate',
|
||||
'metric_value' => module_numeric($value['TONS_PER_HOUR']),
|
||||
'metric_unit' => 'tons/hr',
|
||||
],
|
||||
[
|
||||
'stage' => '6',
|
||||
'level' => module_numeric($value['MIL6LVL']),
|
||||
'sp' => module_numeric($value['MILL6SP']),
|
||||
'rpm' => module_numeric($value['EMILL6RPM']),
|
||||
'metric' => 'Average Rate',
|
||||
'metric_value' => module_numeric($value['AVG_TONS_PER_HOUR']),
|
||||
'metric_unit' => 'tons/15 min',
|
||||
],
|
||||
];
|
||||
|
||||
$endpointDataLoaded = false;
|
||||
$endpointErrorMessage = null;
|
||||
$eastImbibition = [
|
||||
[
|
||||
'label' => 'Imbibition 6',
|
||||
'value' => module_numeric($value['IMBFLOW']),
|
||||
'unit' => 'gpm',
|
||||
'sp_label' => 'Imbibition 6 SP',
|
||||
'sp_value' => module_numeric($value['IMBSP']),
|
||||
],
|
||||
[
|
||||
'label' => 'Imbibition 5',
|
||||
'value' => module_numeric($value['IMBFLOW']),
|
||||
'unit' => 'gpm',
|
||||
'sp_label' => 'Imbibition 5 SP',
|
||||
'sp_value' => module_numeric($value['IMB5SP']),
|
||||
],
|
||||
];
|
||||
|
||||
try {
|
||||
if ($configuredBaseUrl !== false && $configuredBaseUrl !== '') {
|
||||
$baseUrl = rtrim($configuredBaseUrl, '/');
|
||||
} else {
|
||||
$baseUrl = 'https://192.168.0.10';
|
||||
}
|
||||
$westAverage = module_numeric(module_capture(__DIR__ . '/west15minavg.php'));
|
||||
$westRows = [
|
||||
[
|
||||
'stage' => '1',
|
||||
'level' => module_numeric($ID['00654'] ?? null),
|
||||
'sp' => null,
|
||||
'rpm' => module_numeric($ID['00666'] ?? null),
|
||||
'metric' => 'MCC FPM',
|
||||
'metric_value' => module_numeric($value['Feet/Minute'] ?? null),
|
||||
'metric_unit' => 'fpm',
|
||||
],
|
||||
[
|
||||
'stage' => '2',
|
||||
'level' => module_numeric($ID['00656'] ?? null),
|
||||
'sp' => null,
|
||||
'rpm' => module_numeric($ID['00670'] ?? null),
|
||||
'metric' => 'MCC Output',
|
||||
'metric_value' => module_numeric($ID['00638'] ?? null),
|
||||
'metric_unit' => '%',
|
||||
],
|
||||
[
|
||||
'stage' => '3',
|
||||
'level' => module_numeric($ID['00657'] ?? null),
|
||||
'sp' => null,
|
||||
'rpm' => module_numeric($ID['00672'] ?? null),
|
||||
'metric' => 'MCC Tons',
|
||||
'metric_value' => module_numeric($ID['00640'] ?? null),
|
||||
'metric_unit' => 'tons',
|
||||
],
|
||||
[
|
||||
'stage' => '4',
|
||||
'level' => module_numeric($ID['00658'] ?? null),
|
||||
'sp' => null,
|
||||
'rpm' => module_numeric($ID['00674'] ?? null),
|
||||
'metric' => 'Mill 1 SP',
|
||||
'metric_value' => module_numeric($ID['00642'] ?? null),
|
||||
'metric_unit' => '%',
|
||||
],
|
||||
[
|
||||
'stage' => '5',
|
||||
'level' => module_numeric($ID['00660'] ?? null),
|
||||
'sp' => null,
|
||||
'rpm' => module_numeric($ID['00680'] ?? null),
|
||||
'metric' => 'Grinding Rate',
|
||||
'metric_value' => module_numeric($value['RATE'] ?? null),
|
||||
'metric_unit' => 'tons/hr',
|
||||
],
|
||||
[
|
||||
'stage' => '—',
|
||||
'level' => null,
|
||||
'sp' => null,
|
||||
'rpm' => null,
|
||||
'metric' => 'Average Rate',
|
||||
'metric_value' => $westAverage,
|
||||
'metric_unit' => 'tons/15 min',
|
||||
],
|
||||
];
|
||||
|
||||
$endpointUrl = rtrim($baseUrl, '/') . '/shared-endpoint/public/index.php';
|
||||
$scheme = parse_url($endpointUrl, PHP_URL_SCHEME) ?: 'http';
|
||||
|
||||
$context = null;
|
||||
if (strcasecmp($scheme, 'https') === 0) {
|
||||
$host = parse_url($endpointUrl, PHP_URL_HOST) ?: 'localhost';
|
||||
if (in_array($host, ['localhost', '127.0.0.1', '192.168.0.10'], true)) {
|
||||
$context = stream_context_create([
|
||||
'ssl' => [
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$response = @file_get_contents($endpointUrl, false, $context ?: null);
|
||||
|
||||
if ($response === false && strcasecmp($scheme, 'https') === 0) {
|
||||
$fallbackUrl = preg_replace('#^https#i', 'http', $endpointUrl);
|
||||
$response = @file_get_contents($fallbackUrl);
|
||||
if ($response !== false) {
|
||||
$endpointUrl = $fallbackUrl;
|
||||
}
|
||||
}
|
||||
|
||||
if ($response === false) {
|
||||
throw new RuntimeException('Unable to reach shared endpoint: ' . $endpointUrl);
|
||||
}
|
||||
|
||||
try {
|
||||
$payload = json_decode($response, true, flags: JSON_THROW_ON_ERROR);
|
||||
} catch (JsonException $exception) {
|
||||
throw new RuntimeException('Malformed JSON from shared endpoint', 0, $exception);
|
||||
}
|
||||
|
||||
if (($payload['status'] ?? null) !== 'ok') {
|
||||
$message = $payload['message'] ?? 'unknown error';
|
||||
throw new RuntimeException('Shared endpoint returned an error: ' . $message);
|
||||
}
|
||||
|
||||
if (!isset($payload['items']) || !is_array($payload['items'])) {
|
||||
$snippet = substr(strip_tags($response), 0, 200);
|
||||
throw new RuntimeException('Shared endpoint response missing items. Snippet: ' . $snippet);
|
||||
}
|
||||
|
||||
foreach ($payload['items'] as $item) {
|
||||
$tagKey = str_pad((string) $item['tagId'], 5, '0', STR_PAD_LEFT);
|
||||
$value[$item['name']] = $item['value'];
|
||||
$rounded[$item['name']] = $item['rounded1'];
|
||||
$rounded1[$item['name']] = $item['rounded2'];
|
||||
$roundedid[$tagKey] = $item['rounded2'];
|
||||
$ID[$tagKey] = $item['value'];
|
||||
}
|
||||
|
||||
$endpointDataLoaded = true;
|
||||
} catch (Throwable $exception) {
|
||||
$endpointErrorMessage = $exception->getMessage();
|
||||
error_log('Milling shared endpoint failed: ' . $endpointErrorMessage);
|
||||
}
|
||||
|
||||
$dataSourceLabel = 'Shared endpoint';
|
||||
|
||||
if (!$endpointDataLoaded) {
|
||||
require __DIR__ . '/../items.php';
|
||||
require __DIR__ . '/../items2dec.php';
|
||||
$dataSourceLabel = 'Legacy items.php data';
|
||||
}
|
||||
// Helper function for rendering data rows
|
||||
function renderDataRow($label, $value, $unit = "") {
|
||||
$safeValue = htmlspecialchars($value);
|
||||
return "<tr>
|
||||
<td id=\"vtitle\">$label</td>
|
||||
<td id=\"sum-count\">$safeValue</td>
|
||||
<td id=\"vtitle\">$unit</td>
|
||||
</tr>";
|
||||
}
|
||||
$westImbibition = module_numeric($ID['00624'] ?? null);
|
||||
?>
|
||||
<?php
|
||||
//if ($value['BC09ONOFF'] == 0) {
|
||||
//$grindingrate=$value['WTONSHR'];
|
||||
//}
|
||||
//else if ($value['BC09ONOFF'] == 1) {
|
||||
//$grindingrate="0";
|
||||
//}
|
||||
?>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="50%" align="center" colspan="5" border="0">
|
||||
<font color="#00BFFF"><i>EAST MILL TANDEM</i></font>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<section class="module-card">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Mill Tandems</h2>
|
||||
<span class="module-heading__meta">East & West tandem performance</span>
|
||||
</div>
|
||||
|
||||
<div class="module-grid module-grid--two">
|
||||
<div class="module-stack">
|
||||
<div class="module-tag">East Tandem</div>
|
||||
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Mill 1 Output</span>
|
||||
<span class="module-row__value"><?php echo module_number($value['MILL1OUTPUT'] ?? null); ?>%</span>
|
||||
</div>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Control Mode</span>
|
||||
<div class="module-row__value"><?php echo $eastMillMode; ?></div>
|
||||
</div>
|
||||
|
||||
<table class="module-table module-table--tight">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mill</th>
|
||||
<th>Level</th>
|
||||
<th>SP</th>
|
||||
<th>RPM</th>
|
||||
<th>Metric</th>
|
||||
<th>Value</th>
|
||||
<th>Units</th>
|
||||
<th>Mode</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($eastMillRows as $row) : ?>
|
||||
<tr>
|
||||
<td><?php echo module_html($row['stage']); ?></td>
|
||||
<td>
|
||||
<div class="module-progress">
|
||||
<div class="module-bar">
|
||||
<div class="module-bar__fill" style="width: <?php echo module_clamp_percent($row['level'] ?? 0); ?>%;"></div>
|
||||
</div>
|
||||
<span class="module-notes"><?php echo module_number($row['level'], 0); ?>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="module-table__number"><?php echo module_number($row['sp'], 0); ?></td>
|
||||
<td class="module-table__number"><?php echo module_number($row['rpm'], 0); ?></td>
|
||||
<td><?php echo module_html($row['metric']); ?></td>
|
||||
<td class="module-table__number"><?php echo module_number($row['metric_value'], 1); ?></td>
|
||||
<td><?php echo module_html(strtoupper($row['metric_unit'])); ?></td>
|
||||
<td>
|
||||
<?php echo $row['mode'] ?? '—'; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="tftableEAST">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">Level</font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">SP</font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">RPM</font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">Mill 1 OP</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $value['MILL1OUTPUT']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">%</font>
|
||||
</td>
|
||||
<?php
|
||||
if ($value['MILL1AUTOMAN'] == 0) {
|
||||
echo "<td colspan=\"1\" align=\"center\" bgcolor=\"#0B3B17\"><font color=\"#e0e0e0\">A</font></td>";
|
||||
}
|
||||
if ($value['MILL1AUTOMAN'] == 1) {
|
||||
echo "<td colspan=\"1\" align=\"center\" bgcolor=\"#8A0808\"><font color=\"#e0e0e0\">M</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<div class="module-divider"></div>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#e0e0e0">1</font>
|
||||
</td>
|
||||
<td bgcolor="#0B3B17" align="left"><progress id="progressmills" data-label="<?php echo $value['MILL1LVLPV']; ?>%" max="100" value="<?php echo $value['MILL1LVLPV']; ?>"></progress></td>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#e0e0e0"><?php echo $value['MILL1SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#00FF00"><?php echo $value['EMILL1RPM']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">MCC FPM</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $value['MAINSPD']; ?></font>
|
||||
</td>
|
||||
<td colspan="2" align="left">
|
||||
<font color="#e0e0e0">FPM</font>
|
||||
</td>
|
||||
<?php foreach ($eastImbibition as $imb) : ?>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label"><?php echo module_html($imb['label']); ?></span>
|
||||
<span class="module-row__value"><?php echo module_number($imb['value'], 0); ?> <?php echo module_html(strtoupper($imb['unit'])); ?></span>
|
||||
</div>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label"><?php echo module_html($imb['sp_label']); ?></span>
|
||||
<span class="module-row__value"><?php echo module_number($imb['sp_value'], 0); ?> <?php echo module_html(strtoupper($imb['unit'])); ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#000000">2</font>
|
||||
</td>
|
||||
<td bgcolor="#D7DF01" align="left"><progress id="progressmills" data-label="<?php echo $value['M2LVL']; ?>%" max="100" value="<?php echo $value['M2LVL']; ?>"></progress></td>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#ffffff"><?php echo $value['MILL2SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#298A08"><?php echo $value['EMILL2RPM']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">MCC Output</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $value['MCCOUTPUT']; ?></font>
|
||||
</td>
|
||||
<td colspan="2" align="left">
|
||||
<font color="#e0e0e0">%</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#e0e0e0">3</font>
|
||||
</td>
|
||||
<td bgcolor="#04B404" align="left"><progress id="progressmills" data-label="<?php echo $value['MIL3LVL']; ?>%" max="100" value="<?php echo $value['MIL3LVL']; ?>"></progress></td>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#e0e0e0"><?php echo $value['MILL3SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#29522b"><?php echo $value['EMILL3RPM']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">MCC Tons</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $rounded1['MCCTONS']; ?></font>
|
||||
</td>
|
||||
<td colspan="2" align="left">
|
||||
<font color="#e0e0e0">Tons</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#e0e0e0">4</font>
|
||||
</td>
|
||||
<td bgcolor="#DF7401" align="left"><progress id="progressmills" data-label="<?php echo $value['MIL4LVL']; ?>%" max="100" value="<?php echo $value['MIL4LVL']; ?>"></progress></td>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#e0e0e0"><?php echo $value['MILL4SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#00FF00"><?php echo $value['EMILL4RPM']; ?></font>
|
||||
</td>
|
||||
<td colspan="1" align="left">
|
||||
<font color="#e0e0e0">Mill 1 SP</font>
|
||||
</td>
|
||||
<?php
|
||||
if ($value['LEVEL_THROUGHPUT_SWITCH'] == 1) {
|
||||
echo "<td align=\"right\"><font color=\"00FF00\"><b> " . $value['WEIGHT_WSP'] . " </b></font></td>";
|
||||
}
|
||||
if ($value['LEVEL_THROUGHPUT_SWITCH'] == 0) {
|
||||
echo "<td align=\"right\"><font color=\"00FF00\"><b> " . $value['WEIGHT_WSP'] . " </b></font></td>";
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($value['LEVEL_THROUGHPUT_SWITCH'] == 1) {
|
||||
echo "<td colspan=\"1\"><font color=\"#e0e0e0\">Tons/Hr</font></td>";
|
||||
}
|
||||
if ($value['LEVEL_THROUGHPUT_SWITCH'] == 0) {
|
||||
echo "<td colspan=\"1\"><font color=\"#e0e0e0\">%</font></td>";
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($value['MILL1AUTOMAN1'] == 1) {
|
||||
echo "<td colspan=\"1\" align=\"center\" bgcolor=\"#0B3B17\"><font color=\"#e0e0e0\">A</font></td>";
|
||||
}
|
||||
if ($value['MILL1AUTOMAN1'] == 0) {
|
||||
echo "<td colspan=\"1\" align=\"center\" bgcolor=\"#8A0808\"><font color=\"#e0e0e0\">M</font></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#e0e0e0">5</font>
|
||||
</td>
|
||||
<td bgcolor="#5858FA" align="left"><progress id="progressmills" data-label="<?php echo $value['MIL5LVL']; ?>%" max="100" value="<?php echo $value['MIL5LVL']; ?>"></progress></td>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#e0e0e0"><?php echo $value['MILL5SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#00FF00"><?php echo $value['EMILL5RPM']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">Grinding Rate</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $ID['00560']; ?></font>
|
||||
</td>
|
||||
<td colspan="2" align="left">
|
||||
<font color="#e0e0e0">Tons/Hr</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#8A0808" align="center">
|
||||
<font color="#e0e0e0">6</font>
|
||||
</td>
|
||||
<td bgcolor="#8A0808" align="left"><progress id="progressmills" data-label="<?php echo $value['MIL6LVL']; ?>%" max="100" value="<?php echo $value['MIL6LVL']; ?>"></progress></td>
|
||||
<td bgcolor="#8A0808" align="center">
|
||||
<font color="#e0e0e0"><?php echo $value['MILL6SP']; ?></font>
|
||||
</td>
|
||||
<td bgcolor="#8A0808" align="center">
|
||||
<font color="#00FF00"><?php echo $value['EMILL6RPM']; ?></font>
|
||||
</td>
|
||||
<td align="left" colspan="1">
|
||||
<font color="#e0e0e0">Average Rate</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $value['AVG_TONS_PER_HOUR']; ?></font>
|
||||
</td>
|
||||
<td colspan="2" align="left">
|
||||
<font color="#e0e0e0">Tons/15/Min</font>
|
||||
</td>
|
||||
<div class="module-stack">
|
||||
<div class="module-tag">West Tandem</div>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan="2">
|
||||
<font color="#e0e0e0">Imibition 6:</font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E" align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $value['IMB6Flow']; ?></b></font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E">
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
|
||||
<td colspan="1">
|
||||
<font color="#e0e0e0">Imibition 6 SP:</font>
|
||||
</td>
|
||||
<td align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $value['IMB6SP']; ?></b></font>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan="2">
|
||||
<font color="#e0e0e0">Imibition 5:</font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E" align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $value['IMB5Flow']; ?></b></font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E">
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
|
||||
<td colspan="1">
|
||||
<font color="#e0e0e0">Imibition 5 SP:</font>
|
||||
</td>
|
||||
<td align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $ID['00164']; ?></b></font>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
</tr>
|
||||
<table class="module-table module-table--tight">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mill</th>
|
||||
<th>Level</th>
|
||||
<th>SP</th>
|
||||
<th>RPM</th>
|
||||
<th>Metric</th>
|
||||
<th>Value</th>
|
||||
<th>Units</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($westRows as $row) : ?>
|
||||
<tr>
|
||||
<td><?php echo module_html($row['stage']); ?></td>
|
||||
<td>
|
||||
<div class="module-progress">
|
||||
<div class="module-bar">
|
||||
<div class="module-bar__fill" style="width: <?php echo module_clamp_percent($row['level'] ?? 0); ?>%;"></div>
|
||||
</div>
|
||||
<span class="module-notes"><?php echo module_number($row['level'], 0); ?>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="module-table__number"><?php echo module_number($row['sp'], 0); ?></td>
|
||||
<td class="module-table__number"><?php echo module_number($row['rpm'], 0); ?></td>
|
||||
<td><?php echo module_html($row['metric']); ?></td>
|
||||
<td class="module-table__number"><?php echo module_number($row['metric_value'], 1); ?></td>
|
||||
<td><?php echo module_html(strtoupper($row['metric_unit'])); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<td width="50%">
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="50%" align="center" colspan="6" border="0">
|
||||
<font color="#00BFFF"><i>WEST MILL TANDEM</i></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tftableWEST">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">Level</font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">SP</font>
|
||||
</td>
|
||||
<td align="center">
|
||||
<font color="#e0e0e0">RPM</font>
|
||||
</td>
|
||||
<td colspan="4" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#e0e0e0">1</font>
|
||||
</td>
|
||||
<td bgcolor="#0B3B17" align="left"><progress id="progressmills" data-label="<?php echo $ID['00914']; ?>%" max="100" value="<?php echo $ID['00654']; ?>"></progress></td>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td bgcolor="#0B3B17" align="center">
|
||||
<font color="#00FF00"><?php echo $ID['00926']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">BC-09 FPM</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $value['Feet/Minute']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">FPM</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#000000">2</font>
|
||||
</td>
|
||||
<td bgcolor="#D7DF01" align="left"><progress id="progressmills" data-label="<?php echo $ID['00916']; ?>%" max="100" value="<?php echo $ID['00656']; ?>"></progress></td>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#ffffff"></font>
|
||||
</td>
|
||||
<td bgcolor="#D7DF01" align="center">
|
||||
<font color="#298A08"><?php echo $ID['00930']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">BC-09 Output</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php echo $ID['00690']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#e0e0e0">3</font>
|
||||
</td>
|
||||
<td bgcolor="#04B404" align="left"><progress id="progressmills" data-label="<?php echo $ID['00962']; ?>" max="100" value="0"></progress></td>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td bgcolor="#04B404" align="center">
|
||||
<font color="#00FF00"><?php echo $ID['01018']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">BC-09 Tons</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Tons</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#e0e0e0">4</font>
|
||||
</td>
|
||||
<td bgcolor="#DF7401" align="left"><progress id="progressmills" data-label="<?php echo $ID['00918']; ?>%" max="100" value="<?php echo $ID['00658']; ?>"></progress></td>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td bgcolor="#DF7401" align="center">
|
||||
<font color="#00FF00"><?php echo $ID['00934']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Mill 1 SP</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">%</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#e0e0e0">5</font>
|
||||
</td>
|
||||
<td bgcolor="#5858FA" align="left"><progress id="progressmills" data-label="<?php echo $ID['00920']; ?>%" max="100" value="<?php echo $ID['00660']; ?>"></progress></td>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td bgcolor="#5858FA" align="center">
|
||||
<font color="#00FF00"><?php echo $ID['00940']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Grinding Rate</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00">
|
||||
<font><?php echo $value['RATE']; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Tons/Hr</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#8A0808" colspan="4" align="center">
|
||||
<font color="#e0e0e0"></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Average Rate</font>
|
||||
</td>
|
||||
<td align="right">
|
||||
<font color="#00FF00"><?php require "../includes/west15minavg.php"; ?></font>
|
||||
</td>
|
||||
<td align="left">
|
||||
<font color="#e0e0e0">Tons/15Min</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#2E2E2E" colspan="2">
|
||||
<font color="#e0e0e0">Imibition:</font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E" align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $value['IMB5Flow']; ?></b></font>
|
||||
</td>
|
||||
<td bgcolor="#2E2E2E">
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
<div class="module-divider"></div>
|
||||
|
||||
<td colspan="1">
|
||||
<font color="#e0e0e0">Imibition SP:</font>
|
||||
</td>
|
||||
<td align="right" id="lsp">
|
||||
<font color="00FF00"><b><?php echo $ID['00164']; ?></b></font>
|
||||
</td>
|
||||
<td>
|
||||
<font color="#e0e0e0">GPM</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<font color="#e0e0e0"> </font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
?>
|
||||
<div class="module-row">
|
||||
<span class="module-row__label">Imbibition</span>
|
||||
<span class="module-row__value"><?php echo module_number($westImbibition, 0); ?> GPM</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include("../includes/items2dec.php");
|
||||
include("../../items2dec.php");
|
||||
?>
|
||||
|
||||
<!-- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv TRUCK DUMP, TABLES AND KNIVES vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -->
|
||||
|
||||
@@ -1,44 +1,55 @@
|
||||
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$syrupOverflow = module_numeric($value['Syrup Overflow Lvl'] ?? null) ?? 0.0;
|
||||
$syrupRcvr = module_numeric($value['Syrup RCVR'] ?? null) ?? 0.0;
|
||||
$totalSyrup = ($syrupOverflow * 0.82569) + ($syrupRcvr * 0.17431);
|
||||
|
||||
$tanks = [
|
||||
['label' => 'Juice Tank 1', 'value' => module_numeric($value['Juice Tank1'] ?? null)],
|
||||
['label' => 'Juice Tank 2', 'value' => module_numeric($value['Juice Tank2'] ?? null)],
|
||||
['label' => 'Syrup Receiver', 'value' => module_numeric($value['Syrup RCVR'] ?? null)],
|
||||
['label' => 'Syrup Overflow', 'value' => module_numeric($value['Syrup Overflow Lvl'] ?? null)],
|
||||
['label' => 'Total Syrup', 'value' => module_numeric($totalSyrup)],
|
||||
['label' => 'A1 Receiver', 'value' => module_numeric($value['A1 RCVR'] ?? null)],
|
||||
['label' => 'A1 Overflow', 'value' => module_numeric($value['A1 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'A2 Receiver', 'value' => module_numeric($value['A2 RCVR'] ?? null)],
|
||||
['label' => 'A2 Overflow', 'value' => module_numeric($value['A2 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'B Receiver', 'value' => module_numeric($value['B RCVR'] ?? null)],
|
||||
['label' => 'B Overflow', 'value' => module_numeric($value['B Molasses Overflow Lvl'] ?? null)],
|
||||
];
|
||||
|
||||
$tankGroups = array_chunk($tanks, (int) ceil(count($tanks) / 2));
|
||||
?>
|
||||
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Tank Levels</h2>
|
||||
<span class="module-heading__meta">Percent levels across juice, syrup, and molasses</span>
|
||||
</div>
|
||||
|
||||
<table width="100%" class="tftable2">
|
||||
<tr>
|
||||
<td width="100%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>TANK LEVELS</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Juice Tank1</font></td>
|
||||
<td colspan="" width="9.09%" align="center"><font color="#e0e0e0">Juice Tank2</font></td>
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Syrup Rcvr</font></td>
|
||||
<td colspan="" width="9.09%" align="center"><font color="#e0e0e0">Syrup Over</font></td>
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Total Syrup</font></td>
|
||||
<td colspan="" width="9.09%" align="center"><font color="#e0e0e0">A1 Rcvr</font></td>
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A1 Over</font></td>
|
||||
<td colspan="" width="9.09%" align="center"><font color="#e0e0e0">A2 Rcvr</font></td>
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A2 Over</font></td>
|
||||
<td colspan="" width="9.09%" align="center"><font color="#e0e0e0">B Rcvr</font></td>
|
||||
<td colspan="" width="9.09%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">B Over</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['Juice Tank1']; ?>%" max="100" value="<?php echo $value['Juice Tank1']; ?>"></progress></td>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['Juice Tank2']; ?>%" max="100" value="<?php echo $value['Juice Tank2']; ?>"></progress></td>
|
||||
<td width="9.09" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['Syrup RCVR']; ?>%" max="100" value="<?php echo $value['Syrup RCVR']; ?>"></progress></td>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['Syrup Overflow Lvl']; ?>%" max="100" value="<?php echo $value['Syrup Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="9.09" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>%" max="100" value="<?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>"></meter></td>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['A1 RCVR']; ?>%" max="100" value="<?php echo $value['A1 RCVR']; ?>"></progress></td>
|
||||
<td width="9.09" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['A1 Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['A1 Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['A2 RCVR']; ?>%" max="100" value="<?php echo $value['A2 RCVR']; ?>"></progress></td>
|
||||
<td width="9.09" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['A2 Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['A2 Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="9.09" align="left"><progress id="progresstanks" data-label="<?php echo $value['B RCVR']; ?>%" max="100" value="<?php echo $value['B RCVR']; ?>"></progress></td>
|
||||
<td width="9.09" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['B Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['B Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
?>
|
||||
<div class="module-grid module-grid--two">
|
||||
<?php foreach ($tankGroups as $group) : ?>
|
||||
<div class="module-stack">
|
||||
<?php foreach ($group as $tank) : ?>
|
||||
<?php $percent = module_clamp_percent($tank['value']); ?>
|
||||
<div class="module-subcard module-subcard--compact">
|
||||
<div class="module-row">
|
||||
<span class="module-row__label"><?php echo module_html($tank['label']); ?></span>
|
||||
<span class="module-row__value"><?php echo module_number($tank['value'], 0); ?>%</span>
|
||||
</div>
|
||||
<div class="module-progress">
|
||||
<div class="module-bar">
|
||||
<div class="module-bar__fill" style="width: <?php echo number_format($percent, 2); ?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$syrupOverflow = module_numeric($value['Syrup Overflow Lvl'] ?? null) ?? 0.0;
|
||||
$syrupRcvr = module_numeric($value['Syrup RCVR'] ?? null) ?? 0.0;
|
||||
$totalSyrup = ($syrupOverflow * 0.82569) + ($syrupRcvr * 0.17431);
|
||||
|
||||
$tanks = [
|
||||
['label' => 'Juice Tank 1', 'value' => module_numeric($value['Juice Tank1'] ?? null)],
|
||||
['label' => 'Juice Tank 2', 'value' => module_numeric($value['Juice Tank2'] ?? null)],
|
||||
['label' => 'Syrup Receiver', 'value' => module_numeric($value['Syrup RCVR'] ?? null)],
|
||||
['label' => 'Syrup Overflow', 'value' => module_numeric($value['Syrup Overflow Lvl'] ?? null)],
|
||||
['label' => 'Total Syrup', 'value' => module_numeric($totalSyrup)],
|
||||
['label' => 'Condensate Water', 'value' => module_numeric($value['CondensateWater'] ?? null)],
|
||||
['label' => 'Sweet Water', 'value' => module_numeric($value['SweetwaterTank'] ?? null)],
|
||||
['label' => 'Cold Water Injection', 'value' => module_numeric($value['Cold Water Injection LVL'] ?? null)],
|
||||
['label' => 'A1 Receiver', 'value' => module_numeric($value['A1 RCVR'] ?? null)],
|
||||
['label' => 'A1 Overflow', 'value' => module_numeric($value['A1 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'A2 Receiver', 'value' => module_numeric($value['A2 RCVR'] ?? null)],
|
||||
['label' => 'A2 Overflow', 'value' => module_numeric($value['A2 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'B Receiver', 'value' => module_numeric($value['B RCVR'] ?? null)],
|
||||
['label' => 'B Overflow', 'value' => module_numeric($value['B Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'Flash Tank', 'value' => module_numeric($value['FlashTankLVL'] ?? null)],
|
||||
];
|
||||
|
||||
$tankGroups = array_chunk($tanks, (int) ceil(count($tanks) / 2));
|
||||
?>
|
||||
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Tank Levels (Stacked)</h2>
|
||||
<span class="module-heading__meta">Combined juice, syrup, water, and molasses storage</span>
|
||||
</div>
|
||||
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="1000%" align="center" colspan="8" border="0"><font color="#00BFFF"><i>TANK LEVELS</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tftable1">
|
||||
<tr>
|
||||
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Juice Tank1</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">Juice Tank2</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Syrup Rcvr</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">Syrup Overflow</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Total Syrup</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">Condensate Water</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Sweet Water</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">Cold Water INJ</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['Juice Tank1']; ?>%" max="100" value="<?php echo $value['Juice Tank1']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['Juice Tank2']; ?>%" max="100" value="<?php echo $value['Juice Tank2']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['Syrup RCVR']; ?>%" max="100" value="<?php echo $value['Syrup RCVR']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['Syrup Overflow Lvl']; ?>%" max="100" value="<?php echo $value['Syrup Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>%" max="100" value="<?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>"></meter></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['CondensateWater']; ?>" max="100" value="<?php echo $value['CondensateWater']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['SweetwaterTank']; ?>" max="100" value="<?php echo $value['SweetwaterTank']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['Cold Water Injection LVL']; ?>" max="100" value="<?php echo $value['Cold Water Injection LVL']; ?>"></progress></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">A1 Rcvr</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A1 Overflow</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">A2 Rcvr</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A2 Overflow</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">B Rcvr</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">B Overflow</font></td>
|
||||
<td colspan="" width="12.5%" align="center"><font color="#e0e0e0">Flash Tank</font></td>
|
||||
<td colspan="" width="12.5%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0"></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['A1 RCVR']; ?>%" max="100" value="<?php echo $value['A1 RCVR']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['A1 Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['A1 Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['A2 RCVR']; ?>%" max="100" value="<?php echo $value['A2 RCVR']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['A2 Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['A2 Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['B RCVR']; ?>%" max="100" value="<?php echo $value['B RCVR']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $value['B Molasses Overflow Lvl']; ?>%" max="100" value="<?php echo $value['B Molasses Overflow Lvl']; ?>"></progress></td>
|
||||
<td width="12.5" align="left"><progress id="progresstanks" data-label="<?php echo $value['FlashTankLVL']; ?>" max="100" value="<?php echo $value['FlashTankLVL']; ?>"></progress></td>
|
||||
<td width="12.5" bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php //echo $value['B RCVR']; ?>" max="100" value="<?php //echo $value['B RCVR']; ?>"></progress></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
?>
|
||||
<div class="module-grid module-grid--two">
|
||||
<?php foreach ($tankGroups as $group) : ?>
|
||||
<div class="module-stack">
|
||||
<?php foreach ($group as $tank) : ?>
|
||||
<?php $percent = module_clamp_percent($tank['value']); ?>
|
||||
<div class="module-subcard module-subcard--compact">
|
||||
<div class="module-row">
|
||||
<span class="module-row__label"><?php echo module_html($tank['label']); ?></span>
|
||||
<span class="module-row__value"><?php echo module_number($tank['value'], 0); ?>%</span>
|
||||
</div>
|
||||
<div class="module-progress">
|
||||
<div class="module-bar">
|
||||
<div class="module-bar__fill" style="width: <?php echo number_format($percent, 2); ?>%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,142 +1,49 @@
|
||||
<?php
|
||||
include("../includes/items.php");
|
||||
// phpcs:ignoreFile
|
||||
declare(strict_types=1);
|
||||
|
||||
include __DIR__ . '/../../items.php';
|
||||
require_once __DIR__ . '/module-helpers.php';
|
||||
|
||||
$syrupOverflow = module_numeric($value['Syrup Overflow Lvl'] ?? null) ?? 0.0;
|
||||
$syrupRcvr = module_numeric($value['Syrup RCVR'] ?? null) ?? 0.0;
|
||||
$totalSyrup = ($syrupOverflow * 0.82569) + ($syrupRcvr * 0.17431);
|
||||
|
||||
$tanks = [
|
||||
['label' => 'Juice Tank 1', 'value' => module_numeric($value['Juice Tank1'] ?? null)],
|
||||
['label' => 'Juice Tank 2', 'value' => module_numeric($value['Juice Tank2'] ?? null)],
|
||||
['label' => 'Syrup Receiver', 'value' => module_numeric($value['Syrup RCVR'] ?? null)],
|
||||
['label' => 'Syrup Overflow', 'value' => module_numeric($value['Syrup Overflow Lvl'] ?? null)],
|
||||
['label' => 'Total Syrup', 'value' => module_numeric($totalSyrup)],
|
||||
['label' => 'A1 Receiver', 'value' => module_numeric($value['A1 RCVR'] ?? null)],
|
||||
['label' => 'A1 Overflow', 'value' => module_numeric($value['A1 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'A2 Receiver', 'value' => module_numeric($value['A2 RCVR'] ?? null)],
|
||||
['label' => 'A2 Overflow', 'value' => module_numeric($value['A2 Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'B Receiver', 'value' => module_numeric($value['B RCVR'] ?? null)],
|
||||
['label' => 'B Overflow', 'value' => module_numeric($value['B Molasses Overflow Lvl'] ?? null)],
|
||||
['label' => 'Flash Tank', 'value' => module_numeric($value['FlashTankLVL'] ?? null)],
|
||||
['label' => 'Condensate Water', 'value' => module_numeric($value['CondensateWater'] ?? null)],
|
||||
['label' => 'Sweet Water', 'value' => module_numeric($value['SweetwaterTank'] ?? null)],
|
||||
['label' => 'Cold Water Injection', 'value' => module_numeric($value['Cold Water Injection LVL'] ?? null)],
|
||||
];
|
||||
?>
|
||||
|
||||
<table class="tftable2">
|
||||
<tr>
|
||||
<td width="100%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>TANK LEVELS</i></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tftable3">
|
||||
<section class="module-card module-card--tight">
|
||||
<div class="module-heading">
|
||||
<h2 class="module-heading__title">Tank Levels (Vertical)</h2>
|
||||
<span class="module-heading__meta">Quick scan of tank headspace</span>
|
||||
</div>
|
||||
|
||||
<tr>
|
||||
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Juice Tank1</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">Juice Tank2</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Syrup Rcvr</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">Syrup Overflow</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Total Syrup</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">A1 Rcvr</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A1 Over</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">A2 Rcvr</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A2 Over</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">B Rcvr</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">B Over</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">Flash Tank</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Condens. Water</font></td>
|
||||
<td colspan="" width="6.66%" align="center"><font color="#e0e0e0">Sweet Water</font></td>
|
||||
<td colspan="" width="6.66%" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Cold Water INJ</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['Juice Tank1']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['Juice Tank1']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['Juice Tank2']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['Juice Tank2']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['Syrup RCVR']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['Syrup RCVR']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['Syrup Overflow Lvl']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['Syrup Overflow Lvl']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo round(($value['Syrup Overflow Lvl']*.82569)+($value['Syrup RCVR']*.17431),0); ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['A1 RCVR']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['A1 RCVR']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['A1 Molasses Overflow Lvl']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['A1 Molasses Overflow Lvl']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['A2 RCVR']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['A2 RCVR']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['A2 Molasses Overflow Lvl']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['A2 Molasses Overflow Lvl']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['B RCVR']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['B RCVR']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['B Molasses Overflow Lvl']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['B Molasses Overflow Lvl']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['FlashTankLVL']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['FlashTankLVL']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['CondensateWater']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['CondensateWater']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['SweetwaterTank']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['SweetwaterTank']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="6.66" align="left">
|
||||
<div class="barcontainer">
|
||||
<div class="bar" style="height:<?php echo $value['Cold Water Injection LVL']; ?>%">
|
||||
<div class="bartext"><font color="white"><?php echo $value['Cold Water Injection LVL']; ?>%</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
?>
|
||||
<div class="module-vertical-grid">
|
||||
<?php foreach ($tanks as $tank) : ?>
|
||||
<?php $percent = module_clamp_percent($tank['value']); ?>
|
||||
<div class="module-vertical">
|
||||
<div class="module-vertical__bar">
|
||||
<div class="module-vertical__fill" style="height: <?php echo number_format($percent, 2); ?>%;"></div>
|
||||
</div>
|
||||
<div class="module-vertical__value"><?php echo module_number($tank['value'], 0); ?>%</div>
|
||||
<div class="module-vertical__label"><?php echo module_html($tank['label']); ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
$host="192.168.0.16";
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
?>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
$host="192.168.0.2";
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
|
||||
$con = mysqli_connect($host ,$username, $password, $database);
|
||||
@mysqli_select_db($con, $database) or die( "Unable to select database");
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
$host="192.168.0.10";
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
?>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
$host="192.168.0.16";
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$con=mysqli_connect('192.168.0.10', 'corey', '41945549', 'controls');
|
||||
$query="SELECT ID, Name, ROUND(Value, 0) AS Value, ROUND(Value, 1) AS RoundedValue1, ROUND(Value, 2) AS RoundedValue, Timestamp FROM items ORDER BY ID ASC";
|
||||
$result=mysqli_query($con, $query);
|
||||
|
||||
mysqli_close($con);
|
||||
|
||||
while ($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) {
|
||||
$value[$row['Name']] = $row['Value'];
|
||||
$rounded[$row['Name']] = $row['RoundedValue'];
|
||||
$time[$row['Name']] = $row['Timestamp'];
|
||||
$ID[$row['ID']] = $row['Value'];
|
||||
$roundedid[$row['ID']] = $row['RoundedValue'];
|
||||
$rounded1[$row['ID']] = $row['RoundedValue1'];
|
||||
$rounded1[$row['Name']] = $row['RoundedValue1'];
|
||||
}
|
||||
?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
$con=mysqli_connect('192.168.0.10', 'corey', '41945549', 'controls');
|
||||
$query="SELECT ID, Name, ROUND(Value, 2) AS Value, Timestamp FROM items ORDER BY ID ASC";
|
||||
$result=mysqli_query($con, $query);
|
||||
|
||||
mysqli_close($con);
|
||||
|
||||
while ($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) {
|
||||
$value[$row['Name']] = $row['Value'];
|
||||
$time[$row['Name']] = $row['Timestamp'];
|
||||
$ID[$row['ID']] = $row['Value'];
|
||||
}
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
$con=mysqli_connect('192.168.0.16', 'corey', '41945549', 'controls');
|
||||
$query="SELECT ID, Name, ROUND(Value, 0) AS Value, ROUND(Value, 1) AS RoundedValue1, ROUND(Value, 2) AS RoundedValue, Timestamp FROM items ORDER BY ID ASC";
|
||||
$result=mysqli_query($con, $query);
|
||||
|
||||
mysqli_close($con);
|
||||
|
||||
while ($row=mysqli_fetch_array($result, MYSQLI_ASSOC)) {
|
||||
$value[$row['Name']] = $row['Value'];
|
||||
$rounded[$row['Name']] = $row['RoundedValue'];
|
||||
$time[$row['Name']] = $row['Timestamp'];
|
||||
$ID[$row['ID']] = $row['Value'];
|
||||
$roundedid[$row['ID']] = $row['RoundedValue'];
|
||||
$rounded1[$row['ID']] = $row['RoundedValue1'];
|
||||
$rounded1[$row['Name']] = $row['RoundedValue1'];
|
||||
}
|
||||
?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT DISTINCT record FROM record ORDER BY record DESC LIMIT 1";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$include1=mysqli_fetch_array($result,MYSQLI_ASSOC);
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
|
||||
|
||||
<?php echo round($include1['record']); ?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT DISTINCT record, timestamp FROM record ORDER BY record DESC LIMIT 1";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$include1=mysqli_fetch_array($result,MYSQLI_ASSOC);
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
|
||||
|
||||
<?php echo date('F, d', strtotime($include1['timestamp'])); ?>
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
$serverName = "CBM2K12\SQLEXPRESS";
|
||||
$uid = "cbmclient";
|
||||
$pwd = "ascbm2k";
|
||||
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
|
||||
|
||||
/* Connect using SQL Server Authentication. */
|
||||
$conn = sqlsrv_connect( $serverName, $connectionInfo);
|
||||
if( $conn === false )
|
||||
{
|
||||
echo "Unable to connect.</br>";
|
||||
die( print_r( sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$sql = "SELECT ROUND (Tons,0) AS Tons FROM LoadData WHERE CropDay = ( SELECT Max(CropDay) FROM LoadData)";
|
||||
|
||||
$stmt = sqlsrv_query( $conn, $sql );
|
||||
if( $stmt === false) {
|
||||
die( print_r( sqlsrv_errors(), true) );
|
||||
}
|
||||
$tonsin = 0;
|
||||
while( $rowtonsin = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
|
||||
{
|
||||
$tonsin += $rowtonsin['Tons'];
|
||||
|
||||
}
|
||||
|
||||
//end
|
||||
|
||||
?>
|
||||
<?php echo $tonsin; ?>
|
||||
<?
|
||||
$db = null;
|
||||
?>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
$servername = "192.168.0.2";
|
||||
$username = "corey";
|
||||
$password = "41945549";
|
||||
$dbname = "controls";
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
$query = "SELECT DISTINCT PREVTONS FROM totaltons";
|
||||
$result=$conn->query($query);
|
||||
$tonsin = 0;
|
||||
if ($result->num_rows > 0) {
|
||||
// output data of each row
|
||||
while($rowtotground = $result->fetch_assoc()) {
|
||||
$tonsin += $rowtotground['PREVTONS'];
|
||||
|
||||
}
|
||||
} else {
|
||||
echo "0 results";
|
||||
}
|
||||
$conn->close();
|
||||
|
||||
?>
|
||||
<?php echo ($tonsin)+0; ?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT AVG(wtonshr) AS rate FROM (SELECT wtonshr FROM milling ORDER BY id DESC LIMIT 900) tbl";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$row3=mysqli_fetch_assoc($result);
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
|
||||
<?php echo round($row3['rate'],0); ?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT AVG(wtonshr) AS rate FROM (SELECT wtonshr FROM milling ORDER BY id DESC LIMIT 600) tbl";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$roww24hravg=mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||
|
||||
mysqli_close($con);
|
||||
|
||||
echo round($roww24hravg['rate'],0)*24;
|
||||
?>
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
error_reporting(E_ERROR);
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
|
||||
mysql_connect('127.0.0.1',$username,$password);
|
||||
@mysql_select_db($database) or die( "Unable to select database");
|
||||
$query = "SELECT (SELECT AVG(wtonshr) FROM milling ORDER BY id DESC LIMIT 600) AS rate, (SELECT avgtcd FROM milling ORDER BY id DESC LIMIT 1) AS eavg";
|
||||
$result=mysql_query($query);
|
||||
|
||||
$num=mysql_numrows($result);
|
||||
|
||||
mysql_close();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$i=0;
|
||||
while ($i < $num) {
|
||||
|
||||
$f1=mysql_result($result,$i,"rate");
|
||||
$f2=mysql_result($result,$i,"eavg");
|
||||
?>
|
||||
|
||||
|
||||
<?php echo round($f1,0)*24; ?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT ((SELECT westtotground FROM westtotalground ORDER BY id DESC LIMIT 1) - (SELECT westtotground FROM westtotalground ORDER BY id DESC LIMIT 899, 1))*4 AS westavg";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$include4=mysqli_fetch_array($result,MYSQLI_ASSOC);
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
|
||||
|
||||
<?php echo round($include4['westavg']); ?>
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
error_reporting(E_ERROR);
|
||||
$username="corey";
|
||||
$password="41945549";
|
||||
$database="controls";
|
||||
|
||||
mysql_connect('127.0.0.1',$username,$password);
|
||||
@mysql_select_db($database) or die( "Unable to select database");
|
||||
$query = "SELECT AVG(wtonshr) AS rate FROM (SELECT wtonshr FROM milling ORDER BY id DESC LIMIT 600) tbl";
|
||||
$result=mysql_query($query);
|
||||
|
||||
$num=mysql_numrows($result);
|
||||
|
||||
mysql_close();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$i=0;
|
||||
while ($i < $num) {
|
||||
|
||||
$f1=mysql_result($result,$i,"rate");
|
||||
?>
|
||||
|
||||
|
||||
<?php echo round($f1,0); ?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
@@ -1,32 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
<title>LASUCA Controls </title>
|
||||
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
|
||||
<script src="js/prototype.js" type="text/javascript"></script>
|
||||
<script src="js/scriptaculous.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
function showHint()
|
||||
{
|
||||
var sid = Math.random();
|
||||
new Ajax.Updater('overview_values', 'data/main.php?sid=' + sid, {asynchronous:true});
|
||||
}
|
||||
function startShowing()
|
||||
{
|
||||
new PeriodicalExecuter(showHint, 1);
|
||||
new PeriodicalExecuter(function(pe) {}, 1);
|
||||
}
|
||||
startShowing();
|
||||
</script>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>LASUCA Controls • Factory Overview</title>
|
||||
<link rel="stylesheet" href="dashboard.css?v=1" />
|
||||
</head>
|
||||
|
||||
<body bgcolor="#000000">
|
||||
<div id='overview_values' name='overview_values'></div>
|
||||
<body>
|
||||
<main class="board-shell">
|
||||
<header class="board-header">
|
||||
<div>
|
||||
<h1 class="board-header__title">LASUCA Controls</h1>
|
||||
<div class="board-header__meta">
|
||||
<span>Factory overview display</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="board-header__meta board-header__status">
|
||||
<span>Local time <time data-board-clock>--</time></span>
|
||||
<span>Last data update <time data-refresh-status>--</time></span>
|
||||
<span
|
||||
class="board-header__error"
|
||||
data-refresh-error
|
||||
aria-hidden="true"
|
||||
></span>
|
||||
</div>
|
||||
</header>
|
||||
<div class="board-content" data-board-root>
|
||||
<div class="board-loader">Loading live data…</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="dashboard.js?v=1" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||