<?php
require_once('../wu_init.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('3'); }

if(isset($_POST['id'])){
if(!empty($_POST['id'])){
$id = intval($_POST['id']);
$how = mysqli_num_rows(mysqli_query($connect_db, "SELECT id FROM ".DB_PREFIX."_es_s WHERE usr='$u_id' AND tou='$id' LIMIT 1"));
if ($how == 0) { exit('0'); }
mysqli_query($connect_db, "DELETE FROM `".DB_PREFIX."_es_s` WHERE usr='$u_id' AND tou='$id' LIMIT 1");
exit('1');
} else { exit('3'); }
} else { exit('3'); }
?>