Example #1
0
 /**
  * Constructeur qui initialise certaines variables de classe
  * et qui lance le traitement initial
  *
  * @param	filename	emplacement du fichier XML de configuration
  * @return	null
  * @author	Florent MONTHEL, Stéphane F
  **/
 protected function __construct($filename)
 {
     # On parse le fichier de configuration
     $this->getConfiguration($filename);
     # Chargement du fichier de langue
     loadLang(PLX_CORE . 'lang/' . $this->aConf['default_lang'] . '/core.php');
     # récupération des paramètres dans l'url
     $this->get = plxUtils::getGets();
     # gestion du timezone
     date_default_timezone_set($this->aConf['timezone']);
     # chargement des variables
     $this->racine = $this->aConf['racine'];
     $this->bypage = $this->aConf['bypage_feed'];
     $this->tri = 'desc';
     $this->clef = !empty($this->aConf['clef']) ? $this->aConf['clef'] : '';
     # Traitement des plugins
     $this->plxPlugins = new plxPlugins($this->aConf['default_lang']);
     $this->plxPlugins->loadPlugins();
     # Hook plugins
     eval($this->plxPlugins->callHook('plxFeedConstructLoadPlugins'));
     # Traitement sur les répertoires des articles et des commentaires
     $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_articles'], false, true, 'arts');
     $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_commentaires']);
     # Récupération des données dans les autres fichiers xml
     $this->getCategories(path('XMLFILE_CATEGORIES'));
     $this->getUsers(path('XMLFILE_USERS'));
     $this->getTags(path('XMLFILE_TAGS'));
     # Récupération des articles appartenant aux catégories actives
     $this->getActiveArts();
     # Hook plugins
     eval($this->plxPlugins->callHook('plxFeedConstruct'));
 }
function addToPluxml()
{
    define('PLX_ROOT', '../../../');
    define('PLX_CORE', PLX_ROOT . 'core/');
    define('PLX_CONFIG_PATH', 'data/configuration/');
    define('PLX_PLUGINS', PLX_ROOT . 'plugins/');
    define('PLX_UPDATER', true);
    include PLX_CORE . 'lib/config.php';
    # On inclut les librairies nécessaires
    include_once PLX_CORE . 'lib/class.plx.glob.php';
    include_once PLX_CORE . 'lib/class.plx.utils.php';
    include_once PLX_CORE . 'lib/class.plx.motor.php';
    include_once PLX_CORE . 'lib/class.plx.admin.php';
    include_once PLX_CORE . 'lib/class.plx.plugins.php';
    $plxAdmin = plxAdmin::getInstance();
    # Si cryptMyPluxml est chargé
    if (in_array('cryptMyPluxml', plxGlob::getInstance(PLX_PLUGINS, true)->aFiles)) {
        $pickyPasteInPluxml = $plxAdmin->plxPlugins->getInstance('pickyPasteInPluxml');
        if ($pickyPasteInPluxml->getParam('cryptMyPluxml') == 1) {
            // Create storage directory if it does not exist.
            if (!is_dir(PLX_ROOT . 'data/zb')) {
                mkdir(PLX_ROOT . 'data/zb', 0705);
                file_put_contents(PLX_ROOT . 'data/zb/.htaccess', "Allow from none\nDeny from all\n", LOCK_EX);
            }
            define('PLX_ZB', PLX_ROOT . 'data/zb/');
        } else {
            define('PLX_ZB', './data/');
        }
    } else {
        define('PLX_ZB', './data/');
    }
}
Example #3
0
 /**
  * Méthode qui récupère la liste des mises à jour disponibles
  *
  * @return	null
  * @author	Stéphane F
  **/
 public function getUpdateList()
 {
     $plxUpdates = plxGlob::getInstance(PLX_UPDATE);
     if ($updates = $plxUpdates->query('/^update_[0-9\\-\\.]+.php$/')) {
         foreach ($updates as $filename) {
             preg_match('/^(update_([0-9\\-\\.]+)).php$/', $filename, $capture);
             $this->updateList[$capture[2]] = array('filename' => $filename, 'class_name' => str_replace('.', '_', $capture[1]));
         }
     }
     krsort($this->updateList);
 }
