<?PHP 
error_reporting (5);

require_once ('phpscript/grab_globals.lib.php');
include_once ('phpscript/ConnectToMySql.php');
include_once ('phpscript/cookie.lib.php');

$ok  			= $GLOBALS['send'];
$abbr			= $GLOBALS['cancel'];
$mailAdr    	= $GLOBALS['mailAdr'];


    if ($ok=='Anmelden') { //   n i c h t  beim ersten Mal
      if (!$abbr) {
          $loggedin = true;
      } else {
		  $loggedin = false;
		
	  }
	}

?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>Signin</title>
</head>

<body>
<div>
<?

	if (!$loggedin) {
		$t1="<form id='frmsignin' name='frmsignin' method='post' action='$_SELF'>
			   <p><input type='hidden' name='loggedin' id='loggedin' value='$loggedin' />
			      <input type='text' name='mailAdr' id='mailAdr' size='40' />
			 	  <input type='submit' name='send' id='send' value='Anmelden' />
				   <input type='submit' name='cancel' id='cancel' value='Abbrechen' /></p>";
		echo $t1;
	} else {
		$t1="<p style='text-align:center;'><img src='media/images/wf-man-logo.png'></img></p>";
		echo $t1;
		setCookie('cookWFPIC',$mailAdr,0);	
	}
?>
	</div>
  </body>
</html>
