1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>login</title>
<body>
<table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width: 40px;"><img style="width: 30px; height: 30px;" alt="" src="images/img_connect.gif"></td>
<td style="width: 649px;"><?php $error = "";
@$step = $_GET['step'];
include ("admin/param.inc.php"); // Constantes
include ("language/".LANG.".inc.php"); // Language
include ("style.inc.php") ; // Font, color, etc
require ("config.inc.php") ; // connection to database
/* Checking user access */
if ( $step==1 )
{
$pwdus = md5($_GET['pwdus']);
$qry = "SELECT IdUs, NameUs ".
"FROM ".USER." ".
"WHERE LoginUs = '".$_GET['loginus']." ' ".
"AND PwdUs = '".$pwdus." ' ";
$ret = mysql_query($qry, $cnx) ;
$col = mysql_fetch_row($ret) ;
$idus = $col[0]; if ( $idus==0 ) { $error = $txt[16];
unset($step);
}
else {
setcookie($cookie,$idus,time()+3600,"/");
echo '<script language = "JavaScript">/'.'/<!--';
echo "\nlocation.href = \'index.php\' ";
echo '/'.'/--></script>';
exit;
} }
/* Identification */
if ( !isset($step) )
{
echo "<HTML><HEAD>
<TITLE>ASCOMETAL 38 / SOGEST INDUSTRIE</TITLE>
<BODY BACKGROUND=\"images/$backimg\">" ;
echo "<P><FONT FACE=\"$font\" SIZE=2 COLOR=RED>".$error." </P>";
print("<FORM ACTION=\"#\" METHOD=\"GET\">
<INPUT TYPE=\"HIDDEN\" NAME=\"step\" VALUE=\"1\">
<TABLE WIDTH=75% BORDER=0>
<TR>
<TD COLSPAN=2>
<FONT FACE=$font SIZE=4>$txt[12]</FONT><BR> </TD>
</TR>
<TR>
<TD><FONT FACE=\"$font\" SIZE=2>$txt[13]</TD>
<TD><INPUT TYPE=\"TEXT\" NAME=\"loginus\"></TD>
<TR>
<TD><FONT FACE=\"$font\" SIZE=2>$txt[14]</TD>
<TD><INPUT TYPE=\"PASSWORD\" NAME=\"pwdus\"></TD>
</TR>
<TD COLSPAN=2><P> <CENTER>
<INPUT TYPE=\"SUBMIT\" VALUE=\"$txt[15]\"></TD>
</TR>
</TABLE>
</FORM>");
}
/* Erase the cookie */
if ( $step==3 ) {
setcookie($cookie,"",time()-3600,"/");
echo '<script language = "JavaScript">/'.'/<!--';
echo "\nlocation.href = \'index.php\' ";
echo '/'.'/--></script>';
}
php?></td>
</tr>
</tbody>
</table>
</body>
</html> |
Partager