Просмотр файла modules/padmin/extentions.php

Размер файла: 1.23Kb
  1. <?php
  2. /**********************************
  3. * @package: PerfCMS *
  4. * @year: 2012 *
  5. * @author: Artas *
  6. * @link: http://perfcms.org.ua *
  7. **********************************/
  8. $locate = 'in_padmin';
  9. if(isset($user) && $user['level'] >= 6) {
  10. if(isset($_GET['act']) && $_GET['act'] == 'save' && !empty($_POST['ext'])) {
  11. $ext = str_replace(',', ';', trim(input($_POST['ext'])));
  12. $db->query("UPDATE `system` SET `files_types` = '$ext'");
  13. header('location: /padmin/extentions?act=saved');
  14. exit;
  15. }
  16. $title = $lang->word('extentions');
  17. require_once(SYS.'/view/header.php');
  18. $tpl->div('title', $lang->word('extentions'));
  19. if(isset($_GET['act']) && $_GET['act'] == 'saved') { $tpl->div('top', $lang->word('succ_save')); }
  20. echo '<div class="menu">
  21. <form action="/padmin/extentions?act=save" method="post">
  22. '.$lang->word('enter_ext').':<br/>
  23. <input type="text" value="'. str_replace(';', ',', $system['files_types']) .'" name="ext" /><br/>
  24. <input type="submit" value="'. $lang->word('save') .'" />
  25. </form>
  26. </div>';
  27. $tpl->div('block', img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
  28. require_once(SYS.'/view/footer.php');
  29. } else { go('/'); }
  30. ?>