<?php
function get_new_inbox_messages($id,$profile)
{
    if(empty($id) || empty($profile))
        return '0';
    $sql="SELECT COUNT(ID) as amount FROM IN_INBOX_MESSAGE WHERE to_user='$id' AND to_user_profile='$profile' AND status='1'";
    $row=db_request(db_execute($sql));
    return $row[1]['AMOUNT'];
}
?>