コード例 #1
0
 * @license    http://www.tinybrick.com/license/commercial-extension
 */
// To enable debugging, uncomment the following
//error_reporting(E_ALL | E_STRICT);
//ini_set('display_errors', 1);
// require_once 'app/Mage.php';
// Mage::setIsDeveloperMode(true);
//ini_set('display_errors', 1);
error_reporting(0);
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MJ12bot') || strpos($_SERVER['HTTP_USER_AGENT'], 'bingbot') || strpos($_SERVER['HTTP_USER_AGENT'], 'AhrefsBot')) {
    exit;
}
if (isset($_GET['viewall'])) {
    unset($_GET['viewall']);
}
if (!PageCache::doYourThing()) {
    include_once 'index.php';
}
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
    $_SERVER['HTTPS'] = 'on';
    $_SERVER['SERVER_PORT'] = 443;
}
class PageCache
{
    private static $isCookieNew = true;
    private static $sessionType = '';
    private static $rawSession = '';
    private static $session = '';
    private static $sessionConfig = array();
    private static $cacheEngine = '';
    private static $cacheData = array();