/* Automatically generated.
 * Copyright (c) 2000-2006 by SAP AG, Walldorf.,
 * http://www.sap.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of SAP AG, Walldorf. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with SAP.
 * Do not edit.
 */

import ro.emid.Application;
import ro.emid.common.constants.AppConstants;
import ro.emid.common.mesg.Message;
import java.util.List;
import ro.emid.administrare.action.message.MessageService;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public class JEE_jsp_WEB_2d_INF_pagelet_admin_messages_adminMessages_1471592526686 extends com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase{

	public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
	{
		//isXml=false
		JspFactory  _jspFactory     = JspFactory.getDefaultFactory();
		PageContext pageContext = _jspFactory.getPageContext(this,request,response,null,true,32768,true);
		ServletConfig config = pageContext.getServletConfig();
		ServletContext application = pageContext.getServletContext();
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl) pageContext;
		com.sap.engine.services.servlets_jsp.server.application.InjectionWrapper _jspx_resourceInjector = ((com.sap.engine.services.servlets_jsp.server.application.ServletContextImpl)_jspx_pageContext.getServletContext()).getApplicationContext().getInjectionWrapper();
		HttpSession session = pageContext.getSession();
		if (!response.isCommitted()) {
		response.setContentType("text/html;charset=UTF-8");
		}
		JspWriter   out     = pageContext.getOut();
		java.lang.Object page = this;
		try {
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(1,40);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(2,58);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(3,48);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(4,35);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(5,71);to=(9,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(9,0);to=(14,2)]
			
    /**
     * @see ro.emid.administrare.action.message.LoadMessagesAction
     */
    List messages = (List) request.getAttribute("messages");

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(14,2);to=(18,18)]
			out.print("\r\n\r\n<fieldset>\r\n    <legend><b>Trimite mesaj nou:</b></legend>\r\n    <form action=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(18,18);to=(18,44)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(18,44);to=(26,39)]
			out.print("?action=save-message\" method=\"post\" name=\"zaforma\">\r\n        <table>\r\n            <tr>\r\n                <td>\r\n                    <input style=\"float: right\" type=\"submit\" value=\"Trimite\"/>\r\n\r\n                    Catre:\r\n                    <select name=\"application\" id=\"appSelect\">\r\n                        <option value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(26,39);to=(26,59)]
			out.print(Message.FOR_ALL);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(26,59);to=(27,39)]
			out.print("\">Toti</option>\r\n                        <option value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(27,39);to=(27,77)]
			out.print(Application.getIncidenteAppName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(27,77);to=(28,39)]
			out.print("\">Incidente</option>\r\n                        <option value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(28,39);to=(28,78)]
			out.print(Application.getCallcenterAppName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(28,78);to=(29,39)]
			out.print("\">Callcenter/Deranjamente</option>\r\n                        <option value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(29,39);to=(29,85)]
			out.print(Application.getLucrariProgramateAppName());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(29,85);to=(33,85)]
			out.print("\">LPOD</option>\r\n                    </select>&nbsp;&nbsp;\r\n\r\n                    Tip Mesaj:\r\n                    <input type=\"radio\" id=\"msg1\" name=\"type\" class=\"typeMsg\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(33,85);to=(33,108)]
			out.print(Message.TYPE_ALERT);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(33,108);to=(34,85)]
			out.print("\" checked=\"checked\"><label for=\"msg1\"> Alert </label>\r\n                    <input type=\"radio\" id=\"msg2\" name=\"type\" class=\"typeMsg\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(34,85);to=(34,112)]
			out.print(Message.TYPE_PERMANENT);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(34,112);to=(68,8)]
			out.print("\"><label for=\"msg2\"> Permanent </label>\r\n                </td>\r\n            </tr>\r\n            <tr>\r\n                <td>\r\n                    <textarea rows=\"3\" cols=\"10\" style=\"width: 100%\" id=\"message\" name=\"message\"></textarea>\r\n                </td>\r\n            </tr>\r\n            <tr>\r\n                <td>\r\n                    <select id=\"predefined\">\r\n                        <option></option>\r\n                        <option>Atentie, in intervalul 10:00 si 10:30 aplicatia va fi oprita pentru mentenanta. Va rugam sa nu operati in acel interval de timp. Va multumim.</option>\r\n                    </select>\r\n                </td>\r\n            </tr>\r\n        </table>\r\n    </form>\r\n</fieldset>\r\n\r\n<fieldset style=\"margin-top: 10px\">\r\n    <legend><b>Mesaje trimise:</b></legend>\r\n\r\n    <table cellpadding=2 cellspacing=1 width=\"100%\" class=\"table\">\r\n        <thead>\r\n        <tr>\r\n            <th width=\"10px\">#</th>\r\n            <th width=\"60px\">Tip</th>\r\n            <th width=\"130px\">Applicatie</th>\r\n            <th>Text</th>\r\n            <th width=\"1%\">&nbsp;</th>\r\n        </tr>\r\n        </thead>\r\n        <tbody>\r\n        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(68,8);to=(68,58)]
			if( messages == null || messages.size() == 0){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(68,58);to=(72,8)]
			out.print("\r\n        <tr>\r\n            <td colspan=\"10\" class=\"no-data\">Nu sunt mesaje</td>\r\n        </tr>\r\n        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(72,8);to=(75,10)]
			}else for (int i = 0; i < messages.size(); i++) {
            Message message = (Message) messages.get(i);
            List readBy = MessageService.getReadUsersForMessage(message);
        
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(75,10);to=(77,16)]
			out.print("\r\n        <tr>\r\n            <td>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(77,16);to=(77,36)]
			out.print(message.getId());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(77,36);to=(78,23)]
			out.print("</td>\r\n            <td title=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(78,23);to=(78,93)]
			out.print(readBy != null && readBy.size() > 0 ? String.valueOf(readBy) : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(78,93);to=(79,16)]
			out.print("\">\r\n                ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(79,16);to=(79,166)]
			out.print(message.getType() == Message.TYPE_ALERT ? "Alert" : message.getType() == Message.TYPE_PERMANENT ? "Permanent" : String.valueOf(message.getType()));
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(79,166);to=(81,16)]
			out.print("\r\n            </td>\r\n            <td>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(81,16);to=(81,45)]
			out.print(message.getApplication());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(81,45);to=(82,16)]
			out.print("</td>\r\n            <td>");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(82,16);to=(82,38)]
			out.print(message.getText());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(82,38);to=(84,94)]
			out.print("</td>\r\n            <td>\r\n                <a class=\"link\" onclick=\"return alert(\'Doriti sa stergeti mesajul ?\');\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(84,94);to=(84,120)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(84,120);to=(84,146)]
			out.print("?action=delete-message&id=");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(84,146);to=(84,166)]
			out.print(message.getId());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(84,166);to=(87,8)]
			out.print("\">\u015eterge</a>\r\n            </td>\r\n        </tr>\r\n        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(87,8);to=(87,13)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/pagelet/admin/messages/adminMessages.jsp";from=(87,13);to=(101,0)]
			out.print("\r\n        </tbody>\r\n    </table>\r\n</fieldset>\r\n\r\n<script type=\"text/javascript\">\r\n    jQuery(function(){\r\n        $(\"predefined\").onchange=function(){\r\n            var selected = this.options[ this.selectedIndex].text;\r\n            $(\"message\").value = selected;\r\n        };\r\n    });\r\n</script>\r\n\r\n");
// end
		} catch (ThreadDeath tde) { throw tde;
		} catch (OutOfMemoryError ome) { throw ome;
		} catch (Throwable t) {
			if (!(t instanceof SkipPageException)) {
				try {
					out.clear();
				} catch(java.io.IOException _jspioex) {}
				_jspx_pageContext.handlePageException(t);
			}
		}finally{
			_jspFactory.releasePageContext(pageContext);
		}
	}

}
