<?php
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined('_GNUBOARD_')) {
    exit;
} // 개별 페이지 접근 불가

$begin_time = get_microtime();

if (!isset($g5['title'])) {
    $g5['title'] = $config['cf_title'];
    $g5_head_title = $g5['title'];
} else {
    $g5_head_title = $g5['title']; // 상태바에 표시될 제목
    $g5_head_title .= " | " . $config['cf_title'];
}

// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
$g5['lo_location'] = addslashes($g5['title']);
if (!$g5['lo_location']) {
    $g5['lo_location'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
}
$g5['lo_url'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
if (strstr($g5['lo_url'], '/' . G5_ADMIN_DIR . '/') || $is_admin == 'super') {
    $g5['lo_url'] = '';
}
?>
<!doctype html>
<html lang="ko">
    <head>
        <meta charset="utf-8">
        <meta name="google-site-verification" content="xnXbGv0t_1rN9IBl8vWfUu4EkY-YUIRGzpzg4_OM7qw" />
        <?php
        if (G5_IS_MOBILE) {
            echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">' . PHP_EOL;
            echo '<meta name="HandheldFriendly" content="true">' . PHP_EOL;
            echo '<meta name="format-detection" content="telephone=no">' . PHP_EOL;
        } else {
            echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10,user-scalable=yes">' . PHP_EOL;
            echo '<meta name="HandheldFriendly" content="true">' . PHP_EOL;
            echo '<meta name="format-detection" content="telephone=no">' . PHP_EOL;
            echo '<meta http-equiv="imagetoolbar" content="no">' . PHP_EOL;
            echo '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">' . PHP_EOL;
        }

        echo plugin_run('메타태그', '[[metatag]]', false, false); //OG meta tag

        if ($config['cf_add_meta']) {
            echo $config['cf_add_meta'] . PHP_EOL;
        }
        ?>
        <title><?php echo $g5_head_title; ?></title>
        <link rel="stylesheet" href="<?php echo G5_THEME_CSS_URL; ?>/<?php echo G5_IS_MOBILE ? 'mobile' : 'default'; ?>.css">
        <link rel="stylesheet" href="<?php echo G5_THEME_CSS_URL ?>/font-awesome.min.css">
        <link rel="stylesheet" href="<?php echo G5_THEME_CSS_URL; ?>/mdl/material-design-lite.css">
        <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
        <!--style here-->
        <!--[if lte IE 8]>
        <script src="<?php echo G5_JS_URL ?>/html5.js"></script>
        <![endif]-->
        <script type="text/javascript">
            // 자바스크립트에서 사용하는 전역변수 선언
            var g5_url = "<?php echo G5_URL ?>";
            var g5_bbs_url = "<?php echo G5_BBS_URL ?>";
            var g5_is_member = "<?php echo isset($is_member) ? $is_member : ''; ?>";
            var g5_is_admin = "<?php echo isset($is_admin) ? $is_admin : ''; ?>";
            var g5_is_mobile = "<?php echo G5_IS_MOBILE ?>";
            var g5_bo_table = "<?php echo isset($bo_table) ? $bo_table : ''; ?>";
            var g5_sca = "<?php echo isset($sca) ? $sca : ''; ?>";
            var g5_editor = "<?php echo ($config['cf_editor'] && $board['bo_use_dhtml_editor']) ? $config['cf_editor'] : ''; ?>";
            var g5_cookie_domain = "<?php echo G5_COOKIE_DOMAIN ?>";

        </script>

        <script src="<?php echo G5_THEME_URL . "/js/jquery-1.12.0.min.js"; ?>"></script>
        <script src="<?php echo G5_THEME_URL . "/js/jquery-migrate-git.js"; ?>"></script>
        <script src="<?php echo G5_THEME_URL ?>/js/modernizr.custom.28468.js"></script>
        <script src="<?php echo G5_THEME_URL ?>/js/ask.js"></script>
        <script src="<?php echo G5_THEME_URL ?>/js/foundation.min.js"></script>
        <script src="<?php echo G5_THEME_URL ?>/js/material.min.js"></script>
        <script src="<?php echo G5_JS_URL ?>/common.js"></script>
        <script src="<?php echo G5_JS_URL ?>/wrest.js"></script>
        <script src="<?php echo G5_THEME_URL ?>/js/swiper.jquery.min.js"></script>
        <link rel="stylesheet" href="<?php echo G5_THEME_CSS_URL; ?>/swiper.min.css">
        <?php
        if (!defined('G5_IS_ADMIN')) {
            echo $config['cf_add_script'];
        }
        ?>
    </head>
    <body class="response-wrap">
        <div id="wrapper" class="off-canvas-wrapper">