<?php
if(!defined('WEBUPPER')){ exit; }
list($item_id, $em) = explode('||', $extra);
$item_id = intval($item_id);
$email = mysqli_real_escape_string($connect_db, $email);
$item = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT id,co,ti FROM `".DB_PREFIX."_es` WHERE id = '$item_id' LIMIT 1"));
$sum = $item['co'];
$comment = "Покупка товара ".$item['ti'];
mysqli_query($connect_db, "INSERT INTO `".DB_PREFIX."_cash_in` (usr,ps,type,extra,batch,s,dt) VALUES ('$u_id','$paysystem','eshopbuy','$extra','$batch','$sum','$dt')");