<?php
session_start();
require("./CustomSql.inc.php");
$db = new CustomSQL($DBName);
$showtable = true;
$errortag = false;
if (!empty($userlogin)) {
if (empty($username)){
$errortag = true;
$errormsg = $error_usernameempty;
}
if (empty($password)){
$errortag = true;
$errormsg = $error_passwordempty;
}
$customerid = $db->logincheck($username,$password);
if ($customerid==0) {
$errortag = true;
$errormsg = $error_wrongpassword;
}
if (!$errortag){
session_register("CID");
$CID = $customerid;
$showtable = false;
}
}
if (session_is_registered("CID")){
$showtable = false;
}
?>
<html>
<head>
<title><?php print "$front_login"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php print "$front_charset"; ?>">
<link rel="stylesheet" href="./style/style.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body background="C:\XoB\XoB-Net Client\gfx\logon_ClientBG.png" text="#000000" leftmargin="0" topmargin="0">
<br><br><br>
<table width="500" border="0">
<tr>
<td><IMG SRC="C:\XoB\XoB-Net Client\gfx\login_ques.png" BORDER="0">
</td>
<td bgcolor="#FFFFFF" width="500">
<table border="0" cellspacing="0" cellpadding="4" width="500">
<tr>
<td></td>
</tr>
<?php
if ($errortag){
?>
<tr>
<td><font color="#FF0000"><?php print "$errormsg"; ?></font></td>
</tr>
<?php
}
?>
<tr>
<td align="left">
<?php
if ($showtable){
?>
<form action="<?php print "$PHP_SELF"; ?>" method="POST">
<table border=0 cellpadding=2 cellspacing=2>
<tr><td width="120"><b><?php print "$front_username"; ?> : </b></td><td><input type="text" name="username" value="<?php print "$username"; ?>" class="fields"></td></tr>
<tr><td><b><?php print "$front_password"; ?> : </b></td><td><input type="password" name="password" value="" class="fields"></td></tr>
<tr><td><b>[<a href="register.php"><?php print "$front_registration"; ?></a>]</b> <b>[<a href="forgetpass.php"><?php print "$front_forgetpass"; ?></a>]</b></td><td><input Class="button" type="submit" name="userlogin" value="<?php print "$front_login"; ?>"></td></tr>
</table>
</form>
<?php
}
else{
?>
<b> <a href="
http://www.xob.frac.dk/client/ver 1/index.php">Continue</a><br>
<a href="modiinfo.php"><?php print "$front_modiinfo"; ?></a> | <a href="modipass.php"><?php print "$front_modipass"; ?></a><br>
<?php
}
?>
</b></td>
</tr>
<tr>
<td align="right"> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>