Файл: modules/padmin/extensions.php
Строк: 58
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6)
{
if(isset($_GET['act']) && $_GET['act'] == 'save' && !empty($_POST['ext']))
{
$ext = str_replace(',', ';', trim(input($_POST['ext'])));
$ini = new Ini(SYS.'/ini/core.ini');
$ini->write('files_types', $ext);
$ini->updateFile();
header('location: /padmin/extensions?act=saved');
exit;
}
$title = _t('extentions');
include_header($title);
$tpl->div('title', _t('extentions'));
if(isset($_GET['act']) && $_GET['act'] == 'saved') { $tpl->div('top', _t('succ_save')); }
echo '<div class="menu">
<form action="/padmin/extensions?act=save" method="post">
'._t('enter_ext').':<br/>
<input type="text" value="'. str_replace(';', ',', $system['files_types']) .'" name="ext" /><br/>
<input type="submit" value="'. _t('save') .'" />
</form>
</div>';
$tpl->div('block', img('admin.png') .'<a href="/padmin/">'. _t('padmin') .'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
} else { go('/'); }
?>