本文整理汇总了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;
}