<?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/customan/no_info.jsp" />

<style type="text/css">
	#divHlr {
		margin:10px;
	}
</style>


<!-- ワーニングメッセージです。ここでは、登録完了のメッセージを表示します。 -->
<og:errorMessage command="{@command}" clear="{@clear}" displayMsg="{@displayMsg}" />

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

<og:query command="{@command}" debug="{@debug}" maxRowCount="{@maxRowCount}" scope="request">
	<jsp:text>
		select '0' ISANS
				,case
					when A.FGKOKAI != '0' and '{@USER.YMD}' between A.DYKSTR and A.DYKEND
						then '2'
					when A.FGKOKAI != '0' and '{@USER.YMD}' &gt; A.DYKEND
						then '3'
				end ANKJYOKYO
				,A.NMANK,A.DYKEND,A.FGKOKAI,A.CRYPTKEY,A.FGSHUBETSU,A.CDANK,A.UNIQ,A.USERID,0 KCNT,0 SUSPOINT
				,case when A.FGRESDISP in ('1','2') then 'true' else 'false' end RESDISP
		from AN01 A
		where A.FGKOKAI = '1'
		and A.DYKSTR &lt;= '{@USER.YMD}'
		and A.FGJ = '1'
	</jsp:text>
	<og:where startKey="and">
		<og:and value = "A.NMANK		like	'%{@NMANK}%'" />
		<og:and value = "A.DYKEND		&lt;=	'{@DYKEND}'" />
		<og:and value = "( '{@ISNOTEND}'='0' OR ('{@ISNOTEND}'='1' and '{@USER.YMD}' &lt;= A.DYKEND ) )" />
		<og:and value = "A.FGJ			=		'{@FGJ}'" />
	</og:where>
	<og:appear startKey = "order by" value = "{@ORDER_BY}"
				defaultVal = "A.DYKEND,A.UNIQ" />
</og:query>

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

<og:tableFilter classId="DBSELECT" selectedAll="true" scope="request">
	select count(*) KCNT
	from AN11 A
	where A.USERID = [USERID]
	and A.CDANK = [CDANK]
	and A.FGJ = '1'
</og:tableFilter>

<og:tableFilter classId="DBSELECT" selectedAll="true" scope="request">
	select [RESDISP]||[FGSHUBETSU] ISANS,SUSPOINT
	from AN11 A
	where A.USERID = [USERID]
	and A.CDANK = [CDANK]
	and A.KIPADDR = '{@USER.IPADDRESS}'
	and A.FGJ = '1'
	order by A.NOKAITO desc
</og:tableFilter>

<og:viewLink command="NEW">
	<og:link column="USERID" gamenId="OP1013" href="index.jsp" onLink="true" target="_top"
		keys="command,USERID" vals="NEW,[USERID]" />
</og:viewLink>

<og:viewMarker command="{@command}">
	<og:columnMarker column="ISANS" onMark="[ISANS]" markList="0">
		<og:input type="button" lbl="KAITO" td="false"
			onClick="top.location.href='../OP1003/index.jsp?command=NEW&amp;KEY=[CRYPTKEY]&amp;BACK_GAMENID={@GUI.KEY}';" />
	</og:columnMarker>
	<og:columnMarker column="ISANS" onMark="[ISANS]" markList="false1|false2">
		<og:input type="button" lbl="ISANS.1" td="false" />
	</og:columnMarker>
	<og:columnMarker column="ISANS" onMark="[ISANS]" markList="true1">
		<og:input type="button" lbl="VIEWKEKKA" td="false"
			onClick="top.location.href='../OP1101/index.jsp?command=NEW&amp;KEY=[CRYPTKEY]&amp;UVIEW=true&amp;BACK_GAMENID={@GUI.KEY}';" />
	</og:columnMarker>
	<og:columnMarker column="ISANS" onMark="[ISANS]" markList="true2">
		<og:input type="button" lbl="VIEWKEKKA" td="false"
			onClick="top.location.href='../OP1101/index.jsp?command=NEW&amp;KEY=[CRYPTKEY]&amp;UVIEW=true&amp;BACK_GAMENID={@GUI.KEY}';" />
		 ( [SUSPOINT] {@LBL.POINT} )
	</og:columnMarker>
</og:viewMarker>

<og:view
	viewFormType = "HTMLTable"
	command		= "{@command}"
	noDisplay	= "CDANK,CRYPTKEY,UNIQ,SUSPOINT,RESDISP"
	checked		= "{@checked}"
	startNo		= "{@startNo}"
	pageSize	= "{@pageSize}"
	selectedType= "NONE"
	scope		= "request" />

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