$('.adm_posts_cont .close, .rossr_cont .close').click(function(){
var obj = $(this);
var act = "post_del";
var id = $(obj).next().find('.post_id').val();
if ( $(obj).next().find('.action').val() == "post_upd_complaint" ){
act = "compl_del";
}else if ( $(obj).next().find('.action').val() == "rossr_upd" ){
act = "rossr_del";
id = $(obj).next().find('.rossr_id').val();
}
$.ajax({
type: "POST",
url: "/includes/ajax_actions.php",
data: "action=" + act + "&id=" + id + "&PHPSESSID=" + $('.phpSesId').val(),
dataType: "text",
error: function (XMLHttpRequest, textStatus, errorThrown){
},
success: function(msg){
if ( msg == 'ok' )
$(obj).parent().remove();
else{
alert('Ошибка');
}
}
});
});