TRR003.jsp 3.97 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.csc.library.entry.*" %>
<%@ page import="com.csc.library.utilities.*" %>
<jsp:useBean id="TRR003" scope="page" class="com.csc.library.system.Task" />
<html>
<% 
   TRR003.setChannel(request ,response);
   ReportEntry screen=(ReportEntry)TRR003.process("ReportEntry",request.getParameter("__screen"));
   UProfile uf=screen.getUProfile();
   screen.process();
   ThaiUtilities th=new ThaiUtilities();
%>
<head>
<title>ReportOption</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="CSS/TISCO.css" rel="stylesheet" type="text/css">
<script language='javascript' src='JS/SCREEN.js'></script>
<!--script language='javascript' src='JS/SWAPLANG.js'></script-->
<script language='javascript'>setLang('eng');</script>
<script language="JavaScript" type="text/JavaScript">

function goClose(){
	window.close();
}

function setData(){
	with(document.cscform){
	tmp=export_config.value.split(".");
	 	setParent(tmp[0],tmp[1]);
	}
	//window.close();
}

function setParent(ex_type,f_type){
	with(document.cscform){
		__export_type.value=ex_type;
		__file_type.value=f_type;
		//goSubmit();
	 }
}

function goSubmit(){
	with(document.cscform){
      bCon=confirm("Export  file");
	  if (bCon==true)	{
		__cmd.value="save";
		setData();
		submit();
	  }
	}
 }
//-->
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<form name="cscform" method="post" action ="TRR003.jsp">
 

<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<div align="center">
    <table  cellpadding="0"  cellspacing="0">
      <tr > 
        <td  class="header"> PRR003, 
          <script language="javascript">swapLang('Report Option');</script>&nbsp;</td>
      </tr>
      <tr > 
        <td  colspan="2"> 
          <div align="center"> 
            <table  cellpadding="0" cellspacing="0" >
              <tr> 
                <td colspan="2"  class="blankspace"></td>
              </tr>
              <tr> 
                <td width="197"  class="columnlabel">Select file format&nbsp;</td>
                <td width="441" > 
                <select name="export_config" size="1">
      				<%if(request.getParameter("__expxml").equals("null") && request.getParameter("__mmxml").equals("null")){%>
                    <option value="EXPORT_PDF.pdf">pdf</option>
                    <option value="EXPORT_HTML.html">html</option>
                    <option value="EXPORT_XML.xml">xml</option>
                    <%}else if(!request.getParameter("__expxml").equals("null")){%>
                    <option value="EXPORT">exp</option>                    
                    <%}else if(!request.getParameter("__mmxml").equals("null")){%>
                    <option value="MAILMERGE">mm</option>            
                    <%}%>
                  </select></td>
              </tr>
              <tr > 
                <td colspan="2" class="blankspace"></td>
              </tr>
              <TR> 
                <TD colspan="2"><div align="center"><a href="javascript:goSubmit();"><img src="IMAGES/BUTTON/OK.gif" border="0"></a> 
                    &nbsp;&nbsp; <a href="javascript:goClose();"> <img src="IMAGES/BUTTON/CANCEL.gif" border="0"></a></div></TD>
              </TR>
              <tr > 
                <td colspan="2" class="blankspace"></td>
              </tr>
            </table>
          </div></td>
      </tr>
      <tr bordercolor="0069B3"> 
        <td  class="bottom"></td>
      </tr>
    </table>
  </div>
  <%
  java.util.Enumeration em=request.getParameterNames();
  while(em.hasMoreElements()){
  	String name=(String)em.nextElement();
  	String value=request.getParameter(name);
  	if(!name.equals("export_config"))
  	out.println("<input type=\"hidden\" name=\""+name+"\" value=\""+th.ASCII2Unicode(value)+"\">");
  } 
  %>
</form>
</body>
</html>