Example #4
0
 /**
  * Méthode qui ajoute les déclarations nécessaires à la fin de la page foot.php de l'administration
  *
  * @param	null
  * @return	stdout
  * @author	Stephane F
  **/
 public function addFooter()
 {
     # On regarde s'il y a des boutons personnels à ajouter dans la plxtoolbar
     if (is_dir(PLX_ROOT . 'addons/plxtoolbar.buttons/')) {
         $buttons = plxGlob::getInstance(PLX_ROOT . 'addons/plxtoolbar.buttons');
         if ($aFiles = $buttons->query('/button.(.*).php$/')) {
             foreach ($aFiles as $button) {
                 include PLX_ROOT . 'addons/plxtoolbar.buttons/' . $button;
             }
         }
     }
     # Initialisation de la plxToolbar
     echo "\n" . '<script type="text/javascript">plxToolbar.init();</script>' . "\n";
 }
Example #5
0
 public function step5()
 {
     echo "Conversion des articles au nouveau format<br />";
     $plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->plxAdmin->aConf['racine_articles']);
     if ($files = $plxGlob_arts->query('/^[0-9]{4}.([0-9]{3}|home|draft).[0-9]{12}.[a-z0-9-]+.xml$/', 'art')) {
         foreach ($files as $id => $filename) {
             $art = $this->parseArticle(PLX_ROOT . $this->plxAdmin->aConf['racine_articles'] . $filename);
             if (!$this->plxAdmin->editArticle($art, $art['numero'])) {
                 echo '<p class="error">Erreur pendant le traitement du fichier : ' . $filename . '</p>';
                 return false;
             }
         }
     }
     return true;
 }
Example #6
0
 public function step5()
 {
     echo L_UPDATE_ARTICLES_CONVERSION . "<br />";
     $plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->plxAdmin->aConf['racine_articles']);
     if ($files = $plxGlob_arts->query('/^[0-9]{4}.([0-9]{3}|home|draft).[0-9]{12}.[a-z0-9-]+.xml$/', 'art')) {
         foreach ($files as $id => $filename) {
             $art = $this->parseArticle(PLX_ROOT . $this->plxAdmin->aConf['racine_articles'] . $filename);
             if (!$this->plxAdmin->editArticle($art, $art['numero'])) {
                 echo '<p class="error">' . L_UPDATE_ERR_FILE_PROCESSING . ' : ' . $filename . '</p>';
                 return false;
             }
         }
     }
     return true;
 }
 public function getThemes()
 {
     # on mets le theme actif en début de liste
     if (is_dir($this->racineTheme . $this->activeTheme)) {
         $this->aThemes[$this->activeTheme] = $this->activeTheme;
     }
     # liste des autres themes dispos
     $files = plxGlob::getInstance($this->racineTheme, true);
     if ($styles = $files->query("/[a-z0-9-_\\.\\(\\)]+/i", "", "sort")) {
         foreach ($styles as $k => $v) {
             if (substr($v, 0, 7) != 'mobile.' and $v != $this->activeTheme) {
                 $this->aThemes[$v] = $v;
             }
         }
     }
 }
Example #8
0
 public function step2()
 {
     echo L_UPDATE_ARTICLES_CONVERSION . "<br />";
     $plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->plxAdmin->aConf['racine_articles']);
     if ($files = $plxGlob_arts->query('/(.*).xml$/', 'art')) {
         foreach ($files as $filename) {
             if (is_readable($filename)) {
                 $data = file_get_contents(PLX_ROOT . $this->plxAdmin->aConf['racine_articles'] . $filename);
                 if (!preg_match('/\\]\\]<\\/title_htmltag>/', $data)) {
                     $data = preg_replace("/<\\/document>\$/", "\t<title_htmltag>\n\t\t<![CDATA[]]>\n\t</title_htmltag>\n</document>", $data);
                 }
                 if (!plxUtils::write($data, PLX_ROOT . $this->plxAdmin->aConf['racine_articles'] . $filename)) {
                     echo '<p class="error">' . L_UPDATE_ERR_FILE_PROCESSING . ' : ' . $filename . '</p>';
                     return false;
                 }
             }
         }
     }
     return true;
 }
