execute.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. Doo::loadCore('db/DooModel');
  3. class execute extends DooModel {
  4. public $eid;
  5. public $description;
  6. public $staff;
  7. public $mold;
  8. public $_table = 'CLD_execute';
  9. public $_primarykey = 'eid';
  10. public $_fields = array('eid', 'description', 'staff','mold');
  11. /**
  12. * 是否有查看日常收支的权限
  13. */
  14. function isPaymentsShow($sid){
  15. $list = $this->find ( array (
  16. 'where' => '(staff like \'%["' . $sid . '%\' ) and mold="日常收支"',
  17. 'asArray' => true
  18. ) );
  19. if (empty($list)){
  20. return false;
  21. }else {
  22. return true;
  23. }
  24. }
  25. /*
  26. function getClientByCid($cid){
  27. $sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid) where a.cid= '".$cid."' " ;
  28. $query = Doo::db ()->query ( $sql );
  29. $result = $query->fetch ();
  30. return $result;
  31. }
  32. public function getProjectByIdList($projectid){
  33. return $this->find ( array ('where' => "pid= '".$projectid."'", 'asArray' => TRUE ) );
  34. }
  35. */
  36. }
  37. ?>