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