Example #9
0
 /**
  * Constructeur qui initialise certaines variables de classe
  * et qui lance le traitement initial
  *
  * @param	filename	emplacement du fichier XML de configuration
  * @return	null
  * @author	Florent MONTHEL, Stéphane F
  **/
 public function __construct($filename)
 {
     # Version de PluXml
     if (!is_readable(PLX_ROOT . 'version')) {
         header('Content-Type: text/plain charset=UTF-8');
         echo 'Le fichier "' . PLX_ROOT . 'version" est necessaire au fonctionnement de PluXml';
         exit;
     }
     $f = file(PLX_ROOT . 'version');
     $this->version = $f['0'];
     $this->get = plxUtils::getGets();
     $this->getConfiguration($filename);
     $this->racine = $this->aConf['racine'];
     $this->bypage = $this->aConf['bypage_feed'];
     $this->tri = 'desc';
     $this->clef = !empty($this->aConf['clef']) ? $this->aConf['clef'] : '';
     $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_articles']);
     $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_commentaires']);
     $this->getCategories(PLX_ROOT . $this->aConf['categories']);
     $this->getUsers(PLX_ROOT . $this->aConf['users']);
 }
Example #10
0
 public function OwlSlider()
 {
     if (defined('PLX_VERSION') and version_compare(PLX_VERSION, '5.5', ">=")) {
         $link = "data/medias/";
     } else {
         $link = "data/images/";
     }
     $dossier = $this->getParam("dir");
     $directory = $link . $dossier;
     // lien vers votre dossier
     $files = plxGlob::getInstance(PLX_ROOT . $directory);
     if ($img = $files->query('/[a-z0-9-_]+.(jpg|gif|png|jpeg)$/i')) {
         echo '<div id="owl-demo" class="owl-carousel">';
         foreach ($img as $k => $v) {
             $slider = $directory . '/' . $v;
             echo '<div class="item"><img src="' . $slider . '" alt="" /></div>';
         }
         echo '</div>';
     } else {
         echo "Le dossier n'existe pas ou est vide.";
     }
 }
