<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
?>
<?php virtual('/Connections/locale.php'); ?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['login'])) {
$loginUsername=$_POST['login'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "/perso.php";
$MM_redirectLoginFailed = "/connexion.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_locale, $locale);
$LoginRS__query=sprintf("SELECT login, passe FROM membre WHERE login='%s' AND passe='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $locale) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>">
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>">
<head>
<?php
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
}
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>serma info</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<style type="text/css">
<!--
-->
</style>
<link href="../css/principal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
left: 591px;
top: 269px;
}
-->
</style>
</head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50" colspan="3"><img src="../images/banner.jpg" alt="banner" width="780" height="120" /></td>
</tr>
<tr>
<td height="25" colspan="3" align="left" valign="top" class="barrelogin">
<p>
<?php
if(isset($_SESSION['MM_Username']))
{
echo "Bonjour ". $_SESSION['MM_Username'] ;
echo "<a href='$logoutAction'>Déconnecter</a></p>";
}
else
{
?>
<form id="form1" method="POST" action="<?php echo $loginFormAction; ?>">
<table width="537" height="31" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Login</td>
<td><input name="login" type="text" id="login" /></td>
<td>password</td>
<td><input name="password" type="password" id="password" /></td>
<td><input name="envoyez" type="submit" id="envoyez" value="Envoyer" /></td>
<td> </td>
</tr>
</table>
<?php } ?>
</form> </td>
</tr>
<tr>
<td width="160" height="22" align="left" valign="top" class="MenuAG"> </td>
<td width="485" height="22" align="left" valign="top" background="/connexion.php" class="Menucentre"><a href="/connexion.php">Connexion</a> - <a href="../index.php">Accueil</a> - <a href="../forum.php">Forum</a> - <a href="../aides.php">Aides</a> - <a href="../videos.php">Videos</a> - <a href="../contacts.php">Contacts</a> - <a href="../telechargement.php">Téléchargements</a> </td>
<td width="135" align="center" valign="top" class="MenuAD"> </td>
</tr>
<tr>
<td height="60" align="left" valign="top" class="MenuHG">Aides et<br />
procédures : </td>
<td align="left" valign="top" class="Menucentre"><!-- TemplateBeginEditable name="Titres" -->Téléchargement<!-- TemplateEndEditable --></td>
<td align="center" valign="top" class="MenuHD">Top 5 des<br />
procédures : </td>
</tr>
<tr>
<td height="22" align="left" valign="top" class="MenuinterG"> </td>
<td width="485" align="left" valign="top" class="Menucentre"> </td>
<td align="center" valign="top" class="MenuinterD"> </td>
</tr>
<tr>
<td height="60" align="left" valign="top" class="MenuG"><p class="Style1">Recherche par catégorie</p> </td>
<td rowspan="6" align="left" valign="top" class="Menucentre"><!-- TemplateBeginEditable name="Contenu" -->
<p> </p>
<!-- TemplateEndEditable --></td>
<td rowspan="5" align="center" valign="top" class="MenuD"> </td>
</tr>
<tr>
<td height="60" align="left" valign="top" class="MenuG"><span class="Style1">Recherche par mot clé</span></td>
</tr>
<tr>
<td height="60" align="left" valign="top" class="MenuG"><a href="../videos.php">Procédures en vidéo</a></td>
</tr>
<tr>
<td height="60" align="left" valign="top" class="MenuG"><a href="../phpBB2/index.php">Forum</a></td>
</tr>
<tr>
<td height="60" class="MenuG">Administration</td>
</tr>
<tr>
<td class="MenuinterG"></td>
<td class="MenuD"> </td>
</tr>
<tr>
<td height="22" class="menuBG"> </td>
<td height="22" class="Menucentre"><span class="MentionLegal">© 2007 serma technologies | <a href="../contacts.php">Contacts</a> | Plan du site </span></td>
<td height="22" class="menuBD"> </td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>