<%@ page pageEncoding="Shift_JIS"%>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld" %>
<%-- <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> --%>
<%@ page import="jp.co.orangesoft.xgate.util.MobilePhoneAccessKey" %>
<jsp:useBean id="htmltool" class="jp.co.orangesoft.xgate.util.HtmlTool"/>

<%
	String servlet = response.encodeURL((String)session.getAttribute("servlet"));
	String term = (String)session.getAttribute("term");

	String folder = (String)session.getAttribute("folder");
	String isTrash = (String)session.getAttribute("isTrash");
	String trash = (String)session.getAttribute("trash");

	java.util.Locale lang = (java.util.Locale)session.getAttribute("lang");
	MobilePhoneAccessKey accesskey = new MobilePhoneAccessKey();

	String msg = "true".equals(isTrash) ? "Empty "+trash+"?" : "Delete all?";
	String yes = "Yes";
	String no = "No";
	String charset = "Shift_JIS";

	if(lang.equals(java.util.Locale.JAPANESE)){
		msg = "true".equals(isTrash) ? trash+"を空にします。" : "すべて削除します。";
		msg = msg+"よろしいですか？";
		yes = "はい";
		no = "いいえ";
	}
%>

<%-- ==================================================================================== --%>
<c:choose>

<c:when test="${term == 'imode' || term == 'astel' || term == 'willcom'}">
	<% response.setContentType("text/html;charset="+charset); %>

	<html>
	<body>
	<%=msg%>
	<p>
	<a accesskey="1" href="<%= servlet+"?cmd=DMA&folder="+folder %>"><%=accesskey.get(term, 1)%></a><%=yes%>
	<br>
	<a accesskey="0" href="<%= servlet+"?cmd=ST&folder="+folder %>"><%=accesskey.get(term, 0)%></a><%=no%>
	</body>
	</html>
</c:when>

<%-- ==================================================================================== --%>
<c:when test="${term == 'jphone' || term == 'jsky'}">
	<% response.setContentType("text/html;charset="+charset); %>
	
	<html>
	<body>
	<%=msg%>
	<p>
	<a directkey="1" href="<%= servlet+"?cmd=DMA&folder="+folder %>"><%=yes%></a>
	<br>
	<a directkey="0" href="<%= servlet+"?cmd=SM&folder="+folder %>"><%=no%></a>
	</body>
	</html>
</c:when>

<%-- ==================================================================================== --%>
<c:when test="${term == 'hdml'}">
	<% response.setContentType("text/x-hdml;charset="+charset); %>

	<HDML VERSION="3.0" TTL=0>
	  <DISPLAY NAME="trash">
	    <ACTION TYPE=ACCEPT LABEL="<%=no%>" TASK=RETURN>
	    <ACTION TYPE=SOFT1 LABEL="<%=yes%>" TASK=GO DEST="<%= servlet+"?cmd=DMA&folder="+folder %>" >
	    <%=msg%>
	  </DISPLAY>
	</HDML>

</c:when>

<%-- ==================================================================================== --%>
<c:when test="${term == 'wml'}">
	<% response.setContentType("text/vnd.wap.wml;charset="+charset); %>

	<?xml version="1.0"?>
	<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
				"http://www.wapforum.org/DTD/wml_1.1.xml">

	<wml>
	<head>
	  <meta http-equiv="Cache-Control" content="max-age=0"/>
	</head>
	<card id="trash">
	  <p>
	  <do type="accept" label="<%=no%>">
	    <prev/>
	  </do>
	  <do type="options" label="<%=yes%>">
	    <go href="<%= servlet+"?cmd=DMA&amp;folder="+folder %>"/>
	  </do>
	  <%=msg%>
	  </p>
	</card>
	</wml>

</c:when>

<%-- ==================================================================================== --%>
<c:when test="${term == 'wml_nokia'}">
	<% response.setContentType("text/vnd.wap.wml;charset="+charset); %>

	<?xml version="1.0"?>
	<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
	            "http://www.wapforum.org/DTD/wml_1.1.xml">

	<wml>
	<head>
	  <meta http-equiv="Cache-Control" content="max-age=0"/>
	</head>
	<card id="trash">
	  <p>
	  <do type="accept" label="<%=no%>">
	    <prev/>
	  </do>
	  <do type="prev" label="<%=yes%>">
	    <go href="<%= servlet+"?cmd=DMA&amp;folder="+folder %>"/>
	  </do>
	  <%=msg%>
	  </p>
	</card>
	</wml>

</c:when>

<%-- ==================================================================================== --%>
<c:otherwise>
	<% response.setContentType("text/html;charset="+charset); %>
	

</c:otherwise>

<%-- ==================================================================================== --%>
</c:choose>

<!-- Copyright (c) 2000,2001 Orangesoft Inc. All Rights Reserved. -->