Example #11
0
    header('Location: parametres_affichage.php');
    exit;
}
# On récupère les thèmes
$aStyles[''] = L_NONE1;
$files = plxGlob::getInstance(PLX_ROOT . $plxAdmin->aConf['racine_themes'], true);
if ($styles = $files->query("/[a-z0-9-_\\.\\(\\)]+/i")) {
    foreach ($styles as $k => $v) {
        if (substr($v, 0, 7) != 'mobile.') {
            $aStyles[$v] = $v;
        }
    }
}
# On récupère les templates de la page d'accueil
$aTemplates = array();
$files = plxGlob::getInstance(PLX_ROOT . $plxAdmin->aConf['racine_themes'] . $plxAdmin->aConf['style']);
if ($array = $files->query('/^home(-[a-z0-9-_]+)?.php$/')) {
    foreach ($array as $k => $v) {
        $aTemplates[$v] = $v;
    }
}
if (empty($aTemplates)) {
    $aTemplates[''] = L_NONE1;
}
# Tableau du tri
$aTriArts = array('desc' => L_SORT_DESCENDING_DATE, 'asc' => L_SORT_ASCENDING_DATE, 'alpha' => L_SORT_ALPHABETICAL);
$aTriComs = array('desc' => L_SORT_DESCENDING_DATE, 'asc' => L_SORT_ASCENDING_DATE);
# On va tester les variables pour les images et miniatures
if (!is_numeric($plxAdmin->aConf['images_l'])) {
    $plxAdmin->aConf['images_l'] = 800;
}
Example #12
0
    echo "\t</url>\n";
}
# Les catégories
foreach ($plxMotor->aCats as $cat_num => $cat_info) {
    if ($cat_info['menu'] != 'oui' or $cat_info['articles'] == 0) {
        continue;
    }
    echo "\n";
    echo "\t<url>\n";
    echo "\t\t<loc>" . $plxMotor->urlRewrite("?categorie" . intval($cat_num) . "/" . $cat_info['url']) . "</loc>\n";
    echo "\t\t<changefreq>weekly</changefreq>\n";
    echo "\t\t<priority>0.8</priority>\n";
    echo "\t</url>\n";
}
# Les articles
$plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $plxMotor->aConf['racine_articles']);
$aFiles = $plxGlob_arts->query('/^[0-9]{4}.([0-9,|home]*).[0-9]{3}.[0-9]{12}.[a-z0-9-]+.xml$/', 'art', 'rsort', 0, false, 'before');
# On parse les fichiers
if (is_array($aFiles)) {
    # On a des fichiers
    foreach ($aFiles as $k => $v) {
        # On parcourt tous les fichiers
        $array[$k] = $plxMotor->parseArticle(PLX_ROOT . $plxMotor->aConf['racine_articles'] . $v);
        # On stocke les enregistrements dans un objet plxRecord
        $plxRecord_arts = new plxRecord($array);
    }
    if ($plxGlob_arts->count and $plxRecord_arts->size) {
        # On a des articles
        # On boucle sur nos articles
        while ($plxRecord_arts->loop()) {
            $num = intval($plxRecord_arts->f('numero'));
Example #13
0
 /**
  * Constructeur qui initialise certaines variables de classe
  * et qui lance le traitement initial
  *
  * @param	filename	emplacement du fichier XML de configuration
  * @return	null
  * @author	Anthony GUÉRIN, Florent MONTHEL, Stéphane F
  **/
 protected function __construct($filename)
 {
     # On parse le fichier de configuration
     $this->getConfiguration($filename);
     # Chargement du fichier de langue
     $lang = isset($_SESSION['lang']) ? $_SESSION['lang'] : $this->aConf['default_lang'];
     $this->aConf['default_lang'] = $lang;
     loadLang(PLX_CORE . 'lang/' . $lang . '/core.php');
     # récupération des paramètres dans l'url
     $this->get = plxUtils::getGets();
     # gestion du timezone
     date_default_timezone_set($this->aConf['timezone']);
     # On vérifie s'il faut faire une mise à jour
     if ((!isset($this->aConf['version']) or PLX_VERSION != $this->aConf['version']) and !defined('PLX_UPDATER')) {
         header('Location: ' . PLX_ROOT . 'update/index.php');
         exit;
     }
     # Chargement des variables
     $this->style = $this->aConf['style'];
     $this->racine = $this->aConf['racine'];
     $this->bypage = $this->aConf['bypage'];
     $this->tri = $this->aConf['tri'];
     $this->tri_coms = $this->aConf['tri_coms'];
     # On récupère le chemin de l'url
     $var = parse_url($this->racine);
     $this->path_url = str_replace(ltrim($var['path'], '\\/'), '', ltrim($_SERVER['REQUEST_URI'], '\\/'));
     # Traitement des plugins
     $this->plxPlugins = new plxPlugins($lang);
     $this->plxPlugins->loadPlugins();
     # Hook plugins
     eval($this->plxPlugins->callHook('plxMotorConstructLoadPlugins'));
     # Traitement sur les répertoires des articles et des commentaires
     $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_articles'], false, true, 'arts');
     $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_commentaires']);
     # Récupération des données dans les autres fichiers xml
     $this->getCategories(path('XMLFILE_CATEGORIES'));
     $this->getStatiques(path('XMLFILE_STATICS'));
     $this->getTags(path('XMLFILE_TAGS'));
     $this->getUsers(path('XMLFILE_USERS'));
     # Récuperation des articles appartenant aux catégories actives
     $this->getActiveArts();
     # Hook plugins
     eval($this->plxPlugins->callHook('plxMotorConstruct'));
 }
Example #14
0
 /**
  * Constructeur qui initialise certaines variables de classe
  * et qui lance le traitement initial
  *
  * @param	filename	emplacement du fichier XML de configuration
  * @return	null
  * @author	Anthony GUÉRIN, Florent MONTHEL, Stéphane F
  **/
 public function __construct($filename)
 {
     # Version de PluXml
     if (!is_readable(PLX_ROOT . 'version')) {
         header('Content-Type: text/plain charset=UTF-8');
         echo 'Le fichier "' . PLX_ROOT . 'version" est necessaire au fonctionnement de PluXml';
         exit;
     }
     $f = file(PLX_ROOT . 'version');
     $this->version = $f['0'];
     # Traitement initial
     $this->start = plxDate::microtime();
     $this->get = plxUtils::getGets();
     # On parse le fichier de configuration
     $this->getConfiguration($filename);
     # On vérifie s'il faut faire une mise à jour
     if ((!isset($this->aConf['version']) or $this->version != $this->aConf['version']) and !defined('PLX_UPDATER')) {
         header('Location: ' . PLX_ROOT . 'update/index.php');
         exit;
     }
     # Chargement des variables
     $this->racine = $this->aConf['racine'];
     $this->bypage = $this->aConf['bypage'];
     $this->tri = $this->aConf['tri'];
     $this->tri_coms = $this->aConf['tri_coms'];
     # On récupère le chemin de l'url
     $var = parse_url($this->racine);
     $this->path_url = str_replace(ltrim($var['path'], '\\/'), '', ltrim($_SERVER['REQUEST_URI'], '\\/'));
     # Definition du thème à afficher
     if (plxUtils::mobileDetect() and !empty($this->aConf['style_mobile']) and is_dir(PLX_ROOT . 'themes/' . $this->aConf['style_mobile'])) {
         $this->style = $this->aConf['style_mobile'];
     } else {
         $this->style = $this->aConf['style'];
     }
     # Traitement sur les répertoires des articles et des commentaires
     $this->plxGlob_arts = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_articles']);
     $this->plxGlob_coms = plxGlob::getInstance(PLX_ROOT . $this->aConf['racine_commentaires']);
     # On récupère les catégories et les pages statiques
     $this->getCategories(PLX_ROOT . $this->aConf['categories']);
     $this->getStatiques(PLX_ROOT . $this->aConf['statiques']);
     $this->getTags(PLX_ROOT . $this->aConf['tags']);
     $this->getUsers(PLX_ROOT . $this->aConf['users']);
 }
Example #15
0
                $plxPlugin->setParam('avatar' . $i, '', '');
                $plxPlugin->saveParams();
            }
        }
    }
}
# mise à jour du nombre de membres existants
$nbmembres = floor(sizeof($plxPlugin->getParams()) / 2);
$mnuDisplay = $plxPlugin->getParam('mnuDisplay') == '' ? 1 : $plxPlugin->getParam('mnuDisplay');
$mnuName = $plxPlugin->getParam('mnuName') == '' ? 'MyTeam' : $plxPlugin->getParam('mnuName');
$mnuPos = $plxPlugin->getParam('mnuPos') == '' ? 2 : $plxPlugin->getParam('mnuPos');
$template = $plxPlugin->getParam('template') == '' ? 'static.php' : $plxPlugin->getParam('template');
$label1 = $plxPlugin->getParam('champs1') == '' ? 'Info 1' : $plxPlugin->getParam('champs1');
$label2 = $plxPlugin->getParam('champs2') == '' ? 'Info 2' : $plxPlugin->getParam('champs2');
# On récupère les templates des pages statiques
$files = plxGlob::getInstance(PLX_ROOT . 'themes/' . $plxAdmin->aConf['style']);
if ($array = $files->query('/^static(-[a-z0-9-_]+)?.php$/')) {
    foreach ($array as $k => $v) {
        $aTemplates[$v] = $v;
    }
}
?>
	


