<a class="button float" href="main.html" target="navTab" rel="main" data-change-title="false"><i class="icon-refresh"></i><@t.page 'button.refresh'/></a>
<div class="pageFormContent" layoutH>
    <fieldset>
        <legend><@t.page 'my_account'/></legend>
        <div class="unit">
            <ul>
                <li>
                    <div class="card">
                        <i class="bi bi-ui-checks icon-large icon"></i>
                        <p><@t.page 'process.pending'/></p>
                        <a href="sysWorkflowProcess/list.html" title="<@t.page 'process.pending'/>" target="navTab" rel="sysWorkflowProcess/list">
                            <@sys.workflowProcessList roleIds=admin.roles deptId=admin.deptId userId=admin.id pageSize=0>
                                <h3 data-todo="${(page.totalCount gt 0)?then(page.totalCount,'')}" data-todo-type="process_list">${page.totalCount}</h3>
                            </@sys.workflowProcessList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-book icon-large icon"></i>
                        <p><@t.page 'myself.my_pending_content'/></p>
                        <a href="myself/contentList.html?status=2" title="<@t.page 'my_content'/>" target="navTab" rel="myself/contentList">
                            <@cms.contentList advanced=true status=2 userId=admin.id pageSize=0>
                                <h3>${page.totalCount}</h3>
                            </@cms.contentList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-edit icon-large icon"></i>
                        <p><@t.page 'myself.my_draft'/></p>
                        <a href="myself/contentList.html?status=0" title="<@t.page 'my_content'/>" target="navTab" rel="myself/contentList">
                            <@cms.contentList advanced=true status=0 userId=admin.id pageSize=0>
                                <h3>${page.totalCount}</h3>
                            </@cms.contentList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-signin icon-large icon"></i>
                        <p><@t.page 'user.login_count'/></p>
                        <a href="myself/logLogin.html" title="<@t.page 'my_login_log'/>" target="navTab" rel="myself/logLogin">
                            <h3>${admin.loginCount}</h3>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-unlock-alt icon-large icon"></i>
                        <p><@t.page 'my_login_token'/></p>
                        <a href="myself/userTokenList.html" title="<@t.page 'my_login_token'/>" target="navTab" rel="myself/userTokenList">
                            <h3><@sys.userTokenList userId=admin.id pageSize=0>${page.totalCount}</@sys.userTokenList></h3>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-calendar-empty icon-large icon"></i>
                        <p class="label">
                            <@t.page 'user.last_login_date'/>
                        </p>
                        <p>
                            ${(admin.lastLoginDate?string('yyyy-MM-dd HH:mm'))!}
                        </p>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="bi bi-cloudy-fill icon-large icon"></i>
                        <p class="label">
                            <@t.page 'user.last_login_ip'/>
                        </p>
                        <p title="${(getIpRegion(admin.lastLoginIp).address)!}">
                            ${admin.lastLoginIp!}
                        </p>
                    </div>
                </li>
            </ul>
        </div>
    </fieldset>
    <fieldset>
        <legend><@t.page 'content'/></legend>
        <ul class="report clearfix">
            <li>
                <h2 class="contentTitle"><@t.page 'report.content.lastest'/></h2>
                <div class="pageFormContent">
                    <@cms.contentList orderField="publishDate" pageSize=5>
                        <#list page.list as content>
                            <@t.merge 'categoryIds' content.categoryId!/>
                        </#list>
                        <@cms.category ids=t.categoryIds!><#assign categoryMap=map!/></@cms.category>
                        <#list page.list as content>
                    <p class="ellipsis">
                        <span class="float-right date info">${content.publishDate?string("yyyy-MM-dd")!} <i class="bi bi-eye"></i> ${content.clicks!}</span>
                        [<a href="${(categoryMap[content.categoryId?string].url)!}" class="exclude-translate" target="_blank">${(categoryMap[content.categoryId?string].name)!}</a>]
                        <a href="${content.url!}" class="exclude-translate" target="_blank">${(content.title)!}</a>
                    </p>
                        </#list>
                    </@cms.contentList>
                </div>
            </li>
            <li>
                <div class="tabs box">
                    <div class="tabsHeader">
                        <ul class="right">
                            <h2 class="float-left"><@t.page 'report.content.hot'/></h2>
                            <#assign today=.now?string("yyyy-MM-dd")/>
                            <#assign thisMonth=.now?string("yyyy-MM-01")/>
                            <li><a href="common/hotContent.html?startVisitDate=${today}" class="j-ajax"><@t.page 'report.today'/></a></li>
                            <li><a href="common/hotContent.html?startVisitDate=${getDate('yesterday',getDate('yesterday',today))?date}&endVisitDate=${getDate('yesterday',today)?date}" class="j-ajax"><@t.page 'report.yesterday'/></a></li>
                            <li><a href="common/hotContent.html?startVisitDate=${getDate('lastSunday',today)?date}&dayAnalytics=false" class="j-ajax"><@t.page 'report.this_week'/></a></li>
                            <li><a href="common/hotContent.html?startVisitDate=${getDate('yesterday',getDate('lastMonday',today))?date}&endVisitDate=${getDate('lastSunday',today)?date}&dayAnalytics=false" class="j-ajax"><@t.page 'report.last_week'/></a></li>
                            <li><a href="common/hotContent.html?startVisitDate=${getDate('yesterday',thisMonth)?date}&dayAnalytics=false" class="j-ajax"><@t.page 'report.this_month'/></a></li>
                            <li><a href="common/hotContent.html?startVisitDate=${getDate('yesterday',getDate('lastMonth',thisMonth))?date}&endVisitDate=${getDate('yesterday',thisMonth)?date}&dayAnalytics=false" class="j-ajax"><@t.page 'report.last_month'/></a></li>
                        </ul>
                    </div>
                    <div class="tabsContent unitBox">
                        <div>
                            <#assign startVisitDate=today/>
                            <#include "common/hotContent.html"/>
                        </div>
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                    </div>
                </div>
            </li>
        </ul>
    </fieldset>
