<%@ page contentType="text/html; charset=Shift_JIS" %>
<%@ page pageEncoding="Windows-31J"%>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld" %>
<%-- <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> --%>
<jsp:useBean id="htmltool" class="jp.co.orangesoft.xgate.util.HtmlTool"/>

<%
	String servlet = (String)request.getAttribute("servlet");
	String uid = (String)request.getAttribute("uid");
	String[] uids = (String[])request.getAttribute("uids");
	String term = (String)request.getAttribute("term");
	java.util.Locale local = (java.util.Locale)request.getAttribute("lang");
	String uid0 = htmltool.format(request.getAttribute("uid0"));
	
	String title = "Delete messages?";
	String msg = "";
	String yes = "Yes";
	String no = "No";
	String charset = "Windows-31J";

	String[] subjects=(String[])request.getAttribute("subjects");
	String submit = "DELETE";
	String logout = "LOGOUT";
	
	int lang = local.equals(java.util.Locale.JAPANESE) ? 0 : 1;
	
	String select="";
	for(int i=0; i<uids.length; i++){
		select= select + "&select=" + uids[i] ;
	
	}
		
	if(local.equals(java.util.Locale.JAPANESE)){
		title = "ﾒｯｾｰｼﾞ削除の確認";
		msg = "削除します。よろしいですか？";
		submit = "削除";
		logout = "ログアウト";
		yes = "はい";
		no = "いいえ";
	}
	
	for(int i=0; i<subjects.length; i++){	
		if(subjects[i] == null || subjects[i].length() == 0){ 
			subjects[i] = "no subject";
			if(local.equals(java.util.Locale.JAPANESE))	subjects[i] = "無題";
		}	
			//subjects[i] = "\""+subjects[i]+"\"";
			if(local.equals(java.util.Locale.JAPANESE))	subjects[i] = ""+subjects[i]+"";
	}
%>

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

<c:when test="${term == 'imode' || term == 'astel' || term == 'wml' || term == 'willcom'}">
	<% response.setContentType("text/html;charset="+charset); %>
	<html>
	<body>
	<%=title%>
	<hr>
	<%=msg%><br>
	<a accesskey="1" href="<%= servlet+"?cmd=DELETE_SELECT_MESSAGES&sel=yes&uid="+ uid + select %>"><%=yes%></a><br>
	<a accesskey="0" href="<%= servlet+"?cmd=ST&sel=yes&uid="+uid0 %>"><%=no%></a>
	<hr>
	<c:forEach var="subject" items="${subjects}">
		◆<c:out value="${subject}"/><hr>
	</c:forEach>
	
	</body>
	</html>
</c:when>

<%-- ==================================================================================== --%>
<c:when test="${term == 'jphone' || term == 'jsky'}">
	<% response.setContentType("text/html;charset="+charset); %>
	<html>
	<body>
	<%=title%>
	<hr>
	
	<c:forEach var="subject" items="${subjects}">
		<c:out value="${subject}"/><br>
	</c:forEach>
	
	<br><%=msg%><br>
	<a directkey="1" href="<%= servlet+"?cmd=DELETE_SELECT_MESSAGES&sel=yes&uid="+ uid + select %>"><%=yes%></a><br>
	<a directkey="0" href="<%= servlet+"?cmd=ST&sel=yes&uid="+uid0 %>"><%=no%></a>
	</body>
	</html>
</c:when>

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

<%-- ==================================================================================== --%>
<c:otherwise>
	<% response.setContentType("text/html;charset="+charset); %>
	<html>
	<head>
	<meta name="viewport" content="width=device-width">
	</head>
	<body bgcolor="#CCFFFF">
	<%=title%>
	<hr>
	
	<c:forEach var="subject" items="${subjects}">
		<c:out value="${subject}"/><br>
	</c:forEach>
	
	<br><%=msg%><br>
	<a href="<%= servlet+"?cmd=DELETE_SELECT_MESSAGES&palm=yes&sel=yes&uid="+ uid + select %>"><%=yes%></a><br>
	<a href="<%= servlet+"?cmd=ST&palm=yes&sel=yes&uid="+uid0 %>"><%=no%></a>
	</body>
	</html>
</c:otherwise>

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

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