<html><head>
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<title>Demo Login Page</title></head>

<!-- Build a menu of jurisdictions using JavaScript and PHP -->
<!-- Call dacs_list_jurisdictions -->
<!-- Note: Replace "MYSERVER" with an appropriate domain name -->

<body bgcolor="#fffff4">
<script type="text/javaScript">
function jurisdiction_form_handler() {
  si = document.jurisdiction_form.DACS_JURISDICTION.selectedIndex;
  oo = document.jurisdiction_form.DACS_JURISDICTION.options[si];
  v = oo.value;

  s = v.split("@");
  h = s[0];
  oo.value = s[1];
  document.jurisdiction_form.action = h + "/dacs_authenticate";
  s[0] = "";
  s[1] = "";
  h = "";
}
</script>
<center>
<h1>Demo Login Page</h1>
<hr>
</center>

<p>
<center>
<form name="jurisdiction_form" method="post" action="" onSubmit="jurisdiction_form_handler()">
<table width="100%">
<tr>
  <td width="20%"><font size="+1"><b>Home Jurisdiction</b></font></td>
  <td width="80%">
    <select name="DACS_JURISDICTION" size="1">
    <option value="" selected>-&nbsp;-&nbsp;-&nbsp;-&nbsp;-&nbsp;-</option>
<?php
$file = fopen("https://MYSERVER/cgi-bin/dacs/dacs_list_jurisdictions?FORMAT=php", "r");
if (!$file) {
  echo "<P>Unable to open remote file.\n";
  exit;
}

$n = 0;
while (!feof($file)) {
  $line = rtrim(fgets($file, 1024));
  if ($line == "")
    continue;
  if ($line == "OK")
    break;
  parse_str($line);
  $n++;
}

fclose($file);

for ($i = 0; $i < $n; $i++) {
  echo "<option value=\"$host[$i]\">$jurisdiction[$i]</option>\n";
}
?>
    </select>


</tr>
<tr>
  <td width="20%"><font size="+1"><b>Username</b></font></td>
  <td width="80%"><input type="TEXT" size="20" name="USERNAME"></td>
</tr>

<tr>
  <td width="20%"><font size="+1"><b>Password</b></font></td>
  <td width="80%"><input type="PASSWORD" size="20" name="PASSWORD"></td>
</tr>

<tr>
  <td width="20%"><font size="+1"><b>Extra Information</b></font><br><font size="-1"><em>(optional)</em></font></td>
  <td width="80%"><input type="TEXT" size="20" name="AUXILIARY"></td>
</tr>

<tr>
 <td colspan="2">
 <pre>

 </pre>
 </td>
</tr>

<tr>
<td width="20%" align="LEFT"><input type="submit" value=" Submit "></td>
<td align="LEFT"><input type="reset" value=" Reset all values "></td>
</tr>
<input type=hidden name="DACS_BROWSER" value="1">

</table>
</form>
</center>
<p>
<hr>
<pre>

</pre>
<p><em><b>Copyright (c) 2003-2016 Distributed Systems Software.  All rights rese
rved.</b></em>
<p><em><b>$Id: login.php 2873 2016-03-12 18:54:40Z brachman $</b></em>
</body>
</html>
