X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/3a48d89e76fd2ab87dabf08632474c529cf77ad4..bc7cbb4617f28ec33b6ff0e81e7d48a5b00310a6:/web/graphs.php
diff --git a/web/graphs.php b/web/graphs.php
new file mode 100644
index 0000000..850d9d7
--- /dev/null
+++ b/web/graphs.php
@@ -0,0 +1,78 @@
+
+
+
+
+
+ WeatherMon (ÐоÑледние 24 ÑаÑа)
+
+
+
+
+ false)))) {
+ die($err);
+ }
+
+$db -> exec('SET CHARACTER SET utf8');
+
+if (!$local_net) {
+
+ $filter = ' and s.is_public=1';
+
+} else {
+
+ $filter = '';
+
+}
+
+$q = $db -> prepare(
+ 'select
+ distinct v.sensor_id,s.s_description,p.id as param_id,p.st_description
+ from
+ sensor_values v,st_parameters p,sensors s
+ where
+ v.timestamp>adddate(now(), -1)
+ and v.sensor_id=s.id
+ and s.st_id=p.st_id
+ and p.id>=0'.$filter.'
+ order by s_description,st_description'
+ );
+$q -> execute();
+
+while ($row = $q -> fetch(PDO::FETCH_ASSOC)) {
+
+ echo ''.$row['s_description'].'/'.$row['st_description'].'
';
+?>
+
+
+ÐÑÑ
ивнÑе даннÑе
+
+ÐаÑÑÑойки
+
+
\ No newline at end of file