<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>InfaMadge</title>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1" height="100%">
<tr>
<td width="29%" height="68" bgcolor="#33CCFF"> </td>
<td width="66%" height="68"> </td>
<td width="5%" height="68" bordercolor="#33CCFF" bordercolorlight="#33CCFF" bordercolordark="#33CCFF" style="border-style: solid; border-width: 2; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<img border="0" src="InfaMadge.jpg" align="right" width="283" height="32"></td>
</tr>
<tr>
<td width="29%" height="486" bgcolor="#33CCFF"> </td>
<td width="82%" colspan="2" height="486" style="font-family: Verdana; font-size: 10pt">
<p style="margin-left: 150; margin-right: 150">
<font face="Verdana" size="2"><b>WELCOME</b> to Infa-</font><img border="0" src="j0334254[1].gif" width="68" height="106" align="left"><font face="Verdana" size="2">Madge,
an interactive information management </font>
<font face="Verdana" size="2">system. Please note only valid users are
permitted to use this service. If y</font><font face="Verdana" size="2">ou
require further</font><font face="Verdana" size="2"> information regarding
this product please contact our admin team.</font></p>
<p style="margin-left: 150; margin-right: 150" align="left"><b>
<font face="Verdana" size="2">Please enter your login details below to gain
access to Infa-Madge.</font></b></p>
<p align="center">
<form action ="<?php $PHP_SELF?>" method ="post">
<p align="left" style="margin-left: 150">
<?PHP
//Populate user id field so that any info entered will be put back in the event of login failure
echo( "<b><font face=Verdana size=2>USER NAME </font></b><input type=text size =20 name=useridt value= \"$useridt\"><br>");
?>
<b><font face="Verdana" size="2">PASSWORD </font></b><input type="password" size="20" name = "passwdt">
<input type="submit" name="submit" value="Login"><font size="1" color="#0000FF">
Register new user</font><br>
</form>
</p>
<?PHP
//Validate User Login
if ("Login"==$submit) {
include("/usr/local/home/httpd/pdata/peterslab/connect.inc.php");
if (!$dbcnx) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
mysql_select_db("infamadge", $dbcnx);
if (!@mysql_select_db("infamadge") ) {
echo( "<p>Unable to locate the infamadge " .
"database at this time.</p>" );
exit();
}
$query = "SELECT * FROM users WHERE userid = '$useridt' and passwd = '$passwdt'";
$result = mysql_query($query)
or die ( "couldn't execute query");
while( $row = mysql_fetch_array($result) )
{
$userid = $row["userid"];
$passwd = $row["passwd"];
}
if (!$userid) {
echo( "<p style=\"margin-left: 150; margin-right: 150\" align=\"left\"><font color=#FF0000>INVALID LOGIN");
}
else echo $userid;
}
?>
</td>
</tr>
<tr>
<td width="29%" height="38" bgcolor="#33CCFF"> </td>
<td width="66%" height="38" style="font-family: Verdana; font-size: 10pt" bgcolor="#CCFF66">
<?PHP
//Identify what broswer and platform is being used
$viewer = getenv("HTTP_USER_AGENT");
$browser = "Unknown Browser!";
if( preg_match( "/MSIE/i", "$viewer" ) )
{ $browser = "Internet Explorer"; }
else if( preg_match( "/Netscape/i", "$viewer" ) )
{ $browser = "Netscape";}
else if( preg_match( "/Opera/i", "$viewer" ) )
{ $browser = "Opera"; }
$platform = "Unknown O/S";
if( preg_match( "/Windows/i", "$viewer" ) )
{ $platform = "Windows"; }
else if( preg_match( "/Linux/i", "$viewer" ) )
{ $platform = "Linux"; }
echo( "<b>Identified:</b> $browser on $platform Operating System");
?>
</td>
<td width="5%" height="38" bgcolor="#CCFF66">
<p align="right"><font face="Verdana" size="2">
<?PHP
//Print date and prevent page caching
echo date("d F Y");
$PHP_SELF;
?>
</font>
</td>
</tr>
</table>
</body>
</html>