<p>
	<h2><?php 
echo $plxPlugin->getInfo("description");
?>
</h2>
</p>
Example #16
0
 /**
  * Méthode qui affiche une page statique en lui passant son id (si cette page est active ou non)
  *
  * @param	id		id numérique ou url/titre de la page statique
  * @return	stdout
  * @scope	global
  * @author	Stéphane F
  **/
 public function staticInclude($id)
 {
     # Hook Plugins
     if (eval($this->plxMotor->plxPlugins->callHook('plxShowStaticInclude'))) {
         return;
     }
     # On génère un nouvel objet plxGlob
     $plxGlob_stats = plxGlob::getInstance(PLX_ROOT . $this->plxMotor->aConf['racine_statiques']);
     if (is_numeric($id)) {
         # inclusion à partir de l'id de la page
         $regx = '/^' . str_pad($id, 3, '0', STR_PAD_LEFT) . '.[a-z0-9-]+.php$/';
     } else {
         # inclusion à partir du titre de la page
         $url = plxUtils::title2url($id);
         $regx = '/^[0-9]{3}.' . $url . '.php$/';
     }
     if ($files = $plxGlob_stats->query($regx)) {
         # on récupère l'id de la page pour tester si elle est active
         if (preg_match('/^([0-9]{3}).(.*).php$/', $files[0], $c)) {
             if ($this->plxMotor->aStats[$c[1]]['active']) {
                 include PLX_ROOT . $this->plxMotor->aConf['racine_statiques'] . $files[0];
             }
         }
     }
 }
