人人商城

statistics.table.php 1.1KB

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