/**
  * Constructeur de la classe inMyPluxml
  *
  * @param	default_lang	langue par défaut utilisée par PluXml
  * @return	null
  * @author	Stephane F
  **/
 public function __construct($default_lang)
 {
     # Appel du constructeur de la classe plxPlugin (obligatoire)
     parent::__construct($default_lang);
     if (defined('PLX_ADMIN')) {
         if (!empty($_GET['deletetoken']) && !empty($_GET['pasteid'])) {
             list($this->CIPHERDATA, $this->ERRORMESSAGE, $this->STATUS) = cmp_processPasteDelete(plxUtils::strCheck(plxUtils::nullbyteRemove($_GET['pasteid'])), plxUtils::strCheck(plxUtils::nullbyteRemove($_GET['deletetoken'])));
         } elseif (!empty($_SERVER['QUERY_STRING'])) {
             $zb = preg_replace('!(a=[0-9]+&?)*(zb=)?!', '', plxUtils::getGets($_SERVER['QUERY_STRING']));
             if (!empty($zb)) {
                 list($this->CIPHERDATA, $this->ERRORMESSAGE, $this->STATUS) = cmp_processPasteFetch($zb);
             }
         }
     }
     # Déclarations des hooks
     $this->addHook('ThemeEndHead', 'ThemeEndHead');
     $this->addHook('plxMotorPreChauffageBegin', 'plxMotorPreChauffageBegin');
     $this->addHook('plxMotorDemarrageBegin', 'plxMotorDemarrageBegin');
     $this->addHook('plxShowConstruct', 'plxShowConstruct');
     $this->addHook('AdminPrepend', 'Prepend');
     $this->addHook('IndexBegin', 'Prepend');
     $this->addHook('AdminTopEndHead', 'AdminTopEndHead');
     $this->addHook('AdminArticleTop', 'AdminArticleTop');
     // Pour n'enregistrer des données que via ZB, décommenter ces lignes
     // $this->addHook('AdminArticleContent', 'AdminArticleContent');
     // $this->addHook('AdminArticleFoot', 'AdminArticleFoot');
 }
<?php

/**
 * Gestion de la configuration d'un plugin
 *
 * @package PLX
 * @author	Stephane F
 **/
