'PluXml',
'description'=>plxUtils::strRevCheck(L_SITE_DESCRIPTION),
'meta_description'=>'',
'meta_keywords'=>'',
'timezone'=>$timezone,
'allow_com'=>1,
'mod_com'=>0,
'mod_art'=>0,
'capcha'=>1,
'style'=>'defaut',
'clef'=>plxUtils::charAleatoire(15),
'bypage'=>5,
'bypage_archives'=>5,
'bypage_admin'=>10,
'bypage_admin_coms'=>10,
'bypage_feed'=>8,
'tri'=>'desc',
'tri_coms'=>'asc',
'images_l'=>800,
'images_h'=>600,
'miniatures_l'=>200,
'miniatures_h'=>100,
'thumbs'=>1,
'images'=>'data/images/',
'documents'=>'data/documents/',
'racine_articles'=>'data/articles/',
'racine_commentaires'=>'data/commentaires/',
'racine_statiques'=>'data/statiques/',
'racine_themes'=>'themes/',
'racine_plugins'=>'plugins/',
'homestatic'=>'',
'hometemplate'=>'home.php',
'urlrewriting'=>0,
'gzip'=>0,
'feed_chapo'=>0,
'feed_footer'=>'',
'version'=>$version,
'default_lang'=>$lang,
'userfolders'=>0,
'display_empty_cat'=>0
);
function install($content, $config) {
# gestion du timezone
date_default_timezone_set($config['timezone']);
# Création du fichier de configuration
$xml = ''."\n";
$xml .= ''."\n";
foreach($config as $k=>$v) {
if(is_numeric($v))
$xml .= "\t".$v."\n";
else
$xml .= "\t\n";
}
$xml .= '';
plxUtils::write($xml,path('XMLFILE_PARAMETERS'));
# Création du fichier des utilisateurs
$salt = plxUtils::charAleatoire(10);
$xml = ''."\n";
$xml .= "\n";
$xml .= "\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\t".''."\n";
$xml .= "\t\n";
$xml .= "";
plxUtils::write($xml,path('XMLFILE_USERS'));
# Création du fichier des categories
$xml = ''."\n";
$xml .= ''."\n";
$xml .= "\t".''."\n";
$xml .= '';
plxUtils::write($xml,path('XMLFILE_CATEGORIES'));
# Création du fichier des pages statiques
$xml = ''."\n";
$xml .= ''."\n";
$xml .= "\t".''."\n";
$xml .= '';
plxUtils::write($xml,path('XMLFILE_STATICS'));
plxUtils::write(file_get_contents(PLX_CORE.'/lib/html.static.txt'),PLX_ROOT.$config['racine_statiques'].'001.'.L_DEFAULT_STATIC_URL.'.php');
# Création du premier article
$html = explode('-----', file_get_contents(PLX_CORE.'/lib/html.article.txt'));
$xml = ''."\n";
$xml .= '
1
';
plxUtils::write($xml,PLX_ROOT.$config['racine_articles'].'0001.001.001.'.date('YmdHi').'.'.L_DEFAULT_ARTICLE_URL.'.xml');
# Création du fichier des tags servant de cache
$xml = ''."\n";
$xml .= ''."\n";
$xml .= "\t".''."\n";
$xml .= '';
plxUtils::write($xml,path('XMLFILE_TAGS'));
# Création du fichier des plugins
$xml = ''."\n";
$xml .= ''."\n";
$xml .= '';
plxUtils::write($xml,path('XMLFILE_PLUGINS'));
# Création du premier commentaire
$xml = ''."\n";
$xml .= '
normal
127.0.0.1
';
plxUtils::write($xml,PLX_ROOT.$config['racine_commentaires'].'0001.'.date('U').'-1.xml');
}
$msg='';
if(!empty($_POST['install'])) {
if(trim($_POST['name']=='')) $msg = L_ERR_MISSING_USER;
elseif(trim($_POST['login']=='')) $msg = L_ERR_MISSING_LOGIN;
elseif(trim($_POST['pwd']=='')) $msg = L_ERR_MISSING_PASSWORD;
elseif($_POST['pwd']!=$_POST['pwd2']) $msg = L_ERR_PASSWORD_CONFIRMATION;
else {
install($_POST, $config);
header('Location: '.plxUtils::getRacine());
exit;
}
$name=$_POST['name'];
$login=$_POST['login'];
}
else {
$name='';
$login='';
}
plxUtils::cleanHeaders();
?>