当前位置: 首页>>代码示例>>PHP>>正文


PHP func::decode方法代码示例

本文整理汇总了PHP中func::decode方法的典型用法代码示例。如果您正苦于以下问题:PHP func::decode方法的具体用法?PHP func::decode怎么用?PHP func::decode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在func的用法示例。


在下文中一共展示了func::decode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php
	define('ROOT', '..');
	include ROOT . '/lib/include.php';

	$searchType = 'group';
	$searchKeyword = func::decode($accessInfo['action']);
	if(!empty($accessInfo['value'])) $searchExtraValue = $accessInfo['value'];

	include ROOT . '/lib/begin.php';

	// 글 목록

	$customQuery = $event->on('Query.feedItems', '');

	$pageCount = $skinConfig->postList; // 페이지갯수
	list($posts, $totalFeedItems) = FeedItem::getFeedItems($searchType, $searchKeyword, $searchExtraValue, $page, $pageCount, false, 0, $customQuery);
	$paging = Func::makePaging($page, $pageCount, $totalFeedItems);
	
	$group = Group::getByName($searchKeyword);
	$groupCategories = GroupCategory::getList($group['id']);
	
	if(count($groupCategories)>0) {
		$src_group = $skin->cutSkinTag('group_category');
		$groups = Group::getList();
		if(count($groups) > 0) {
			$sp_group = "<ul>\n";
				foreach($groupCategories as $groupCategory) {
					$sp_group .= "<li><a href=\"{$servicePath}/group/".func::encode($group['name'])."/".func::encode($groupCategory['name'])."\">{$groupCategory['name']}</a>\n";
				}
			$sp_group .= "</ul>\n";
开发者ID:ncloud,项目名称:bloglounge,代码行数:30,代码来源:group.php

示例2: if

<?php
	define('ROOT', '..');
	include ROOT . '/lib/include.php';

	// 글 목록

	$searchType = $accessInfo['action'];
	$searchKeyword = func::decode($accessInfo['value']);

	if ($searchType=='tag') {
    } else if ($searchType=='blogURL') { // 블로그주소			
		if(!empty($searchKeyword)) {
			$searchFeedId = Feed::blogURL2Id('http://'.str_replace('http://', '', $searchKeyword));
			$searchExtraValue = $searchFeedId;
		}
	} else if($searchType=='archive') { // 날짜..
		$targetDate = (!Validator::is_digit($searchKeyword) || strlen($searchKeyword) != 8) ? date("Ymd") : $searchKeyword;
		$tDate = substr($targetDate, 0, 4).'-'.substr($targetDate, 4, 2).'-'.substr($targetDate, 6, 2);
		$tStart = strtotime("$tDate 00:00:00");

		if(isset($accessInfo['pass'][0]) && Validator::is_digit($accessInfo['pass'][0]) && strlen($accessInfo['pass'][0]) == 8) {
			$targetDate = $accessInfo['pass'][0];
			$tDate = substr($targetDate, 0, 4).'-'.substr($targetDate, 4, 2).'-'.substr($targetDate, 6, 2);
			$tEnd = strtotime("$tDate 00:00:00");
			$searchExtraValue = array('start'=>$tStart,'end'=>$tEnd);
		} else {
			$searchExtraValue = $tStart;
		}
	}
	
	
开发者ID:ncloud,项目名称:bloglounge,代码行数:29,代码来源:search.php

示例3: substr

<?php
	define('ROOT', '..');
	include ROOT . '/lib/include.php';

	// 글 목록
	$action = func::decode($accessInfo['action']);

	$searchType = 'archive';
	
	if((Validator::is_digit($action) && strlen($action) == 8)) {
		$targetDate = $searchKeyword = $action;
		$tDate = substr($targetDate, 0, 4).'-'.substr($targetDate, 4, 2).'-'.substr($targetDate, 6, 2);
		$tStart = strtotime("$tDate 00:00:00");
		
		if(isset($accessInfo['value']) && Validator::is_digit($accessInfo['value']) && strlen($accessInfo['value']) == 8) {
			$targetDate = $accessInfo['value'];
			$tDate = substr($targetDate, 0, 4).'-'.substr($targetDate, 4, 2).'-'.substr($targetDate, 6, 2);
			$tEnd = strtotime("$tDate 00:00:00");
			$searchExtraValue = array('start'=>$tStart,'end'=>$tEnd);
		} else {
			$searchExtraValue = $tStart;
		}
	} else {
		switch($action) {
			case 'yesterday':		
				$searchKeyword = date('Ymd',mktime()-86400);
				$searchExtraValue = strtotime( $searchKeyword . ' 00:00:00');
			break;
			case 'today':	
			default:
				$searchKeyword = date('Ymd',mktime());
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:day.php


注:本文中的func::decode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。