Please Log in to join the conversation.
Please Log in to join the conversation.
function uddeIMajaxGetNewMessages($myself, $config){
$db = uddeIMgetDatabase();
if (uddeIMcheckJversion()>=4) {
$jinput = JFactory::getApplication()->input;
$input = $jinput->get('value', '', 'USERNAME');
} else {
$input = trim( class_exists('JRequest') ? JRequest::getVar('value') : uddeIMmosGetParam($_REQUEST, 'value', '') );
if (class_exists('JFilterInput'))
$input = JFilterInput::clean($input, 'username');
else
$input = (string) preg_replace( '/[\x00-\x1F\x7F<>"\'%&]/', '', $input );
}
if (function_exists('iconv'))
$input = iconv('UTF-8',$config->charset,$input);
$sql="SELECT count(a.id) FROM #__uddeim AS a WHERE a.totrash=0 AND a.toread=0 AND a.toid=".(int)$myself;
$db->setQuery($sql);
$result=(int)$db->loadResult();
echo $result;
}
Please Log in to join the conversation.