AEOS Calvarium v0.4

This commit is contained in:
OverSu 2026-08-26 17:23:29 +02:00
commit 57b531cb62
189 changed files with 3810 additions and 1417 deletions

425
install/index.php Normal file → Executable file
View file

@ -3,234 +3,233 @@
if (file_exists("../data/config.xml")){header('Location: ../index.php');}
require_once ('../lib/aeos.lib.php');
?>
<!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" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>AEOS | Installation</title>
<link rel="stylesheet" type="text/css" media="screen" href="../themes/defaut/styles.css" />
<link rel="stylesheet" type="text/css" media="screen" href="../themes/system/styles.css" />
<link rel="stylesheet" type="text/css" media="screen" href="install.css" />
<link rel="icon" type="image/png" href="../themes/defaut/images/favicon_aeos.ico" />
</head>
<body>
<div id="content">
<div id="center">
<div id="left">NNSPROD LOGO</div>
<h6><img src="../themes/defaut/images/icones/config.png" alt="Install" class="icon" />Installation - AEOS</h6>
<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" />
Installation - AEOS
</h6>
<table class="tableCenter">
<tr>
<?php
!isset($_GET['etape'])?$etape=0:$etape=$_GET['etape'];
$PHPVersion = phpversion();
$PHPv = explode (".", $PHPVersion);
switch ($etape)
{
// Pré-installation
case 0: ?>
<td class="menu">
<ul class="listing">
<li id="actif">Preface</li>
<li class="onglet">Etape 1</li>
<li class="onglet">Etape 2</li>
<li class="onglet">Etape 3</li>
<li class="onglet">Etape 4</li>
</ul>
</td>
<td rowspan="2" class="blocD">
<form method="post" action="index.php?etape=1">
<h2>Préface d'installation</h2>
<h3>AEOS 0.2 [CALVARIUM]</h3>
<p>
Bienvenue sur l'assistant d'installation d'AEOS [CALVARIUM] !<br />
Veuillez suivre les étapes et valider avec la touche "suivant" afin de progresser.<br /><br />
<b>Prérequis:</b><br /><br />
PHP version >= 5.x.x
<?php
if ($PHPv[0]>=5) {echo "<span class='validation'>OK</span><br />";}
else {$erreur="Vous ne disposez pas de la version 5 de PHP."; echo "<span class='erreur'>ERREUR</span><br />";}
?>
Possibilité d'écrire dans le dossier DATA
<?php
$chmod_data = substr(sprintf('%o', fileperms('../data')), -4);
if ($chmod_data<"0700"){$erreur="Le dossier DATA n'a pas les droits appropriés. Il est en ".$chmod_data; echo "<span class='erreur'>ERREUR</span>";}
else {echo "<span class='validation'>OK</span>";}
?>
<div id="Menu">
<ul>
<?php
if (!isset($_POST['lang'])) $langs="fr"; else $langs=$_POST['lang'];
require_once('lang/'.$langs.'/index.php');
$menuArray=array($lang['L_Inst_Etape'], $lang['L_Inst_Etape1'], $lang['L_Inst_Etape2'], $lang['L_Inst_Etape3'], $lang['L_Inst_Etape4']);
$l=0;
foreach ($menuArray as $menu)
{
if (@$_GET['etape']==$l){ ?><li class="Actif"><?php }
else { ?><li><?php }
echo $menu."</li>";
$l++;
}
?>
</ul>
</div>
<?php
!isset($_GET['etape'])?$etape=0:$etape=$_GET['etape'];
$PHPVersion = phpversion();
$PHPv = explode (".", $PHPVersion);
$install_conf = lecture_xml("base.xml");
switch ($etape)
{
// Prérequis -------------------------------------------------------------------------------------------------------------------------
case 0:
?>
<form method="POST" action="index.php?etape=0">
<p>
<select name="lang" class="input_select" onchange="this.form.submit();">
<option value="basic">-</option>
<?php
$list = listing_dossier("lang/");
foreach ($list as $pages)
{
$lg = lecture_xml('lang/'.$pages.'/lang.xml'); ?>
<option value="<?php echo $pages; ?>" <?php if($pages==@$_POST['lang']){echo "selected";}?>>
<?php echo $lg['lang']['title']['#text'];?>
</option><?php
} ?>
</select>
</p>
</form>
<form method="POST" action="index.php?etape=1">
<h3>AEOS v<?php echo $install_conf['configuration']['version']['#text'];?></h3>
<h4><?php echo $lang['L_Inst_bienvenue']; ?></h4>
<h5><?php echo $lang['L_Inst_instruction']; ?></h5>
<p><?php echo $lang['L_Inst_prerequis']; ?></p>
<table class="Full">
<tr>
<td><?php echo $lang['L_Inst_versionphp']; ?><?php echo $PHPVersion; ?></td>
<td>
<?php
if (isset($erreur))
{
echo "<br /><span class='erreur2'>".$erreur."</span>";
?><br /><input type="submit" value="Suivant" class="input" id="input1" disabled="disabled" /><?php
}
else
{ ?>
<br /><br /><input type="submit" value="Suivant" class="input" id="input1" /><?php
} ?>
</p>
</form>
</td>
<?php
break;
// Etape 1
case 1:
?>
<td class="menu">
<ul class="listing">
<li class="onglet">Preface</li>
<li id="actif">Etape 1</li>
<li class="onglet">Etape 2</li>
<li class="onglet">Etape 3</li>
<li class="onglet">Etape 4</li>
</ul>
</td>
<td rowspan="2" class="blocD">
<form method="post" action="index.php?etape=2">
<h2>Etape 1</h2>
<h3>Configuration générale</h3>
<p>
Titre du site<br />
<input class="textWidth" type="text" name="titre" /><br /><br />
Description du site<br />
<textarea class="textWidth" name="description" rows="1" cols="1" class="input"></textarea>
<input type="button" value="Précédent" onclick="javascript:history.back();" class="input" id="input2" />
<input type="submit" value="Suivant" class="input" id="input1" />
</p>
</form>
</td>
<?php
break;
// Etape 2
case 2:
?>
<td class="menu">
<ul class="listing">
<li class="onglet">Preface</li>
<li class="onglet">Etape 1</li>
<li id="actif">Etape 2</li>
<li class="onglet">Etape 3</li>
<li class="onglet">Etape 4</li>
</ul>
</td>
<td rowspan="2" class="blocD">
<form method="post" action="index.php?etape=3">
<h2>Etape 2</h2>
<h3>Configuration du compte Administrateur</h3>
<p>
Identifiant: <input type="text" style="float:right; border:1px solid #219AD2;" name="login_admin" /><br /><br />
Mot de passe: <input type="password" style="float:right; border:1px solid #219AD2;" name="mdp_admin" /><br /><br />
Confirmer mot de passe: <input type="password" style="float:right; border:1px solid #219AD2;" name="mdp_confirme_admin" /><br /><br />
eMail: <input type="text" style="float:right; border:1px solid #219AD2;" name="email_admin" /><br /><br />
if ($PHPv[0]>=5) {echo "<span class='valide'>OK</span><br />";}
else
{
$erreur=$lang['L_Inst_Msg_versionphp'];
echo "<span class='erreur'>".$lang['L_Inst_Msg_erreur']."</span><br />";
}
?>
</td>
</tr>
<tr>
<td><?php echo $lang['L_Inst_repdata']; ?> </td>
<td>
<?php
if(!isset($_GET['erreur']))
{
ecriture_xml('base.xml', 'nom_site', $_POST['titre']);
ecriture_xml('base.xml', 'description_site', $_POST['description']);
}
if (@$_GET['erreur']==1) echo "<span class='erreur2'>Les deux mots de passe ne sont pas identiques !</span><br />";
elseif (@$_GET['erreur']==2) echo "<span class='erreur2'>Votre adresse email n'est pas conforme.</span><br />";
?>
<input type="button" value="Précédent" onclick="javascript:history.back();" class="input" id="input2" />
<input type="submit" value="Suivant" class="input" id="input1" />
</p>
</form>
</td>
<?php
break;
// Etape 3
case 3:
?>
<td class="menu">
<ul class="listing">
<li class="onglet">Preface</li>
<li class="onglet">Etape 1</li>
<li class="onglet">Etape 2</li>
<li id="actif">Etape 3</li>
<li class="onglet">Etape 4</li>
</ul>
</td>
$chmod_data = substr(sprintf('%o', fileperms('../data')), -4);
if ($chmod_data<"0700")
{
$erreur=$lang['L_Inst_Msg_repdata'].$chmod_data;
echo "<span class='erreur'>".$lang['L_Inst_Msg_erreur']."</span>";
}
else echo "<span class='valide'>OK</span>";
?></td>
</tr>
</table>
<td rowspan="2" class="blocD">
<form method="post" action="index.php?etape=4">
<h2>Etape 3</h2>
<h3>Licence publique générale GNU</h3>
<?php if (@$_GET['erreur']==1) echo "<span class='erreur2'>Veuillez accepter les conditions !</span><br />";
elseif (isset($_POST['mdp_admin']) && md5($_POST['mdp_admin']) != md5($_POST['mdp_confirme_admin']))
{
@header('Location:index.php?etape=2&erreur=1');
}
elseif (checkMail($_POST['email_admin'])==FALSE)
{
@header('Location:index.php?etape=2&erreur=2');
}
else
{
<p>
<?php
if (isset($erreur))
{
echo "<span class='erreur'>".$erreur."</span>"; ?>
<input type="submit" value="<?php echo $lang['L_Mot_suivant']; ?>" class="input_button" disabled="disabled" /><?php
}
else
{ ?>
<input type="submit" value="<?php echo $lang['L_Mot_suivant']; ?>" class="input_button" /><?php
} ?>
<input type="hidden" name="lang" value="<?php if(!@isset($_POST['lang'])){echo "fr";}else{echo $_POST['lang'];} ?>" />
</p>
</form>
<?php
break;
// Etape 1 -------------------------------------------------------------------------------------------------------------------------
case 1:
?>
<form method="POST" action="index.php?etape=2">
<h3><?php echo $lang['L_Inst_confgen']; ?></h3>
<p><?php echo $lang['L_Inst_sitenom']; ?></p>
<p><input class="input_text" type="text" name="titre" /></p>
<p><?php echo $lang['L_Inst_descnom']; ?></p>
<p><input class="input_text" name="description" /></p>
<p>
<input type="button" value="<?php echo $lang['L_Mot_precedent']; ?>" onclick="javascript:history.back();" class="input_button" />
<input type="submit" value="<?php echo $lang['L_Mot_suivant']; ?>" class="input_button" />
<input type="hidden" name="lang" value="<?php if(!@isset($_POST['lang'])){echo "fr";}else{echo $_POST['lang'];} ?>" />
</p>
</form>
<?php
break;
// Etape 2 -------------------------------------------------------------------------------------------------------------------------
case 2:
?>
<form method="POST" action="index.php?etape=3">
<h3><?php echo $lang['L_Inst_confadmin']; ?></h3>
<p><?php echo $lang['L_Mot_identifiant']; ?></p>
<p><input type="text" class="input_text" name="login_admin" /></p>
<p><?php echo $lang['L_Mot_motdepasse']; ?></p>
<p><input type="password" class="input_text" name="mdp_admin" /></p>
<p><?php echo $lang['L_Mot_confmotdepasse']; ?></p>
<p><input type="password" class="input_text" name="mdp_confirme_admin" /></p>
<p><?php echo $lang['L_Mot_mail']; ?></p>
<p><input type="text" class="input_text" name="email_admin" /></p>
<?php
if(!isset($_GET['erreur']))
{
ecriture_xml('base.xml', 'login_admin', $_POST['login_admin']);
ecriture_xml('base.xml', 'mdp_admin', md5($_POST['mdp_admin']));
ecriture_xml('base.xml', 'email_admin', $_POST['email_admin']);
ecriture_xml('base.xml', 'nom_site', $_POST['titre']);
ecriture_xml('base.xml', 'description_site', $_POST['description']);
ecriture_xml('base.xml', 'lang', $_POST['lang']);
}
}?>
<p>
<textarea class="textWidth" style="height:90px;" cols="0" rows="0"><?php include('../licence.txt'); ?></textarea><br />
<input type="checkbox" name="conditions" /> Oui j'ai lu et j'accepte les termes et conditions d'utilisation
<input type="button" value="Précédent" onclick="javascript:history.back();" class="input" id="input2" />
<input type="submit" value="Suivant" class="input" id="input1" />
</p>
</form>
</td>
<?php
break;
// Etape 4
case 4:
if (!isset($_POST['conditions']) || (@$_POST['conditions']!="on"))
if (@$_GET['erreur']==1) echo "<span class='erreur'>".$lang['L_Inst_Msg_motdepasse']."</span><br />";
elseif (@$_GET['erreur']==2) echo "<span class='erreur'>".$lang['L_Inst_Msg_mauvaisemail']."</span><br />";
?>
<p><input type="button" value="<?php echo $lang['L_Mot_precedent']; ?>" onclick="javascript:history.back();" class="input_button" /></p>
<p><input type="submit" value="<?php echo $lang['L_Mot_suivant']; ?>" class="input_button" /></p>
<input type="hidden" name="lang" value="<?php if(!@isset($_POST['lang'])){echo "fr";}else{echo $_POST['lang'];} ?>" />
</form>
<?php
break;
// Etape 3 -------------------------------------------------------------------------------------------------------------------------
case 3:
?>
<form method="POST" action="index.php?etape=4">
<h3><?php echo $lang['L_Inst_licence']; ?></h3>
<?php
if (@$_GET['erreur']==1) echo "<span class='erreur'>".$lang['L_Inst_Msg_condition']."</span>";
elseif (isset($_POST['mdp_admin']) && md5($_POST['mdp_admin']) != md5($_POST['mdp_confirme_admin']))
{
@header('Location: index.php?etape=3&erreur=1');
} ?>
<td class="menu">
<ul class="listing">
<li class="onglet">Preface</li>
<li class="onglet">Etape 1</li>
<li class="onglet">Etape 2</li>
<li class="onglet">Etape 3</li>
<li id="actif">Etape 4</li>
</ul>
</td>
<td rowspan="2" class="blocD">
<form method="post" action="../index.php">
<h2>Etape 4</h2>
<h3>Finalisation</h3>
<?php
copy("base.xml", "../data/config.xml");
unlink("base.xml");
?>
<p>
<b>AEOS 0.1 Alpha [CALVARIUM]</b> installé avec succés !<br /><br />
<span class="erreur2">N'oubliez pas d'effacer le dossier INSTALL de votre serveur !</span><br />
(Vous avez la possibilité de l'effacer via l'administration du site)<br /><br />
<b>Remerciements:</b><br />
N.n.S Production, PHP.NET
<input type="submit" value="Accés au site" class="input" id="input1" />
</p>
</form>
</td>
<?php
break;
} ?>
</tr>
<tr>
<td style="background:none;">
</td>
</tr>
</table>
@header('Location:index.php?etape=2&erreur=1');
}
elseif (checkMail($_POST['email_admin'])==FALSE)
{
@header('Location:index.php?etape=2&erreur=2');
}
else
{
if(!isset($_GET['erreur']))
{
ecriture_xml('base.xml', 'login_admin', $_POST['login_admin']);
ecriture_xml('base.xml', 'mdp_admin', md5($_POST['mdp_admin']));
ecriture_xml('base.xml', 'email_admin', $_POST['email_admin']);
}
}
$licence = @file_get_contents('http://www.gnu.org/licenses/gpl.txt'); ?>
<p><textarea class="input_text"><?php echo $licence; ?></textarea></p>
<p>
<input type="checkbox" name="conditions" />
<?php echo $lang['L_Inst_accepte']; ?>
</p>
<p><input type="button" value="<?php echo $lang['L_Mot_precedent']; ?>" onclick="javascript:history.back();" class="input_button" /></p>
<p><input type="submit" value="<?php echo $lang['L_Mot_suivant']; ?>" class="input_button" /></p>
<p><input type="hidden" name="lang" value="<?php if(!@isset($_POST['lang'])){echo "fr";}else{echo $_POST['lang'];} ?>" /></p>
</form>
<?php
break;
// Etape 4 -------------------------------------------------------------------------------------------------------------------------
case 4:
if (!isset($_POST['conditions']) || (@$_POST['conditions']!="on"))
{
@header('Location: index.php?etape=3&erreur=1');
} ?>
<form method="POST" action="../index.php">
<h3><?php echo $lang['L_Mot_finalisation']; ?></h3>
<p>AEOS v<?php echo $install_conf['configuration']['version']['#text'];?></p>
<h4><?php echo $lang['L_Inst_succes']; ?></h4>
<p><?php echo $lang['L_Inst_effacerinstall']; ?></p>
<h5><?php echo $lang['L_Inst_admineffacer']; ?></h5>
<p><?php echo $lang['L_Mot_remerciements']; ?>:</p>
<p>NNS Production, PHP.NET</p>
<p>
<input type="submit" value="<?php echo $lang['L_Inst_accessite']; ?>" class="input_button" />
<input type="hidden" name="lang" value="<?php if(!@isset($_POST['lang'])){echo "fr";}else{echo $_POST['lang'];} ?>" />
</p>
</form>
<?php copy("base.xml", "../data/config.xml"); ?>
<?php
break;
} ?>
</div>
</div>
</body>