/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: Apache Tomcat/7.0.19
 * Generated at: 2012-12-23 11:24:01 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp;

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

public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("\n");
      out.write("<head>\n");
      out.write("\t<link rel=\"shortcut icon\" href=\"include/fav.ico\">\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"include/style.css\">\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"include/menu.css\">\n");
      out.write("\t<script type=\"text/javascript\" src=\"include/menu.js\"></script>\n");
      out.write("</head>\n");
      out.write("\n");
      out.write("<body style=\"margin: 10;\">\n");
      out.write("\n");
      out.write("<table height=\"100%\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
      out.write("\n");
      out.write("\t<tr height=\"1\">\n");
      out.write("\t\t<td colspan=\"3\">\n");
      out.write("\t\t\t<img src=\"include/banner.jpg\">\n");
      out.write("\t\t</td>\n");
      out.write("\t</tr>\n");
      out.write("\n");
      out.write("\t<tr height=\"1\">\n");
      out.write("\t\t<td align=\"left\" style=\"padding-left: 8px; padding-right: 8px;\"><img src=\"include/logo.jpg\" border=\"0\"></img></td>\n");
      out.write("\t\t<td align=\"left\">\n");
      out.write("\t\t\t<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n");
      out.write("\t\t\t\t<tr>\n");
      out.write("\t\t\t\t\t<td align=\"left\" valign=\"middle\">\n");
      out.write("\n");
      out.write("\t\t\t\t\t\t<a href=\"index.jsp?page=account\"><b>\n");
      out.write("\t\t\t\t\t\t\t");

								if(request.getParameter("page") != null && request.getParameter("page").compareTo("account") == 0)
								{
									out.print("<font color=\"#444444\">ACCOUNTS</font>");
								}
								else
								{
									out.print("<font color=\"#aaaaaa\">ACCOUNTS</font>");
								}
							
      out.write("\n");
      out.write("\t\t\t\t\t\t</b></a>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t|\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t<a href=\"index.jsp?page=role\"><b>\n");
      out.write("\t\t\t\t\t\t\t");

								if(request.getParameter("page") != null && (request.getParameter("page").compareTo("role") == 0 || request.getParameter("page").compareTo("rolexml") == 0))
								{
									out.print("<font color=\"#444444\">CHARACTERS</font>");
								}
								else
								{
									out.print("<font color=\"#aaaaaa\">CHARACTERS</font>");
								}
							
      out.write("\n");
      out.write("\t\t\t\t\t\t</b></a>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t|\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t<a href=\"index.jsp?page=server\"><b>\n");
      out.write("\t\t\t\t\t\t\t");

								if(request.getParameter("page") != null && request.getParameter("page").compareTo("server") == 0)
								{
									out.print("<font color=\"#444444\">SERVER CONFIGURATION</font>");
								}
								else
								{
									out.print("<font color=\"#aaaaaa\">SERVER CONFIGURATION</font>");
								}
							
      out.write("\n");
      out.write("\t\t\t\t\t\t</b></a>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t|\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t<a href=\"index.jsp?page=serverctrl\"><b>\n");
      out.write("\t\t\t\t\t\t\t");

								if(request.getParameter("page") != null && request.getParameter("page").compareTo("serverctrl") == 0)
								{
									out.print("<font color=\"#444444\">SERVER CONTROL</font>");
								}
								else
								{
									out.print("<font color=\"#aaaaaa\">SERVER CONTROL</font>");
								}
							
      out.write("\n");
      out.write("\t\t\t\t\t\t</b></a>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t|\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t\t<td>\n");
      out.write("\t\t\t\t\t\t<ul id=\"menu\">\n");
      out.write("\t\t\t\t\t\t\t<li onmouseover=\"javascript:show_submenu('sub_plugins');\" onmouseout=\"javascript:hide_submenu('sub_plugins');\">\n");
      out.write("\t\t\t\t\t\t\t\t<a href=\"index.jsp?plugin\"><b><font color=\"#aaaaaa\">&#9660;ADDONS</font></b></a>\n");
      out.write("\t\t\t\t\t\t\t\t<ul id=\"sub_plugins\">\n");
      out.write("\t\t\t\t\t\t\t\t\t");

										File f = new File(request.getRealPath("addons"));
										String[] files = f.list();
										java.util.Arrays.sort(files);
										if (files.length > 0)
										{
											for (int i=0; i<files.length; i++)
											{
  												f = new File(request.getRealPath("addons") + "/" + files[i]);
  												if(f.isDirectory())
												{
													out.print("<li><a href=\"index.jsp?plugin=" + files[i] + "\"> <b>&#9679; </b>" + files[i] + "</a></li>");
     												}
  											}
										}
									
      out.write("<li style=\"border-bottom: 1px solid #cccccc;\"><a href=\"http://pwadmin.codeplex.com/Thread/List.aspx\">Search Plugins...</a></li>\n");
      out.write("\t\t\t\t\t\t\t\t</ul>\n");
      out.write("\t\t\t\t\t\t\t</li>\n");
      out.write("\t\t\t\t\t\t</ul>\n");
      out.write("\t\t\t\t\t</td>\n");
      out.write("\t\t\t\t</tr>\n");
      out.write("\t\t\t</table>\n");
      out.write("\t\t</td>\n");
      out.write("\t\t<td align=\"right\" valign=\"middle\" style=\"padding-right: 8px;\">");
pageContext.include("login.jsp");
      out.write("</td>\n");
      out.write("\t</tr>\n");
      out.write("\n");
      out.write("\t<tr height=\"1\">\n");
      out.write("\t\t<td colspan=\"3\">\n");
      out.write("\t\t\t<br>\n");
      out.write("\t\t</td>\n");
      out.write("\t</tr>\n");
      out.write("\n");
      out.write("\t<tr>\n");
      out.write("\t\t<td align=\"center\" valign=\"top\" colspan=\"3\">\n");
      out.write("\t\t\t");

				if(request.getParameter("page") != null)
				{
					if(request.getParameter("page").compareTo("account") == 0)
					{
						pageContext.include("account.jsp");
					}
					if(request.getParameter("page").compareTo("role") == 0)
					{
						pageContext.include("role.jsp");
					}
					if(request.getParameter("page").compareTo("rolexml") == 0)
					{
						pageContext.include("rolexml.jsp");
					}
					if(request.getParameter("page").compareTo("server") == 0)
					{
						pageContext.include("server.jsp");
					}
					if(request.getParameter("page").compareTo("serverctrl") == 0)
					{
						pageContext.include("serverctrl.jsp");
					}
					if(request.getParameter("page").compareTo("login") == 0)
					{
						pageContext.include("login.jsp");
					}
				}
				if(request.getParameter("plugin") != null)
				{
					out.print("<iframe src=\"addons/" + request.getParameter("plugin") + "/\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>");
				}
			
      out.write("\n");
      out.write("\t\t</td>\n");
      out.write("\t</tr>\n");
      out.write("</table>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("\n");
      out.write("</html>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
