コード例 #1
0
 public function dealEvaluation($request, $response)
 {
     /*{{{*/
     $this->privilegeManagement();
     //mark是标记,remark是备注
     $feedbackId = $request->id;
     $mark = $request->mark;
     $status = $request->status;
     $remark = $request->remark;
     $remark = XString::convertToGbk($remark);
     if (empty($remark)) {
         $remark = "";
     }
     UserFeedbackClient::getInstance()->dealEvaluation($feedbackId, $mark, $status, $remark, $this->curInspector->id);
     echo json_encode(array('success' => 1));
     return self::DIRECT_OUTPUT;
 }
コード例 #2
0
    public function sendSuggestion($userId, $suggestion, $tel, $email, $name, $os='',$v,$app, $from='')//_s
    {/*{{{*/
        $user = DAL::get()->find('user', $userId);
        if ($user->isNull())
        {
            $userId = 0;
        }

        $tmp = UserClient::getInstance()->checkProfanity(strip_tags($suggestion));
        $suggestion= $tmp['CONTENT'];
        $content = "";
        if(strtolower($app) == 'doctorhd')
        {
               $os = 'ipad';
        } 
        $content .= "来自".$os."(".$v.")的用户发送了一条意见或建议, 内容如下:\n";
        $content .= "----------------------------------------------------------------------------\n";
        $content .= "{$suggestion}\n\n";
        $content .= "电话: {$tel}\n";
        $content .= "E-Mail: {$email}\n";
        $content .= "姓名: {$name}\n";
        $content .= $from == 'intention' ? "来源:intention\n" : "";
        $content .= "----------------------------------------------------------------------------\n";
        $content .= "发送时间: ".date("y-m-d H:i");
        if ($from == 'intention')
        {
            $result = UserFeedbackClient::getInstance()->addOtherEvaluation($content, $userId);
        }
        else 
        {
            $result = UserClient::getInstance()->addUserAdvice('意见建议', $content, $userId);
        }
        if ($result <= 0)
        {
            $this->setErrorCode(114);
            return 0;
        }
        $this->content = array('id' => $result);
    }/*}}}*/