Exemplo n.º 1
0
    $p_filename = !empty($_POST['p_filename']) ? $_POST['p_filename'] : '';
    $p_parent = !empty($_POST['p_parent']) ? rawurldecode($_POST['p_parent']) : '/';
    if (empty($p_filename)) {
        $okt->error->set(__('c_a_te_error_must_filename'));
    }
    if ($okt->error->isEmpty()) {
        file_put_contents($oThemeEditor->getThemePath() . $p_parent . '/' . $p_filename, '');
        $okt->redirect('configuration.php?action=theme_editor&theme=' . $sThemeId . '&file=' . rawurlencode($p_parent . '/' . $p_filename));
    }
}
/* Affichage
----------------------------------------------------------*/
# Infos page
$okt->page->addGlobalTitle(__('c_a_theme_editor'), 'configuration.php?action=theme_editor');
if ($sThemeId) {
    $okt->page->addGlobalTitle($oThemeEditor->getThemeInfo('name'), 'configuration.php?action=theme_editor&theme=' . $sThemeId);
}
$okt->page->addGlobalTitle(__('c_a_te_new_file'), 'configuration.php?action=theme_editor&theme=' . $sThemeId . '&new_file=1');
# En-tête
require OKT_ADMIN_HEADER_FILE;
?>


<form action="configuration.php" method="post">

	<div class="two-cols">
		<p class="field col"><label for="p_filename"><?php 
_e('c_a_te_filename');
?>
</label>
		<?php