diff --git a/application/default/views/scripts/visual/index.phtml b/application/default/views/scripts/visual/index.phtml index 9282928f..1e3e474b 100644 --- a/application/default/views/scripts/visual/index.phtml +++ b/application/default/views/scripts/visual/index.phtml @@ -16,19 +16,28 @@ $this->breadcrumb()->setSeparator(' > ');
diff --git a/application/module/Westdc/Visual/Reader/Sc2009.php b/application/module/Westdc/Visual/Reader/Sc2009.php new file mode 100644 index 00000000..3cd9c522 --- /dev/null +++ b/application/module/Westdc/Visual/Reader/Sc2009.php @@ -0,0 +1,71 @@ +subset)) + { + $this->subset = "avg_sand"; + return; + } + + switch($this->subset){ + case "avg": + $this->subset = "avg_sand"; + break; + case "max" : + $this->subset = "max_sand"; + break; + case "min" : + $this->subset = "min_sand"; + break; + } + + return; + } + + public function getData() + { + $sql = "SELECT * FROM data_sands2009 + ORDER BY + year ASC, + month ASC + "; + + $rs = $this->db->query($sql); + return $rs; + + } + + public function outPut() + { + $this->switchDataset(); + + $rs = $this->getData(); + + $data = array(); + + while($row = $rs->fetch()) + { + $row['utctime'] = $this->utcMsTime(mktime(0,0,0,$row['month'],0,$row['year'])); + $data[] = array($row['utctime'],$row[$this->subset]); + } + + return $data; + } + +} \ No newline at end of file