ASR003_STD.jsp 4.82 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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
<!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="ASR003" scope="page" class="com.csc.library.system.Task" />
<html>
<% 
	//out.println(request.getParameter("__screen"));
	
   ASR003.setChannel(request ,response);
   ReportEntry screen=(ReportEntry)ASR003.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">
<link href="./CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="./CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="./JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="./JS/bootstrap.js"></script>
<script type='text/javascript' src='JS/SCREEN.js'></script>
<script language='javascript' src='JS/SWAPLANG.js'></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="JavaScript" type="text/JavaScript">

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

function setData(){
	with(document.cscform){
		//alert("export_config -->> "+export_config.value);
	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");
	  bCon=confirm(MyCode[183]);
	  if (bCon==true)	{
		__cmd.value="save";
		setData();
		submit();
		//window.close();
	  }
	}
 }
//-->
</script>

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

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

<%=screen.InitialVariable()%>

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

<div align="center">
    <table  cellpadding="0"  cellspacing="0">
      <tr > 
        <td  class="header"> ASR003_STD, 
          <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> -->
                     <option value="EXPORT_XLS.xls">xls</option>
                     <option value="EXPORT_CSV.csv">csv</option>
                     <option value="EXPORT_TXT.txt">txt</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  class="buttonline" colspan="7"><div align="center">
                  <button type="button" class="btn btn-primary width100" swlang code="SW013169" onClick="goSubmit();">OK</button>&nbsp;
                  <button type="button" class="btn btn-primary width100" swlang code="SW006927" onClick="goClose();">CANCEL</button>
                </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)+"\">");
  } 
  if(request.getParameter("__cmd")!=null && request.getParameter("__cmd").equals("save")){
  %>
	<script language="javascript">goClose();</script>
	<%	
	}
  %>
</form>
</body>
</html>