<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
<title>Cronos</title>

<link type="image/x-icon" href="./images/favicon.ico"
	rel="shortcut icon">
<link rel='stylesheet' href='./css/cronos.css' type='text/css'>
<link rel="stylesheet"
	href="css/jquery-ui-themes-1.11.2/themes/start/jquery-ui.css">

<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery-ui-1.11.2/jquery-ui.js"></script>

<script>
	$(function() {
		$("#tabs").tabs();
	});
</script>

<%
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Cache-Control", "no-store");
	response.setHeader("Pragma", "no-cache");
	response.setDateHeader("Expires", 0);
%>
</head>

<body>
	<link rel='stylesheet' href='./css/cronos.css' type='text/css'>
	<div align="center" valign="center">
		<table border="0" cellpadding="0" width="70%">
			<tr>
				<td>
					<table style="background-color: #00adef;" border="0"
						cellpadding="0" cellspacing="0" width="100%">
						<tr height="100px">
							<td colspan="3" style="background-color: #415B6C;" align="center"><img
								src="images/logo-login.jpg" border=0></td>
						</tr>
						<tr>
							<td valign="bottom" width="5%">&nbsp;</td>
							<td valign="bottom" align="center">&nbsp;</td>
							<td valign="bottom" width="5%">&nbsp;</td>
						</tr>
						<tr>
							<td valign="bottom" width="5%" style="font-size: 6px;">&nbsp;</td>
							<td valign="middle" align="center">&nbsp;</td>
							<td valign="bottom" width="5%"></td>
						</tr>
						<tr>
							<td align="right" width="5%">&nbsp;</td>
							<td style="border: 1px solid white;">
								<table
									style="background-position: center; width: 100%;"
									border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="5%"></td>
										<td>
											<!-- Comienzo Panel -->
											<div align="center" id="center">
												<html:form action='/panel'>

													<html:hidden property="method" value="save" />

													<table class="celda-negro" style="width: 75%;border=0">
														<tr>
															<td valign="middle" align="center"><span
																class="celda-bold"><%=request.getAttribute("message")%>
																<html:errors /></span>
															</td>
														<tr>
															<td valign="top" align="center">&nbsp;</td>
														</tr>
													</table>

													<div id="tabs">
														<ul>
															<li><a href="#tabs-1"><bean:message
																		key="panel.titulo.base" /></a></li>
															<li><a href="#tabs-2"><bean:message
																		key="panel.titulo.origenDatos" /></a></li>
															<li><a href="#tabs-3"><bean:message
																		key="panel.titulo.datosTomcat" /></a></li>
														</ul>
														<div id="tabs-1">
															<table class="celda-negro" style="width: 99%;border=0">

																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.docBase" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="docBase" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.path" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="path" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.workDir" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="workDir" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxActiveSessions" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 80px;" name="panelForm"
																			property="maxActiveSessions" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.reloadable" /></b></td>

																	<td class="celda-negro"><html:checkbox
																			name="panelForm" property="reloadable"></html:checkbox></td>

																</tr>
																<tr>
																	<td colspan="2" valign="top" align="center">
																		&nbsp;</td>
																</tr>
															</table>

														</div>
														<div id="tabs-2">
															<table class="celda-negro" style="width: 99%;border=0">
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverPostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="pgServer" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverPortPostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 80px;" name="panelForm"
																			property="pgServerPort" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.basePostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="pgDbname" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.usuarioPostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="pgUser" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.passwordPostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="pgPassword" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxActivePostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="pgMaxActive" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxIdlePostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="pgMaxIdle" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxWaitPostgres" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="pgMaxWait" /></td>
																</tr>


																<tr>
																	<td colspan="2" valign="top" align="center">
																		&nbsp;</td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="ssServer" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverPortSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 80px;" name="panelForm"
																			property="ssServerPort" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.baseSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="ssDbname" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.usuarioSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="ssUser" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.passwordSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="ssPassword" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxActiveSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="ssMaxActive" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxIdleSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="ssMaxIdle" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxWaitSQLServer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="ssMaxWait" /></td>
																</tr>


																<tr>
																	<td colspan="2" valign="top" align="center">
																		&nbsp;</td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="orServer" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.serverPortOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 80px;" name="panelForm"
																			property="orServerPort" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.baseOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="orDbname" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.usuarioOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="orUser" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.passwordOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="orPassword" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxActiveOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="orMaxActive" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxIdleOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="orMaxIdle" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxWaitOracle" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="orMaxWait" /></td>
																</tr>

																<tr>
																	<td colspan="2" valign="top" align="center">
																		&nbsp;</td>
																</tr>
															</table>
														</div>
														<div id="tabs-3">
															<table class="celda-negro" style="width: 99%;border=0">
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.enableLookups" /></b></td>

																	<td class="celda-negro"><html:checkbox
																			name="panelForm" property="enableLookups"></html:checkbox></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.acceptCount" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="acceptCount" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.socketBuffer" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="socketBuffer" /></td>
																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxThreads" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="maxThreads" /></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.deployOnStartup" /></b></td>

																	<td class="celda-negro"><html:checkbox
																			name="panelForm" property="deployOnStartup"></html:checkbox></td>


																</tr>

																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.maxHttpHeaderSize" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="maxHttpHeaderSize" /></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.connectionTimeout" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="connectionTimeout" /></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.sslEnabled" /></b></td>

																	<td class="celda-negro"><html:checkbox
																			name="panelForm" property="sslEnabled"
																			onclick="changePort();"></html:checkbox></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.port" /></b></td>

																	<td class="celda-negro"><html:text
																			style="width: 80px;" name="panelForm" property="port" /></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.keystoreFile" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 350px;" name="panelForm"
																			property="keystoreFile" /></td>


																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.keystorePass" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="keystorePass" /></td>

																</tr>
																<tr>
																	<td align="right" class="celda-negro"
																		style="text-transform: uppercase"><b><bean:message
																				key="panel.linuxRootPassword" /></b></td>

																	<td align="left" class="celda-negro"><html:text
																			style="width: 110px;" name="panelForm"
																			property="linuxRootPassword" /></td>

																</tr>
															</table>
														</div>
														<div id="botones" />
														<table class="celda-negro" style="width: 90%; border: 0;">
															<tr>
																<td align="center"><input class="estiloBoton"
																	type="button"
																	value="<bean:message key="panel.guardar" />"
																	onclick="javascript:submit();"></td>
																<td align="center"><input class="estiloBoton"
																	type="button"
																	value="<bean:message key="panel.restart" />"
																	onclick="javascript:restart();"></td>
																<td align="center"><input class="estiloBoton"
																	type="button"
																	value="<bean:message key="panel.cerrarsession" />"
																	onclick="javascript:closesession();"></td>
															</tr>
														</table>
													</div>
											</div> </html:form> <html:form action='/panel'>
												<html:hidden property="method" value="restart" />
											</html:form> <html:form action='/panel'>
												<html:hidden property="method" value="cerrarsession" />
											</html:form>

											</div> <!--  FIN Panel -->
										</td>
										<td width="5%"></td>

									</tr>
								</table>
							</td>
							<td align="left" width="5%">&nbsp;</td>
						</tr>
						<tr>
							<td valign="bottom" width="5%" style="font-size: 6px;">&nbsp;
							</td>
							<td valign="middle" align="center"></td>
							<td valign="bottom" width="5%"></td>
						</tr>
						<tr>
							<td valign="bottom" width="5%">&nbsp;</td>
							<td valign="bottom" align="center"><div id="botones"></div></td>
							<td valign="bottom" width="5%">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</div>

	<script type=text/javascript>
		function restart() {
			document.forms[1].submit();
		}
		function closesession() {
			if (confirm("<bean:message key="panel.confirm.cerrarsession" />")) {
				document.forms[2].submit();
			}
		}
		function changePort() {

			var remember = document.forms[0].sslEnabled; //document.getElementById('sslEnabled');
			var textbox = document.forms[0].port; // document.getElementById('port');
			var textbox2 = document.forms[0].keystoreFile;
			var textbox3 = document.forms[0].keystorePass;
			if (remember.checked) {
				textbox.value = "8443";
				if (textbox2.value == "") {
					textbox2.value = "<bean:message key="panel.automatico" />";
					textbox3.value = "<bean:message key="panel.automatico" />";
					textbox2.disabled = true;
					textbox3.disabled = true;
				}
			} else {
				textbox.value = "8080";
				if (textbox2.value == "autom") {
					textbox2.value = "";
					textbox3.value = "";
				}
			}
		}
	</script>
	</bod
														y>
</html>