Example #17
0
 /**
  * Méthode qui retourne la liste des langues disponibles dans un tableau
  *
  * @return	string		chaine de caractères modifiée
  * @author	Stephane F.
  **/
 public static function getLangs()
 {
     $array = array();
     $glob = plxGlob::getInstance(PLX_CORE . 'lang', true);
     if ($aFolders = $glob->query("/[a-z]+/i")) {
         foreach ($aFolders as $folder) {
             $array[$folder] = $folder;
         }
     }
     ksort($array);
     return $array;
 }
Example #18
0
 /**
  * Méthode qui affiche une page statique en lui passant son id (si cette page est active ou non)
  *
  * @param	id		id numérique ou url/titre de la page statique
  * @return	stdout
  * @scope	global
  * @author	Stéphane F
  **/
 public function staticInclude($id)
 {
     # Hook Plugins
     if (eval($this->plxMotor->plxPlugins->callHook('plxShowStaticInclude'))) {
         return;
     }
     # On génère un nouvel objet plxGlob
     $plxGlob_stats = plxGlob::getInstance(PLX_ROOT . $this->plxMotor->aConf['racine_statiques']);
     if (is_numeric($id)) {
         $regx = '/^' . str_pad($id, 3, '0', STR_PAD_LEFT) . '.[a-z0-9-]+.php$/';
     } else {
         $url = plxUtils::title2url($id);
         $regx = '/^[0-9]{3}.' . $url . '.php$/';
     }
     if ($files = $plxGlob_stats->query($regx)) {
         include PLX_ROOT . $this->plxMotor->aConf['racine_statiques'] . $files[0];
     }
 }
Example #19
0
 /**
  * Méthode qui renvoie la liste des plugins inactifs
  *
  * @return	array		liste des plugins inactifs
  * @author	Stephane F
  **/
 public function getInactivePlugins()
 {
     $aPlugins = array();
     $dirs = plxGlob::getInstance(PLX_PLUGINS, true);
     if (sizeof($dirs->aFiles) > 0) {
         foreach ($dirs->aFiles as $plugName) {
             if (!isset($this->aPlugins[$plugName]) and $plugInstance = $this->getInstance($plugName)) {
                 $plugInstance->getInfos();
                 $aPlugins[$plugName] = $plugInstance;
             }
         }
     }
     ksort($aPlugins);
     return $aPlugins;
 }
Example #20
0
 /**
  * M�thode qui affiche une page statique en lui passant son id (si cette page est active ou non)
  *
  * @param	id	id num�rique de la page statique
  * @return	stdout
  * @scope	global
  * @author	St�phane F
  **/
 public function staticInclude($id)
 {
     # On g�n�re un nouvel objet plxGlob
     $plxGlob_stats = plxGlob::getInstance(PLX_ROOT . $this->plxMotor->aConf['racine_statiques']);
     if ($files = $plxGlob_stats->query('/^' . str_pad($id, 3, '0', STR_PAD_LEFT) . '.[a-z0-9-]+.php$/')) {
         include PLX_ROOT . $this->plxMotor->aConf['racine_statiques'] . $files[0];
     }
 }
