fix1
This commit is contained in:
21
main.php
21
main.php
@@ -1866,17 +1866,26 @@ elseif ($service === 'powerapi') {
|
|||||||
if (isset($_GET['county'])) {
|
if (isset($_GET['county'])) {
|
||||||
try {
|
try {
|
||||||
$query = "
|
$query = "
|
||||||
SELECT DISTINCT ON (county, state)
|
WITH latest_update AS (
|
||||||
|
SELECT MAX(update) as max_update FROM countyoutages
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
county,
|
county,
|
||||||
state,
|
state,
|
||||||
SUM(outages) as outage,
|
SUM(outages) as outage,
|
||||||
update as time,
|
MAX(update) as time,
|
||||||
SUM(served) as served,
|
SUM(served) as served,
|
||||||
ROUND(CAST((SUM(outages)::FLOAT / SUM(served)) * 100 AS NUMERIC), 2) as perout
|
ROUND(
|
||||||
|
CASE
|
||||||
|
WHEN SUM(served) > 0 THEN (SUM(outages)::FLOAT / SUM(served)) * 100
|
||||||
|
ELSE 0
|
||||||
|
END::NUMERIC, 2
|
||||||
|
) as perout
|
||||||
FROM countyoutages
|
FROM countyoutages
|
||||||
WHERE update = (SELECT MAX(update) FROM countyoutages)
|
JOIN latest_update ON countyoutages.update = latest_update.max_update
|
||||||
AND cwa = $1
|
WHERE cwa = $1
|
||||||
GROUP BY county, state, update
|
GROUP BY county, state
|
||||||
|
ORDER BY county, state;
|
||||||
";
|
";
|
||||||
|
|
||||||
$result = pg_query_params($dbconn, $query, ['RLX']);
|
$result = pg_query_params($dbconn, $query, ['RLX']);
|
||||||
|
|||||||
35
youtube.html
35
youtube.html
@@ -1,35 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
overflow-y: hidden;
|
|
||||||
overflow-x: hidden;
|
|
||||||
border: 0;
|
|
||||||
padding:0px;
|
|
||||||
margin:0px;
|
|
||||||
}
|
|
||||||
iframe{
|
|
||||||
display: block; /* iframes are inline by default */
|
|
||||||
height: 100vh; /* Set height to 100% of the viewport height */
|
|
||||||
width: 100vw; /* Set width to 100% of the viewport width */
|
|
||||||
border: 0; /* Remove default border */
|
|
||||||
padding:0px;
|
|
||||||
margin:0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<script>
|
|
||||||
setTimeout(function(){
|
|
||||||
window.location.reload(1);
|
|
||||||
}, 30000*60);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<iframe src="https://www.youtube.com/embed/PRB70sO5MZM?autoplay=1&mute=1" title="YouTube video player" frameborder="0" marginheight="0" marginwidth="0" allow="autoplay; clipboard-write; encrypted-media; web-share" allowfullscreen></iframe>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in New Issue
Block a user