<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

if(!defined('AMINA_CSS')) include_once(AMINA_PATH.'/css.php');

if(!AMINA) {
	// URL ENCODING
	if (isset($_REQUEST['url'])) {
		$url = amina_trim($_REQUEST['url']);
		if(preg_match('/(bbs\/board.php|bbs\/write.php)/i', $url)) {
			$url = str_replace("../", G5_URL."/", $url);
			$url = str_replace("./", G5_URL."/", $url);
		} else if(preg_match('/(board.php|write.php)/i', $url)) {
			$url = str_replace("../", G5_BBS_URL."/", $url);
			$url = str_replace("./", G5_BBS_URL."/", $url);
		} else {
			$url = str_replace("../", G5_URL."/", $url);
			$url = str_replace("./", G5_URL."/", $url);
		}
		$urlencode = urlencode($url);
	} else {
		$url = '';
	    $urlencode = urlencode($_SERVER['REQUEST_URI']);
		if (G5_DOMAIN) {
			$p = parse_url(G5_DOMAIN);
	        $urlencode = G5_DOMAIN.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", $urlencode));
		}
	}

	$login_url        = $urlencode ? $urlencode : G5_URL;
}

$login_action_url = G5_HTTPS_BBS_URL.'/login_check.php';

$skin_val = $aminaThema['login_skin'];
$skin_dir = 'misc/login';
$skin_name = 'login.skin.php';
$action = 'login';

if(file_exists(THEMA_PATH.'/skin/'.$skin_name)) {
	$member_skin_path = THEMA_PATH.'/skin';
	$member_skin_url = THEMA_URL.'/skin';
} else if(file_exists(AMINA_PATH.'/'.$skin_dir.'/'.$skin_val.'/'.$skin_name)) {
	$member_skin_path = AMINA_PATH.'/'.$skin_dir.'/'.$skin_val;
	$member_skin_url = AMINA_URL.'/'.$skin_dir.'/'.$skin_val;
} else {
	$member_skin_path = AMINA_PATH.'/'.$skin_dir.'/basic';
	$member_skin_url = AMINA_URL.'/'.$skin_dir.'/basic';
}

include($member_skin_path.'/'.$skin_name);

?>
