예제 #1
0
파일: iswaf.php 프로젝트: nlmayday/icampus
    $iswaf = (include iswaf_root . '/conf/conf_default.php');
    include_once iswaf_root . '/conf/conf.php';
}
foreach ($iswaf as $key => $value) {
    if (!is_array($value) && !defined($key)) {
        define($key, $value);
    }
}
if (!defined('iswaf_mode')) {
    define('iswaf_mode', '');
}
if (!defined('iswaf_status')) {
    define('iswaf_status', 1);
}
$d->init($iswaf);
$d->save();
unset($d);
if (isset($_GET['iswaf__installer__']) && isset($_GET['connect_key'])) {
    if ($_GET['connect_key'] == md5(iswaf_connenct_key)) {
        function iswaf_writetofile($filename, $data)
        {
            if (function_exists('file_put_contents')) {
                return file_put_contents($filename, $data);
            } else {
                $fp = fopen($filename, 'w');
                $a = fwrite($fp, $data);
                fclose($fp);
                return $a;
            }
        }
        $_GET['action'] = isset($_GET['action']) ? $_GET['action'] : '';