$class_notifications = new class_notifications(); } $post_data['subject'] = $subject; $post_data['username'] = ($user->data['user_id'] == ANONYMOUS) ? $username : $user->data['username']; $post_data['message'] = $message; if ($post_data['first_post']) { // fetch topic title $sql = "SELECT topic_title, topic_id FROM " . TOPICS_TABLE . " WHERE topic_id = " . $topic_id; $result = $db->sql_query($sql); if ($topic_info = $db->sql_fetchrow($result)) { $class_notifications->send_notifications('newtopic', $post_data, $topic_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); } } else { if ($setbm) { set_bookmark($topic_id); } $class_notifications->send_notifications($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); } // Forum Notification - END } if ($lock_subject)