Location: PHPKode > projects > O - OpenSource GroupWare > osgw/login.php
<?php
/**************************************************************************
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   @Authors:	Ryan Thompson(hide@address.com)
***************************************************************************/
include("./data.php");
$service['add_header'] = FALSE;
$service['no_session'] = TRUE;
include('./config.inc.php');
if(isset($_POST['login']))
{
	if($user->login($_POST['username'], $_POST['password']))
	{	
		$O->redirect('/'.$user->get_default_service($user->user_id));
	}
} 

echo $layout->page_header;
?>

<table align="center" class="login" style="height:auto;background: none">
<tr><td>
<?php
	if($error->buffer)
	{
		echo $error->display();
	}
?>
</td></tr>
</table>

<br />
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table align="center" cellspacing="0" cellpadding="0" border="0" class="login">

<tr>
<td style="background:#224466;" valign="top"><?php echo $text['login']?></td>
</tr>
<tr>
<td style="background:#224466;">

<table style="border-top: 2px solid white;border-bottom: 2px solid white; background:#336699;color: #FFFFFF;" width="98%" align="center">
<tr>
<td><?php echo $text['username']?>:</td>
<td><input type="text" name="username" value="<?php echo $_POST['username']?>" /></td>
</tr>
<tr>
<td><?php echo $text['password']?>:</td>
<td><input type="password" name="password" value="" /></td>
</tr>

</table>


</td>
</tr>
<tr>
<td colspan="2" style="background: #224466">
<div style="float:left;width:100px;">
	<input type="submit" name="login" value="<?php echo $text['login']?>" class="button1" />
</div>
<div style="float:right;">
	<input type="reset" name="cancel" value="<?php echo $text['cancel']?>" class="button1" />
</div>
</td>
</tr>
<tr>
<td style="text-align:right;font-size:10pt;background:#224466;color:#FFFFFF;font-family:Arial">

<a href="forgot.php" style="color:#FFFFFF"><?php echo $text['forgot_password']?></a>
</td>
</tr>
</table>

</form>
</body>
</html>
Return current item: O - OpenSource GroupWare