예제 #1
0
ignore_user_abort(TRUE);
@set_time_limit(0);
if (!function_exists('one_dir_up')) {
    function one_dir_up($dir, $num_dirs = 1)
    {
        $dir = str_replace('\\', '/', $dir);
        $folders = explode('/', $dir);
        array_splice($folders, count($folders) - $num_dirs);
        $folders = array_values($folders);
        $dir = implode('/', $folders);
        return $dir;
    }
}
define('INSTALLER_BASE_DIR', dirname(__FILE__));
define('FORUM_BASE_DIR', one_dir_up(INSTALLER_BASE_DIR));
define('INCLUDE_BASE_DIR', one_dir_up(INSTALLER_BASE_DIR) . '/includes');
define('K4_BASE_DIR', FORUM_BASE_DIR . '/includes/k4bb');
define('BB_BASE_DIR', FORUM_BASE_DIR);
define('IN_K4', TRUE);
require_once INCLUDE_BASE_DIR . '/filearts/filearts.php';
require_once INCLUDE_BASE_DIR . '/k4bb/init.php';
class K4Installer extends FAController
{
    function execute()
    {
        $request = $this->getRequest();
        $request['template'] =& new FATemplate(FA_FORCE | FA_NOCACHE);
        $this->setRequest($request);
        parent::execute();
    }
}
예제 #2
0
        $dir = implode('/', $folders);
        return $dir;
    }
}
// just some checks ;)
if (isset($_REQUEST['GLOBALS'])) {
    unset($_REQUEST['GLOBALS']);
}
if (isset($_COOKIE['GLOBALS'])) {
    unset($_COOKIE['GLOBALS']);
}
//
// start doing stuff
//
define('K4_BASE_DIR', dirname(__FILE__));
define('BB_BASE_DIR', file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/index.php') && is_dir(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes') ? dirname($_SERVER['SCRIPT_FILENAME']) : one_dir_up(dirname(__FILE__), 2));
define('IN_K4', TRUE);
@set_time_limit(0);
set_magic_quotes_runtime(0);
ini_set('session.name', 'sid');
ini_set('session.auto_start', 0);
ini_set('arg_separator.output', '&');
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src,fieldset=');
require K4_BASE_DIR . '/config.php';
require K4_BASE_DIR . '/init.php';
session_start();
class K4Controller extends FAController
{
    function __construct($template)
    {
        global $_URL;