<?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="query">
	<script type="text/javascript" src="../customan/ankKomoku.js" ><!-- --></script>
</og:head>

<jsp:directive.include file="/jsp/custom/query_info.jsp" />

<!-- キーのチェック・復号化 -->
<og:bizLogic logics="an.OP0001S" keys="KEY" />
<og:value command="SET" key="CDANK" value="{@RETURN}" />

<og:value command="SQL">
	select A.USERID,A.NMANK,A.SMANK,A.DYKSTR,A.DYKEND,A.FGNODPL,A.FGRESDISP,A.FGSHUBETSU,A.FGTEMPLATE
	from AN01 A
	where A.CDANK = '{@CDANK}'
	and A.FGJ = '1'
</og:value>

<og:value command="SQL">
	select count(*) CNT
	from AN02 A
	where A.CDANK = '{@CDANK}'
	and A.IMGNAI is not null and A.IMGNAI != coalesce('',' ')
	and A.FGJ = '1'
</og:value>

<og:value command="SQL">
	select {@CNT} + count(*) CNT
	from AN03 A
	where A.CDANK = '{@CDANK}'
	and A.IMGKVAL is not null and A.IMGKVAL != coalesce('',' ')
	and A.FGJ = '1'
</og:value>

<div style="margin: 10px;">
	<og:equals val1="{@USERID}" val2="{@USER.ID}">
		<og:link lbl="ANKCONF" gamenId="AN0003"  href="index.jsp" target="_top"
			keys="command,CDANK,FGJ" vals="NEW,{@CDANK},1" />
		&amp;nbsp;&amp;nbsp;
	</og:equals>

	<og:link lbl="QALISTOUT" href="fileout.jsp" target="_top"
		keys="command,KEY,LIST" vals="NEW,{@KEY},true" />
	<og:link lbl="ALL_OUT" href="fileout.jsp" target="_top"
		keys="command,KEY,LIST,ALL_OUT" vals="NEW,{@KEY},true,true" />
	&amp;nbsp;&amp;nbsp;

	<og:equals val1="{@CNT}" val2="0" notEquals="true">
		<og:link lbl="IMAGESOUT" href="fileout.jsp" target="_top"
			keys="command,KEY,IMAGE,USERID,FGTEMPLATE" vals="NEW,{@KEY},true,{@USERID},{@FGTEMPLATE}" />
		&amp;nbsp;&amp;nbsp;
	</og:equals>

	<og:link lbl="ANKCOPY" href="fileout.jsp" target="_top"
		keys="command,KEY,ALL_OUT,DIRECT,LIST,IMAGE,USERID,FGTEMPLATE" vals="NEW,{@KEY},true,true,true,true,{@USERID},{@FGTEMPLATE}" />
</div>

<og:equals val1="{@USERID}" val2="{@USER.ID}">
	<div style="margin: 10px;">
		<og:fieldset lbl="ANKCNG" >
		<form method="POST" action="forward.jsp">
			<div style="margin: 10px;">
			<og:writeCheck>
				<og:submit  value="entry" lbl="ANKCNG" command="ENTRY" accesskey="E" keys="CDANK" vals="{@CDANK}" />
			</og:writeCheck>
			</div>

			<table>
				<tr><og:column name="NMANK" colspan="7" must="true" /></tr>
				<tr><og:column name="SMANK" colspan="7" /></tr>
				<tr>
					<og:column name="DYKSTR" must="true" />
					<og:column name="DYKEND" must="true" />
				</tr>
				<tr>
					<og:column name="FGNODPL" must="true" />
					<og:column name="FGRESDISP" must="true" />
					<og:column name="FGSHUBETSU" must="true" />
				</tr>
				<tr>
					<td colspan="6"><hr width="95%" /></td>
				</tr>
				<tr>
					<td colspan="6"><og:column name="FGTEMPLATE" must="true" lbl="TEMPLATEKOKAI" colspan="3" td="no" /></td>
				</tr>
			</table>
		</form>
		</og:fieldset>
	</div>
</og:equals>

<hr width="98%" />

<div class="contents">
<og:value command="SET" key="PREVIEW" value="true" />
<jsp:directive.include file="/jsp/customan/ankVIEW.jsp" />
</div>

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