} break; case "edit": $edit_tr = intval(trim($_GET['msg'])); if ($edit_tr) { $edit_msg = opinions::GetMsgInfo($edit_tr, $error); if ($edit_msg['fromuser_id'] != $uid && !hasPermissions('users')) { unset($edit_msg); unset($action); } } break; case "cmtedit": $id_edit = intval($_POST['opid']); $theme = substr(change_q_x($_POST['comment'], false, false, 'br|b|i'), 0, 3000); $info = opinions::GetMsgComInfo($id_edit); $com_msg = $theme; $medit = $info['opinion_id']; if (!$uid) { $ecom_error_flag = 1; } if (!$theme) { $ecom_error_flag = 1; $com_alert[2] = "Поле заполнено некорректно"; } if (strlen($_POST['comment']) > 3000) { $ecom_error_flag = 1; $com_alert[2] = "Слишком большой комментарий. Допускается не более 3000 знаков"; } if (!$ecom_error_flag) { $error .= opinions::editCommentOpinion($theme, $uid, $id_edit);