statistics.table.php
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
class StatisticsTable extends We7Table {
protected $stat_fans_table ='stat_fans';
protected $stat_visit_table = 'stat_visit';
public function visitList($params, $type = 'more') {
global $_W;
$this->query->from($this->stat_visit_table);
if (!empty($params['uniacid'])) {
$this->query->where('uniacid', $params['uniacid']);
}
if (!empty($params['date'])) {
$this->query->where('date', $params['date']);
}
if (!empty($params['date >='])) {
$this->query->where('date >=', $params['date >=']);
}
if (!empty($params['date <='])) {
$this->query->where('date <=', $params['date <=']);
}
if (!empty($params['module'])) {
$this->query->where('module', $params['module']);
}
if (!empty($params['type'])) {
$this->query->where('type', $params['type']);
}
if ($type == 'one') {
return $this->query->get();
} else {
return $this->query->getall();
}
}
}