<%--
  - Author(s)  : kyj
  - Date       : 2015.01.19
  - Description: 경영평가표 팝업
  --%>

<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="kr.co.hsnc.common.config.WAFConfig" %>
<%@ page import="kr.co.hsnc.common.util.ValueObject" %>
<%@ page import="kr.co.hsnc.common.sql.RowSet" %>

<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />

<%
	ctx.init(request, response); 
	HandlerStorage storage = ctx.getHandlerStorage();
	ValueObject params = storage.getParams();
	ValueObject user = ctx.getUser();
	String p_corp_id = params.get("p_corp_id");
    
    RowSet getApprYearList = storage.getRowSet("getApprYearList");
    
    
%>
<script src="/js/crownix-viewer.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/crownix-viewer.min.css">

<!-- <SCRIPT language="javascript" src="/js/RDConfig.js"></SCRIPT> -->
<SCRIPT language="JavaScript">
	
	function doPageInit() {
		var args = arguments;
		  var viewerObj = document.getElementById("RdViewer");
		  var p_doc_cd = "<%=params.get("p_doc_cd")%>";
		  var RDUrl = "";
		  var RDParams = "";
		  
		  /* if(p_doc_cd == "11")
		      RDUrl = "/report/mrd/buyer/supplier/outside/OutSupplierReport.mrd";
	      {
		      RDUrl = "/report/mrd/buyer/supplier/outside/OutSupplierReport.mrd";
	      }
		  else if(p_doc_cd == "12")
	      {
		      RDUrl = "/report/mrd/buyer/supplier/outside/OutSupplierReport.mrd";
	      } */
		      RDUrl = "/report/mrd/buyer/supplier/outside/OutSupplierReport.mrd";
		  
		  var RDParams = "[" + $("#p_corp_id").val() + "]";
        		RDParams += "[" + $("#p_arr_id").val() + "]";
        		RDParams += "[" + $("#p_appr_dy").val() + "]";

      		var viewer = new m2soft.crownix.Viewer("<%=WAFConfig.get("waf.rd_report.searver")%>", 'RdViewer');
    		viewer.useAdjustCharacterScale(true);
    		viewer.openFile("<%= ctx.getServerDomain() %>" + RDUrl, '/rf [<%= WAFConfig.get("waf.rd_report.path", "")%>rdagent.jsp] /rsn [<%= WAFConfig.get("waf.rd_report.DataSource", "")%>] /rp '+ RDParams);
         		
        	<%-- 	
		  with(viewerObj) {
		    AutoAdjust = false;
		    ZoomRatio = 140;
		    SetBackgroundColor(255,255,255);
		    HideStatusbar();
		    ShowMemoLine (0);
		    //FileOpen(urlPrefix + RDUrl, RDParams);
		    ApplyLicense("<%=WAFConfig.get("waf.rd_report.path")%>rdagent.jsp");
		    FileOpen("<%= ctx.getServerDomain() %>" + RDUrl, "/rf [<%= WAFConfig.get("waf.rd_report.path", "")%>rdagent.jsp] /rsn [<%= WAFConfig.get("waf.rd_report.DataSource", "")%>] /rp "+ RDParams);
		  } --%>
	}
	
	
	
	document.body.onload = doPageInit;

</SCRIPT>
<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>

<FORM name="form1" method="post">

<INPUT type="hidden" name="p_corp_id" id="p_corp_id" value="<%=p_corp_id%>">
<INPUT type="hidden" name="p_arr_id" id="p_arr_id" value="<%=params.get("p_arr_id")%>">
<INPUT type="hidden" name="p_appr_dy" id="p_appr_dy" value="<%=params.get("p_appr_dy")%>">

<TABLE class="screen_title_table">
<tr>
<td>


<!-- 발주의뢰정보 : 시작 -->
<div class="tab_container">
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%; margin-left: 0px;">
		<tr>
			<td align="left">
				<div class="tab_content">
		        	<div style="width: 40%; text-align: left; float: left;" >
		        	기준 년도 : 
		        		<select name="corpTestYear" id="corpTestYear">
		        		<%
		        			if(getApprYearList.size() > 0)
		        			{
		        			    for(int i=0; i < getApprYearList.size(); i++)
		        			    {
		        		%>
		        			<option value="<%=getApprYearList.getRow(i).get("appr_dy")%>|<%=getApprYearList.getRow(i).get("arr_id")%>" <%=params.get("p_appr_dy").equals(getApprYearList.getRow(i).get("appr_dy")) ? "selected=\"selected\" " : "" %>><%=getApprYearList.getRow(i).get("appr_dy")%></option>
		        		<%
		        			    }
		        			}
		        		%>
		        		</select>
		        	</div>
					<div style="margin-top: 25px; margin-bottom: 5px;height:1400px;">
						<div id="RdViewer" style="position:relative;width:100%;height:100%"></div>
<!-- 						<script type="text/javascript">makeRDViewer('RdViewer', '100%', '100%');</script> -->
					</div>
		        </div>
			</td>
		</tr>
	</table>
  </div>	
  </td>
  </tr>
</TABLE>
</FORM>
