flowelementModel.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. //表单元素管理
  3. class flow_flowelementClassModel extends flowModel
  4. {
  5. protected $flowcompanyidfieds = 'none';
  6. public function iseditqx()
  7. {
  8. if($this->adminid==1)return true;
  9. return parent::iseditqx();
  10. }
  11. public function isdeleteqx()
  12. {
  13. if($this->adminid==1)return true;
  14. return parent::isdeleteqx();
  15. }
  16. public function isaligndata()
  17. {
  18. $arr[] = array('value'=>'0','name'=>'居中');
  19. $arr[] = array('value'=>'1','name'=>'居左');
  20. $arr[] = array('value'=>'2','name'=>'居右');
  21. return $arr;
  22. }
  23. public function iseditlxdata()
  24. {
  25. $arr[] = array('value'=>'0','name'=>'不可编辑');
  26. $arr[] = array('value'=>'1','name'=>'所有人');
  27. $arr[] = array('value'=>'2','name'=>'仅管理员');
  28. $arr[] = array('value'=>'3','name'=>'仅admin');
  29. return $arr;
  30. }
  31. public $checkarr = array('islu','isbt','iszs','islb','ispx','issou','isonly','isdr');
  32. public function flowrsreplace($rs,$lx=0)
  33. {
  34. if($rs['iszb']=='0'){
  35. $rs['iszb'] = '<font color=#ff6600>主表</font>';
  36. }else{
  37. $rs['iszb'] = '第'.$rs['iszb'].'个子表';
  38. }
  39. $rs['isalign'] = $this->rock->valtoname($this->isaligndata(), $rs['isalign']);
  40. if($rs['iseditlx']=='0'){
  41. $rs['iseditlx'] = '';
  42. }else{
  43. $rs['iseditlx'] = $this->rock->valtoname($this->iseditlxdata(), $rs['iseditlx']);
  44. }
  45. /*
  46. if($lx==0)foreach($this->checkarr as $fid){
  47. if(isset($rs[$fid])){
  48. if($rs[$fid]=='1'){
  49. $rs[$fid]='√';
  50. }else{
  51. $rs[$fid]='';
  52. }
  53. }
  54. }
  55. */
  56. return $rs;
  57. }
  58. public function flowbillwhere($uid, $lx)
  59. {
  60. $where = 'and 1=2';
  61. $mkid = (int)$this->rock->post('mkid','0');
  62. if($mkid>0)$where='and `mid`='.$mkid.'';
  63. return array(
  64. 'order' => '`iszb`,`sort`',
  65. 'where' => $where
  66. );
  67. }
  68. }
粤ICP备19079148号