public function checkAuth($userId,$modName) { $users = new System_Models_UserMapper(); $groupId = $users->getGroupId($userId); $mns = new System_Models_ModnameMapper(); $modId = $mns->getModId($modName); $result = $this->getDbtable()->checkAuth($groupId,$modId); $auth = $result['modPriv']; return $auth; }
public function find($id,System_Models_Improvement $improvement) { $resultSet = $this->getDbTable()->find($id); if (0 == count($resultSet)) { return; } $row = $resultSet->current(); $improvement->setId($row->imprId) ->setTypeId($row->typeId) ->setUserId($row->userId) ->setPriority($row->priority) ->setDescription($row->description) ->setITime($row->iTime) ->setModId($row->modId) ->setStatus($row->status); $status = $improvement->getStatus(); if($status == 0) { $improvement->setStatusCh('等待处理'); } elseif($status == 1) { $improvement->setStatusCh('处理中'); } elseif($status == 2) { $improvement->setStatusCh('已解决'); } elseif($status == 3) { $improvement->setStatusCh('暂时不能解决'); } $users = new System_Models_UserMapper(); $contactId = $users->getContactId($improvement->getUserId()); $contacts = new Employee_Models_ContactMapper(); $contactName = $contacts->findContactName($contactId); $modnames = new System_Models_ModnameMapper(); $modNameCh = $modnames->getModNameCh($improvement->getModId()); $imptypes = new System_Models_ImptypeMapper(); $typeName = $imptypes->getTypeName($improvement->getTypeId()); $improvement->setContactId($contactId); $improvement->setContactName($contactName); $improvement->setTypeName($typeName); $improvement->setModNameCh($modNameCh); }
public function populatemodnamechddAction() { $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $modnames = new System_Models_ModnameMapper(); $arrayModNameChs = $modnames->findModNameChs(); $json = Zend_Json::encode($arrayModNameChs); echo $json; }