本文整理汇总了PHP中messages::removeChat方法的典型用法代码示例。如果您正苦于以下问题:PHP messages::removeChat方法的具体用法?PHP messages::removeChat怎么用?PHP messages::removeChat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类messages
的用法示例。
在下文中一共展示了messages::removeChat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
* http://ifsoft.com.ua, http://ifsoft.co.uk
* qascript@ifsoft.co.uk
*
* Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
*/
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
$clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
$accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
$accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
$profileId = isset($_POST['profileId']) ? $_POST['profileId'] : '';
$chatId = isset($_POST['chatId']) ? $_POST['chatId'] : 0;
$clientId = helper::clearInt($clientId);
$accountId = helper::clearInt($accountId);
$profileId = helper::clearInt($profileId);
$chatId = helper::clearInt($chatId);
$result = array("error" => true, "error_code" => ERROR_UNKNOWN);
$auth = new auth($dbo);
if (!$auth->authorize($accountId, $accessToken)) {
api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
}
$messages = new messages($dbo);
$messages->setRequestFrom($accountId);
$verifyId = $messages->getChatId($accountId, $profileId);
if ($chatId == $verifyId) {
$result = $messages->removeChat($chatId);
}
echo json_encode($result);
exit;
}