當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TikiLib::tiki_unserialize方法代碼示例

本文整理匯總了PHP中TikiLib::tiki_unserialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP TikiLib::tiki_unserialize方法的具體用法?PHP TikiLib::tiki_unserialize怎麽用?PHP TikiLib::tiki_unserialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TikiLib的用法示例。


在下文中一共展示了TikiLib::tiki_unserialize方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

	$cookietab = '1';
}
if (!isset($_REQUEST['printpages']) && !isset($_REQUEST['printstructures'])) {
	$printpages = array();
	$printstructures = array();
	if (isset($_REQUEST["page_ref_id"])) {
		$info = $structlib->s_get_page_info($_REQUEST['page_ref_id']);
		if (!empty($info)) {
			$printstructures[] = $_REQUEST['page_ref_id'];
		}
	} elseif (isset($_REQUEST["page"]) && $tikilib->page_exists($_REQUEST["page"])) {
		$printpages[] = $_REQUEST["page"];
	}
} else {
	$printpages = TikiLib::tiki_unserialize(urldecode($_REQUEST["printpages"]));
	$printstructures = TikiLib::tiki_unserialize(urldecode($_REQUEST['printstructures']));
}
if (isset($_REQUEST["find"])) {
	$find = $_REQUEST["find"];
} else {
	$find = '';
}
$smarty->assign('find', $find);
if (isset($_REQUEST["addpage"])) {
	if (!in_array($_REQUEST["pageName"], $printpages)) {
		foreach ($_REQUEST['pageName'] as $value) {
			$printpages[] = $value;
		}
	}
	$cookietab = 2;
}
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:31,代碼來源:tiki-print_pages.php

示例2: select_banner

 function select_banner($zone, $target = '_blank', $id = '')
 {
     global $prefs, $tikilib;
     // Things to check
     // UseDates and dates
     // Hours
     // weekdays
     // zone
     // maxImpressions and impressions
     if (!empty($zone)) {
         $id = $this->select_banner_id($zone);
     }
     $res = $this->get_banner($id);
     $class = 'banner' . str_replace(' ', '_', $zone);
     $raw = '';
     switch ($res["which"]) {
         case 'useHTML':
             $raw = $res["HTMLData"];
             break;
         case 'useFlash':
             if ($prefs['javascript_enabled'] == 'y') {
                 global $headerlib;
                 include_once 'lib/headerlib.php';
                 $headerlib->add_jsfile('lib/swfobject/swfobject.js');
             }
             $raw = $tikilib->embed_flash(unserialize($res['HTMLData']));
             break;
         case 'useImage':
             $raw = "<div class='banner {$class}'><a target='{$target}' href='banner_click.php?id=" . $res["bannerId"] . "&amp;url=" . urlencode($res["url"]) . "'><img alt='banner' border='0' src=\"banner_image.php?id=" . $res["bannerId"] . "\" /></a></div>";
             break;
         case 'useFixedURL':
             @($fp = fopen($res["fixedURLData"], "r"));
             if ($fp) {
                 $raw = '';
                 while (!feof($fp)) {
                     $raw .= fread($fp, 4096);
                 }
                 fclose($fp);
             }
             break;
         case 'useText':
             $raw = "<a target='{$target}' class='bannertext' href='banner_click.php?id=" . $res["bannerId"] . "&amp;url=" . urlencode($res["url"]) . "'>" . $res["textData"] . "</a>";
             break;
     }
     // Increment banner impressions done in select_banner_id()
     // Now to set view limiting cookie for user
     $cookieName = "banner_{$zone}";
     $views = array();
     if (isset($_COOKIE[$cookieName])) {
         $views = TikiLib::tiki_unserialize($_COOKIE[$cookieName]);
     }
     if ($res['maxUserImpressions'] > 0) {
         $views[$res['bannerId']] = isset($views[$res['bannerId']]) ? $views[$res['bannerId']] + 1 : 1;
         $expire = $res['useDates'] ? $res['toDate'] : $tikilib->now + 60 * 60 * 24 * 90;
         //90 days
         setcookie($cookieName, serialize($views), $expire);
     }
     return $raw;
 }
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:59,代碼來源:bannerlib.php

示例3: get_assign_permissions

}

if (isset($_REQUEST['copy'])) {
	$newPermissions = get_assign_permissions();
	$filter = TikiFilter::get('text');
	$to_copy = array(
					'perms' => $newPermissions->getPermissionArray(),
					'object' => $filter->filter($_REQUEST['objectId']),
					'type' => $filter->filter($_REQUEST['objectType'])
	);
	$_SESSION['perms_clipboard'] = serialize($to_copy);
}

if (!empty($_SESSION['perms_clipboard'])) {
	$perms_clipboard = TikiLib::tiki_unserialize($_SESSION['perms_clipboard']);
	$smarty->assign(
					'perms_clipboard_source',
					$perms_clipboard['type'] . (empty($perms_clipboard['object']) ? '' : ' : ') . $perms_clipboard['object']
	);

	if (isset($_REQUEST['paste'])) {
		$access->check_authenticity(tra('Are you sure you want paste the copied permissions onto this object?'));
		unset($_SESSION['perms_clipboard']);
		
		$set = new Perms_Reflection_PermissionSet;
	
		if ( isset( $perms_clipboard['perms'] ) ) {
			foreach ( $perms_clipboard['perms'] as $group => $gperms ) {
				foreach ( $gperms as $perm ) {
					$set->add($group, $perm);
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:30,代碼來源:tiki-objectpermissions.php

示例4: array

if (!isset($_REQUEST['sendpages'])) {
	$sendpages = array();
} else {
	$sendpages = TikiLib::tiki_unserialize(urldecode($_REQUEST['sendpages']));
}

if (!isset($_REQUEST['sendstructures'])) {
	$sendstructures = array();
} else {
	$sendstructures = TikiLib::tiki_unserialize(urldecode($_REQUEST['sendstructures']));
}

if (!isset($_REQUEST['sendarticles'])) {
	$sendarticles = array();
} else {
	$sendarticles = TikiLib::tiki_unserialize(urldecode($_REQUEST['sendarticles']));
}

$smarty->assign('username', $_REQUEST['username']);
$smarty->assign('site', $_REQUEST['site']);
$smarty->assign('path', $_REQUEST['path']);
$smarty->assign('password', $_REQUEST['password']);

if (isset($_REQUEST['dbg'])) {
	$smarty->assign('dbg', $_REQUEST['dbg']);
}

if (isset($_REQUEST['find'])) {
	$find = $_REQUEST['find'];
} else {
	$find = '';
開發者ID:railfuture,項目名稱:tiki-website,代碼行數:31,代碼來源:tiki-send_objects.php


注:本文中的TikiLib::tiki_unserialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。