piler/webui/model/stat/counter.php
2015-05-22 11:37:08 +02:00

28 lines
508 B
PHP

<?php
class ModelStatCounter extends Model {
public function get_counters(){
$counter = array();
$asize = $ssize = 0;
$query = $this->db->query("SELECT * FROM " . TABLE_COUNTER);
if($query->num_rows == 1) {
$asize = $query->row['size'];
$ssize = $query->row['stored_size'];
unset($query->row['size']);
unset($query->row['stored_size']);
$counter = $query->row;
}
return array ($asize, $ssize, $counter);
}
}
?>