当前位置: 首页>>代码示例>>PHP>>正文


PHP cache::fromWP方法代码示例

本文整理汇总了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;
开发者ID:PaulinaKowalczuk,项目名称:oc-server3,代码行数:31,代码来源:map2.php

示例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 ';';
开发者ID:kirstenko,项目名称:oc-server3,代码行数:31,代码来源:cache.php

示例3: addCacheByWP

 function addCacheByWP($wp)
 {
     global $translate;
     $cache = cache::fromWP($wp);
     if (!is_object($cache)) {
         return false;
     } else {
         return $this->addCache($cache);
     }
 }
开发者ID:4Vs,项目名称:oc-server3,代码行数:10,代码来源:cachelist.class.php

示例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);
开发者ID:RH-Code,项目名称:opencaching,代码行数:31,代码来源:map.php


注:本文中的cache::fromWP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。