$res = mysql_query("INSERT INTO
b_lists_users_ids
SET user_vk_id = ".$_POST['user_vk_id']."
, bl_acc_to_app = '1'
, not_srch_posts_vk = '1'
, reason = '".mysql_real_escape_string($_POST['reason'])."'
, user_vk_id_add = '".$_SESSION['vk_id']."'
, date_add = UNIX_TIMESTAMP()
, user_vk_id_edit = '".$_SESSION['vk_id']."'
, date_edit = UNIX_TIMESTAMP()
ON DUPLICATE KEY UPDATE
is_active = '1'
, bl_acc_to_app = '1'
, not_srch_posts_vk = '1'
, reason = '".mysql_real_escape_string($_POST['reason'])."'
, user_vk_id_edit = '".$_SESSION['vk_id']."'
, date_edit = UNIX_TIMESTAMP()
");
CREATE TABLE IF NOT EXISTS `b_lists_users_ids` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_vk_id` bigint(20) unsigned NOT NULL,
`b_comment` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`reason` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`user_vk_id_add` bigint(20) unsigned NOT NULL,
`date_add` int(10) unsigned NOT NULL,
`user_vk_id_edit` bigint(20) unsigned NOT NULL,
`date_edit` int(10) unsigned NOT NULL,
`is_active` enum('1','0') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
`bl_acc_to_app` enum('1','0') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
`not_srch_posts_vk` enum('1','0') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `user_vk_id` (`user_vk_id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=259 ;
header("Content-Type: text/html; charset=utf-8");
session_start();
require_once($_SERVER['DOCUMENT_ROOT']."/includes/db_connect.php");
if ( $_SESSION['user_type'] != '4' && $_SESSION['is_auth_vk'] == "1" ){
if ( !is_numeric( $_POST['id'] ) )
die();
if ( $_POST['action'] == "post_del" ){
if ( $_SESSION['user_type'] == '1' || $_SESSION['search_access'] == '1' ){
$row = mysql_fetch_assoc(mysql_query("
SELECT from_user
FROM posts
WHERE id = ".$_POST['id']."
LIMIT 0, 1
"));
if ( $row['from_user'] == '1' && $_SESSION['user_type'] != '1' )
die('нет прав');
}else{
die('нет прав');
}
}elseif( $_POST['action'] == "compl_del" ){
if ( $_SESSION['user_type'] == '1' || $_SESSION['compl_access'] == '1' ){}
else{
die('нет прав');
}
}
$res = mysql_query("
SELECT post_images
FROM posts
WHERE id = ".$_POST['id']."
AND from_user = '1'
LIMIT 0, 1
");
while ( $row = mysql_fetch_assoc($res) ){
$arr = explode(",", $row['post_images']);
foreach ( $arr as $key => $val ){
unlink($_SERVER['DOCUMENT_ROOT'].$val);
unlink($_SERVER['DOCUMENT_ROOT'].str_replace(".", "_little.", $val));
}
}
$res = mysql_query("UPDATE
posts
SET
owner_id = 0
, group_vk_id = 0
, user_vk_id = 0
, screen_name = ''
, post_vk_id = NULL
, post_wall_id = ''
, street = ''
, house = ''
, price = NULL
, phones = NULL
, addit_info = NULL
, search_text = ''
, post_images = NULL
, post_images_s = NULL
, from_user = '0'
, renter_type = '0'
, viewed_by_admin = '1'
, complaint_text = NULL
, complaint_is_new = '0'
, complaint_date = 0
, complaint_viewed = '0'
, date_upd = 0
, date_add = 0
, date_to_client = 0
, post_town_id = 0
, post_country_id = 0
, show_cost = 0
, show_count = 0
, is_active = '-1'
, is_actual = '0'
, comm_text = NULL
WHERE id = ".$_POST['id']."
LIMIT 1
");
if ( $res )
echo "ok";
}
$('.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('Ошибка');
}
}
});
});
Заказчик принял СБР, я для вывода денег ( надо все поля заполнить ) оставил ему +
Он мне после 2 месяцев оставил минус
То есть я не могу ничего ответить даже. Так заказчики могут спустя некоторое время обливать аккаунт грязью… Даже если бы мы дальше с ним работали через СБР тоже, он все равно мог бы к любой СБР — спустя время — оставить отрицательный отзыв.