checkProfil(PROFIL_ADMIN); $plugin = isset($_GET['p'])?urldecode($_GET['p']):''; $plugin = plxUtils::nullbyteRemove($plugin); # chargement du fichier css du plugin pour le frontend $file_frontend = PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.basename($plugin).'.site.css'; # chargement du fichier css du plugin pour le backend $file_backend = PLX_ROOT.PLX_CONFIG_PATH.'plugins/'.basename($plugin).'.admin.css'; # Traitement du formulaire: sauvegarde du code css et regénération du cache if(isset($_POST['submit'])) { $ret_f = plxUtils::write(trim($_POST['frontend']), $file_frontend); $ret_b = plxUtils::write(trim($_POST['backend']), $file_backend); if($ret_f AND $ret_b) { $ret_1 = $plxAdmin->plxPlugins->cssCache('site'); $ret_2 = $plxAdmin->plxPlugins->cssCache('admin'); } if($ret_f AND $ret_b AND $ret_1 AND $ret_2) plxMsg::Info(L_SAVE_FILE_SUCCESSFULLY); else plxMsg::Error(L_SAVE_FILE_ERROR); header('Location: parametres_plugincss.php?p='.urlencode($plugin)); exit; } $backend = is_file($file_backend) ? trim(file_get_contents($file_backend)) : ''; $file_backend_init = PLX_PLUGINS.basename($plugin).'/css/admin.css'; $backend = ($backend=='' AND is_file($file_backend_init)) ? trim(file_get_contents($file_backend_init)) : $backend; $frontend = is_file($file_frontend) ? trim(file_get_contents($file_frontend)) : ''; $file_frontend_init = PLX_PLUGINS.basename($plugin).'/css/site.css'; $frontend = ($frontend=='' AND is_file($file_frontend_init)) ? trim(file_get_contents($file_frontend_init)) : $frontend; # On inclut le header include(dirname(__FILE__).'/top.php'); ?>

'.L_BACK_TO_PLUGINS.'

'; ?>
plxPlugins->callHook('AdminPluginCss')) # Hook Plugins ?>