function warning_edit()
{
global $bb_cfg;
$bbcode_on = ($bb_cfg['allow_bbcode']) ? true : false;
$smilies_on = ($bb_cfg['allow_smilies']) ? true : false;
$warn_id = (int) $this->request['warn_id'];
$sql = 'SELECT warn_bbcode_uid, warn_text, warn_theme, warn_type, warn_exp_time FROM bb_users_warn WHERE warn_id = '.$warn_id.' LIMIT 1';
if (!$result = DB()->sql_query($sql)) ajax_die("Произошла непредвиденная ошибка, обратитесь к Администратору_1");
$row = DB()->sql_fetchrow($result);
if ($row['warn_type'] == 1) $type = "readonly";
else if ($row['warn_type'] == 2) $type = "sigban";
else if ($row['warn_type'] == 3) $type = "allowavatar";
else if ($row['warn_type'] == 4) $type = "allow_pm";
else if ($row['warn_type'] == 6) $type = "sel";
else if ($row['warn_type'] == 5) $type = "active";
$this->response['message'] = strip_bbcode_uid($row['warn_text'], $row['warn_bbcode_uid']);
$this->response['theme'] = $row['warn_theme'];
$this->response['type'] = $type;
$this->response['id'] = $warn_id;
$this->response['date'] = date($bb_cfg['post_date_format'], $row['warn_exp_time']);
}