<!DOCTYPE html>
<html lang="<@t.page 'html_lang'/>">
<head>
    <meta charset="utf-8">
    <title>${site.name} - <@t.page "management_system"/></title>
    <meta name="viewport" content="width=device-width,initial-scale=0.6">
    <link href="${base}/resource/fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="${base}/resource/fonts/bootstrap-icons/bootstrap-icons.css" rel="stylesheet"/>
    <link href="${base}/resource/css/core.css?version=20250428" rel="stylesheet" media="screen"/>
    <link href="${base}/resource/css/cms.css?version=20250328" rel="stylesheet" media="screen"/>
    <script src="${base}/resource/js/echarts.proxy.js"></script>
</head>
<body>
    <div id="background"></div><div id="progressBar"><i class="icon-spinner icon-spin"></i></div>
    <header>
        <div class="logo"><img src="<#if siteAttribute.logo?has_content>${getUrl(siteAttribute.logo)}<#else>${base}/resource/logo.png</#if>" alt="LOGO"/></div>
        <ul class="nav">
            <li>
                <a href="${site.dynamicPath!}" target="_blank"><i class="icon-home icon-large"></i></a>
                <#if site.useStatic>
                    <ul>
                        <li><a href="${site.sitePath!}" target="_blank"><@t.page "website"/></a></li>
                    </ul>
                </#if>
            </li>
        <@sys.authorized roleIds=admin.roles url="clearCache">
            <li>
                <a href="clearCache" target="ajaxTodo" title="<@t.page 'button.clear_cache'/>"><i class="icon-rubbish icon-large"></i></a>
            </li>
        </@sys.authorized>
            <li>
                <a href="javascript:void(0)" class="langList">
                    <img src="${base}/resource/images/${t.pageMessage("lang")}.png" alt="${langs[t.pageMessage("lang")]}" title="${langs[t.pageMessage("lang")]}"/>
                </a>
                <ul class="langList">
                    <@sys.configData code="site"><#assign excludeLangs=(object.site_exclude_lang!'')?split(',')/></@sys.configData>
                    <#list langs as k,v>
                        <#if !(excludeLangs?has_content && excludeLangs?seq_contains(k))>
                    <li<#if t.pageMessage("lang")=k> class="selected"</#if>>
                        <a href="changeLocale?lang=${k}" target="ajaxTodo">
                            <img src="${base}/resource/images/${k}.png" alt="${v}" title="${v}"/> ${v}
                        </a>
                    </li>
                        </#if>
                    </#list>
                </ul>
            </li>
            <li>
                <a href="javascript:void(0)" class="theme"></a>
                <ul class="themeList" id="themeList">
                    <li class="toptry"><a href="javascript:void(0)"><img src="${base}/resource/images/theme-toptry.png" alt="toptry"/></a></li>
                    <li class="red"><a href="javascript:void(0)"><img src="${base}/resource/images/theme-red.png" alt="red"/></a></li>
                    <li class="ghibli"><a href="javascript:void(0)"><img src="${base}/resource/images/theme-ghibli.png" alt="ghibli"/></a></li>
                </ul>
            </li>
            <li>
                <a href="myself/profile.html" target="navTab" rel="myself/profile" title="<@t.page 'my_account'/>" class="exclude-translate"><#if admin.cover?has_content><img class="avatar" src="${admin.cover}" alt="${(admin.nickname)!}"><#else><i class="avatar icon-user icon-large"></i></#if> ${(admin.nickname)!}</a>
                <ul>
                    <li>
                        <a href="logout?userId=${admin.id}" title="<@t.page 'logout'/>"><i class="icon-signout icon-large"></i> <@t.page 'logout'/></a>
                    </li>
                </ul>
            </li>
        </ul>
        <ul class="nav left">
            <li>
                <a href="javascript:;" onclick="return false;" class="navbar-toggler"></a>
            </li>
            <@sys.authorized roleIds=admin.roles url="cmsDiy/preview">
            <li><a href="cmsDiy/preview.html" target="navTab" rel="cmsDiy/preview"><i class="bi bi-palette2"></i> <@t.page "diy.preview"/></a></li>
            </@sys.authorized>
        </ul>
    </header>
    <main>
        <aside id="leftside">
            <nav id="sidebar">
                <div id="menu">
                    <#include "include_page/menus.html"/>
                </div>
                <footer>
                    <@tools.version>
                        <#if authorizationEdition>
                            <a href="common/license.html" target="dialog" mask="true"><@t.page "license"/>: ${getLicense().authorization!}</a>
                        <#else>
                            <@t.page "license.no"/>
                            <@tools.masterSite>
                                <@sys.authorized roleIds=admin.roles url="sysSite/uploadLicense">
                            <a href="sysSite/uploadLicense.html" target="navTab" rel="sysSite/uploadLicense" title="<@t.menu 'license'/>"><@t.page "license.upgrade"/></a>
                                </@sys.authorized>
                            </@tools.masterSite>
                        </#if>
                    </@tools.version>
                    <br/>
                    Copyright &copy; ${.now?string("yyyy")}
                </footer>
            </nav>
        </aside>
        <div id="navTab" class="tabsPage">
            <div class="tabsPageHeader">
                <div class="tabsPageHeaderContent">
                    <ul class="navTab-tab">
                        <li tabid="main" class="main" url="main.html"><a href="javascript:;" onclick="return false;"><@t.page "workgin_table"/></a></li>
                    </ul>
                </div>
                <a href="javascript:;" onclick="return false;" class="tabsLeft"><i class="icon-backward icon-large"></i></a>
                <a href="javascript:;" onclick="return false;" class="tabsRight"><i class="icon-forward icon-large"></i></a>
                <a href="javascript:;" onclick="return false;" class="tabsMore"><i class="icon-th-list icon-large"></i></a>
            </div>
            <ul class="tabsMoreList">
                <li><a href="javascript:;" onclick="return false;"><@t.page "workgin_table"/></a></li>
            </ul>
            <div class="navTab-panel tabsPageContent layoutBox">
                <div class="page unitBox work-bench">
                    <#include "main.html"/>
                </div>
            </div>
        </div>
    </main>
    <script>
        var base = "${base+adminContextPath}";
        window.UEDITOR_HOME_URL = "${(parentSite!site).dynamicPath}resource/plugins/ueditor/";
        window.UEDITOR_BASE_URL = "${base}/resource/plugins/ueditor/";
        window.UEDITOR_LANGUAGE = "<@t.page 'ueditor.lang_js'/>";
        window.TIMYMCE_HOME_URL = "${(parentSite!site).dynamicPath}resource/plugins/tinymce/";
        window.TIMYMCE_LANGUAGE = "<@t.page 'tinymce.lang'/>";
        window.TIMYMCE_RESOURCE_PREFIX = "${getFileUploadPrefix()}";
        window.TIMYMCE_FILETYPES = "<@sys.configData code='safe'>${object.allow_files!}</@sys.configData>";
        window.CKEDITOR_BASEPATH = "${(parentSite!site).dynamicPath}resource/plugins/ckeditor/";
        window.CKEDITOR_LANGUAGE = "<@t.page 'ckeditor.lang'/>";
        window.LANGUAGE = "<@t.page 'lang'/>";
        window.SPECTRUM_LANGUAGE = "<@t.page 'spectrum.lang'/>";
        window.LOADSCRIPTS_BASE = "${base}";
        window.FILE_UPLOAD_PREFIX = "${getFileUploadPrefix()}";
    </script>
    <script src="${base}/resource/plugins/jquery/jquery.min.js"></script>
    <script src="${base}/resource/plugins/jquery/jquery.cookie.js"></script>
    <script src="${base}/resource/plugins/jquery/jquery.validate.min.js"></script>
    <script src="${base}/resource/plugins/encrypt/base64.js"></script>
    <script src="${base}/resource/plugins/encrypt/sha512.min.js"></script>
    <script src="${base}/resource/js/loadscripts.js?version=20250428"></script>
    <script src="${base}/resource/js/loadscripts.config.js?version=20250428"></script>
    <script src="${base}/resource/js/jui.min.js?version=20250428"></script>
    <script src="${base}/resource/js/jui.plugins.js?version=20250428"></script>
    <script src="${base}/resource/js/lang/regional.<@t.page 'lang'/>.js"></script>
    <script src="${base}/resource/js/cms.js?version=202408"></script>
    <script>
        JUI.init(base + "/common/jui.frag.html", {
            loginUrl:"login_dialog.html", loginTitle:"<@t.page 'login'/>",
            pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderType"},
            debug:false,
            callback:function(){
                initEnv();
                $("#themeList").theme({themeBase:window.LOADSCRIPTS_BASE+"/resource/css/theme-",defaultTheme:"toptry"});

            <#if admin.weakPassword && admin.loginCount lte 3 >
                <@sys.authorized roleIds=admin.roles url="changePassword">
                $.pdialog.open("myself/password.html?target=dialog", "login", "<@t.page 'user.new_password'/>", {mask: true, width: 450, height: 320});
                </@sys.authorized>
            </#if>

                loadScripts([window.LOADSCRIPTS_BASE+"/resource/plugins/echarts/echarts.common.min.js"],function(){
                    echartsProxy(echarts);
                });
                if($(window).width() < 1024 ){
                    $(".navbar-toggler").not(".side-right").trigger("click");
                }
            }
        });
    </script>
</body>
</html>