本文整理汇总了PHP中cache::fromWP方法的典型用法代码示例。如果您正苦于以下问题:PHP cache::fromWP方法的具体用法?PHP cache::fromWP怎么用?PHP cache::fromWP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cache
的用法示例。
在下文中一共展示了cache::fromWP方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sql_fetch_assoc
$rCoord = sql_fetch_assoc($rsCoords);
sql_free_result($rsCoords);
if ($rCoord !== false) {
$nGMInitLat = $rCoord['gmLat'];
$nGMInitLon = $rCoord['gmLon'];
$nGMInitZoom = $rCoord['gmZoom'];
} else {
// europe is the last fallback
$nGMInitLat = 52.74959372674114;
$nGMInitLon = 10.01953125;
$nGMInitZoom = 4;
}
}
$sGMInitWaypoint = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
if ($sGMInitWaypoint != '') {
$cache = cache::fromWP($sGMInitWaypoint);
if ($cache == null) {
$sGMInitWaypoint = '';
} else {
if ($cache->allowView()) {
$nGMInitLon = $cache->getLongitude();
$nGMInitLat = $cache->getLatitude();
$nGMInitZoom = -1;
$bGMInitCookiePos = false;
} else {
$sGMInitWaypoint = '';
}
}
}
$nUserLon = 0;
$nUserLat = 0;
示例2: header
$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 ';';
echo '"' . mb_ereg_replace('"', '\\"', $cache->getName()) . '"';
echo ';';
echo '"' . mb_ereg_replace('"', '\\"', $cache->getUsername()) . '"';
echo ';';
示例3: addCacheByWP
function addCacheByWP($wp)
{
global $translate;
$cache = cache::fromWP($wp);
if (!is_object($cache)) {
return false;
} else {
return $this->addCache($cache);
}
}
示例4: isset
$tpl->add_body_unload('GUnload()');
// process start params
$gm_initcookiepos = true;
if (isset($_REQUEST['lat']) && isset($_REQUEST['lon']) && isset($_REQUEST['zoom'])) {
$gm_initlat = $_REQUEST['lat'];
$gm_initlon = $_REQUEST['lon'];
$gm_initzoom = $_REQUEST['zoom'];
$gm_initcookiepos = false;
} else {
$gm_initlat = 51;
$gm_initlon = 10;
$gm_initzoom = 6;
}
$gm_initwp = isset($_REQUEST['wp']) ? $_REQUEST['wp'] : '';
if ($gm_initwp != '') {
$cache = cache::fromWP($gm_initwp);
if ($cache == null) {
$gm_initwp = '';
} else {
if ($cache->allowView()) {
$gm_initlon = $cache->getLongitude();
$gm_initlat = $cache->getLatitude();
$gm_initzoom = 13;
$gm_initcookiepos = false;
} else {
$gm_initwp = '';
}
}
}
$tpl->assign('gm_initlon', $gm_initlon);
$tpl->assign('gm_initlat', $gm_initlat);