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

<og:equals val1="{@command}" val2="NEW">
	<og:fileUD typeDownload="true" />
	<og:userInfo command="SET" key="CLM_NAMES" value="{@DB.CLM_NAMES}" />

	<og:file action="mkdir" fileURL="{@SYS.REAL_PATH}report"/>
	<og:file action="mkdir" fileURL="{@SYS.REAL_PATH}report/{@USER.BASE_GAMENID}"/>

	<og:file action="exists" fileURL="{@SYS.REAL_PATH}report/{@USER.BASE_GAMENID}" file1="fileDownloadList.txt" useStop="false">
		<og:readTable
			command		= "NEW"
			fileURL		= "{@SYS.REAL_PATH}jsp/common/"
			filename	= "fileDownloadListDef.txt"
			scope		= "request"
			mainTrans	= "false"
		/>
		<og:writeTable
			fileURL		= "{@SYS.REAL_PATH}report/{@USER.BASE_GAMENID}"
			filename	= "fileDownloadList.txt"
			scope		= "request"
		/>
	</og:file>
</og:equals>

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

<og:columnEditor column="DEFAULT" label=" " scope="request" />

<og:viewLink command="NEW">
	<og:link column="REPNAME" href="download.jsp" onLink="[ISREP]" markList="Y"
		keys="REPNAME,MODELNAME,TYPE,D_MARK"
		vals="[REPNAME],[MODELNAME],[TYPE],U"
		onClick="location.href=$(this).attr('href')+'&amp;ISCALC='+$('#ISCALC').attr('checked'); return false;" />
	<og:link column="REPNAME" href="download.jsp" onLink="[MODELNAME]" markList="Template"
		keys="REPNAME,MODELNAME,TYPE,D_MARK,gamenId,GAMENID"
		vals="[REPNAME],[MODELNAME],[TYPE],S,{@USER.BASE_GAMENID},{@USER.BASE_GAMENID}"
		onClick="location.href=$(this).attr('href')+'&amp;ISCALC='+$('#ISCALC').attr('checked'); return false;" />
</og:viewLink>

<og:value command="SET" key="DEFAULT_MODELNAME">
<og:userInfo command="GET" key="REPORT_DEFAULT_MODELNAME_{@USER.BASE_GAMENID}" />
</og:value>

<og:viewMarker command="NEW">
	<og:columnMarker column="DEFAULT" onMark="[MODELNAME]" markList="{@DEFAULT_MODELNAME}">
		<span style="font-weight:bold; color:red;">*</span>
	</og:columnMarker>
</og:viewMarker>

<b><og:message lbl="CONFIG_REPORT" /></b><br />

<form onSubmit="return oneClick();" method="POST" action="forward.jsp">

<og:writeCheck>
	<og:submit value="update" command="INSERTONE"  lbl="INSERT" accesskey="I" />
	<og:submit value="update" command="MODIFY"     lbl="MODIFY" accesskey="M" />
	<og:submit value="update" command="REALDELETE" lbl="DELETE" accesskey="D" onClick="return confirm('{@LBL.GEM0040}');"/>
</og:writeCheck>

<og:submit value="default" lbl="SET_DEFAULT_MODEL"  accesskey="F" />

<og:input type="checkbox" name="ISCALC" id="ISCALC" />

<og:view
	viewFormType= "HTMLCustomTable"
	command		= "NEW"
	selectedType= "radio"
	scope		= "request"
	noMessage	= "true"
	viewFormId	= "dummy">
	<og:thead rowspan="1">
		<tr>
			<td colspan="2">[REPNAME]</td>
			<td>[TYPE]</td>
		</tr>
	</og:thead>
	<og:tbody rowspan="1">
		<tr>
			<td>[DEFAULT]</td>
			<td>[REPNAME]</td>
			<td>[TYPE]</td>
		</tr>
	</og:tbody>
</og:view>

</form>

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