Файл: modules/padmin/extentions.php
Строк: 35
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.org.ua *
**********************************/
$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'])));
$db->query("UPDATE `system` SET `files_types` = '$ext'");
header('location: /padmin/extentions?act=saved');
exit;
}
$title = $lang->word('extentions');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('extentions'));
if(isset($_GET['act']) && $_GET['act'] == 'saved') { $tpl->div('top', $lang->word('succ_save')); }
echo '<div class="menu">
<form action="/padmin/extentions?act=save" method="post">
'.$lang->word('enter_ext').':<br/>
<input type="text" value="'. str_replace(';', ',', $system['files_types']) .'" name="ext" /><br/>
<input type="submit" value="'. $lang->word('save') .'" />
</form>
</div>';
$tpl->div('block', img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
} else { go('/'); }
?>