public function actionAdd() { if (EnvUtil::submitCheck("formhash")) { $begin = empty($_POST["begindate"]) ? "" : strtotime($_POST["begindate"]); $end = empty($_POST["enddate"]) ? "" : strtotime($_POST["enddate"]); $toId = implode(",", StringUtil::getId($_POST["uid"])); $flowId = intval($_POST["flowid"]); $data = array("flowid" => $flowId, "toid" => $toId, "uid" => $this->uid, "begindate" => $begin, "enddate" => $end, "status" => 1); FlowRule::model()->add($data); $this->redirect($this->createUrl("entrust/index")); } else { $list = WfCommonUtil::getFlowList($this->uid); $this->renderPartial("add", array("flowlist" => $list, "lang" => Ibos::getLangSources())); } }