day_k_base.class.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Class Day_k_base
  4. * @author 王刚涛
  5. * 日线数据
  6. */
  7. class Day_k_base {
  8. /***
  9. * @param $attrs
  10. * @return mixed
  11. * @throws Exception
  12. * 添加信息
  13. */
  14. static public function add($attrs,$date=0)
  15. {
  16. if (empty($attrs)) throw new Exception('参数不能为空', 102);
  17. if($date===0)
  18. {
  19. $date=strtotime(date('Ym'));
  20. }
  21. $Table_day_k_base = new Table_day_k_base($date);
  22. $id = $Table_day_k_base->add($attrs);
  23. return $id;
  24. }
  25. /**
  26. * 管理员日志记录列表
  27. *
  28. * @param $page 当前页
  29. * @param $pagesize 每页大小
  30. *
  31. */
  32. static public function getListByPage($page, $pagesize){
  33. $filter = array();
  34. $Table_day_k_base = new Table_day_k_base();
  35. return $Table_day_k_base->getList($filter, 0, $page, $pagesize);
  36. }
  37. //管理员日志总数
  38. static public function getCountAll(){
  39. $filter = array();
  40. $Table_day_k_base = new Table_st_log();
  41. return $Table_day_k_base->getList($filter, 1);
  42. }
  43. }
  44. ?>