<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzLevelNumber" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.weboffice.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
   int i = 0;
   OfficePrintTemp officePrintTemp = new OfficePrintTemp(0);
   Collection collTemp = officePrintTemp.getTemplateList(); 
   Iterator iterTemp = null;
   if (collTemp != null) {
	   iterTemp = collTemp.iterator();
   }
   OfficeTemplate officeTemplate = null;
    
%>
<!-----上面的工具栏------>
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <tr>
    <td>    
      <%=SzPageHelp.button("新增","document.location.href='update.jsp'") %>
    </td>
  </tr>
  </form>
</table>
<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <tr class="trClassTitle">
    <td>名称</td>
    <td>说明</td>
    <td>模板文件</td>
    <td>输出文件夹</td>
    <td>操作</td>
  </tr>
<%
  String name = "";
  String path = "";
  while (iterTemp.hasNext()) {
	  officeTemplate = (OfficeTemplate)iterTemp.next();
	  name = officeTemplate.getAttrs().get("name");
	  path = officeTemplate.getAttrs().get("path");
	  i++;
%>
  <tr  onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
    <td><%=name%>&nbsp;</td>
    <td><%=officeTemplate.getAttrs().get("desc")%>&nbsp;</td>
    <td><%=path%>&nbsp;</td>
    <td><%=officeTemplate.getAttrs().get("saveDir")%>&nbsp;</td>
    <td>   
      <a href="javascript:document.location.href='update.jsp?OPERATOR=update&name=<%=name%>'">修改</a>
      <a href="javascript:DeleteCheck('<%=name%>');">删除</a>
      <a href="javascript:document.location.href='updateBlock.jsp?OPERATOR=updateBlock&type=GW&name=<%=name%>';">正文</a>
      <a href="javascript:document.location.href='updateBlock.jsp?OPERATOR=updateBlock&type=FJ&name=<%=name%>';">附件</a>
      <a href="javascript:document.location.href='updateBlock.jsp?OPERATOR=updateBlock&type=QZ&name=<%=name%>';">签名</a>
      <a href="javascript:document.location.href='updateBlock.jsp?OPERATOR=updateBlock&type=MX&name=<%=name%>';">明细</a>
      <a href="javascript:document.location.href='updateBlock.jsp?OPERATOR=updateBlock&type=TJ&name=<%=name%>';">条件</a>
      <!-- 
      <a href="javascript:EditCheck('<%=path%>');">编辑模板</a>
       -->                             
    </td>    
  </tr>
<%
  }
%>
  </form>  
</table>  

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">

  </form>
</table>
<script language="javascript">
  function DeleteCheck(name) {
  	if (confirm("删除将不能恢复,是否继续?")) {
  		document.location.href="control.jsp?OPERATOR=delete&name=" + name; 
  	}
  }
  function EditCheck(path) {
  	var url = "control.jsp?OPERATOR=edit&path=" + path;
    window.open(url, '', 'left=20,top=20,scrollbars=yes,resizable=yes,status=yes,width=1000,height=720');    
  }
</script>
