<#if !startVisitDate?has_content>
    <#assign startVisitDate=(.now?long-7*24*3600*1000)?number_to_date/>
</#if>
<@visit.urlList startVisitDate=startVisitDate endVisitDate=endVisitDate pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm"  action="visit/url.html" autocomplete="off" onsubmit="return divSearch(this,'visitBox');" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'url'/>:</label>
                    <input type="text" name="url" value="${url!}" size="30"/>
                </li>
                <li>
                    <label><@t.page 'visit.visit_date'/>:</label>
                    <input type="text" name="startVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startVisitDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endVisitDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                    <li>
                        <a class="button" href="visit/exportUrl?_csrf=<@tools.csrfToken admin=true/>" target="dwzExport" targetType="navTab"><i class="bi bi-cloud-download"></i><@t.page "button.export"/></a>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th><@t.page 'visit.visit_date'/></th>
                <th width="500"><@t.page 'url'/></th>
                <th>PV</th>
                <th>UV</th>
                <th>IP Views</th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td><a href="visit/history.html?startCreateDate=${a.id.visitDate!}" target="navTab" rel="visit/history" title="<@t.page 'visit.history'/>">${a.id.visitDate?date}</a></td>
                <td>
                    <div class="box">
                        <a href="cmsDiy/preview.html?url=${((a.url)?url)!}" target="navTab" rel="cmsDiy/preview"  title="<@t.page 'diy.preview'/>">${a.url!}</a>
                        <a href="${a.url!}" target="_blank"><i class="icon-external-link"></i></a>
                    </div>
                </td>
                <td class="center">${a.pv!}</td>
                <td class="center">${a.uv!}</td>
                <td class="center">${a.ipviews!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#assign rel='visitBox'/>
    <#include "../include_page/page.html"/>
</div>
</@visit.urlList>