vcardModel.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. class flow_vcardClassModel extends flowModel
  3. {
  4. protected function flowbillwhere($uid, $lx)
  5. {
  6. $where = '`uid`='.$uid.'';
  7. $key = $this->rock->post('key');
  8. $gname = $this->rock->post('gname');
  9. if(!isempt($gname))$where.=" and `gname`='$gname'";
  10. if(!isempt($key))$where.=" and (`name` like '%$key%' or `unitname` like '%$key%' or `mobile` like '%$key%' or `gname` = '$key')";
  11. return array(
  12. 'where' => 'and '.$where,
  13. );
  14. }
  15. //替换
  16. public function flowrsreplace($rs, $lx=0)
  17. {
  18. if($lx==2 && $this->rock->ismobile()){
  19. if(!isempt($rs['mobile']))$rs['mobile']='<a onclick="return callPhone(this)" href="tel:'.$rs['mobile'].'">'.$rs['mobile'].'</a>';
  20. if(!isempt($rs['tel']))$rs['tel']='<a onclick="return callPhone(this)" href="tel:'.$rs['tel'].'">'.$rs['tel'].'</a>';
  21. }
  22. return $rs;
  23. }
  24. public function flowdaorutestdata()
  25. {
  26. return array(
  27. 'name' => '关羽',
  28. 'sex' => '男',
  29. 'mobile' => '15812345678',
  30. 'tel' => '0592-123456',
  31. 'unitname' => '蜀国荆州守将',
  32. 'email' => 'guanyu@rockoa.com',
  33. 'gname' => '同事',
  34. 'address' => '荆州市',
  35. );
  36. }
  37. }
粤ICP备19079148号