AEOS Calvarium v0.4
This commit is contained in:
parent
821b405f5a
commit
57b531cb62
189 changed files with 3810 additions and 1417 deletions
95
admin/index.php
Normal file → Executable file
95
admin/index.php
Normal file → Executable file
|
|
@ -4,35 +4,32 @@ session_start();
|
|||
|
||||
// Inclusion des librairie
|
||||
require_once ('../lib/aeos.lib.php');
|
||||
require_once ('../lib/config.lib.php');
|
||||
require_once ('../lib/var.lib.php');
|
||||
$password = AEOS_PASSWORD;
|
||||
$login = AEOS_LOGIN;
|
||||
$email = AEOS_MAIL;
|
||||
|
||||
$password = $ADMIN_MDP;
|
||||
$login = $ADMIN_LOG;
|
||||
$email = $ADMIN_EMAIL;
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title><?php echo $SITE_NOM; ?></title>
|
||||
<meta name="description" content="<?php echo $SITE_DESC; ?>" />
|
||||
<?php
|
||||
// Detection du navigateur. Si iPhone ou non.
|
||||
if(preg_match("/iphone/i", $_SERVER["HTTP_USER_AGENT"])) {?>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../themes/<?php echo $SITE_THEME; ?>/styles_mobile.css" /><?php } else { ?>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../themes/<?php echo $SITE_THEME; ?>/styles.css" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="tinyeditor/style.css" />
|
||||
<script type="text/javascript" src="tinyeditor/packed.js"></script>
|
||||
<link rel="icon" type="image/png" href="../themes/<?php echo $SITE_THEME; ?>/images/favicon_aeos.ico" /><?php } ?>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title><?php echo AEOS_NAME; ?></title>
|
||||
<meta name="description" content="<?php echo AEOS_DESC; ?>" />
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="../themes/system/styles.css" />
|
||||
<script type="text/javascript" src="owEditor/owEditor.js"></script>
|
||||
<link rel="icon" type="image/png" href="../themes/<?php echo AEOS_THEME; ?>/images/favicon_aeos.ico" />
|
||||
</head>
|
||||
|
||||
<?php if(!isset($_SESSION['_login']) || !isset($_SESSION['_pass'])){ ?>
|
||||
<body>
|
||||
<div id="content">
|
||||
|
||||
<div id="center">
|
||||
<div id="left">NNSPROD LOGO</div>
|
||||
<h6><img src="../themes/<?php echo $SITE_THEME; ?>/images/icones/logout.png" alt="Logout" class="icon" />Administration - AEOS</h6>
|
||||
<?php if(!isset($_SESSION['_LOGIN']) || !isset($_SESSION['_PASSWORD'])){ ?>
|
||||
<body>
|
||||
<div id="Layout"></div>
|
||||
<div id="Administration">
|
||||
<h1><img src="../themes/system/images/logo_black.png" alt="Logo AEOS" /></h1>
|
||||
<h6>
|
||||
<img src="../themes/system/images/icones/logout.png" alt="Logout" class="icon" />
|
||||
Administration - AEOS
|
||||
</h6>
|
||||
|
||||
<?php
|
||||
if (@$_GET['action']=="mdpperdu")
|
||||
|
|
@ -42,24 +39,22 @@ if(preg_match("/iphone/i", $_SERVER["HTTP_USER_AGENT"])) {?>
|
|||
if(($login == $_POST['login']) && (strtolower($email) == strtolower($_POST['email'])))
|
||||
{
|
||||
$mdp = generer_mdp(12);
|
||||
sendMail($SITE_NOM, $email, "Récupération de mot de passe", "Ce mail provient de ".$SITE_NOM.".\nVous avez fait une demande de nouveau mot de passe.\n\nVoici votre nouveau mot de passe: ".$mdp);
|
||||
sendMail(AEOS_NAME, $email, "Récupération de mot de passe", "Ce mail provient de ".AEOS_NAME.".\nVous avez fait une demande de nouveau mot de passe.\n\nVoici votre nouveau mot de passe: ".$mdp);
|
||||
ecriture_xml('../data/config.xml', 'mdp_admin', md5($mdp));
|
||||
echo "<span class='valide'>Un email vous a été envoyé.</span>";
|
||||
echo "<p><span class='valide'>Un email vous a été envoyé.</span></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<span class='erreur'>Login ou email incorrect.</span>";
|
||||
echo "<p><span class='erreur'>Login ou email incorrect.</span></p>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="index.php?action=mdpperdu" method="post">
|
||||
<p>
|
||||
Login<br /><input type="text" name="login" class="input" value="" /><br /><br />
|
||||
Email<br /><input type="text" name="email" class="input" value="" /><br /><br />
|
||||
<input type="submit" value="Renvoyer un mot de passe" class="input" />
|
||||
</p>
|
||||
</form>
|
||||
<p><a href="index.php" class="link">Retour</a></p>
|
||||
<form action="index.php?action=mdpperdu" method="POST">
|
||||
<p>Login<br /><input type="text" name="login" class="input_text" value="" /></p>
|
||||
<p>Email<br /><input type="text" name="email" class="input_text" value="" /></p>
|
||||
<p><input type="submit" value="Renvoyer un mot de passe" class="input_button" /></p>
|
||||
</form>
|
||||
<p><a href="index.php" class="link">Retour</a></p>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
|
@ -68,28 +63,36 @@ if(preg_match("/iphone/i", $_SERVER["HTTP_USER_AGENT"])) {?>
|
|||
{
|
||||
if(($login == $_POST['login']) && ($password == md5($_POST['mdp'])))
|
||||
{
|
||||
$_SESSION['_login'] = $login;
|
||||
$_SESSION['_pass'] = $password;
|
||||
$_SESSION['_LOGIN'] = $login;
|
||||
$_SESSION['_PASSWORD'] = $password;
|
||||
$n = lecture_xml(URL_CHECK_UPDATE);
|
||||
if($n['notifications']['update']['#text']!=UPDATE)
|
||||
{
|
||||
$_SESSION['_NOTIFICATIONS']=TRUE;
|
||||
copy(URL_CHECK_UPDATE, 'notifications.xml');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['_NOTIFICATIONS']=FALSE;
|
||||
}
|
||||
if($_SESSION['_NOTIFICATIONS']) ecriture_xml('../data/config.xml', 'update', $n['notifications']['update']['#text']);
|
||||
header('Location: index.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<p class='decalageBas'><span class='erreur'>Login ou mot de passe incorrect.</span></p>";
|
||||
echo "<p><span class='erreur'>Login ou mot de passe incorrect.</span></p>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="index.php" method="post">
|
||||
<p>
|
||||
Login<br /><input type="text" name="login" class="input" value="" /><br /><br />
|
||||
Mot de passe<br /><input type="password" name="mdp" class="input" value="" /><br /><br />
|
||||
<input type="submit" value="Connexion" class="input" />
|
||||
</p>
|
||||
<form action="index.php" method="POST">
|
||||
<p>LOGIN<br /><input type="text" name="login" class="input_text" value="" /></p>
|
||||
<p>MOT DE PASSE<br /><input type="password" name="mdp" class="input_text" value="" /></p>
|
||||
<p><input type="submit" value="Connexion" class="input_button" /></p>
|
||||
<p><a href="index.php?action=mdpperdu" class="link">Mot de passe perdu ?</a></p>
|
||||
</form>
|
||||
<p><a href="index.php?action=mdpperdu" class="link">Mot de passe perdu ?</a></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<?php } else {require_once('base.php');} ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue