piler/webui/model/stat/counter.php

28 lines
508 B
PHP
Raw Permalink Normal View History

2012-02-08 23:14:28 +01:00
<?php
class ModelStatCounter extends Model {
2012-06-22 15:22:02 +02:00
public function get_counters(){
2012-02-08 23:14:28 +01:00
$counter = array();
2015-05-22 11:37:08 +02:00
$asize = $ssize = 0;
2012-02-08 23:14:28 +01:00
$query = $this->db->query("SELECT * FROM " . TABLE_COUNTER);
if($query->num_rows == 1) {
2013-02-16 12:51:43 +01:00
$asize = $query->row['size'];
2014-05-05 16:00:33 +02:00
$ssize = $query->row['stored_size'];
2013-02-16 12:51:43 +01:00
2012-02-10 14:35:07 +01:00
unset($query->row['size']);
2014-05-05 16:00:33 +02:00
unset($query->row['stored_size']);
2012-02-10 14:35:07 +01:00
2012-02-08 23:14:28 +01:00
$counter = $query->row;
}
2014-05-05 16:00:33 +02:00
return array ($asize, $ssize, $counter);
2012-02-08 23:14:28 +01:00
}
}
?>