<? 
// login_wml.php
//
// Copyright, Exolution GmbH / Michael Kerrisk, Sep 2000
// http://www.exolution.com/wapsh   mailto:wapsh@exolution.de
//
// This software is Open Source licensed under the terms of the Trolltech QPL
// version 1.0.  See http://www.exolution.de/wapsh for further information.
//
// -------------------------------------------------------------------
//

    header("Content-type: text/vnd.wap.wml");
    require("common.inc");
    require("getloginhosts.inc");
    require("displayfuncs.inc");
    require("common_wml.inc");
    echo '<?xml version="1.0" encoding="iso-8859-1"?>';
?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
  "http://www.wapforum.org/DTD/wml_1.1.xml">

<?
    srand ((double) microtime() * 1000000);
?>
<wml>

<card title="htsh Login">

  <p>
    htsh login
  </p>

  <p>
    Username
  </p>
  <p>
    <input type="text" name="username" format="*M" size="8" maxlength="8"
    	value="<? echo $u; ?>"/>
  </p>
  <p>

    Password
  </p>
  <p>
    <input type="password" name="password" format="*M" size="8" maxlength="8"/>
  </p>
  <p>

<?
    getLoginHosts($numHosts, $hostName, $hostAddressList);

    if ($numHosts > 1) {
        echo '<select name="host" title="host" value="' . $h . '">';
        for ($j = 0; $j < $numHosts; $j++)
            echo "<option value=\"$hostName[$j]\">$hostName[$j]</option>";
        echo "</select>";
?>
 
<?
    } // if
?>
  </p>
 
  <p>
<?
    wmlSubmitAnchor("Login", "command.php", "post", 
    	    '<postfield name="' . session_name() . '" ' .
		    'value="' . session_id() . '"/>' .
            '<postfield name="ctype" value="wap"/>' .
            '<postfield name="username" value="$username"/>' .
            '<postfield name="password" value="$password"/>' .
            (($numHosts > 1) ? '<postfield name="host" value="$host"/>' : '') .
            '<postfield name="r' . rand() . '" value="x"/>');
?>
  </p>                                                                          
    
</card>

</wml>
