Пример #1
0
/**
 * 初期実行 index.php から呼ばれる
 */
function openpne_execute()
{
    $module = '';
    $type = '';
    $action = '';
    if (!($module = get_request_var('m'))) {
        // モジュール名の自動設定
        if (!db_admin_user_exists()) {
            $module = 'setup';
        } elseif (isKtaiUserAgent()) {
            $module = 'ktai';
        } else {
            $module = 'pc';
        }
    }
    $types = array('page', 'do');
    if ($a = get_request_var('a')) {
        $arr = explode('_', $a, 2);
        if (!empty($arr[1]) && in_array($arr[0], $types)) {
            $type = $arr[0];
            $action = $arr[1];
        }
    }
    openpne_forward($module, $type, $action);
}
Пример #2
0
// モジュール毎に決められた認証をおこなっているかどうかのチェック
if (defined('CHECK_IMG_AUTH') && CHECK_IMG_AUTH) {
    require_once OPENPNE_WEBAPP_DIR . '/init.inc';
    $module = '';
    if (!($module = get_request_var('m'))) {
        // モジュール名の自動設定
        if (!db_admin_user_exists()) {
            $module = 'setup';
        } elseif (isKtaiUserAgent()) {
            $module = 'ktai';
        } else {
            $module = 'pc';
        }
    }
    $params = '&a=page_h_toimg';
    if (isKtaiUserAgent()) {
        $params .= '&m=ktai';
    } else {
        $params .= '&m=pc';
    }
    $_SERVER['QUERY_STRING'] .= $params;
    if (!($module = _check_module($module))) {
        openpne_display_error('モジュールが見つかりません', true);
    }
    // disable modules
    if (in_array($module, (array) $GLOBALS['_OPENPNE_DISABLE_MODULES'])) {
        openpne_display_error('モジュールが無効になっています', true);
    }
    if (OPENPNE_UNDER_MAINTENANCE && !in_array($module, (array) $GLOBALS['_OPENPNE_MAINTENANCE_MODULES'])) {
        openpne_display_error();
    }