Пример #1
0
 public function actionDelFbAttach()
 {
     $feedId = intval(EnvUtil::getRequest("feedid"));
     $attachId = intval(EnvUtil::getRequest("aid"));
     $feed = FlowRunfeedback::model()->fetchByAttributes(array("feedid" => $feedId, "uid" => $this->uid));
     if ($feed) {
         $aids = explode(",", $feed["attachmentid"]);
         foreach ($aids as $i => &$aid) {
             if ($aid == $attachId) {
                 unset($aids[$i]);
                 break;
             }
         }
         FlowRunfeedback::model()->modify($feedId, array("attachmentid" => implode(",", $aids)));
         AttachUtil::delAttach($attachId);
         $this->ajaxReturn(array("isSuccess" => true));
     }
     $this->ajaxReturn(array("isSuccess" => false));
 }
Пример #2
0
 protected function isFeedBackSigned()
 {
     return FlowRunfeedback::model()->getHasSignAccess($this->uid, $this->processid, $this->uid);
 }
Пример #3
0
 protected function getAllSignByType($type, $con = "")
 {
     if ($type == 1) {
         $extra = $con ? " AND flowprocess = '{$con}'" : "";
     } else {
         $extra = $con ? " AND processid = '{$con}'" : "";
     }
     $criteria = array("select" => "*", "condition" => sprintf("runid = %d %s", $this->run->runid, $extra), "order" => "processid,edittime");
     return FlowRunfeedback::model()->fetchAll($criteria);
 }