
<%    /**
     * **********************************************************@@ Program Name
     * : doc_list.jsp Description	: /집계자/내문서함/등록함/문서 목록 Author	: 기현테크 Create
     * Date	: 2010.11.23 History	:
     * @@***********************************************************
     */
%>

<%@ page contentType="text/html; charset=UTF-8"
         import="java.net.URLDecoder" import="kr.co.kihyun.lang.MInteger"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%    try {
        /**
         * ***** Parameter ********
         */
        String uri = URLDecoder.decode(request.getParameter("uri"), "UTF-8");
        int pageSize = MInteger.parseInt(request.getParameter("pageSize"));
        int currentPage = MInteger.parseInt(request.getParameter("currentPage"));
        int currentPageSetUp = MInteger.parseInt(request.getParameter("currentPageSetUp"));
        int listNum = MInteger.parseInt(request.getParameter("listNum"));
        if (listNum == 0) {
            listNum = 30;
        }
        String sort = request.getParameter("sort");
%>

<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <!-- <td align="center" valign="middle"><b>01</b>ㆍ02ㆍ03ㆍ04ㆍ05 -->
        <td align="right">
            <% 
            //이전 40개
            //System.out.println("currentPageSetUp::::::"+currentPageSetUp+":::currentPage::"+currentPage+":::::pageSize:::"+pageSize);
            if (currentPage > 10) {
            %>
            <a href="./<%= uri%>&subStrPage=1" style="text-decoration: none;">
                <img src="/totsys/common/images/bt_list_pre.gif" style="vertical-align: top;" />
            </a>
            <%} else {%>
            <img src="/totsys/common/images/bt_list_pre.gif" style="vertical-align: top;" />
            <%}%>
            <%if (currentPage > 10) {//이전 10개%>
            <a href="./<%= uri%>&subStrPage=<%= (currentPageSetUp - 9)%>" style="text-decoration: none;">
                <img src="/totsys/common/images/prev_text.gif" style="vertical-align: top;" />
            </a>
            <%} else {%>
            <img src="/totsys/common/images/prev_text.gif" style="vertical-align: top;" />
            <%}%>
        </td>
        <% 
        //페이지 선택
        for (int i = (currentPageSetUp + 1); i <= pageSize && i <= (currentPageSetUp + 10); i++) {
            if (i != 1) {%>
        <!--td nowrap>&nbsp;<img src="images/pagebar.gif">&nbsp;</td-->
        <%}
                if (i != currentPage) {%>
        <td>&nbsp;
            <a border=0  href="./<%= uri%>&subStrPage=<%= i%>&listNum=<%=listNum%>&sort=<%=sort%>">
                <span style="font-family: 돋움; font-size: 12px; color: #7a7a7a; font-weight: bold;"><%= i%></span>
            </a>&nbsp;
        </td>
        <%														} else {%>
        <td nowrap>&nbsp;
            <span style="font-family: 돋움; font-size: 12px; color: #508ac3; font-weight: bold;"><%= i%></span>&nbsp;&nbsp;
        </td>
        <%}
                    }%>
        <td>
            <%if ((pageSize - currentPageSetUp) > 10) {//다음 10개%>
            <a href="./<%= uri%>&subStrPage=<%= (currentPageSetUp + 11)%>" style="text-decoration: none;">
                <img src="/totsys/common/images/next_text.gif" style="vertical-align: top;" />
            </a>
            <%} else {%>
            <img src="/totsys/common/images/next_text.gif" style="vertical-align: top;" />
            <%}%>
            <% //다음 40개
                //System.out.println("currentPageSetUp End::::::"+currentPageSetUp+":::currentPage::"+currentPage+":::pageSize:::"+pageSize);
                if ((pageSize - currentPageSetUp) > 10) {%>
            <a href="./<%= uri%>&subStrPage=<%= pageSize%>" style="text-decoration: none;">
                <img src="/totsys/common/images/bt_list_next.gif" style="vertical-align: top;" />
            </a>
            <%} else {%>
            <img src="/totsys/common/images/bt_list_next.gif" style="vertical-align: top;" />
            <%}%>
        </td>
    </tr>
</table>
<%
    } catch (Exception ex) {
        ex.printStackTrace();
        out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';"));
    } finally {
    }
%>
