<?php
include_once('../common.php');

$uid = intval($_POST[uid]);
$call = intval($_POST[call]);
if ($call==1){
	$count = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) from ".tname('avcall')." WHERE clientid='$uid'"), 0);
	if ($count>0){
			$xml_return = '<avcall>yes</avcall>';
			echo $xml_return; 
	}else {
		$xml_return = '<avcall>no</avcall>';
		echo $xml_return;
	}
}
?>