當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。