Файл: modules/padmin/settings_modules.php
Строк: 159
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.ru *
**********************************/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6) {
$title = $lang->word('padmin_modules_settings');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('padmin_modules_settings'));
if(isset($_POST['save']) && $_GET['act']== 'save') {
$mini_chat = input($_POST['mini_chat']);
$forum = input($_POST['forum']);
$library = input($_POST['library']);
$share = input($_POST['share']);
$news = input($_POST['news']);
$downloads = (int)$_POST['downloads'];
$show_topics = (int)$_POST['show_topics'];
$who_upload = (int)$_POST['who_upload'];
$db->query("UPDATE `system` SET `open_mini_chat` = '". $mini_chat."', `open_forum` = '". $forum."', `open_library` = '". $library."', `open_share` = '". $share."', `open_news` = '". $news."', `who_upload` = '$who_upload', `downloads_opened` = '$downloads', `show_topics` = '$show_topics'");
$tpl->div('menu', $lang->word('succ_save'));
$tpl->div('block', img('settings.png') . '<a href="/padmin/settings_modules/">'.$lang->word('settings').'</a><br/>'. img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
exit;
}
echo '<div class="post">
<form action="/padmin/settings_modules/?act=save" method="post">
<b> '.$lang->word('mini_chat').'</b>:<br />
<input type="radio" name="mini_chat" value="yes"'. ($system['open_mini_chat'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="mini_chat" value="no"'. ($system['open_mini_chat'] == 'no'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('forum').'</b>:<br />
<input type="radio" name="forum" value="yes"'. ($system['open_forum'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="forum" value="no"'. ($system['open_forum'] == 'no'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('share').'</b>:<br />
<input type="radio" name="share" value="yes"'. ($system['open_share'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="share" value="no"'. ($system['open_share'] == 'no'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('news').'</b>:<br />
<input type="radio" name="news" value="yes"'. ($system['open_news'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="news" value="no"'. ($system['open_news'] == 'no'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('downloads').'</b>:<br />
<input type="radio" name="downloads" value="1"'. ($system['downloads_opened'] == '1'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="downloads" value="0"'. ($system['downloads_opened'] == '0'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('library').'</b>:<br />
<input type="radio" name="library" value="yes"'. ($system['open_library'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="library" value="no"'. ($system['open_library'] == 'no'?' checked="checked"':NULL) .' />'. $lang->word('offs') .'<br />
<b> '.$lang->word('show_forum_topics').'</b>:<br />
<input type="radio" name="show_topics" value="1"'. ($system['show_topics'] == '1'?' checked="checked"':NULL) .' />'. $lang->word('yyes') .'
<input type="radio" name="show_topics" value="0"'. ($system['show_topics'] == '0'?' checked="checked"':NULL) .' />'. $lang->word('yno') .'<br />
<input type="submit" name="save" 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 { header('Location: /'); }
?>