<?xml version="1.0" encoding="UTF-8" ?>
<jsp:directive.page pageEncoding="UTF-8" />

<style type="text/css">
	table.wd100 td { width: 100px;}
</style>

<table class="wd100">
	<!-- ﾕｰｻﾞｰ GEA10 GE0001 -->
	<tr>
		<td>
			<og:link gamenId="GE0001" href="index.jsp" target="CONTENTS"
				keys="command,SYSTEM_ID,USRUPD,DYUPDFROM,DYUPDTO,FGJ"
				vals="NEW,{@SYSTEM_ID},{@USRUPD},{@DYUPDFROM},{@DYUPDTO},{@FGJ}" >{@LBL.GE0001}
			</og:link>
		</td>
		<td>GEA10.xml</td><td id="GEA10"></td>
	</tr>
	<!-- ｼｽﾃﾑ定数 GE12 GE0007 -->
	<tr>
		<td>
			<og:link gamenId="GE0007" href="index.jsp" target="CONTENTS"
				keys="command,SYSTEM_ID,USRUPD,DYUPDFROM,DYUPDTO,FGJ"
				vals="NEW,{@SYSTEM_ID},{@USRUPD},{@DYUPDFROM},{@DYUPDTO},{@FGJ}" >{@LBL.GE0007}
			</og:link>
		</td>
		<td>GE12.xml</td><td id="GE12"></td>
	</tr>
</table>
=============================================================================<br />

<!-- ﾕｰｻﾞｰ GEA10 GE0001 -->
<og:text caseNN="{@VIEW}">******************** GEA10 {@LBL.GEA10} ********************</og:text>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" dbid="{@DBID}" notfoundMsg="">
		select SYSTEM_ID,USERID,PASSWD,LANG,NAME_JA,ROLES,COMMENTS,DYPASSWD,DYVALID,FGDEFAULT,FGJ,
				DYSET,DYUPD,USRSET,USRUPD,PGSET,PGUPD
		from GEA10
		where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
		<og:where startKey="and">
			<og:and value = "FGJ	=  '{@FGJ}'"				/>
			<og:and value = "USRUPD	=  '{@USRUPD}'"				/>
			<og:and value = "DYUPD	>= '{@DYUPDFROM}000000'"	/>
			<og:and value = "DYUPD	<= '{@DYUPDTO}999999'"		/>
		</og:where>
		order by USERID
	</og:query>

	<script type="text/javascript">
		gea10 = document.getElementById("GEA10");
		gea10.textContent = "<og:text>{@DB.COUNT}</og:text>";
	</script>

	<og:view command="{@command}" selectedType="none" useScrollBar="false" pageSize="{@pageSize}" caseNN="{@VIEW}" />

	<og:writeTable
		fileURL        = "{@DIR}"
		filename       = "GEA10_{@KBSAKU}.xml"
		writerClass    = "XML"
		encode         = "UTF-8" >
		<og:writeTableParam key="TableName" value="GEA10" />
		<og:equals val1="{@EXT_SQL}" val2="DELETE" >
			<og:writeTableParam key="First" >
				delete from GEA10 where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
			</og:writeTableParam>
		</og:equals>
		<og:equals val1="{@EXT_SQL}" val2="MERGE" >
		  <og:writeTableParam key="MergeSql" >
			update GEA10
			set
				PASSWD		= [PASSWD]
			,	LANG		= [LANG]
			,	NAME_JA 	= [NAME_JA]
			,	ROLES		= [ROLES]
			,	COMMENTS	= [COMMENTS]
			,	DYPASSWD	= [DYPASSWD]
			,	DYVALID 	= [DYVALID]
			,	FGDEFAULT	= [FGDEFAULT]
			,	FGJ			= [FGJ]
			,	DYSET		= [DYSET]
			,	DYUPD		= [DYUPD]
			,	USRSET		= [USRSET]
			,	USRUPD		= [USRUPD]
			,	PGSET		= [PGSET]
			,	PGUPD		= [PGUPD]
			where 	SYSTEM_ID	= [SYSTEM_ID]
			and		USERID		= [USERID]
		  </og:writeTableParam>
		</og:equals>
	</og:writeTable>

<!-- ｼｽﾃﾑ定数 GE12 GE0007 -->
<og:text caseNN="{@VIEW}">******************** GE12 {@LBL.GE12} ********************</og:text>
	<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" dbid="{@DBID}" notfoundMsg="">
		select SYSTEM_ID,PARAM_ID,SEQNO,TITLE,PARAM,CONTENTS,PARAM_LVL,KBSAKU,
				FGCRYPT,CONTXT_PATH,FGREBOOT,FGJ,
				DYSET,DYUPD,USRSET,USRUPD,PGSET,PGUPD
		from GE12
		where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
		<og:where startKey="and">
			<og:and value = "KBSAKU =  '{@KBSAKU}'"				/>
			<og:and value = "FGJ	=  '{@FGJ}'"				/>
			<og:and value = "USRUPD	=  '{@USRUPD}'"				/>
			<og:and value = "DYUPD	>= '{@DYUPDFROM}000000'"	/>
			<og:and value = "DYUPD	<= '{@DYUPDTO}999999'"		/>
		</og:where>
		order by SEQNO
	</og:query>

	<script type="text/javascript">
		ge12 = document.getElementById("GE12");
		ge12.textContent = "<og:text>{@DB.COUNT}</og:text>";
	</script>

	<og:view command="{@command}" selectedType="none" useScrollBar="false" pageSize="{@pageSize}" caseNN="{@VIEW}" />

	<og:writeTable
		fileURL        = "{@DIR}"
		filename       = "GE12_{@KBSAKU}.xml"
		writerClass    = "XML"
		encode         = "UTF-8" >
		<og:writeTableParam key="TableName" value="GE12" />
		<og:equals val1="{@EXT_SQL}" val2="DELETE" >
			<og:writeTableParam key="First" >
				delete from GE12 where SYSTEM_ID in ( '{@SYSTEM_ID}','{@AST}' )
				<og:where startKey="and">
					<og:and value = "KBSAKU = '{@KBSAKU}'" />
				</og:where>
			</og:writeTableParam>
		</og:equals>
		<og:equals val1="{@EXT_SQL}" val2="MERGE" >
		  <og:writeTableParam key="MergeSql" >
			update GE12
			set
				SEQNO		= [SEQNO]
			,	TITLE		= [TITLE]
			,	PARAM		= [PARAM]
			,	CONTENTS	= [CONTENTS]
			,	PARAM_LVL	= [PARAM_LVL]
			,	FGCRYPT 	= [FGCRYPT]
			,	CONTXT_PATH = [CONTXT_PATH]
			,	FGREBOOT	= [FGREBOOT]
			,	FGJ			= [FGJ]
			,	DYSET		= [DYSET]
			,	DYUPD		= [DYUPD]
			,	USRSET		= [USRSET]
			,	USRUPD		= [USRUPD]
			,	PGSET		= [PGSET]
			,	PGUPD		= [PGUPD]
			where 	SYSTEM_ID	= [SYSTEM_ID]
			and		PARAM_ID	= [PARAM_ID]
			and		KBSAKU		= [KBSAKU]
		  </og:writeTableParam>
		</og:equals>
	</og:writeTable>
