<%@ page language="java" session="true" contentType="text/html;charset=ISO-8859-2" %>
<%@ page pageEncoding="UTF-8"%>
<%@ include file="header.jsp" %>
<%@ include file="check.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
 <link href="main.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!-- JavaScript code hiding
	function ShowHideDetails() {
		if (document.all['nodetails'].style.display=='block') {
			document.all['nodetails'].style.display="none";
			document.all['details'].style.display="block";
		} else {
			document.all['nodetails'].style.display="block";
			document.all['details'].style.display="none";
		}
	}
// -->
</SCRIPT>

</head>

<body>
<p>
 <fmt:message key="MAIL_SENT_SUCCESSFULLY">  
    <fmt:param value="<%=session.getAttribute("sent_success")%>"/>
 </fmt:message>
 </p>
<div id="nodetails" style="display:block;">
 <a href="javascript:ShowHideDetails();"><fmt:message key="DETAILS_1"/></a>
</div>
<div id="details" style="display:none;" >
   <a href="javascript:ShowHideDetails();"><fmt:message key="DETAILS_2"/></a>
   <table  border="0">
     <% 
         List l = (List) session.getAttribute("sent");
         for (int i=0; i<l.size(); i++) {
            Object[] infos= (Object[]) l.get(i);
           if (infos[3]==null) { %>
          <tr><td><small>Der Newsletter wurde an Distributor <%=infos[0]%> <%=infos[2]%> mit Email-Adresse 
          <%=infos[1]%> erfolgreich verschickt.</small></td></tr>
           <% } else  { %>
            
             <tr><td><small style="color:red;">FEHLER: Der Newsletter konnte an Distributor <%=infos[0]%> <%=infos[2]%> mit Email-Adresse: 
              <%=infos[1]%> nicht verschickt werden! (<%=((Exception) infos[3]).getMessage()%>)</small></td></tr>
         <%}
     } 
     
      session.removeAttribute("sent");
      session.removeAttribute("sent_success");
     %>
     
   
   </table>
   <form></from>
</div>
 