<?php
if (!defined('IN_AJAX')) die(basename(__FILE__));
global $lang, $userdata;
$unread_pm = 0;
if ($userdata['user_new_privmsg'] > 0)
{
$pm_text = declension($userdata['user_new_privmsg'], $lang['NEW_PMS_DECLENSION'], $lang['NEW_PMS_FORMAT']);
$unread_pm = ($userdata['user_new_privmsg'] > 0);
}
else if(!$unread_pm && $userdata['user_unread_privmsg'])
{
$pm_text = declension($userdata['user_unread_privmsg'], $lang['UNREAD_PMS_DECLENSION'], $lang['UNREAD_PMS_FORMAT']);
}else{
$pm_text = $lang['NO_NEW_PM'];
}
$this->response['html'] = $pm_text;