Example #21
0
$delta["+05:00"] = "(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent";
$delta["+05:50"] = "(GMT +5:30) Mumbai, Kolkata, Chennai, New Delhi";
$delta["+05:75"] = "(GMT +5:45) Kathmandu";
$delta["+06:00"] = "(GMT +6:00) Almaty, Dhaka, Colombo";
$delta["+06:50"] = "(GMT +6:30) Yangon, Cocos Islands";
$delta["+07:00"] = "(GMT +7:00) Bangkok, Hanoi, Jakarta";
$delta["+08:00"] = "(GMT +8:00) Beijing, Perth, Singapore, Hong Kong";
$delta["+09:00"] = "(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk";
$delta["+09:50"] = "(GMT +9:30) Adelaide, Darwin";
$delta["+10:00"] = "(GMT +10:00) Eastern Australia, Guam, Vladivostok";
$delta["+11:00"] = "(GMT +11:00) Magadan, Solomon Islands, New Caledonia";
$delta["+12:00"] = "(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka";
# On récupère la liste des éditeurs de texte
$editors[''] = 'aucun';
$editors['plxtoolbar'] = 'plxToolbar';
$folders = plxGlob::getInstance(PLX_ROOT . 'addons', true);
if ($list = $folders->query("/editor.[a-z0-9-_\\.\\(\\)]+/i")) {
    foreach ($list as $k => $v) {
        $name = explode('.', $v);
        $editors[$name[1]] = $name[1];
    }
}
# On inclut le header
include dirname(__FILE__) . '/top.php';
?>

<h2>Edition des param&egrave;tres de PluXml</h2>

<form action="parametres_base.php" method="post" id="change-cf-file">
	<fieldset class="withlabel">
		<legend>Configuration de base :</legend>	
Example #22
0
 * Edition des paramètres d'affichage
 *
 * @package PLX
 * @author	Florent MONTHEL, 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);
# On édite la configuration
if (!empty($_POST)) {
    $plxAdmin->editConfiguration($plxAdmin->aConf, $_POST);
    header('Location: parametres_affichage.php');
    exit;
}
# On récupère les templates
$tpl = plxGlob::getInstance(PLX_ROOT . 'themes', true);
$b_style[''] = 'aucun';
$b_style_mobile[''] = 'aucun';
if ($a_style = $tpl->query("/[a-z0-9-_\\.\\(\\)]+/i")) {
    foreach ($a_style as $k => $v) {
        if (substr($v, 0, 7) != 'mobile.') {
            $b_style[$v] = $v;
        } else {
            $b_style_mobile[$v] = $v;
        }
    }
}
# On récupère la lsite des pages statiques
$pages[''] = 'aucune';
foreach ($plxAdmin->aStats as $number => $static) {
    $pages[$number] = $static['name'];
Example #23
0
 /**
  * Méthode qui affiche un produit en lui passant son id (si ce produit est active ou non)
  *
  * @param    id numérique de la page product
  * @return    stdout
  * @scope    global
  * @author    David.L
  **/
 public function plxShowProductInclude($id)
 {
     # Hook Plugins
     //if(eval($this->plxMotor->plxPlugins->callHook('plxShowProductInclude'))) return ;
     # On génère un nouvel objet plxGlob
     $plxGlob_stats = plxGlob::getInstance(PLX_ROOT . 'data/products/');
     if ($files = $plxGlob_stats->query('/^' . str_pad($id, 3, '0', STR_PAD_LEFT) . '.[a-z0-9-]+.php$/')) {
         include PLX_ROOT . 'data/products/' . $files[0];
     }
 }
Example #24
0
    plxMsg::Error('Ce th&egrave;me n\'existe pas !');
    header('Location: parametres_affichage.php');
    exit;
}
# Traitement du formulaire: sauvegarde du template
if (isset($_POST['submit']) and !empty($tpl) and trim($_POST['content']) != '') {
    if (plxUtils::write($_POST['content'], $filename)) {
        plxMsg::Info("Fichier enregistr&eacute; avec succ&egrave;s");
    } else {
        plxMsg::Error("Erreur pendant l'enregistrement du fichier");
    }
    header("Location: parametres_edittpl.php?tpl=" . $tpl . (isset($_GET['mobile']) ? '&mobile' : ''));
    exit;
}
# On récupère les fichiers templates du thèmes
$files = plxGlob::getInstance(PLX_ROOT . 'themes/' . $style);
if ($aTemplates = $files->query('/[a-z0-9-_]+.(php|css)$/')) {
    foreach ($aTemplates as $k => $v) {
        $aTemplate[$v] = $v;
    }
}
# On récupère le contenu du fichier template
$content = '';
if (file_exists($filename) and filesize($filename) > 0) {
    if ($f = fopen($filename, 'r')) {
        $content = fread($f, filesize($filename));
        fclose($f);
    }
}
# On inclut le header
include dirname(__FILE__) . '/top.php';