<#if !startVisitDate?has_content>
    <#assign startVisitDate=(.now?long-7*24*3600*1000)?number_to_date/>
</#if>
<@visit.dayList startVisitDate=startVisitDate endVisitDate=endVisitDate hourAnalytics=hourAnalytics pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" action="visit/day.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 '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>
                <li>
                    <select class="combox" name="hourAnalytics">
                        <option value><@t.page 'analytics.type'/></option>
                        <option value="false"${(!(hourAnalytics?has_content)||"false"=hourAnalytics)?then(' selected="true"','')?no_esc}><@t.page 'visit.hour_analytics.day'/></option>
                        <option value="true"${(hourAnalytics?has_content&&"true"=hourAnalytics)?then(' selected="true"','')?no_esc}><@t.page 'visit.hour_analytics.hour'/></option>
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                    <li>
                        <a class="button" href="visit/exportDay?_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>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}<#if hourAnalytics?has_content && 'true'=hourAnalytics> ${a.id.visitHour!}:00:00</#if>
                    </a>
                </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.dayList>