<?php
/**
*
* @Artiphp 5
* @paquetage installation
* @version install5.php, 2009/06/06 arteam
* @copyright (c) 2001-2010 Ronald Guérin - hide@address.com - http://www.artiloo.com
* @license consulter artpublic/license/index.html GNU Public License
*
*/
// Protection - Page
define('IN_ARTI', true);
// Chargement configuration
require('../artpublic/config.inc.php'); // ATTENTION : chemin relatif depuis racine Artiphp
// Debug de la page
//error_reporting(E_ALL ^ E_NOTICE);
$coletape = '4';
if ($_GET['lg'] == 'fr' || $_GET['lg'] == 'en') {
$lg = htmlspecialchars(trim($_GET['lg']));
include('langues/' . $lg . '/install.inc.php');
include('../artpublic/langues/' . $lg . '/requis.inc.php'); // traduction termes configuration requise
} else {
header('Location: index.php');
exit();
}
include_once(ARTI_SYS_INT_FCT_PATH . 'fonctions_chmod.inc.php');
// Ne pas modifier l'ordre des lignes ci-dessous
$type_requis = 'usage';
include(ARTI_SYS_INT_FCT_PATH . 'requirements.inc.php');
// ---------------------------------------------
// suppression du répertoire installation/
if ($_GET['etape'] == 3) {
// DEBUT chmod
//include_once(ARTI_SYS_INT_FCT_PATH . 'fonctions_chmod.inc.php');
arti_chmod('', 'pre', 'open');
arti_chmod(ARTI_INT_DIR . 'outils/shredder', 'pre');
// -----------
function supprimer_repertoire($dir)
{
// changement des droits du répertoire à supprimer
arti_chmod($dir, 'pre');
// chemin système du répertoire
$arti_sys_path = rtrim(ARTI_SYS_PATH . $dir, '/\\');
$current_dir = opendir($arti_sys_path);
while (false !== ($entryname = readdir($current_dir))) {
if ($entryname != '.' && $entryname != '..') {
if (is_dir($arti_sys_path . '/' . $entryname)) {
supprimer_repertoire($dir . '/' . $entryname);
} else {
// changement des droits du fichier à supprimer
arti_chmod($dir . '/' . $entryname, 'pre');
unlink($arti_sys_path . '/' . $entryname);
}
}
}
closedir($current_dir);
// patch pour free.fr (rmdir est désactivé)
// artpublic/outils/shredder/ DOIT être vide ! (shredder = broyeur)
if (rmdir($arti_sys_path) !== true) {
rename($arti_sys_path, ARTI_SYS_INT_PATH . 'outils/shredder');
}
}
supprimer_repertoire('installation'); // ATTENTION ! Chemin depuis racine Web
// FIN chmod
arti_chmod(ARTI_INT_DIR . 'outils/shredder', 'post');
arti_chmod('', 'post', 'close');
// ---------
header('Location: ' . ARTI_WEB_ADM_INT_PATH . 'modules/index.php');
exit();
}
include('header.inc.php');
?>
<br />
<blockquote>
<span style="color:red; font-weight:bold;"><?php echo $LG_ETAPE4; ?></span>
<p style="text-align:center;">
<?php echo $LG_REQ_VOIR_AUSSI; ?><br />
[<a href="#required"><?php echo $LG_REQ_REQUIREMENTS; ?></a>]
[<a href="#optional"><?php echo $LG_REQ_OPTIONAL; ?></a>]
</p>
</blockquote>
<hr size="1" />
<br />
<div align="center"><center>
<table width="85%" border="0" cellspacing="5" cellpadding="5" bgcolor="#eeeeee" style="border:#000000 1px dashed;">
<tr>
<td>
<p style="text-align:center;">
<?php echo $LG_TXT1; ?>
<br />
<br />
<strong><?php echo $LG_TXT2; ?></strong>
<br />
<br />
<strong><a href="install5.php?etape=3&lg=<?php echo $lg; ?>"><?php echo $LG_TXT4; ?></a></strong>
<br />
<br />
<?php echo $LG_TXT5; ?>
</p>
</td>
</tr>
</table>
</center></div>
<p></p>
<?php
// Affichage des problèmes à corriger
if ($contenu_controle != '') {
?>
<div align="center"><center>
<table width="85%" border="0" cellspacing="5" cellpadding="5" bgcolor="#eeeeee" style="border:#000000 1px dashed;">
<tr>
<td>
<p style="text-align:center;">
<?php echo $LG_REQ_CHMOD_USAGE; ?>
</p>
</td>
</tr>
</table>
</center></div>
<p></p>
<?php
echo $contenu_controle;
}
// Affichage des tableaux des configurations requise et recommandée (pour information)
echo $contenu_requis;
include('footer.inc.php');
?>