本文整理汇总了PHP中cache::fromUUID方法的典型用法代码示例。如果您正苦于以下问题:PHP cache::fromUUID方法的具体用法?PHP cache::fromUUID怎么用?PHP cache::fromUUID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cache
的用法示例。
在下文中一共展示了cache::fromUUID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
require_once './lib2/logic/cachelog.class.php';
$tpl->name = 'picture';
$tpl->menuitem = MNU_CACHES_PICTURE;
$login->verify();
if ($login->userid == 0) {
$tpl->redirect_login();
}
$action = isset($_REQUEST['action']) ? mb_strtolower($_REQUEST['action']) : '';
$redirect = isset($_REQUEST['redirect']) ? $_REQUEST['redirect'] : '';
$redirect = $tpl->checkTarget($redirect, '');
$tpl->assign('action', $action);
$tpl->assign('redirect', $redirect);
if ($action == 'add') {
$picture = new picture();
if (isset($_REQUEST['cacheuuid'])) {
$cache = cache::fromUUID($_REQUEST['cacheuuid']);
if ($cache === null) {
$tpl->error(ERROR_CACHE_NOT_EXISTS);
}
if ($cache->allowEdit() == false) {
$tpl->error(ERROR_NO_ACCESS);
}
$picture->setObjectId($cache->getCacheId());
$picture->setObjectType(OBJECT_CACHE);
$cache = null;
} else {
if (isset($_REQUEST['loguuid'])) {
$cachelog = cachelog::fromUUID($_REQUEST['loguuid']);
if ($cachelog === null) {
$tpl->error(ERROR_CACHELOG_NOT_EXISTS);
}
示例2: header
*
* Unicode Reminder メモ
***************************************************************************/
//prepare the templates and include all neccessary
$opt['rootpath'] = '../../';
require_once $opt['rootpath'] . 'lib2/web.inc.php';
require_once $opt['rootpath'] . 'lib2/logic/cache.class.php';
header('Content-type: text/html; charset=utf-8');
$cache = null;
if (isset($_REQUEST['cacheid'])) {
$cacheid = $_REQUEST['cacheid'] + 0;
$cache = new cache($cacheid);
} else {
if (isset($_REQUEST['uuid'])) {
$uuid = $_REQUEST['uuid'];
$cache = cache::fromUUID($uuid);
} else {
if (isset($_REQUEST['wp'])) {
$wp = $_REQUEST['wp'];
$cache = cache::fromWP($wp);
}
}
}
if ($cache === null) {
echo '0';
} else {
if (!$cache->isPublic()) {
echo '0';
} else {
echo $cache->getCacheId();
echo ';';