Exemplo n.º 1
0
<?php

$bRet = false;
if (isset($aryParam['arg1'], $aryParam['uid'])) {
    if ($aryPear['mobile']->isNonMobile() && 'I' == $aryParam['arg1']) {
        $aryPear['mobile'] = BlockenMobile::singleton('DoCoMo/2.0 ');
        $aryParam['uid'] = substr($aryParam['uid'], 2);
    }
    $bRet = funcExpireMember($aryParam['uid'], $aryPear);
}
if (BLOCKEN_MOBI_OFFCIAL) {
    if ($aryPear['mobile']->isDoCoMo()) {
        if ($bRet) {
            echo "OK\n";
        } else {
            echo "NG\n";
        }
        exit;
    }
}
$objTemplate = loadTemplate();
if ($bRet) {
    $objTemplate->touchBlock('OK');
} else {
    $objTemplate->touchBlock('NG');
}
if (isset($aryParam['_rtn'])) {
    $objTemplate->setVariable('return', $aryParam['_rtn']);
} else {
    $objTemplate->setVariable('return', BLOCKEN_HTTP_URL . BLOCKEN_ROOT_PATH . '/');
}
Exemplo n.º 2
0
$aryPear = array();
$aryParam = $_GET + $_POST;
$aryPear['cookie'] =& new BlockenCookie();
if (BLOCKEN_COOKIE_USE && BLOCKEN_WEB == BLOCKEN_MODE) {
    $aryPear['cookie']->setExpire(BLOCKEN_COOKIE_EXPIRE);
    $aryPear['cookie']->setPath(BLOCKEN_COOKIE_PATH);
    $aryPear['cookie']->setDomain(BLOCKEN_COOKIE_DOMAIN);
    $aryPear['cookie']->setSecure(BLOCKEN_COOKIE_SECURE);
    $aryPear['cookie']->start();
}
$aryPear['db'] =& new BlockenDB();
$aryPear['log'] = BlockenLog::singleton(BLOCKEN_LOG_HANDLER, BLOCKEN_LOG_NAME, BLOCKEN_LOG_IDENT, unserialize(BLOCKEN_LOG_CONF), BLOCKEN_LOG_LEVEL);
$aryPear['session'] =& new BlockenSession();
$aryPear['mobile'] = BlockenMobile::singleton();
if (BLOCKEN_MOBI_USERAGENT && !$aryPear['mobile']->isSimulator() && (BLOCKEN_ALWAYS_DEBUG || BlockenCommon::isMember())) {
    $aryPear['mobile'] = BlockenMobile::singleton(BLOCKEN_MOBI_USERAGENT);
}
if (BLOCKEN_MOBILE_USE && BLOCKEN_WEB == BLOCKEN_MODE) {
    if (!$aryPear['mobile']->isNonMobile()) {
        ob_start('mb_output_handler');
        mb_http_output('SJIS');
        mb_substitute_character(0x3013);
        foreach ($aryParam as $sKey => $sValue) {
            if ($aryPear['mobile']->hasEmoji($sValue)) {
                if (!isset($aryParam['emoji'])) {
                    $aryParam['emoji'] = array();
                }
                $aryParam['emoji'][$sKey] = true;
            }
            $sValue = mb_convert_encoding($sValue, 'UTF-8', 'SJIS');
            if ($aryPear['mobile']->isSoftBank()) {