Файл: groups/handler/access_group.php
Строк: 14
<?php
if (!empty($_POST['save']))
{
$type = abs(intval($_POST['type']));
$access_wall = abs(intval($_POST['access_wall']));
$access_comm = abs(intval($_POST['access_comm']));
$access_forum = abs(intval($_POST['access_forum']));
$access_new_users = abs(intval($_POST['access_new_users']));
if (empty($type) || $type != 1) $type = 0;
if (empty($access_wall) || $access_wall < 0 || $access_wall > 3) $access_wall = 0;
if (empty($access_comm) || $access_comm < 0 || $access_comm > 2) $access_comm = 0;
if (empty($access_forum) || $access_forum < 0 || $access_forum > 2) $access_forum = 0;
if (empty($access_new_users) || $access_new_users != 1) $access_new_users = 0;
if ($err == false && mysql_query("UPDATE `groups` SET
`type` = '".$type."',
`access_wall` = '".$access_wall."',
`access_comm` = '".$access_comm."',
`access_forum` = '".$access_forum."',
`access_new_users` = '".$access_new_users."'
WHERE `id` = '".$id."'") == true)
{
$arr_group = mysql_fetch_array(mysql_query("SELECT * FROM `groups` WHERE `id` = '".$id."' LIMIT 1"));
echo ok(lang('Изменения сохранены','Зміни збережені'));
}
}
?>