If $user['lastactive'] and $date are a UNIX timestamp integers, then just add the number of seconds to it:
if ($user['lastactive'] + (15 * 60) <= $date) {
PS: Welcome to the forums, and note that we have a nifty [noparse]
bbcode tag you can use here instead of the default [code][/noparse] tag, giving you colorful syntax-highlighting for your PHP code. :)