<%@ page contentType="text/html; charset=GBK"  errorPage="../../../error.jsp" %>
<%@ page import = "zr.zrpower.collectionengine.service.ConfigService"%>

<%@ page import = "zr.zrpower.common.web.SelectBox" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>
<%
ConfigService configManage = new ConfigService();
UIService userUI =new UIService();
SessionUser user = (SessionUser)session.getAttribute("userinfo");
SelectBox sb = new SelectBox(configManage.getTableList());
String docid=request.getParameter("SelectedItems");

%>
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK type="text/css" rel="stylesheet" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/script/Public.js"></SCRIPT>
<script type='text/javascript' src='../../../dwr/engine.js'></script>
<script type='text/javascript' src='../../../dwr/util.js'></script>
<script type='text/javascript' src='../../../dwr/interface/CollConfigBean.js'></script>
<script language="JavaScript" type="text/javascript">
 <!--
//有效性检察
function Check(theForm){
if (theForm.TEMPLAET.value == "")
      {

       <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.parent.parent.layer.alert('请选择要上传的模板文件!', {icon: 7});
    <%}else{%>
    alert("请选择要上传的模板文件！");
    <%}%>
       theForm.TEMPLAET.focus();
       return false;
       }
  if(!(((theForm.TEMPLAET.value.toLowerCase()).indexOf(".") > 0)&&(theForm.TEMPLAET.value.toLowerCase()).indexOf(":") > 0))
		{

	<%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.parent.parent.layer.alert('模板文件格式不正确，请点击浏览上传正确的文件!', {icon: 7});
    <%}else{%>
    alert("模板文件格式不正确，请点击浏览上传正确的文件");
    <%}%>
		  theForm.TEMPLAET.focus();
		  return false;
		}
document.form1.submit();
}
-->
</script>
</HEAD>
<BODY class="BodyMain">
<form action="../../../actionprintconfig.do" method="post" enctype="multipart/form-data"  name="form1" onsubmit="return Check(this);">
<input type="hidden" name="DOCID" value='<%=docid%>' />
<!--HTML Head表单头显示[显示内容，用户肤色的图片文件夹]-->
<!--HTML Body Start显示表单开始部分-->
<%=userUI.ShowBodyStartHtml()%>
<br>&nbsp;
           <fieldset style="width: 98%">
           <legend>新建打印模板文件</legend>
            <TABLE  width="100%"  align="center" border="0">
             <TR>
             <TD colspan=2 height=5>
             <input class="input" type="hidden" name="Act" value="addprint" />
             </TD>
             </TR>
              <TR>
               <TD class="PutdSet" width="14%">打印模版：</td>
               <TD><input name="TEMPLAET" type="file" size="60" class="text" maxlength="200" ></td>
             </TR>
              <TR>
               <TD class="PutdSet" width="15%">页码：</TD>
               <TD><input class="text" type="text" name="PAGE" size="60" maxlength="2" onkeypress="if(event.keyCode<48 || event.keyCode>57) event.returnValue=false;"></TD>
             </TR>


           </TABLE>
            <br>
          </fieldset>
           <center><br>
                 <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton("保 存","JavaScript:if(Check(document.form1)){document.form1.submit();}","buttonSave.gif",user.getUserImage())%>
                 <%=userUI.ClickButton("重 填","JavaScript:document.form1.reset();","buttonReset.gif",user.getUserImage())%>
                  </tr></table>
                 <br>
          </center>

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