<?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:head headType="init" />

<!-- history.back() で戻るボタンを表示します。	-->
<jsp:directive.include file="/jsp/common/history_back.jsp" />

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

<og:equals val1="{@MAIL}" val2="true">
	<og:value command="SQL">
		select A.USERID,A.NMANK,A.DYKEND from AN01 A
		where A.CDANK = '{@CDANK}' and A.FGJ = '1'
	</og:value>

	<og:value command="SET" key="DYKEND"><og:column name="DYKEND" td="false" writable="false" /></og:value>

	<og:value command="SQL">
		select A.NAME_JA from AN04 A
		where A.USERID = '{@USERID}' and A.FGJ = '1'
	</og:value>

	<og:value command="SQL">
		select A.MAILAD ADMIN_MAILAD
		from AN04 A
		where A.USERID = 'admin' and A.FGJ = '1'
	</og:value>

	<og:equals val1="34" val2="{@FGKOKAI}" contains="true">
		<og:value command="SET" key="MAILTEXT"><og:file
			fileURL="{@SYS.REAL_PATH}jsp/{@GUI.KEY}" file1="mail.txt" action="read" encode="UTF-8" />
		</og:value>
		<og:value command="SETTBL" action="APPEND" key="KTSID" />
		<og:value command="SETTBL" action="APPEND" key="NMKTS" />
		<og:value command="SETTBL" action="APPEND" key="MAILAD" />
		<og:value command="SETTBL" action="APPEND" key="ANKURL" />

		<c:forTokens items="${MAILAD}" delims="," var="BCCMAIL" varStatus="status">
			<og:value command="SET" key="URL">${fn:split(ANKURL,',')[status.index]}</og:value>
			<og:value command="SET" key="KAITO">${fn:split(KTSID,',')[status.index]} ( ${fn:split(NMKTS,',')[status.index]} )</og:value>
			<og:bizLogic logics="an.AN0007S" keys="CDANK,MAILTEXT,URL,KAITO" />

			<og:mailSender
				bcc = "{@BCCMAIL}"
				from = "noreplay@iacorner.net"
				subject = "{@LBL.ANM0023}">{@RETURN}</og:mailSender>
		</c:forTokens>
	</og:equals>

	<og:equals val1="34" val2="{@FGKOKAI}" contains="true" notEquals="true">
		<og:value command="SET" key="MAILTEXT"><og:file
			fileURL="{@SYS.REAL_PATH}jsp/{@GUI.KEY}" file1="mailAno.txt" action="read" encode="UTF-8" />
		</og:value>
		<og:value command="SET" key="URL" value="{@CURL}?k={@CRYPTKEY}" />
		<og:bizLogic logics="an.AN0007S" keys="CDANK,MAILTEXT,URL" />
		<og:mailSender
			bcc = "{@IRAIADDRS}"
			from = "noreplay@iacorner.net"
			subject = "{@LBL.ANM0023}">{@RETURN}</og:mailSender>
	</og:equals>
</og:equals>

<og:bizLogic logics="an.AN0007A" keys="CDANK,FGKOKAI,IRAIADDRS,KTSTAGS,MAIL" />

<og:forward page="result.jsp" keys="command" vals="RENEW" />

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