<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>
<%@ page import = "zr.zrpower.collectionengine.*" %>
<%@ page import = "zr.zrpower.collectionengine.service.ConfigService"%>

<%@ page import = "zr.zrpower.common.util.DateWork" %>
<%@ page import = "java.lang.Object"%>

<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
COLL_DOC_PRINT[] subconfig  = null;
ConfigService BaseReply = new ConfigService();
String type=request.getParameter("SelectedItems");
int intRowCur=0,intRowCount=0,showcurRow=0,intPage=1,intPageSize;
int intstart=0,intend=0;
intPageSize = 1000;
%>
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<LINK type="text/css" rel="stylesheet" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">

<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/script/Public.js"></SCRIPT>
<!--WEB组件样式和js结束-->
<script language="JavaScript" type="text/JavaScript">
<!--
function do_Function(FileUrl,type){
  parent.Right.location.href ='Right.jsp?ID='+FileUrl+'&SelectedItems='+type;
}
function Add(){
  parent.Right.location.href ='Add.jsp?SelectedItems=<%=type%>';
}
//-->
</script>
</HEAD>
<BODY class="BodyMain">

<FORM name="RegForm" method="post" action="">
<%=userUI.ShowTitleHtml("","","",user.getUserImage())%>
 <%=userUI.ClickButton("增加模板","JavaScript:Add();","IcoAdd.gif",user.getUserImage())%>
<%=userUI.ShowTitleEndHtml()%>
<%=userUI.ShowBodyStartHtml()%>
<table width="100%">
  <tr>
    <td height="450">
         <DIV id="divMessage" style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:auto'>
      <fieldset style="width: 98%">
      <legend>打印模板页码</legend>
       <table border="0"  class="inputTable" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" align="center">
        <%
        //得到查询的记录集
      subconfig = BaseReply.GetPrintList(type);
            if (subconfig != null)
              {//有记录记录集的长度
              intRowCount = subconfig.length;
              }
              //计算开始记录和结束记录
              intstart=intPage*intPageSize-intPageSize;
              intend=intPage*intPageSize;
              if (intRowCount<intend)
              {intend=intRowCount;}
              //当前页显示的记录数
              intRowCur=intend - intstart;
              showcurRow=0;
              for (int i = intstart; i < intend; i++) {
                   COLL_DOC_PRINT file =subconfig[i];
                   showcurRow=showcurRow+1;
              %>
            <tr valign="bottom">
                 <td width="10%" align="center" class="Window_TbB" nowrap style="text-align:center;cursor:pointer;" onclick="do_Function('<%=file.getID()%>','<%=type%>')" title="<%=file.getPAGE()%>">第<%=file.getPAGE()%>页</td>
            </tr>
             <%
             }%>
           </table>
            </fieldset>
           <br>
        </DIV>

    </td>
  </tr>
</table>
 <!--HTML Foot显示表单尾-->
  <%=userUI.ShowFootHtml()%>
 </FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
subconfig = null;
BaseReply = null;
%>
