本文整理汇总了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;
}
示例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"] . "&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"] . "&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;
}
示例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);
示例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 = '';