<?php defined('ACCESS') OR die('No direct script access...');
/**
 * Author - koder_alex
 * ISQ - 669906617
 * VK - https://vk.com/koder_alex
 * It is forbidden to give, sell, modify.
 */
if (isset($_POST['peer']) && is_numeric($_POST['peer']) && DB::$pdo->querySingle("SELECT COUNT(id) FROM `users` WHERE `id` = ?", array((int)$_POST['peer'])))
    $peer = d_user((int)$_POST['peer'], false);
else
    $peer = d_user(0, false);
if ($peer['last_time'] > (time() - $config['TIME_ONLINE']))
    DB::$pdo->query("UPDATE `users` SET `vkTypingId` = :vkTypingId, `vkTypingLastTime` = :vkTypingLastTime WHERE `id` = :id", array(':vkTypingId' => $peer['id'], ':vkTypingLastTime' => time(), ':id' => $user['id']));
setData(array());