<?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:value command="SET" key="CLM" value="{@SYS.SYSTEM_ID}_{@CDANK}_{@CDSITSU}" />

<og:query command="{@command}" displayMsg="" maxRowCount="50000">
	select A.KVAL AN_{@CDANK}_{@CDSITSU}, A.KVAL, '' KEY1, '' KEY2, '' KEY3, '' KEY4, '' KEY5, B.KUID, B.DYKAITO, B.NOKAITO from AN12 A inner join AN11 B
	on A.NOKAITO = B.NOKAITO
	where A.USERID = '{@USER.ID}'
	and A.CDANK = '{@CDANK}'
	and A.CDSITSU = '{@CDSITSU}'
	and A.FGOTHER = '1'
	and A.FGJ = '1'
	order by A.UNIQ DESC
</og:query>

<og:value command="SQL" action="ROW_APPEND">
	select A.UNIQ AN02_OTHER_UNIQS
	from AN02 A
	where A.CDANK = '{@CDANK}'
	and A.CDSITSU != '{@CDSITSU}'
	and A.FGKEY = '1'
	and A.FGJ = '1'
	order by A.SEQNO
</og:value>

<og:value command="SET" key="DISPKEYS" value="KUID,DYKAITO" />

<c:forTokens items="${AN02_OTHER_UNIQS}" delims="," var="AN02_OTHER_UNIQ" varStatus="status">
	<og:value command="SQL">
		select '&lt;span title="'||A.NAIYO||'"&gt;'||{@DBF.SUBSTR}(A.NAIYO,1,10)||'...&lt;/span&gt;' NAIYO_OTHER, A.CDSITSU CDSITSU_OTHER
		from AN02 A
		where A.UNIQ = '{@AN02_OTHER_UNIQ}'
	</og:value>

	<og:columnEditor column="KEY${status.count}" label="{@NAIYO_OTHER}" />

	<og:tableFilter classId="DBSELECT" selectedAll="true" keys="APPEND" vals="true">
		select KNAME KEY${status.count}
		from AN12 A
		where A.NOKAITO = [NOKAITO]
		and A.CDSITSU = '{@CDSITSU_OTHER}'
		and A.FGJ = '1'
	</og:tableFilter>

	<og:value command="SET" key="DISPKEYS" value="{@DISPKEYS},KEY${status.count}" />
</c:forTokens>

<div style="padding-left: 50px;">
	<og:equals val1="{@DB.COUNT}" val2="0" operator="GT">
		&amp;nbsp;&amp;nbsp;
		<og:link href="download.jsp" keys="CDANK,CDSITSU,listId" vals="{@CDANK},{@CDSITSU},list">
			<img src="{@SYS.JSP}/image/fileDownload.gif" alt="Download File" width="20px" height="20px" />
		</og:link>
	</og:equals>
	&amp;nbsp;&amp;nbsp;
	<og:link lbl="RETURN_CDSITSU" href="detail.jsp"
		keys="command,CDANK,CDSITSU,KEY,BACK_GAMENID" vals="NEW,{@CDANK},{@CDSITSU},{@KEY},{@BACK_GAMENID}" />
	<br /><br />
</div>

<og:columnEditor column="AN_{@CDANK}_{@CDSITSU}" label="KNAIYO" />

<div style="padding-left:20px;">
<og:text>{@LBL.NEWESTHND}</og:text>
<og:view
	viewFormType = "HTMLTable"
	command		= "{@command}"
	columnDisplay = "AN_{@CDANK}_{@CDSITSU},{@DISPKEYS}"
	checked		= "{@checked}"
	startNo		= "{@startNo}"
	pageSize	= "100"
	noMessage	= "true"
	selectedType= "NONE" />
</div>

</jsp:root>
