private function getSitemapSourceUrl($spaceUserName,$sourceId,$sourceType)
 {/*{{{*/
     switch ($sourceType)
     {
         case Space::SPACE_SITEMAP_SOURCE_CASE :
             $url = Thread::getStaticUrl($spaceUserName,$sourceId);
             break;
         case Space::SPACE_SITEMAP_SOURCE_ARTICLE :
             $url = Article::buildUrl($spaceUserName,$sourceId);
             break;
         case Space::SPACE_SITEMAP_SOURCE_FLOW :
             $url = DoctorPatientRef::getStaticUrl($spaceUserName,$sourceId);
             break;
         default:
             $url = '';
     }
     return $url;
 }/*}}}*/
	public function sosPost($request, $response)
	{
		$tel = $request->tel;
		$time = $request->time;
        $isAjax = $request->isAjax;
		$confirm = $request->confirm;
        if($isAjax)
        {
            $adviceContent = mb_convert_encoding(trim($request->adviceContent),'gbk','utf-8');
            $clientInfo = mb_convert_encoding($request->clientInfo, 'gbk', 'utf-8');
        }
        else
        {
            $adviceContent = trim($request->adviceContent);
            $clientInfo = $request->clientInfo;
        }

        $msg = null;
		
		if( empty($adviceContent) )
		{
            $msg  = '您还没有简要描述您使用好大夫在线所遇到的困难或需要的帮助,请填写后再点击提交';
            if(false == $isAjax)
            {
                MsgHtml::msg($msg, '', array('button' => 'back' ));
                exit;
            }
		}
        else
        {
            $title = "空间求助 (" . date ( "y-m-d H:i" ) . ")";
            $content = "";
            $content .= "来自 " . XIpLocation::getLocationArea() . '[' . XIpLocation::getIp() . "] 的用户发送了一条空间求助, 内容如下:\n";
            $content .= $adviceContent ."\n";
            if (! $this->_newSpace->isConfirmed()) {
                $content .= "<font color=red>注意: 该用户未认证(" . date ( 'y-m-d H:i:s', time() ) . "之前)!!!</font>\n";
            }
            $content .= "所提交的空间: <a href=\"http://" . $this->_newSpace->userName . ".haodf.com\" target=\"_blank\">" . $this->_newSpace->host->name . "</a>\n";
            if($request->id)
            {
                if($request->type == DoctorPatientRef::DOCTORPATIENTREF_TYPE) 
                {
                    $sourceUrl = DoctorPatientRef::getStaticUrl($this->_newSpace->userName, $request->id);
                    $content .= "<a href= '{$sourceUrl}'  target='_blank' > 来源链接 </a>\n";
                }
                else if($request->type == DoctorPatientRef::THREAD_TYPE) 
                {
                    $sourceUrl = Thread::getStaticUrl($this->_newSpace->userName, $request->id);
                    $content .= "<a href= '{$sourceUrl}'  target='_blank' > 来源链接 </a>\n";
                }
            }
            $content .= "----------------------------------------------------------------------------\n";
            $content .= "联系电话: " . $tel . "\n";

            if ($time) {
                $content .= "方便联系的时间: " . $time . "\n";
            }
            $content .= "----------------------------------------------------------------------------\n";
            $content .= "发送时间: " . date("Y-m-d H:i");
            $content .= "----------------------------------------------------------------------------\n";
            $content .= "用户端信息: \n" . $clientInfo;
            UserClient::getInstance()->addUserAdvice('空间求助', $content, $this->_newSpace->user->id);

            $msg = '信息发送成功,感谢对好大夫在线的支持,管理员稍后为您处理遇到的问题,处理后我们会发送站内信通知您,请继续浏览网站信息';
            if(false == $isAjax)
            {
                MsgHtml::msg($msg, $this->_newSpace->getUrl());
            }
        }
        $response->msg = $msg;
	}