@@ -0,0 +1,1690 @@
+package org.ppl.common;%0A%0Apublic class Page %7B%0A%0A%09public String s_page(String url, Integer total, Integer page, Integer limit, String para) %7B%0A%09%09if(para.length()%3E0) para = '&'+para;%0A%09%09Integer ceil = (int)Math.ceil(total/limit);%0A%09%09Integer st=0;%0A%09%09Integer ceil_limit=0;%0A%09%09String spage, npage, ppage;%0A%09%09%0A%09%09if(ceil %3E 1)  ceil_limit=5;%0A%09   %0A%09    if(ceil %3E1 && page%3E=5)%7B%0A%09        ceil_limit=10;%0A%09    %7D%0A%09    if(page%3E=8)%7B%0A%09        st = (ceil-page) %3E10? (page-5):(ceil-10);%0A%09        ceil_limit += st-1;%0A%09        if(ceil - page %3C8)%7B%0A%09            st = page-2;%0A%09            ceil_limit = ceil;%0A%09        %7D%0A%09        if(ceil - page ==10)%7B%0A%09            st = page-2;%0A%09            ceil_limit =st+9;%0A%09        %7D%0A%09    %7Delse %7B%0A%09        st=1;%0A%09    %7D%0A%09    if(ceil %3C ceil_limit) ceil_limit=ceil;%0A%09    spage = %22%22;%0A%09    for (;st%3C=ceil_limit;st++)%7B%0A%09        if (page == st %7C%7C (page==0 && page==st-1)) %7B%0A%09            if(page==0) page=1;%0A%09            spage +=%22%3Cb class='here_num' style='margin:5px;padding:0px;font-size:16px;'%3E%5B$page%5D%3C/b%3E%22;%0A%09        %7Delse%0A%09            %0A%09             spage += %22%3Ca href='%22+url+%22?pag=%22+st+para+%22' style='margin:5px;padding:0px;font-size:16px;'%3E%5B$st%5D%3C/a%3E%22;%0A%09            %0A%09    %7D%0A%0A%09    if(page%3E=ceil)%7B%0A%09        npage = %22%5B%E5%B7%B2%E5%88%B0%E5%B0%BE%E9%A1%B5%5D%22;%0A%09    %7Delse %7B%0A%09    %09%0A         npage = %22%3Ca href='%22+url+%22?pag=%22+(page+1)+para+%22' style='margin:5px;padding:0px;font-size:16px;'%3E%5B%E4%B8%8B%E4%B8%80%E9%A1%B5%5D%3C/a%3E%22;%0A         npage += %22%3Ca href='%22+url+%22?pag=%22+ceil+para+%22' style='margin:5px;padding:0px;font-size:16px;'%3E%5B%E5%88%B0%E5%B0%BE%E9%A1%B5%5D%3C/a%3E%22;%0A%09        %0A%09    %7D%0A%09   %0A%09      ppage = (page%3E7) ? %22%3Ca href='%22+url+%22?%22+para+%22&pag=1&tol=%22+total+%22' style='margin:5px;padding:0px;font-size:16px;'%3E%5B%E5%9B%9E%E9%A6%96%E9%A1%B5%5D%3C/a%3E%22 : %22%22;%0A%09   %0A%09    return ceil%3E1?ppage+spage+npage:spage;%0A%09%09%0A%09%7D%0A%7D%0A

add page