本文整理匯總了PHP中helper::safe64decode方法的典型用法代碼示例。如果您正苦於以下問題:PHP helper::safe64decode方法的具體用法?PHP helper::safe64decode怎麽用?PHP helper::safe64decode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類helper
的用法示例。
在下文中一共展示了helper::safe64decode方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
/**
* Visual index
*
* @access public
* @return void
*/
public function index($referer = '')
{
$template = $this->config->template->{$this->device}->name;
$this->loadModel('block')->loadTemplateLang($template);
$this->view->referer = helper::safe64decode($referer);
$this->view->title = $this->lang->visual->common;
$this->view->blocks = $this->lang->block->{$template};
if ($referer == '') {
$this->view->referer = getWebRoot();
}
$this->display();
}
示例2: saveReferer
/**
* Save referer info.
*
* @access public
* @return array
*/
public function saveReferer()
{
if (!$this->get->referer) {
if ($this->session->referer) {
$referer = $this->getRefererByID($this->session->referer);
if (!empty($referer)) {
return $referer;
}
}
return null;
}
$url = helper::safe64decode($this->get->referer);
$refererInDB = $this->dao->select("*")->from(TABLE_STATREFERER)->where('url')->eq($url)->fetch();
if (!empty($refererInDB)) {
$this->session->set('referer', $refererInDB->id);
return $refererInDB;
}
$referer = parse_url($url);
if (isset($this->config->searchEngine->domains[$referer['host']])) {
$searchEngine = $this->config->searchEngine->domains[$referer['host']];
$param = $this->config->searchEngine->params[$searchEngine];
parse_str($referer['query'], $queryInfo);
if (is_array($param)) {
foreach ($param as $paramName) {
if (isset($queryInfo[$paramName])) {
$keywords = $queryInfo[$paramName];
}
}
} else {
$keywords = $queryInfo[$param];
}
$referer['searchEngine'] = $searchEngine;
$referer['keywords'] = $keywords;
}
$referer['domain'] = $referer['host'];
$referer['url'] = $url;
$this->dao->replace(TABLE_STATREFERER)->data($referer, "host,query,path,scheme")->autoCheck()->exec();
$referer['id'] = $this->dao->lastInsertId();
$this->session->set('referer', $referer['id']);
return (object) $referer;
}
示例3: domainTrend
/**
* Domain trend report.
*
* @param string $domain
* @param string $mode
* @param string $begin
* @param string $end
* @access public
* @return void
*/
public function domainTrend($domain, $mode = 'today', $begin = '', $end = '')
{
$domain = helper::safe64decode($domain);
$date = $this->stat->parseDate($mode, $begin, $end);
$begin = $date->begin;
$end = $date->end;
if ($begin < $end) {
$labels = $this->stat->getDayLabels($begin, $end);
}
if ($begin == $end) {
$labels = $this->stat->getHourLabels($begin, false);
}
$this->view->title = $this->lang->stat->domain . ' - ' . $domain;
$this->view->domain = $domain;
$this->view->labels = $labels;
$this->view->mode = $mode;
$this->view->lineChart = $this->stat->getItemLine('domain', $domain, $begin, $end);
$this->view->pieCharts = $this->stat->getItemExtraPie('domain', $domain, $begin, $end);
$this->display();
}