#macro guestbookPage currentPage totalPage>
<#if (totalPage <= 0) || (currentPage > totalPage)><#return>#if>
<#local actionUrl = "/plugin/guestbook/list?">
<#local delUrl = "/plugin/guestbook/delete">
<#local startPage = currentPage - 4>
<#if (startPage < 1)><#local startPage = 1>#if>
<#local endPage = currentPage + 4>
<#if (endPage > totalPage)><#local endPage = totalPage>#if>
共${page.totalRows}条,共${page.totalPages}页记录
<#if (currentPage <= 8)>
<#local startPage = 1>
#if>
<#if ((totalPage - currentPage) < 8)>
<#local endPage = totalPage>
#if>
<#if (currentPage == 1)>
<#else>
#if>
<#if (currentPage > 8)>
…
#if>
<#list startPage..endPage as i>
<#if currentPage == i>
#{i}
<#else>
#if>
#list>
<#if ((totalPage - currentPage) >= 8)>
…
#if>
<#if (currentPage == totalPage)>
<#else>
#if>
#macro>