<%@ 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.common.web.SelectBox"%>
<%@ page import = "zr.zrpower.analyseengine.service.StatisticsConfig"%>

<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>

<HTML>
<%
StatisticsConfig StatisticsCfg =  new StatisticsConfig();
UIService userUI =new UIService();
SessionUser user = (SessionUser)session.getAttribute("userinfo");
String TableName=request.getParameter("TableName");
//
//html5用到
  String userClass="windowimg";
  String zdid=request.getParameter("zdid");
  if(!"6".equals(user.getUserImage())){
     userClass=user.getUserImage();
  }

%>
<HTML>
<HEAD>
<TITLE><%=SysPreperty.getProperty().SystemName%><%=SysPreperty.getProperty().Versoin%></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>
</HEAD>
<BODY class="BodyMain">
<FORM name="RegForm" method="post" action="" onsubmit="return Check(this);">
<input type="hidden" id="Act" name="Act" value="savemain">

  <br>&nbsp;

          <table border="0" class="inputTable" cellspacing="0"  cellpadding="0" align="center">
          <tr>
            <td class="inputTd" align="center">
            <select name="FieldName"  id="FieldName" style="WIDTH: 230px" >
                     <%
                     String[][] FieldList = StatisticsCfg.GetTableFieldList3(TableName);
                      if (FieldList != null) {
                      if (FieldList.length > 0) {
                      for (int i = 0; i < FieldList.length; i++) {
                   out.print("<option value='"+FieldList[i][0]+"'>"+FieldList[i][1]+"</option>");
                            }
                          }
                       }
                     %>
              </select>
            </td>
         </tr>
       </table>
                 <center><br>
                 <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton1("确定","JavaScript:seleTask()","buttonSave.gif",user.getUserImage())%>

                 <%if("6".equals(user.getUserWINDOWTYPE())){%>
                    <%=userUI.ClickButton("关闭","JavaScript:parent.layer.closeAll();","buttonClose.gif",user.getUserImage())%>

                <%}else{ %>
                    <%=userUI.ClickButton1("关闭","JavaScript:window.close();","buttonClose.gif",user.getUserImage())%>

                <%} %>
                 </tr></table>
                 </center>


</FORM>
<script language="JavaScript" type="text/JavaScript">
function seleTask()
{


    <%if("6".equals(user.getUserImage())){%>
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
      parent.$('#<%=zdid%>').val(RegForm.FieldName.value);
      parent.layer.close(index);
    <%}else{%>
      window.returnValue=RegForm.FieldName.value;
      window.close();
    <%}%>

}
</script>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
%>
