Workplace Widget

This commit is contained in:
chris
2026-10-25 08:55:10 +00:00
parent d37ac7ed4c
commit 1f7c8d93cc
24 changed files with 586 additions and 50 deletions

View File

@@ -16,7 +16,7 @@ import java.util.HashSet;
import java.util.Set;
import org.json.JSONObject;
/** Server-to-server IMSAPI calls. Defaults to the same verified GlassFish HTTPS host
/** Server-to-server IMSAPI calls. Defaults to the same verified GlassFish host
* used by the existing Workbench, without a required JVM property. */
final class HmiImsapiGateway {
static final Set<String> ALLOWED = new HashSet<>(Arrays.asList(
@@ -50,8 +50,8 @@ final class HmiImsapiGateway {
int localPort = request.getLocalPort();
if (host == null || host.isEmpty() || port < 1 || port > 65535 || port != localPort)
throw new IllegalStateException("Kein direkter Zugriff auf denselben GlassFish-Host");
if (!request.isSecure() && !isLoopback(host))
throw new IllegalStateException("IMSAPI-Autokonfiguration erfordert direktes HTTPS");
if (!request.isSecure() && !isLoopback(host) && !HmiTransportPolicy.allowImsapiHttp())
throw new IllegalStateException("HTTP für IMSAPI deaktiviert");
// Only the machine hosting this JVM can be used as an implicit destination.
try {
boolean matches = false;
@@ -107,7 +107,7 @@ final class HmiImsapiGateway {
throw new IllegalStateException("IMSAPI base URL may only contain /mes");
boolean loopback = isLoopback(root.getHost());
if ("http".equalsIgnoreCase(root.getScheme()) && !loopback
&& !"true".equalsIgnoreCase(HmiAuth.config("hmi.imsapi.allowHttp", "HMI_IMSAPI_ALLOW_HTTP")))
&& !HmiTransportPolicy.allowImsapiHttp())
throw new IllegalStateException("Remote IMSAPI must use HTTPS");
String origin = root.toString().replaceAll("/+$", "");
if (origin.endsWith("/mes")) origin = origin.substring(0, origin.length()-4);

View File

@@ -32,8 +32,9 @@ public class HmiImsapiSecurityResource {
boolean trustedTlsProxy = origin != null && origin.startsWith("https://")
&& origin.equals(HmiAuth.config("hmi.public.origin", "HMI_PUBLIC_ORIGIN"));
if (!request.isSecure() && !trustedTlsProxy
&& !"true".equalsIgnoreCase(HmiAuth.config("hmi.allow.insecure", "HMI_ALLOW_INSECURE")))
&& !HmiTransportPolicy.allowBrowserHttp()) {
return error(403,"HTTPS erforderlich (HMI_PUBLIC_ORIGIN für TLS-Proxy setzen)");
}
if (body == null || body.length() > 4096) return error(400,"Invalid input");
HttpSession old = request.getSession(false);
if (old != null) {

View File

@@ -0,0 +1,145 @@
package com.workbenchclassic.hmi;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.logging.Logger;
import org.json.JSONObject;
/** Only two fixed boolean JVM options are manageable. No shell/user commands.
* The OS user running GlassFish must be authorized to invoke local asadmin.
* This resource does not edit domain.xml directly and never restarts the server. */
final class HmiJvmOptions {
private static final Logger LOG = Logger.getLogger(HmiJvmOptions.class.getName());
private static final int MAX_OUTPUT = 120_000;
private static final int TIMEOUT_SECONDS = 18;
private HmiJvmOptions() { }
static JSONObject commands(boolean browser, boolean api) {
return new JSONObject()
.put("allowInsecure", "asadmin create-jvm-options -Dhmi.allow.insecure=" + browser)
.put("allowImsapiHttp", "asadmin create-jvm-options -Dhmi.imsapi.allowHttp=" + api)
.put("restart", "asadmin restart-domain");
}
static synchronized JSONObject update(boolean browser, boolean api) throws IOException, InterruptedException {
Path program = executable();
// Refuse to change any JVM option until asadmin can inspect the current domain configuration.
String existing = run(program, "list-jvm-options");
String currentBrowser = current(existing, "hmi.allow.insecure");
String currentApi = current(existing, "hmi.imsapi.allowHttp");
try {
replace(program, "hmi.allow.insecure", currentBrowser, Boolean.toString(browser));
replace(program, "hmi.imsapi.allowHttp", currentApi, Boolean.toString(api));
} catch (IOException | InterruptedException failure) {
// Restore both options after a partial update, insofar as asadmin remains available.
// Never report success if rollback is incomplete.
try {
String latest = run(program, "list-jvm-options");
replace(program, "hmi.imsapi.allowHttp", current(latest,"hmi.imsapi.allowHttp"), currentApi);
replace(program, "hmi.allow.insecure", current(latest,"hmi.allow.insecure"), currentBrowser);
} catch (Exception rollbackFailure) {
LOG.warning("HMI JVM option rollback incomplete; check domain.xml via asadmin list-jvm-options");
}
throw failure;
}
LOG.info("HMI transport policy changed via asadmin; restart required to make JVM values effective");
return new JSONObject().put("savedToDomain", true).put("restartRequired", true)
.put("configuredAllowInsecure", browser).put("configuredAllowImsapiHttp", api)
.put("note", "GlassFish/Payara neu starten. Aktive JVM-Werte bleiben bis dahin unveraendert.");
}
private static void replace(Path executable, String key, String previous, String next)
throws IOException, InterruptedException {
if (next.equals(previous)) return;
if (previous != null) run(executable, "delete-jvm-options", "-D" + key + "=" + previous);
if (next != null) run(executable, "create-jvm-options", "-D" + key + "=" + next);
}
private static String current(String list, String key) throws IOException {
String found = null;
for (String line : list.split("\\R")) {
String value = line.trim();
String prefix = "-D" + key + "=";
if (value.startsWith(prefix)) {
String option = value.substring(prefix.length()).trim();
if (!"true".equalsIgnoreCase(option) && !"false".equalsIgnoreCase(option))
throw new IOException("Unknown option value for " + key);
if (found != null && !found.equalsIgnoreCase(option))
throw new IOException("Conflicting JVM options for " + key);
found = option.toLowerCase(java.util.Locale.ROOT);
}
}
return found;
}
private static Path executable() throws IOException {
// com.sun.aas.installRoot is set by GlassFish / Payara at runtime.
String home = System.getProperty("com.sun.aas.installRoot", "").trim();
if (home.isEmpty()) throw new IOException("GlassFish installation root unavailable");
Path install = Paths.get(home).toAbsolutePath().normalize();
Path asadmin = install.resolve("bin").resolve("asadmin").normalize();
if (!asadmin.startsWith(install) || !Files.isRegularFile(asadmin) || !Files.isExecutable(asadmin))
throw new IOException("Local asadmin is not executable");
return asadmin;
}
private static String run(Path executable, String operation, String... values)
throws IOException, InterruptedException {
// Fixed command set only; arguments are constructed exclusively from two literal option names and booleans.
if (!Arrays.asList("list-jvm-options", "create-jvm-options", "delete-jvm-options").contains(operation))
throw new IllegalArgumentException("Unsupported asadmin command");
java.util.List<String> args = new java.util.ArrayList<>();
args.add(executable.toString());
args.add("--interactive=false");
args.add(operation);
args.addAll(Arrays.asList(values));
Process process = new ProcessBuilder(args).redirectErrorStream(true).start();
ExecutorService consumer = Executors.newSingleThreadExecutor(r -> {
Thread t = new Thread(r, "hmi-asadmin-output"); t.setDaemon(true); return t;
});
Future<String> text = consumer.submit(new Callable<String>() {
public String call() throws IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
byte[] bytes = new byte[2048]; int n;
try (InputStream input = process.getInputStream()) {
while ((n = input.read(bytes)) != -1) {
if (buffer.size() < MAX_OUTPUT)
buffer.write(bytes, 0, Math.min(n, MAX_OUTPUT - buffer.size()));
}
}
return buffer.toString(StandardCharsets.UTF_8.name());
}
});
try {
if (!process.waitFor(TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
process.destroyForcibly();
throw new IOException("asadmin timeout");
}
String result;
try { result = text.get(2, TimeUnit.SECONDS); }
catch (ExecutionException | TimeoutException e) { throw new IOException("Could not read asadmin result", e); }
if (process.exitValue() != 0) {
// Never leak administration output into an HTTP response (may include internal URLs/secrets).
LOG.warning("HMI asadmin " + operation + " exited with code " + process.exitValue());
throw new IOException("asadmin operation failed: " + operation);
}
return result;
} finally {
consumer.shutdownNow();
process.destroy();
}
}
}

View File

@@ -0,0 +1,74 @@
package com.workbenchclassic.hmi;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.json.JSONObject;
/** IMSAPI-administrator-only management for fixed transport JVM options. */
@Path("/hmi/v1/system/transport")
@Produces(MediaType.APPLICATION_JSON)
public class HmiSystemSettingsResource {
@Context private HttpServletRequest request;
private Response json(int status, JSONObject payload) {
return Response.status(status).type(MediaType.APPLICATION_JSON)
.header("Cache-Control", "no-store").entity(payload.toString()).build();
}
private Response error(int status, String msg) {
return json(status, new JSONObject().put("error", msg));
}
private Response allowed(boolean mutate) {
if (HmiAuth.user(request) == null) return error(401,"IMSAPI-Anmeldung erforderlich");
if (!HmiSchemaBootstrap.isReady()) return error(503,"HMI-Datenbankschema nicht bereit");
if (!HmiAuth.admin(request)) return error(403,"hmi-admin erforderlich");
if (mutate && !HmiAuth.csrf(request)) return error(403,"CSRF-Token fehlt oder ist ungueltig");
return null;
}
@GET
public Response status() {
Response denied = allowed(false); if (denied != null) return denied;
return json(200, HmiTransportPolicy.status()
.put("managedVia", "asadmin / domain.xml")
.put("fallbackCommands", HmiJvmOptions.commands(
HmiTransportPolicy.allowBrowserHttp(),HmiTransportPolicy.allowImsapiHttp())));
}
@POST @Consumes(MediaType.APPLICATION_JSON)
public Response save(String body) {
Response denied = allowed(true); if (denied != null) return denied;
if (body == null || body.length() > 256) return error(400,"Ungueltige Einstellungen");
try {
JSONObject input = new JSONObject(body);
if (input.length() != 2 || !(input.opt("allowInsecure") instanceof Boolean)
|| !(input.opt("allowImsapiHttp") instanceof Boolean))
return error(400,"Nur allowInsecure und allowImsapiHttp als Boolean erlaubt");
boolean browser = input.getBoolean("allowInsecure");
boolean api = input.getBoolean("allowImsapiHttp");
JSONObject commands = HmiJvmOptions.commands(browser, api);
try {
JSONObject result = HmiJvmOptions.update(browser, api);
return json(200,result.put("effectiveNow",HmiTransportPolicy.status())
.put("fallbackCommands",commands));
} catch (IOException e) {
java.util.logging.Logger.getLogger(getClass().getName()).warning(
"HMI transport policy asadmin update failed: " + e.getClass().getSimpleName());
return json(503, new JSONObject().put("error",
"Automatische domain.xml-Aktualisierung fehlgeschlagen. asadmin-Rechte/Installation pruefen.")
.put("savedToDomain",false).put("fallbackCommands",commands)
.put("restartRequired",true));
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return error(503,"asadmin-Aufruf unterbrochen");
} catch (org.json.JSONException e) {
return error(400,"Ungueltige JSON-Eingabe");
}
}
}

View File

@@ -0,0 +1,43 @@
package com.workbenchclassic.hmi;
import org.json.JSONObject;
/** Transport policy for installations without preconfigured JVM flags.
* Unset = legacy HTTP compatibility (true). An explicit false overrides it.
* These switches do not disable TLS certificate validation. */
final class HmiTransportPolicy {
private HmiTransportPolicy() { }
static boolean allowBrowserHttp() {
return option("hmi.allow.insecure", "HMI_ALLOW_INSECURE", true);
}
static boolean allowImsapiHttp() {
return option("hmi.imsapi.allowHttp", "HMI_IMSAPI_ALLOW_HTTP", true);
}
static boolean option(String property, String env, boolean fallback) {
String configured = System.getProperty(property);
if (configured == null || configured.trim().isEmpty()) configured = System.getenv(env);
if (configured == null || configured.trim().isEmpty()) return fallback;
return "true".equalsIgnoreCase(configured.trim());
}
static String source(String property, String env) {
String p = System.getProperty(property);
if (p != null && !p.trim().isEmpty()) return "JVM";
String e = System.getenv(env);
return (e != null && !e.trim().isEmpty()) ? "ENV" : "DEFAULT";
}
static JSONObject status() {
return new JSONObject()
.put("allowInsecure", allowBrowserHttp())
.put("allowImsapiHttp", allowImsapiHttp())
.put("allowInsecureSource", source("hmi.allow.insecure", "HMI_ALLOW_INSECURE"))
.put("allowImsapiHttpSource", source("hmi.imsapi.allowHttp", "HMI_IMSAPI_ALLOW_HTTP"))
.put("defaultWithoutFlags", true)
.put("restartRequiredAfterJvmChange", true)
.put("tlsCertificateValidation", "ENABLED");
}
}

View File

@@ -5,6 +5,18 @@
<div class="card"><h2>Server und Datenbank beim Deployment</h2><div id="health">Prüfung läuft …</div></div>
<div class="card"><h2>IMSAPI-Anmeldung und Rollen</h2><div id="auth">Prüfung läuft …</div><form id="imsapiLogin" onsubmit="diagnoseLogin(event)"><p>Für eine authentifizierte Live-Diagnose mit IMSAPI anmelden:</p><input id="imsUser" placeholder="IMSAPI-Benutzer" required autocomplete="username" /><input id="imsPassword" placeholder="Passwort" required type="password" autocomplete="current-password" /><input id="imsStation" placeholder="Station" required /><button type="submit">Mit IMSAPI anmelden</button><button type="button" class="secondary" onclick="diagnoseLogout()">Abmelden</button></form><div id="loginInfo"></div><button class="secondary" onclick="refresh()">Erneut prüfen</button><a class="action secondary" href="/backend/hmi/">Zum HMI</a></div>
<div class="card"><h2>Live-Test über dsCustNJTA</h2><p class="lead">Der Live-Test ist nur für über IMSAPI angemeldete HMI-Administratoren freigegeben.</p><button onclick="live()">Pool und Tabellen jetzt prüfen</button><div id="live">Noch nicht geprüft.</div></div>
<div class="card"><h2>Systemeinstellungen · HTTP / HTTPS</h2>
<p class="lead">Direkt neben der Datenbankdiagnose: Konfiguration der IMSAPI-HTTP-Verbindung und des Browser-Logins. Nur mit IMSAPI-Anmeldung und <code>hmi-admin</code> möglich.</p><p class="lead">Fehlen beide JVM-Optionen, ist HTTP standardmäßig zugelassen. Zum Sperren beide Schalter deaktivieren.</p>
<div id="transportState">Bitte zunächst als HMI-Administrator anmelden.</div>
<form id="transportSettings" onsubmit="saveTransport(event)" hidden>
<label class="line"><span>Browser-/IMSAPI-Login über HTTP zulassen</span><input id="allowInsecure" type="checkbox" /></label>
<label class="line"><span>HTTP für serverseitige IMSAPI-Verbindung zulassen</span><input id="allowImsapiHttp" type="checkbox" /></label>
<p class="bad"><b>Warnung:</b> Bei HTTP werden Passwörter und Sitzungsdaten unverschlüsselt übertragen. Nur in einem abgeschotteten Netzwerk verwenden. Auch bei selbstsignierten HTTPS-Zertifikaten bleibt die TLS-Zertifikatsprüfung aktiv.</p>
<button type="submit">Einstellungen in domain.xml speichern</button>
<p class="lead">Die Speicherung erfolgt über das lokale GlassFish/Payara-<code>asadmin</code>. <b>Ein Neustart ist danach erforderlich.</b> Die laufende JVM verwendet bis dahin weiterhin die bisherigen Werte.</p>
</form>
<pre id="transportCommands" hidden></pre>
</div>
<div class="card"><h2>Was bedeutet das Ergebnis?</h2><p><b>HTTP 401:</b> IMSAPI regLogin fehlt oder konnte die Zugangsdaten nicht bestätigen.</p><p><b>HTTP 403:</b> Anmeldung vorhanden, aber Rolle fehlt. HMI-Rolle serverseitig zuweisen (z.B. <code>HMI_ADMIN_USERS</code>).</p><p><b>POOL_CONNECTION_FAILED:</b> Pool <code>dsCustNJTA</code> im GlassFish kontrollieren und <em>Ping</em> durchführen.</p><p><b>SCHEMA_SETUP_FAILED:</b> Benutzer hat möglicherweise nicht die nötigen Rechte zum Anlegen der Tabellen im Schema <code>CUST</code> / <code>cust</code>.</p><p><b>SCHEMA_MIGRATION_REQUIRED:</b> Bereits angelegte HMI-Tabellen benötigen eine manuell geprüfte Migration.</p><p>Fehlerdetails stehen im GlassFish-Log <code>domains/domain1/logs/server.log</code>.</p></div>
<script>
const el=id=>document.getElementById(id);
@@ -14,14 +26,54 @@ async function refresh(){
try{const r=await fetch('/backend/hmi-health',{cache:'no-store'});if(!r.ok)throw Error('HTTP '+r.status);const d=await r.json();
el('health').innerHTML=line('Komponente',d.component)+line('JNDI Pool',d.datasource)+line('Verbindung beim Deployment',d.poolConnectedAtStartup?'OK':'FEHLER',d.poolConnectedAtStartup)+line('Datenbanksystem',d.databaseKind)+line('Schema initialisiert',d.schemaInitialized?'Ja':'Nein',d.schemaInitialized)+line('Initialisierungsphase',d.initializationPhase)+line('Fehlercode',d.failureCode,d.failureCode==='NONE');
}catch(e){el('health').textContent='Öffentlicher Status nicht erreichbar: '+e.message;}
try{const r=await fetch('/backend/api/hmi/v1/security/csrf',{cache:'no-store',credentials:'same-origin'});const d=r.ok?await r.json():{};if(r.ok)diagCsrf=d.csrf||'';
try{const r=await fetch('/backend/api/hmi/v1/security/csrf',{cache:'no-store',credentials:'same-origin'});const d=r.ok?await r.json():{};if(r.ok){diagCsrf=d.csrf||'';diagIsAdmin=!!d.admin;}else{diagIsAdmin=false;}
el('auth').innerHTML=r.ok?line('Benutzer',d.user)+line('Designer',d.designer?'Ja':'Nein',d.designer)+line('Publisher',d.publisher?'Ja':'Nein',d.publisher)+line('Administrator',d.admin?'Ja':'Nein',d.admin):line('Anmeldestatus','HTTP '+r.status,false);
}catch(e){el('auth').textContent='Anmeldetest fehlgeschlagen: '+e.message;}
}catch(e){el('auth').textContent='Anmeldetest fehlgeschlagen: '+e.message;diagIsAdmin=false;}
await loadTransport();
}
let diagCsrf='';
let diagIsAdmin=false;
async function diagnoseLogin(e){e.preventDefault();const info=el('loginInfo');info.textContent='Anmeldung wird geprüft …';
try{const r=await fetch('/backend/api/hmi/v1/security/login',{method:'POST',headers:{'Content-Type':'application/json'},credentials:'same-origin',body:JSON.stringify({username:el('imsUser').value,password:el('imsPassword').value,station:el('imsStation').value})});el('imsPassword').value='';const data=await r.json();if(!r.ok)throw Error(data.error||'HTTP '+r.status);diagCsrf=data.csrf;info.textContent='IMSAPI-Anmeldung erfolgreich';refresh();}catch(e){info.textContent='Anmeldung fehlgeschlagen: '+e.message;}}
async function diagnoseLogout(){try{const r=await fetch('/backend/api/hmi/v1/security/logout',{method:'POST',headers:{'X-CSRF-Token':diagCsrf,'Content-Type':'application/json'},credentials:'same-origin',body:'{}'});diagCsrf='';el('loginInfo').textContent=r.ok?'Abgemeldet':'Abmeldung nicht möglich: HTTP '+r.status;refresh();}catch(e){el('loginInfo').textContent=String(e);}}
async function live(){el('live').textContent='Verbindung wird geprüft …';try{const r=await fetch('/backend/api/hmi/v1/diagnostics',{cache:'no-store',credentials:'same-origin'});const d=await r.json().catch(()=>({}));if(!r.ok){el('live').textContent='HTTP '+r.status+': '+(d.error||'Zugriff verweigert');return;}el('live').innerHTML=line('Pool jetzt erreichbar',d.poolReachableNow?'Ja':'Nein',d.poolReachableNow)+line('SQL-Test',d.connectionQueryOk?'OK':'Fehler',d.connectionQueryOk)+line('Datenbank',d.database)+line('Tabellen',d.tablesFound+' / '+d.tablesExpected)+line('Fehler',d.failure||'Keine');}catch(e){el('live').textContent='Verbindung fehlgeschlagen: '+e.message;}}
async function loadTransport(){
const box=el('transportState');
el('transportSettings').hidden=true;
if(!diagIsAdmin){box.textContent='Nur nach IMSAPI-Anmeldung mit Rolle hmi-admin verfügbar.';return;}
try{
const r=await fetch('/backend/api/hmi/v1/system/transport',{credentials:'same-origin',cache:'no-store'});
const d=await r.json();if(!r.ok)throw Error(d.error||'HTTP '+r.status);
el('allowInsecure').checked=!!d.allowInsecure;
el('allowImsapiHttp').checked=!!d.allowImsapiHttp;
el('transportSettings').hidden=false;
box.innerHTML=line('HTTP-Login',d.allowInsecure?'Zugelassen':'Gesperrt',!d.allowInsecure)
+line('IMSAPI über HTTP',d.allowImsapiHttp?'Zugelassen':'Gesperrt',!d.allowImsapiHttp)
+line('Quelle Login',d.allowInsecureSource)+line('Quelle IMSAPI',d.allowImsapiHttpSource)
+line('TLS-Zertifikatsprüfung',d.tlsCertificateValidation);
}catch(e){box.textContent='Einstellungen nicht lesbar: '+e.message;}
}
async function saveTransport(e){
e.preventDefault();
const browser=el('allowInsecure').checked, api=el('allowImsapiHttp').checked;
if((browser||api) && !confirm('HTTP erlaubt unverschlüsselte Anmeldungen. Nur in einem geschützten internen Netz zulassen. Weiter?'))return;
el('transportState').textContent='Speichere JVM-Optionen mit asadmin …';
try{
const r=await fetch('/backend/api/hmi/v1/system/transport',{method:'POST',credentials:'same-origin',
headers:{'Content-Type':'application/json','X-CSRF-Token':diagCsrf},body:JSON.stringify({allowInsecure:browser,allowImsapiHttp:api})});
const d=await r.json();
if(r.ok){el('transportState').innerHTML=line('Speichern in domain.xml','Erfolgreich',true)
+line('Neustart erforderlich','JA',false)
+'<p>Die Änderungen gelten erst nach dem GlassFish-/Payara-Neustart.</p>';
el('transportCommands').hidden=true;
}else{el('transportState').textContent='Nicht gespeichert: '+(d.error||'HTTP '+r.status)
+'. Bitte die folgenden Befehle auf dem Server mit einem autorisierten Konto ausführen (vorhandene Optionen laut <code>asadmin list-jvm-options</code> vorher entfernen):';
if(d.fallbackCommands){
el('transportCommands').hidden=false;
el('transportCommands').textContent=Object.values(d.fallbackCommands).join('\n');
}
}
}catch(e){el('transportState').textContent='Speichern fehlgeschlagen: '+e.message;}
}
refresh();
</script></body></html>