<?php
	@session_start();
	
	if ( ( strlen( $_GET[ "dok_id" ] ) > 0 ) and ( strlen( $_SESSION[ "benutzer_anmeldename" ] ) > 0 ) )
	{
		header( "Location: system_redir_zum_dokument.php?dok_id=".$_GET[ "dok_id" ] );
	}
	
	if ( strlen( $_SESSION[ "benutzer_anmeldename" ] ) > 0 )
	{
		header( "Location: us_uebersicht.php" );
	}
	
	
	
	$_SESSION[ "body" ] = "onload=\"document.login.elements[ 'sprache' ].readOnly = true;document.login.elements[ 'benutzer_anmeldename' ].focus();\"";
	$_SESSION[ "title" ] = "Web-Applikationen Login";
	$_SESSION[ "css" ] = "index.php";
	
	
	include( "ssi_header.php" );
	
	$_SESSION[ "body" ] = "";
	$_SESSION[ "title" ] = "";
	$_SESSION[ "css" ] = "";
	//<!--#include virtual="header_ssi.php" -->
	
	//login_animation
	
	
	
?>


<h1 style="padding-left:120px;padding-bottom:40px;padding-top:40px;">Login</h1>

<form name="login" action="login.php<?php if ( strlen( $_GET[ "dok_id" ] ) > 0 ) { echo "?dok_id=".$_GET[ "dok_id" ]; } ?>" method="post" >

<table  border="0" ><tr><td>&nbsp;</td><td>&nbsp;</td><td rowspan="15"><?php echo $object;?></td></tr><tr><td class="login_table">Benutzer-Anmeldename</td><td><input type="text" size="20" id="benutzer_anmeldename" autofocus name="benutzer_anmeldename" style="width:120pt;" ></td></tr>
<tr><td class="login_table" >Passwort</td><td><input type="password" size="20" name="passwort" style="width:120pt;" ></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td class="login_table">Mandant</td><td><?php 

$ergebnis = liefere_alle_mandanten();

echo "<select name=\"mandant_name\" size=\"1\" style=\"width:120pt;\">";

foreach( $ergebnis[ 2 ] as $mandant )
{
	echo "<option >".$mandant."</option>";
}
echo "</select>";
//<input type="text" name="mandant" size="20" value="Standard">
?></td></tr>
<!--tr><td class="login_table">Sprache</td><td><input type="text" name="sprache" size="2" value="de" ></td></tr-->
<tr><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td></td><td><input type="submit" value="Login"/></td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td></tr></table>

</form>
<?php

echo '<div id="meldung" style="padding-left:120px;" >'.$_SESSION[ "meldung" ].'</div>';
$_SESSION[ "meldung" ] = "";



?>

<p style="margin:150px 0px;">

</p>



<?php
include("ssi_footer.php");
//<!--#include virtual="footer_ssi.php" -->
?>