<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld" 
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />
<og:head headType="init" />

<og:equals val1="U" val2="{@D_MARK}">
	<og:equals val1="{@ISCALC}" val2="true" notEquals="true">
		<og:docConvert fileURL="{@USER.ID}" inputFile="{@SYS.REAL_PATH}report/{@USER.BASE_GAMENID}/{@MODELNAME}.ods" outputFile="{@MODELNAME}.xls" />
		<og:forward page="../../{@SYS.FILE_OUT_URL}{@USER.ID}/{@MODELNAME}.xls" filename="{@REPNAME}.xls" />
	</og:equals>

	<og:equals val1="{@ISCALC}" val2="true">
		<og:forward page="../../../../report/{@USER.BASE_GAMENID}/{@MODELNAME}.ods" filename="{@REPNAME}.ods" />
	</og:equals>
</og:equals>

<og:equals val1="S" val2="{@D_MARK}">
	<og:readTable
		command		= "NEW"
		fileURL		= "{@SYS.REAL_PATH}report/{@USER.BASE_GAMENID}"
		filename	= "fileDownloadList.txt"
		scope		= "request"
		mainTrans	= "false"
	/>

	<og:fileUD typeDownload="true">
		<og:query
			command		= "NEW"
			maxRowCount	= "1"
			scope		= "request"
			quotCheck	= "false"
			mainTrans	= "false">
				{@USER.LASTSQL}
		</og:query>
	</og:fileUD>

	<og:writeTable
		writerClass		= "CalcDefAno"
		headerSequence	= "LD"
		scope			= "request"
		fileURL			= "{@USER.ID}"
		filename		= "reportTemplate.ods"
		columns			= "{@USER.CLM_NAMES}"
		encode			= "{@SYS.FILE_ENCODE}">
		<og:writeTableParam
			key		= "Size" 
			value	= "25"
		/>
	</og:writeTable>

	<og:equals val1="{@ISCALC}" val2="true" notEquals="true">
		<og:docConvert fileURL="{@USER.ID}" inputFile="reportTemplate.ods" outputFile="reportTemplate.xls" delInput="true" />
		<og:forward page="../../{@SYS.FILE_OUT_URL}{@USER.ID}/reportTemplate.xls" filename="{@GUI.NAME @USER.BASE_GAMENID}_template.xls" />
	</og:equals>

	<og:equals val1="{@ISCALC}" val2="true">
		<og:forward page="../../{@SYS.FILE_OUT_URL}{@USER.ID}/reportTemplate.ods" filename="{@GUI.NAME @USER.BASE_GAMENID}_template.ods" />
	</og:equals>
</og:equals>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
