<?php
/*
 * ASK THEME 관리자 페이지
 */
include_once "./_common.php";
define('_INDEX_', true);
if (!defined('_GNUBOARD_')) {
    exit;
}
include_once(G5_PLUGIN_PATH . '/asktheme/_admin/head.php');
add_stylesheet('<link rel="stylesheet" href="http://www.asktheme.net/theme/asktheme/css/skin/asktheme.latest_list.css">');
//첨부파일 디렉토리 생성
if (!is_dir(G5_DATA_PATH . "/asktheme_attach")) {
    mkdir(G5_DATA_PATH . "/asktheme_attach");
    chmod(G5_DATA_PATH . "/asktheme_attach", 0777);
}
?>
<div class="row">
    <div class="small-12 medium-12 large-12 columns">
        <div class="jumbotron">
            <h1>ASKTheme Admin</h1>
            <p>
                ASKTheme 관리자 모드입니다. 플러그인 관리 및 도움말, 라이센스, 버전정보 등을 확인할 수 있습니다.
            </p>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        function feedupdate(target, tclass) {
            jQuery.getFeed({
                url: 'http://www.asktheme.net/bbs/rss.php?bo_table=' + target,
                success: function (feed) {
                    $.each(feed.items, function (key, value) {
                        if (key <5) {
                            $(tclass).append("<li><a href='" + value.link + "' target='_blank' class='latest-links'>" + value.title + "</a></li>");
                        }
                    });
                }
            });//feed   
        }

        var targetBoard = new Array('theme_download', 'plugins', 'qna');
        $.each(targetBoard, function (i) {
            targetClass = "." + targetBoard[i];
            feedupdate(targetBoard[i], targetClass);
        });
    });
</script>
<div class="row">
    <div class="small-12 medium-6 large-4 columns">

        <div class="latest-basic-wrap">
            <div class="latest-header">
                <h3 class="latest-title">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=theme_download" target="_blank">테마</a>
                </h3>
            </div>
            <div class="latest-body">
                <ul class="latest-list theme_download"></ul>
            </div>

            <div class="latest-footer">
                <div class="latest-more">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=theme_download" target="_blank"><span class="sound_only">테마 다운로드</span>more</a>
                </div>
            </div>
        </div>
    </div>
    <div class="small-12 medium-6 large-4 columns">
        <div class="latest-basic-wrap">
            <div class="latest-header">
                <h3 class="latest-title">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=plugins" target="_blank">테마 플러그인</a>
                </h3>
            </div>
            <div class="latest-body">
                <ul class="latest-list plugins"></ul>
            </div>

            <div class="latest-footer">
                <div class="latest-more">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=plugins" target="_blank"><span class="sound_only">테마 플러그인</span>more</a>
                </div>
            </div>
        </div>
    </div>
    <div class="small-12 medium-12 large-4 columns">
        <div class="latest-basic-wrap">
            <div class="latest-header">
                <h3 class="latest-title">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=plugins" target="_blank">질문답변</a>
                </h3>
            </div>
            <div class="latest-body">
                <ul class="latest-list qna"></ul>
            </div>

            <div class="latest-footer">
                <div class="latest-more">
                    <a href="http://www.asktheme.net/bbs/board.php?bo_table=qna" target="_blank"><span class="sound_only">질문답변</span>more</a>
                </div>
            </div>
        </div>
    </div>
</div>
<?php
include_once(G5_PLUGIN_PATH . '/asktheme/_admin/tail.php');
