Размер файла: 2.77Kb
<?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') {
$chat = input($_POST['chat']);
$forum = input($_POST['forum']);
$share = input($_POST['share']);
$news = input($_POST['news']);
$who_upload = (int)$_POST['who_upload'];
$db->query("UPDATE `system` SET `open_chat` = '". $chat."', `open_forum` = '". $forum."', `open_share` = '". $share."', `open_news` = '". $news."', `who_upload` = '$who_upload'");
$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('chat').'</b>:<br />
<input type="radio" name="chat" value="yes"'. ($system['open_chat'] == 'yes'?' checked="checked"':NULL) .' />'. $lang->word('ons') .'
<input type="radio" name="chat" value="no"'. ($system['open_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 />
<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: /'); }
?>