コード例 #1
0
ファイル: vbseo.php プロジェクト: holandacz/nb4
        if ($vbseo_incf[0] != '/') {
            $vbseo_incf = dirname(__FILE__) . '/' . $vbseo_incf;
        }
        include $vbseo_incf;
        exit;
    } else {
        vbseo_404_routine($vbseo_url_);
    }
} else {
    if (preg_match('#\\.(css|php\\d?/?|html?|txt)$#', $vbseo_found_fn, $typematch) && !strstr($vbseo_found_fn, '://')) {
        if ($typematch[1] == 'css') {
            header('Content-type: text/css');
        }
        if (preg_match('#^(.+)/([^/]+)$#', $vbseo_found_fn, $vbseo_m)) {
            @chdir($vbseo_m[1]);
            $vbseo_found_fn = $vbseo_m[2];
        }
        if ($vbseo_found_fn == 'showthread.' . VBSEO_VB_EXT && isset($_POST) && isset($_POST['excerpt']) && VBSEO_IN_TRACKBACK) {
            @define('THIS_SCRIPT', 'showthread');
            include dirname(__FILE__) . '/global.' . VBSEO_VB_EXT;
            vbseo_extra_inc('linkback');
            vbseo_trackback_proc();
        }
        require getcwd() . '/' . $vbseo_found_fn;
        exit;
    } else {
        vbseo_404();
    }
}
vbseo_close_db();
exit;
コード例 #2
0
ファイル: functions_vbseo_url.php プロジェクト: holandacz/nb4
function vbseo_404_routine($vbseo_url_ = '')
{
    $handle404 = VBSEO_404_HANDLE;
    if (preg_match('#\\.(jpg|gif|png|js|css)$#', $vbseo_url_) && $handle404 == 0) {
        $handle404 = 1;
    }
    switch ($handle404) {
        case 1:
            vbseo_404();
            break;
        case 2:
            $vbseo_incf = VBSEO_404_CUSTOM;
            if ($vbseo_incf[0] != '/') {
                $vbseo_incf = VBSEO_DIRNAME . '/../' . $vbseo_incf;
            }
            include $vbseo_incf;
            break;
        default:
            $fhome = VBSEO_TOPREL;
            vbseo_get_options();
            if ($vboptions['forumhome'] != 'index') {
                $fhome .= $vboptions['forumhome'] . '.' . VBSEO_VB_EXT;
            }
            Header("HTTP/1.1 301 Moved Permanently");
            Header("Location: " . VBSEO_TOPREL);
            break;
    }
}