<html lang="ko">
<head>
<? //-- Facebook 공유를 위한 메타 태그 ?>
<?
extract($_GET);
$sns_url	= "http://".$_SERVER[SERVER_NAME];
$share_url	= $sns_url.$_SERVER[PHP_SELF];

$title	= "지음빌더";
$desc	= "지음빌더는 그누보드4를 기반으로 제작 된 설치형 홈페이지 빌더입니다.";
?>
<meta id="fb_image" property='og:image' content='<?=$sns_url?>/zm.extend/img/logo/sns_logo.png'>
<meta id="fb_title" property="og:title" content="<?=$title?>">
<meta id="fb_desc" property="og:description" content="<?=$desc?>">
<meta property="og:site_name" content="<?=$title?>">
<meta id="fb_url" property='og:url' content="<?=$share_url?>">
</head>
<body>
<?
if($sns == "f") {
	$api_url	= "https://www.facebook.com/sharer/sharer.php?u=". urlencode($share_url);
	zm_gourl($api_url);
}

if($sns == "t") {
	$txt	= urlencode($desc . " #지음빌더");
	$api_url	= "https://twitter.com/intent/tweet?text=".urlencode($sns_url) . " " . $txt;
	zm_gourl($api_url);
}

//-- $sns 값이 없으면 SNS에서 연결 된 것으로 간주하고 해당 페이지로 이동
if($sns == "") {
	zm_gourl("$sns_url");
}


function zm_gourl($url){
	echo "<script>document.location.href = '".$url."';</script>";
}
?>
</body>
</html>