Пример #1
0
# Notes de développement
$sDevNotesFilename = OKT_THEMES_PATH . '/' . $sThemeId . '/notes.md';
$bHasDevNotes = $bEditDevNotes = false;
if (file_exists($sDevNotesFilename)) {
    $bHasDevNotes = true;
    $sDevNotesMd = file_get_contents($sDevNotesFilename);
    $bEditDevNotes = !empty($_REQUEST['edit_notes']) ? $_REQUEST['edit_notes'] : null;
    include_once OKT_VENDOR_PATH . '/phpmarkdown/extra/markdown.php';
    $sDevNotesHtml = Markdown($sDevNotesMd);
}
# Definitions LESS
$sDefinitionsLessFilename = OKT_THEMES_PATH . '/' . $sThemeId . '/css/definitions.less';
$bHasDefinitionsLess = false;
if (file_exists($sDefinitionsLessFilename)) {
    $bHasDefinitionsLess = true;
    $oDefinitionsLessEditor = new oktDefinitionsLessEditor($okt);
    $aCurrentDefinitionsLess = $oDefinitionsLessEditor->getValuesFromFile($sDefinitionsLessFilename);
}
/* Traitements
----------------------------------------------------------*/
# enregistrement notes
if (!empty($_POST['save_notes'])) {
    if ($bHasDevNotes) {
        file_put_contents($sDevNotesFilename, $_POST['notes_content']);
    }
    http::redirect('configuration.php?action=theme&theme_id=' . $sThemeId);
}
# enregistrement definitions less
if (!empty($_POST['save_def_less'])) {
    if ($bHasDefinitionsLess) {
        $oDefinitionsLessEditor->writeFileFromPost($sDefinitionsLessFilename);
Пример #2
0
 *
 * @addtogroup Okatea
 * @subpackage Install interface
 *
 */
if (!defined('OKT_INSTAL_PROCESS')) {
    die;
}
/* Initialisations
------------------------------------------------------------*/
# Inclusion du prepend
require_once __DIR__ . '/../../../oktInc/prepend.php';
# Locales
l10n::set(OKT_INSTAL_DIR . '/inc/locales/' . $_SESSION['okt_install_language'] . '/install');
l10n::set(OKT_LOCALES_PATH . '/' . $_SESSION['okt_install_language'] . '/admin.modules');
$oDefinitionsLessEditor = new oktDefinitionsLessEditor($okt);
/* Traitements
------------------------------------------------------------*/
# formulaire envoyé
if (!empty($_POST['sended'])) {
    $oDefinitionsLessEditor->writeFileFromPost(OKT_THEMES_PATH . '/' . $_SESSION['okt_install_theme'] . '/css/definitions.less');
    http::redirect('index.php?step=' . $stepper->getNextStep());
}
/* Affichage
------------------------------------------------------------*/
# Color picker et autres joyeusetés
$oDefinitionsLessEditor->setFormAssets($oHtmlPage, $_SESSION['okt_install_theme']);
# En-tête
$title = __('i_colors_title');
require OKT_INSTAL_DIR . '/header.php';
?>