1
0

waichuModel.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. class flow_waichuClassModel extends flowModel
  3. {
  4. protected function flowgetfields($lx)
  5. {
  6. $arr['location'] = '此时间定位打卡';
  7. return $arr;
  8. }
  9. public function flowrsreplace($rs, $lx=0)
  10. {
  11. if($lx==1){
  12. $s = $this->getdklocation($rs['outtime'], $rs['intime']);
  13. $rs['location'] = $s;
  14. }
  15. return $rs;
  16. }
  17. private function getdklocation($sdt,$edt)
  18. {
  19. $rows = $this->db->getrows('[Q]location',"`uid`='$this->uid' and `type`=0 and `optdt`>='$sdt' and `optdt`<='$edt'",'location_x,location_y,scale,label,`precision`,`optdt`,`id`');
  20. $s = '';
  21. foreach($rows as $k=>$rs){
  22. $s.=''.($k+1).'.'.$rs['label'].'('.$rs['optdt'].') <a href="javascript:;" onclick="js.locationshow('.$rs['id'].')" class="zhu">查看</a><br>';
  23. }
  24. return $s;
  25. }
  26. protected function flowbillwhere($uid, $lx)
  27. {
  28. $month = $this->rock->post('month');
  29. $where = '';
  30. if($month!=''){
  31. $where.=" and `outtime` like '$month%'";
  32. }
  33. return array(
  34. 'where' => $where
  35. );
  36. }
  37. }
粤ICP备19079148号