if ($droit_acces->getDroitAccesContenu("GESTION CONTENU PAGE", $_POST['id_page']) == true) {
    if ($droit_acces->getModifSeo() != 0 && $droit_acces->getModifNavigation() != 0 || $droit_acces->getSuperAdmin() == 1) {
        $balise_title = $_POST['balise_title'];
        $url = $_POST['url'];
        $meta_description = $_POST['meta_description'];
        $titre_page = $_POST['titre_page'];
        $parent = $_POST['parent_texte'];
    } else {
        $contenu_class->getHeadPage($_POST['id_page']);
        $contenu_class->getContenuPage($_POST['id_page']);
        if ($droit_acces->getModifSeo() != 0) {
            $balise_title = $_POST['balise_title'];
            $url = $_POST['url'];
            $meta_description = $_POST['meta_description'];
        } else {
            $balise_title = $contenu_class->getBaliseTitle();
            $url = $contenu_class->getUrl();
            $meta_description = $contenu_class->getMetaDescription();
        }
        if ($droit_acces->getModifNavigation() != 0) {
            $titre_page = $_POST['titre_page'];
            $parent = $_POST['parent_texte'];
        } else {
            $titre_page = $contenu_class->getTitre();
            $parent = $contenu_class->getParent();
        }
    }
    $gestion_contenu->setModifierPage($_POST['id_page'], $balise_title, $url, $meta_description, $titre_page, $parent);
    if (\core\App::getErreur() !== true && $gestion_contenu->getErreur() !== true) {
        \core\HTML\flashmessage\FlashMessage::setFlash("La page " . $_POST['titre_page'] . " a été mise à jour", "success");
    }
Esempio n. 2
0
if ($page == "gestion-contenus/modifier-contenu" || $page == "gestion-contenus/creer-une-page" || $page == "gestion-contenus/inline") {
    if (isset($_SESSION['err_modification_contenu'])) {
        if (isset($_GET['id'])) {
            $id_page_courante = $_GET['id'];
        }
        $balise_title = $_SESSION['balise_title'];
        $url = $_SESSION['url'];
        $meta_description = $_SESSION['meta_description'];
        $titre_courant = $_SESSION['titre_page'];
        $parent_courant = $_SESSION['parent'];
        unset($_SESSION['err_modification_contenu']);
    } else {
        if ($page == "gestion-contenus/modifier-contenu" || $page == "gestion-contenus/inline") {
            $id_page_courante = $_GET['id'];
            $contenu->getHeadPage($id_page_courante);
            $balise_title = $contenu->getBaliseTitle();
            $meta_description = $contenu->getMetaDescription();
            $contenu->getContenuPage($id_page_courante);
            $url = $contenu->getUrl();
            $titre_courant = $contenu->getTitre();
            $parent_courant = $contenu->getParent();
            $texte_parent_courant = $gestion_contenu->getParentTexte($parent_courant);
            $contenu_page = $contenu->getContenu();
            $bloc_editable = $gestion_contenu->getBlocEditable($id_page_courante);
        } else {
            $balise_title = null;
            $url = null;
            $meta_description = null;
            $titre_courant = null;
            $parent_courant = null;
            $contenu_page = null;