<?
//Platform for Personal Preferences
header('Content-Type: text/html; charset=UTF-8');
header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"');

// 프로그램 정보
$code_name = 'MK Core';
$code_version = '0.4';
$code_author = 'MINKUN';
$code_homepage = 'dev.minkun.net';
$code_e_mail = 'dev _____at_____ minkun.net';
$code_r_date = 'Mar/19/2006';
$code_p_date = 'Apr/17/2015';

//DB 에러 메세지
$db_c_error = 'Database Connect Error!';
$db_s_error = 'Database Select Error';
$db_i_error = 'Data Insert Error';
$db_q_error = 'Query Error';

//프로그램 로딩 시작
$MK_start = getmicrotime();

//gzip 압축
//if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();

//DB 접속
$envs = parse_ini_file($_SERVER["DOCUMENT_ROOT"] . "/env.ini", true);
$db_connect = @mysql_connect($envs['db']['host'], $envs['db']['id'], $envs['db']['passwd']) or die($db_c_error);
@mysql_select_db($envs['db']['name'], $db_connect) or die($db_s_error);

//사이트 기본 환경 DB 접속
//$query='select * from '. $MK_Config;
//$default_config=@mysql_query($query,$db_connect) or die($db_q_error);

//사이트 정보 로딩
//$core=mysql_fetch_assoc($default_config);

$site_secure = "1";
$site_domain = "localhost";
$ssl_mode = "0";
$rewrite_mode = "1";
$site_title = "MK WORK";
$time_zone = "Asia/Seoul";
$default_lang = "ko";
$lang = "ko";
$fontsize = "9";
$basewidth = "100%";
$meta_keywords = "MK WORK";
$meta_description = "MK WORK";
$setup_dir = "/";
//$landing_module=$core['landing_module'];
//$landing_page=$core['landing_page'];
//$google_smtp=$core['google_smtp'];
//$google_access_id=$core['google_access_id'];
//$google_access_pw=$core['google_access_pw'];
//$google_access_pw=base64_decode("$google_access_pw");
//$google_reply_mail=$core['google_reply_mail'];
//$google_reply_name=$core['google_reply_name'];
//$google_send_name=$core['google_send_name'];
$referer_mode = "1";
$referer_no = "10";
$status_mode = "0";

//SSL 사용
$https = ($ssl_mode == true) ? 'https' : 'http';

//타임존 , 현재시간 설정
date_default_timezone_set($time_zone);
$nowtime = $_SERVER['REQUEST_TIME'];
$date = date("Y-m-d", $nowtime);

//공통 URL 지정
$default_url = $setup_dir;
$default_img_url = $setup_dir . 'img/';
$default_script_url = $setup_dir . 'script/';
$default_css_url = $setup_dir . 'css/';

mysql_query("set session character_set_connection=utf8;");
mysql_query("set session character_set_results=utf8;");
mysql_query("set session character_set_client=utf8;");