<@sys.authorized roleIds=admin.roles url='cmsComment/list'>
    <fieldset>
        <legend><@t.page 'comment.management'/></legend>
        <div class="unit">
            <div id="comment" class="chart box" data-resize-object="commentChart"></div>
            <ul class="clearfix">
                <li>
                    <div class="card">
                        <i class="icon-comment icon-large icon"></i>
                        <p><@t.page 'comment.uncheck'/></p>
                        <a href="cmsComment/list.html?status=2" title="<@t.page 'comment.management'/>" target="navTab" rel="cmsComment/list">
                            <@cms.commentList advanced=true status=2 pageSize=0>
                                <h3 data-todo="${(page.totalCount gt 0)?then(page.totalCount,'')}" data-todo-type="comment_list">${page.totalCount}</h3>
                            </@cms.commentList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-comments icon-large icon"></i>
                        <p><@t.page 'content.comments'/></p>
                        <a href="cmsComment/list.html" title="<@t.page 'comment.management'/>" target="navTab" rel="cmsComment/list">
                            <@cms.commentList advanced=true status='1,2' pageSize=0>
                                <h3>${page.totalCount}</h3>
                            </@cms.commentList>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
<script>
var commentChart=echarts.init(document.getElementById('comment'));
commentChart.setOption({
    title: {
        text: "<@t.page 'comment'/>",
        x:'center'
    },
    tooltip : {
        trigger: 'axis'
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [<#list 7..0 as a>"${(.now?long-a*86400000)?number_to_date?string('MM-dd')}"<#sep>,</#list>]
    },
    yAxis: {
        type: 'value'
    },
    series: [
    {
        name:'<@t.page 'operate'/>',
        type:'line',
        smooth: true,
        data:[<#list 7..0 as a><@log.operateList operate='save.cmsComment' startCreateDate=(.now?long-a*86400000)?number_to_date?string endCreateDate=(.now?long-(a-1)*86400000)?number_to_date?string pageSize=0>${page.totalCount}</@log.operateList><#sep>,</#list>],
        areaStyle: {}
    }]
});
</script>
   </fieldset>
</@sys.authorized>
<@sys.authorized roleIds=admin.roles url='tradeOrder/list'>
    <@sys.roleModule roleIds=admin.roles moduleId='trade'>
        <#if object>
    <fieldset>
        <legend><@t.page 'order'/></legend>
        <div class="unit">
            <div id="order" class="chart box" data-resize-object="orderChart"></div>
            <ul class="clearfix">
                <li>
                    <div class="card">
                        <i class="icon-barcode icon-large icon"></i>
                        <p><@t.page 'order.toprocess'/></p>
                        <a href="tradeOrder/list.html?status=2&processed=false" title="<@t.page 'order'/>" target="navTab" rel="tradeOrder/list">
                            <@trade.orderList processed=false status=2 pageSize=0>
                                <h3 data-todo="${(page.totalCount gt 0)?then(page.totalCount,'')}" data-todo-type="order_list">${page.totalCount}</h3>
                            </@trade.orderList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-money icon-large icon"></i>
                        <p><@t.page 'order.topayment'/></p>
                        <a href="tradeOrder/list.html?status=0&processed=false" title="<@t.page 'order'/>" target="navTab" rel="tradeOrder/list">
                            <@trade.orderList processed=false status=0 pageSize=0>
                                <h3>${page.totalCount}</h3>
                            </@trade.orderList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-credit-card icon-large icon"></i>
                        <p><@t.page 'status.accountHistory.2'/></p>
                        <a href="tradeAccountHistory/list.html?status=2&startCreateDate=${(.now?long-7*86400000)?number_to_date?string}" title="<@t.page 'account.history'/>" target="navTab" rel="tradeAccountHistory/list">
                            <@trade.accountHistoryList status=2 startCreateDate=(.now?long-7*86400000)?number_to_date?string pageSize=0>
                                <h3>${page.totalCount}</h3>
                            </@trade.accountHistoryList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-signout icon-large icon"></i>
                        <p><@t.page 'status.refund.0'/></p>
                        <a href="tradeRefund/list.html?status=0" title="<@t.page 'refund'/>" target="navTab" rel="tradeRefund/list">
                            <@trade.refundList status=0 pageSize=0>
                                <h3 data-todo="${(page.totalCount gt 0)?then(page.totalCount,'')}" data-todo-type="refund_list">${page.totalCount}</h3>
                            </@trade.refundList>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
<script>
var orderChart=echarts.init(document.getElementById('order'));
orderChart.setOption({
    title: {
        text: '<@t.page 'order'/>',
        x:'center'
    },
    tooltip : {
        trigger: 'axis'
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [<#list 7..0 as a>'${(.now?long-a*86400000)?number_to_date?string('MM-dd')}'<#sep>,</#list>]
    },
    yAxis: {
        type: 'value'
    },
    series: [
    <#list 0..4 as s>
       {
           name:"<@t.page 'status.order.'+s/>",
           type:'line',
           smooth: true,
           data:[<#list 7..0 as a><@trade.orderList status=s startCreateDate=(.now?long-a*86400000)?number_to_date?string endCreateDate=(.now?long-(a-1)*86400000)?number_to_date?string pageSize=0>${page.totalCount}</@trade.orderList><#sep>,</#list>],
           areaStyle: {}
       }<#sep>,
   </#list>
    ]
});
</script>
    </fieldset>
        </#if>
    </@sys.roleModule>
</@sys.authorized>
<@sys.authorized roleIds=admin.roles url='report/user'>
    <@sys.roleModule roleIds=admin.roles moduleId='visit_menu';visitAuthorized>
    <fieldset>
        <legend><@t.page 'report.user'/></legend>
        <div class="unit">
            <#if visitAuthorized><div id="visit" class="chart box"  data-resize-object="visitChart"></div></#if>
            <ul>
                <li>
                    <div class="card">
                        <i class="icon-signal icon-large icon"></i>
                        <p><@t.page 'register'/></p>
                        <a href="report/user.html" title="<@t.page 'report.user'/>" target="navTab" rel="report/user">
                            <@sys.userList startRegisteredDate=.now?long?number_to_date?string>
                               <h3>${page.totalCount}</h3>
                            </@sys.userList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-signal icon-large icon"></i>
                        <p><@t.page 'user'/></p>
                        <a href="report/user.html" title="<@t.page 'report.user'/>" target="navTab" rel="report/user">
                            <@sys.userList pageSize=0>
                               <h3>${page.totalCount}</h3>
                            </@sys.userList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-ticket icon-large icon"></i>
                        <p><@t.page 'login'/></p>
                        <a href="report/user.html" title="<@t.page 'report.user'/>" target="navTab" rel="report/user">
                            <@log.loginList startCreateDate=.now?long?number_to_date?string>
                               <h3>${page.totalCount}</h3>
                            </@log.loginList>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="card">
                        <i class="icon-list-alt icon-large icon"></i>
                        <p><@t.page 'operate'/></p>
                        <a href="report/user.html" title="<@t.page 'report.user'/>" target="navTab" rel="report/user">
                            <@log.operateList startCreateDate=.now?long?number_to_date?string>
                               <h3>${page.totalCount}</h3>
                            </@log.operateList>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
<#if visitAuthorized>
<script>
<@visit.dayList startVisitDate=(.now?long-7*86400000)?number_to_date>
var visitChart = echarts.init(document.getElementById('visit'));
visitChart.setOption({
    title: {
        text: '<@t.page 'visit'/>',
        x:'center'
    },
    tooltip : {
        trigger: 'axis'
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    legend: {
        data: ['PV', 'UV', 'IP Views'],
        top:30
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: [<#list page.list?reverse as a>'${a.id.visitDate?string('MM-dd')}'<#sep>,</#list>]
    },
    yAxis: {
        type: 'value'
    },
    series: [
       {
           name:'PV',
           type:'line',
           smooth: true,
           data:[<#list page.list?reverse as a>${a.pv!}<#sep>,</#list>],
           areaStyle: {}
       },
       {
           name:'UV',
           type:'line',
           smooth: true,
           data:[<#list page.list?reverse as a>${a.uv!}<#sep>,</#list>],
           areaStyle: {}
       },
       {
           name:'IP Views',
           type:'line',
           smooth: true,
           data:[<#list page.list?reverse as a>${a.ipviews!}<#sep>,</#list>],
           areaStyle: {}
       }]
});
</@visit.dayList>
</script>
</#if>
    </fieldset>
    </@sys.roleModule>
</@sys.authorized>
<@tools.version>
    <fieldset>
        <legend><@t.page 'system'/></legend>
        <div class="unit">
            <ul>
                <li class="cmsVersion">
                    <label><@t.page 'publiccms'/>:</label>
                    <a href="//www.publiccms.com/" target="navTab" rel="publiccms.com" title="<@t.page 'publiccms_website'/>">${cms}.${revision}</a> <span class="new hide" style="color:green">[<@t.page 'version.new'/>]</span><span class="old hide" style="color:red">[<@t.page 'version.old'/>]</span>
                </li>
    <@tools.systemProperties>
                <li>
                    <label><@t.page 'os.timezone'/>:</label>${.vars['user.timezone']!}
                </li>
    </@tools.systemProperties>
    <@tools.masterSite>
                <li>
                    <label>${t.pageMessage(master?then('cluster.master','cluster.normal'))}:</label>
                    <a href="sysCluster/list.html" title="<@t.menu 'cluster'/>" target="navTab" rel="sysCluster/list">${cluster}</a>
                </li>
        <@tools.disk>
                <li>
                    <label><@t.page 'data.directory'/>:</label>
                    <a href="sysSite/monitor.html" title="<@t.page 'system_monitor'/>" target="navTab" rel="sysSite/monitor">${(rootPath)!}</a>
                </li>
                <li>
                    <label><@t.page 'disk_space'/>:</label><@t.fileSize totalSpace/>
                </li>
            </ul>
        </@tools.disk>
    </@tools.masterSite>
        </div>
    <@tools.masterSite>
        <div class="divider"></div>
        <div class="unit">
            <ul>
                <li>
                    <label><@t.page 'site.count'/>:</label>
                    <a href="sysSite/list.html" title="<@t.menu 'site_list'/>" target="navTab" rel="sysSite/list"><@sys.siteList pageSize=0>${page.totalCount}</@sys.siteList></a>
                </li>
                <li>
                    <label><@t.page 'domain.count'/>:</label>
                    <a href="sysDomain/list.html" title="<@t.menu 'site_domain_list'/>" target="navTab" rel="sysDomain/list"><@sys.domainList advanced=true pageSize=0>${page.totalCount}</@sys.domainList></a>
                </li>
            </ul>
        </div>
    </@tools.masterSite>
    </fieldset>
</@tools.version>
</div>