<?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="result" />
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system   = "GE:エンジンサンプル"
	pgid     = "GE0009"
	title    = "リソースファイル抜出"
	date     = "2007/12/12"
	author   = "K.HASEGAWA"
	text     = "ZZZZ"
	version  = "001"
/>

<og:columnCheck
	command   = "{@command}"
	nullCheck = "SYSTEM_ID"
/>

<og:value command="SET" key="DIR" value="{@USER.ID}/{@SYSTEM_ID}/db/resource/xml/update" />
<og:value command="SET" key="ZIP" value="{@USER.ID}/{@SYSTEM_ID}/zip" />
<og:equals val1="**" val2="{@SYSTEM_ID}" >
	<og:value command="SET" key="DIR" value="{@USER.ID}/CMN/db/resource/xml/update" />
	<og:value command="SET" key="ZIP" value="{@USER.ID}/CMN/zip" />
</og:equals>

<!-- 出力先フォルダを削除します。 -->
<og:file action="delete" file1="{@SYS.REAL_PATH}{@SYS.FILE_URL}{@DIR}" />

<!-- ZIP出力の場合、リンクを用意します。(ZIPファイルはまだ未作成 -->
<og:equals val1="{@ZIP_FILE}" nullCheck="true" notEquals="true">
	<og:link href="{@SYS.CONTEXT_URL}{@SYS.FILE_URL}{@ZIP}/{@ZIP_FILE}.zip" target="_blank" useGamenId="false" >
		<img src="{@SYS.JSP}/image/floppy.gif" alt="Excel Open" /> {@ZIP_FILE}.zip <og:message lbl="MSG0056" />
	</og:link><br />
</og:equals>

<!-- 出力先フォルダのｱﾄﾞﾚｽ表示 -->
<og:text>{@SYS.REAL_PATH}{@SYS.FILE_URL}{@DIR}</og:text><br />
=============================================================================
<og:equals val1="{@TargetDB}" val2="RSC" contains="true">
	<og:file fileURL="{@DIR}" file1="GEA03_{@KBSAKU}.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GEA04_{@KBSAKU}.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GEA08_{@KBSAKU}.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GEA10_{@KBSAKU}.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GEA11_{@KBSAKU}.xml" action="delete" useStop="false" />
	<jsp:directive.include file="result_resource.jsp" />
</og:equals>

<og:equals val1="{@TargetDB}" val2="SYS" contains="true">
	<og:file fileURL="{@DIR}" file1="GEA10_{@KBSAKU}.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE12_{@KBSAKU}.xml"  action="delete" useStop="false" />
	<jsp:directive.include file="result_system.jsp" />
</og:equals>

<og:equals val1="{@TargetDB}" val2="RPT" contains="true">
  <og:equals val1="{@CDKH}" nullCheck="true" >
	<og:file fileURL="{@DIR}" file1="GE52.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE53.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE54.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE55.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE57.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE58.xml" action="delete" useStop="false" />
	<jsp:directive.include file="result_report.jsp" />
  </og:equals>

</og:equals>
<og:equals val1="{@TargetDB}" val2="RPD" contains="true">
  <og:equals val1="{@CDKH}" nullCheck="true" >
	<og:file fileURL="{@DIR}" file1="GE50.xml" action="delete" useStop="false" />
	<og:file fileURL="{@DIR}" file1="GE51.xml" action="delete" useStop="false" />
	<jsp:directive.include file="result_reportData.jsp" />
  </og:equals>
</og:equals>

<br/>

<!-- ZIPファイルの作成 -->
<og:equals val1="{@ZIP_FILE}" nullCheck="true" notEquals="true">
	<og:file action="zip" file1="{@SYS.REAL_PATH}{@SYS.FILE_URL}{@DIR}" file2="{@ZIP}/{@ZIP_FILE}.zip" />
<!-- 直接ダウンロードする場合
	<og:forward page="../fileDownload" useRedirect="true" redirectEncode="UTF-8"
		keys="file,name"
		vals="{@SYS.REAL_PATH}{@SYS.FILE_URL}{@ZIP}/{@ZIP_FILE}.zip,{@ZIP_FILE}.zip" />
-->
</og:equals>

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