本文整理匯總了PHP中Thread::getStaticUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Thread::getStaticUrl方法的具體用法?PHP Thread::getStaticUrl怎麽用?PHP Thread::getStaticUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Thread
的用法示例。
在下文中一共展示了Thread::getStaticUrl方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getSitemapSourceUrl
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;
}/*}}}*/
示例2: sosPost
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;
}