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

if(AMINA != 'g5') {
	global $g5, $is_member;
}

global $amina, $xp, $aminaThema;

if ($is_member) {
	//XP Info
	$info = xp_info($member['mb_id']); //현재 레벨
	$info['icon'] = xp_icon($member['mb_id'], $info['level']);
	$info['per'] = round($info['per'],1);

	//Grade
	$lvl = $member['mb_level'];
	$info['grade'] = $xp['grade'][$lvl];
	$info['name'] = $nick;
}

if(!AMINA) {
	// URL ENCODING
	if (isset($_REQUEST['url'])) {
		$url = amina_trim($_REQUEST['url']);
		$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));
		}
	}
}

$outlogin_url        =  $urlencode ? $urlencode : G5_URL;
$outlogin_action_url = G5_HTTPS_BBS_URL.'/login_check.php';

$skin_val = $aminaThema['outlogin_skin'];
$skin_dir = 'misc/outlogin';
$skin_name = 'outlogin.skin.php';
$action = 'logout';

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

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

?>
