<?php
error_reporting(E_ERROR|E_PARSE|E_WARNING);


//require_once("./config.php");
require_once("class/forms.php");
require_once("class/mysql.php");
require_once("class/split_page.php");
require_once("inc/functions.php");


if (PHP_VERSION >= '4.0.4') {
	//ob_start('ob_gzhandler');
}

$DB = new DB_MySQL;
$DB->servername = DB_SERVER;
$DB->dbname = DB_DATABASE;
$DB->dbusername = DB_SERVER_USERNAME;
$DB->dbpassword = DB_SERVER_PASSWORD;
$DB->connect();
$DB->selectdb();


if (!$usepconnect) {
	// 在程序運行完畢時, 關閉數據庫連接
	register_shutdown_function(array(&$DB,'close'));
}

$cpforms = new FORMS;


if (get_magic_quotes_gpc()) {
        $_GET = stripslashes_array($_GET);
        $_POST = stripslashes_array($_POST);
        $_COOKIE = stripslashes_array($_COOKIE);
} 

set_magic_quotes_runtime(0);

if (!ini_get("register_globals")) {
        extract($_GET, EXTR_SKIP);
        extract($_POST, EXTR_SKIP);
		extract($_COOKIE, EXTR_SKIP);
}

?>