include dirname(__FILE__) . '/prepend.php';
# Control de l'accès à la page en fonction du profil de l'utilisateur connecté
$plxAdmin->checkProfil(PROFIL_ADMIN);
$plugin = isset($_GET['p']) ? urldecode($_GET['p']) : '';
$plugin = plxUtils::nullbyteRemove($plugin);
$output = '';
# chargement du fichier d'administration du plugin
$filename = realpath(PLX_PLUGINS . $plugin . '/config.php');
if (is_file($filename)) {
    # si le plugin n'est pas actif, aucune instance n'a été créée, on va donc la créer, sinon on prend celle qui existe
    if (!isset($plxAdmin->plxPlugins->aPlugins[$plugin])) {
        $plxPlugin = $plxAdmin->plxPlugins->getInstance($plugin);
    } else {
        $plxPlugin = $plxAdmin->plxPlugins->aPlugins[$plugin];
    }
    # Control des autorisation d'accès à l'écran config.php du plugin
    $plxAdmin->checkProfil($plxPlugin->getConfigProfil());
    # chargement de l'écran de paramétrage du plugin config.php
    ob_start();
    echo '
	<div class="inline-form action-bar">
		<h2>' . plxUtils::strCheck($plugin) . '</h2>
		<p><a class="back" href="parametres_plugins.php">' . L_BACK_TO_PLUGINS . '</a></p>
            $output .= '</tr>';
        }
    } else {
        $colspan = $_SESSION['selPlugins'] == '1' ? 5 : 4;
        $output .= '<tr><td colspan="' . $colspan . '" class="center">' . L_NO_PLUGIN . '</td></tr>';
    }
    return $output;
}
# récuperation de la liste des plugins inactifs
$aInactivePlugins = $plxAdmin->plxPlugins->getInactivePlugins();
# nombre de plugins actifs
$nbActivePlugins = sizeof($plxAdmin->plxPlugins->aPlugins);
# nombre de plugins inactifs
$nbInactivePlugins = sizeof($aInactivePlugins);
# récuperation du type de plugins à afficher
$_GET['sel'] = isset($_GET['sel']) ? intval(plxUtils::nullbyteRemove($_GET['sel'])) : '';
$session = isset($_SESSION['selPlugins']) ? $_SESSION['selPlugins'] : '1';
$sel = in_array($_GET['sel'], array('0', '1')) ? $_GET['sel'] : $session;
$_SESSION['selPlugins'] = $sel;
if ($sel == '1') {
    $aSelList = array('' => L_FOR_SELECTION, 'deactivate' => L_PLUGINS_DEACTIVATE, '-' => '-----', 'delete' => L_PLUGINS_DELETE);
    $plugins = pluginsList($plxAdmin->plxPlugins->aPlugins, $plxAdmin->aConf['default_lang'], true);
} else {
    $aSelList = array('' => L_FOR_SELECTION, 'activate' => L_PLUGINS_ACTIVATE, '-' => '-----', 'delete' => L_PLUGINS_DELETE);
    $plugins = pluginsList($aInactivePlugins, $plxAdmin->aConf['default_lang'], false);
}
# fil d'ariane
$breadcrumbs = array();
$breadcrumbs[] = '<li><a ' . ($_SESSION['selPlugins'] == '1' ? 'class="selected" ' : '') . 'href="parametres_plugins.php?sel=1">' . L_PLUGINS_ACTIVE_LIST . '</a>&nbsp;(' . $nbActivePlugins . ')</li>';
$breadcrumbs[] = '<li><a ' . ($_SESSION['selPlugins'] == '0' ? 'class="selected" ' : '') . 'href="parametres_plugins.php?sel=0">' . L_PLUGINS_INACTIVE_LIST . '</a>&nbsp;(' . $nbInactivePlugins . ')</li>';
# On inclut le header
Beispiel #4
0
    # Vérification de la validité de la date de création
    if (!plxDate::checkDate($_POST['date_creation_day'], $_POST['date_creation_month'], $_POST['date_creation_year'], $_POST['date_creation_time'])) {
        $valid = plxMsg::Error(L_ERR_INVALID_DATE_CREATION) and $valid;
    }
    # Vérification de la validité de la date de mise à jour
    if (!plxDate::checkDate($_POST['date_update_day'], $_POST['date_update_month'], $_POST['date_update_year'], $_POST['date_update_time'])) {
        $valid = plxMsg::Error(L_ERR_INVALID_DATE_UPDATE) and $valid;
    }
    if ($valid) {
        $plxAdmin->editStatique($_POST);
    }
    header('Location: statique.php?p=' . $_POST['id']);
    exit;
} elseif (!empty($_GET['p'])) {
    # On affiche le contenu de la page
    $id = plxUtils::strCheck(plxUtils::nullbyteRemove($_GET['p']));
    if (!isset($plxAdmin->aStats[$id])) {
        plxMsg::Error(L_STATIC_UNKNOWN_PAGE);
        header('Location: statiques.php');
        exit;
    }
    # On récupère le contenu
    $content = trim($plxAdmin->getFileStatique($id));
    $title = $plxAdmin->aStats[$id]['name'];
    $url = $plxAdmin->aStats[$id]['url'];
    $active = $plxAdmin->aStats[$id]['active'];
    $title_htmltag = $plxAdmin->aStats[$id]['title_htmltag'];
    $meta_description = $plxAdmin->aStats[$id]['meta_description'];
    $meta_keywords = $plxAdmin->aStats[$id]['meta_keywords'];
    $template = $plxAdmin->aStats[$id]['template'];
    $date_creation = plxDate::date2Array($plxAdmin->aStats[$id]['date_creation']);
Beispiel #5
0
plxToken::validateFormToken($_POST);
# Hook Plugins
eval($plxAdmin->plxPlugins->callHook('AdminIndexPrepend'));
# Suppression des articles selectionnes
if (isset($_POST['selection']) and !empty($_POST['sel']) and $_POST['selection'] == 'delete' and isset($_POST['idArt'])) {
    foreach ($_POST['idArt'] as $k => $v) {
        $plxAdmin->delArticle($v);
    }
    header('Location: index.php');
    exit;
}
# Récuperation de l'id de l'utilisateur
$userId = $_SESSION['profil'] < PROFIL_WRITER ? '[0-9]{3}' : $_SESSION['user'];
# Récuperation des paramètres
if (!empty($_GET['sel']) and in_array($_GET['sel'], array('all', 'published', 'draft', 'mod'))) {
    $_SESSION['sel_get'] = plxUtils::nullbyteRemove($_GET['sel']);
    $_SESSION['sel_cat'] = '';
} else {
    $_SESSION['sel_get'] = (isset($_SESSION['sel_get']) and !empty($_SESSION['sel_get'])) ? $_SESSION['sel_get'] : 'all';
}
if (!empty($_POST['sel_cat'])) {
    if (isset($_SESSION['sel_cat']) and $_SESSION['sel_cat'] == $_POST['sel_cat']) {
        # annulation du filtre
        $_SESSION['sel_cat'] = 'all';
    } else {
        # prise en compte du filtre
        $_SESSION['sel_cat'] = $_POST['sel_cat'];
    }
} else {
    $_SESSION['sel_cat'] = (isset($_SESSION['sel_cat']) and !empty($_SESSION['sel_cat'])) ? $_SESSION['sel_cat'] : 'all';
}
Beispiel #6
0
        $plxAdmin->modCommentaire($_POST['comId'], 'offline');
        header('Location: comment.php?c=' . $_POST['comId'] . (!empty($_GET['a']) ? '&a=' . $_GET['a'] : ''));
        exit;
    }
    # Répondre au commentaire
    if (isset($_POST['answer'])) {
        header('Location: comment_new.php?c=' . $_POST['comId']) . (!empty($_GET['a']) ? '&a=' . $_GET['a'] : '');
        exit;
    }
    # Edition
    $plxAdmin->editCommentaire($_POST, $_POST['comId']);
    header('Location: comment.php?c=' . $_POST['comId'] . (!empty($_GET['a']) ? '&a=' . $_GET['a'] : ''));
    exit;
}
# On va récupérer les infos sur le commentaire
if (!$plxAdmin->getCommentaires('/^' . plxUtils::nullbyteRemove($_GET['c']) . '.xml$/', '', 0, 1, 'all')) {
    # Commentaire inexistant, on redirige
    plxMsg::Error(L_ERR_UNKNOWN_COMMENT);
    header('Location: comments.php');
    exit;
}
# On va récupérer les infos sur l'article
$artId = $plxAdmin->plxRecord_coms->f('article');
# On va rechercher notre article
if (($aFile = $plxAdmin->plxGlob_arts->query('/^' . $artId . '.(.+).xml$/', '', 'sort', 0, 1)) == false) {
    # On indique que le commentaire est attaché à aucun article
    $article = '<strong>' . L_COMMENT_ORPHAN . '</strong>';
    # Statut du commentaire
    $statut = '<strong>' . L_COMMENT_ORPHAN_STATUS . '</strong>';
} else {
    $result = $plxAdmin->parseArticle(PLX_ROOT . $plxAdmin->aConf['racine_articles'] . $aFile['0']);
Beispiel #7
0
        header('Location: index.php');
        exit;
    }
    # Infos sur l'article
    $aArt = $plxAdmin->parseArticle(PLX_ROOT . $plxAdmin->aConf['racine_articles'] . $globArt['0']);
    $portee = L_COMMENTS_ARTICLE_SCOPE . ' &laquo;' . $aArt['title'] . '&raquo;';
} else {
    # Commentaires globaux
    $portee = '';
}
# On inclut le header
include dirname(__FILE__) . '/top.php';
# Récupération du type de commentaire à afficher
$_GET['sel'] = !empty($_GET['sel']) ? $_GET['sel'] : '';
if (in_array($_GET['sel'], array('online', 'offline', 'all'))) {
    $comSel = plxUtils::nullbyteRemove($_GET['sel']);
} else {
    $comSel = (isset($_SESSION['selCom']) and !empty($_SESSION['selCom'])) ? $_SESSION['selCom'] : 'all';
}
if (!empty($_GET['a'])) {
    $comSelMotif = '/^[[:punct:]]?' . str_replace('_', '', $_GET['a']) . '.(.*).xml$/';
    $_SESSION['selCom'] = 'all';
    $nbComPagination = $plxAdmin->nbComments($comSelMotif);
    $h2 = '<h2>' . L_COMMENTS_ALL_LIST . '</h2>';
} elseif ($comSel == 'online') {
    $comSelMotif = '/^[0-9]{4}.(.*).xml$/';
    $_SESSION['selCom'] = 'online';
    $nbComPagination = $plxAdmin->nbComments('online');
    $h2 = '<h2>' . L_COMMENTS_ONLINE_LIST . '</h2>';
} elseif ($comSel == 'offline') {
    $comSelMotif = '/^_[0-9]{4}.(.*).xml$/';
/**
 * Affichage de l'aide d'un thème
 *
 * @package PLX
 * @author	Stephane F
 **/
include dirname(__FILE__) . '/prepend.php';
# Control de l'accès à la page en fonction du profil de l'utilisateur connecté
$plxAdmin->checkProfil(PROFIL_ADMIN);
# type d'aide plugin ou theme
$help = isset($_GET['help']) ? urldecode($_GET['help']) : '';
$help = plxUtils::nullbyteRemove($help);
# page
$page = isset($_GET['page']) ? urldecode($_GET['page']) : '';
$page = plxUtils::nullbyteRemove($page);
switch ($help) {
    case 'plugin':
        $filename = realpath(PLX_PLUGINS . $page . '/lang/' . $plxAdmin->aConf['default_lang'] . '-help.php');
        $back_to_title = L_BACK_TO_PLUGINS;
        $back_to = 'parametres_plugins.php';
        break;
    case 'theme':
        $filename = realpath(PLX_ROOT . $plxAdmin->aConf['racine_themes'] . $page . '/lang/' . $plxAdmin->aConf['default_lang'] . '-help.php');
        $back_to_title = L_BACK_TO_THEMES;
        $back_to = 'parametres_themes.php';
        break;
    default:
        plxMsg::Error(L_NO_ENTRY);
        header('Location: index.php');
        exit;
<?php

if (!defined('PLX_ROOT')) {
    exit;
}
$plxMotor = plxMotor::getInstance();
$plxShow = plxShow::getInstance();
$plxPlugin = $plxMotor->plxPlugins->getInstance('cryptMyPluxml');
if (!empty($_GET['deletetoken']) && !empty($_GET['pasteid'])) {
    list($plxPlugin->CIPHERDATA, $plxPlugin->ERRORMESSAGE, $plxPlugin->STATUS) = cmp_processPasteDelete(plxUtils::strCheck(plxUtils::nullbyteRemove($_GET['pasteid'])), plxUtils::strCheck(plxUtils::nullbyteRemove($_GET['deletetoken'])));
} elseif (!empty($_SERVER['QUERY_STRING'])) {
    $zb = preg_replace('!(a=[0-9]+&)*zb=!', '', plxUtils::getGets($_SERVER['QUERY_STRING']));
    $zb = str_replace(array('zb=', 'zb/'), '', $zb);
    list($plxPlugin->CIPHERDATA, $plxPlugin->ERRORMESSAGE, $plxPlugin->STATUS) = cmp_processPasteFetch($zb);
}
?>

<div id="infoZB">(?)<br/>
	<div id="aboutbox">
		<?php 
echo $plxPlugin->getLang('L_ZB_DESC');
?>

	</div>
</div>
<noscript><div class="nonworking"><?php 
echo $plxPlugin->getLang('L_JS_REQUIRED');
?>
</div></noscript>
<div id="oldienotice" class="nonworking"><?php 
echo $plxPlugin->getLang('L_MODERN_BROWSER');