officicModel.php 752 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. //公文查阅
  3. class agent_officicClassModel extends agentModel
  4. {
  5. protected $showuface = false; //不显示人员头像
  6. public function gettotal()
  7. {
  8. $stotal = $this->getwdtotal($this->adminid);
  9. $titles = '';
  10. return array('stotal'=>$stotal,'titles'=> $titles);
  11. }
  12. //未读统计
  13. private function getwdtotal($uid)
  14. {
  15. $ydid = m('log')->getread('official', $uid);
  16. $where = "id not in($ydid) and `status`=1";
  17. $meswh = m('admin')->getjoinstr('receid', $uid, 0, 1);
  18. $where .= $meswh;
  19. $stotal = m('official')->rows($where);
  20. return $stotal;
  21. }
  22. //菜单未读数组
  23. protected function agenttotals($uid)
  24. {
  25. $a = array(
  26. 'mywcy' => $this->getwdtotal($uid)
  27. );
  28. return $a;
  29. }
  30. }
粤ICP备19079148号