<?php
include PLX_ROOT . 'core/admin/prepend.php';
if(!isset($_SESSION['profil']) or $_SESSION['profil'] != PROFIL_ADMIN) {
die();
}
foreach($plxAdmin->plxGlob_arts->aFiles as $artId=>$filename) {
if($filename[0] != '_') {
$art = $plxAdmin->parseArticle(PLX_ROOT . $plxAdmin->aConf['racine_articles'] . $filename);
if(!empty($art['tags'])) {
$plxAdmin->aTags[$artId] = array(
'tags' => $art['tags'],
'date' => $art['date'],
'active' => preg_match('#\bdraft\b#', $art['categorie']) ? 0 : 1,
);
}
unset($art);
}
}
if(!empty($plxAdmin->aTags)) {
ksort($plxAdmin->aTags);
$plxAdmin->editTags();
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Restore your tags</title>
<style>
pre {
border: 1px solid
padding: 0.5rem 1rem;
width: max-content;
margin: 0.5rem auto;
background-color:
}
</style>
</head><body>
<header>
<a href="<?= PLX_ROOT ?>"><?= L_BACK_TO_SITE ?></a>
</header>
<pre><?= str_replace('<', '<', file_get_contents(path('XMLFILE_TAGS'))); ?></pre>
</body></html>