I found my problem to modify the code:
Replace with:
Find:
$query = "SELECT COUNT(*) FROM shoutbox WHERE message='".$shbmsg."' AND user='".$CURUSER['username']."' AND UNIX_TIMESTAMP()-UNIX_TIMESTAMP(date) < 30";
Replace with:
$query = "SELECT COUNT(*) FROM staff_shoutbox WHERE message='".$_POST['message']."' AND user='".$CURUSER['username']."' AND UNIX_TIMESTAMP()-UNIX_TIMESTAMP(date) < 30";
Find:
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, '".$CURUSER['username']."', '".unesc($shbmsg)."', '".get_date_time()."', '".$CURUSER['id']."')";
Replace with:
$query = "INSERT INTO staff_shoutbox (msgid, user, message, date, userid) VALUES (NULL, '".$CURUSER['username']."', '".unesc($_POST['message'])."', '".get_date_time()."', '".$CURUSER['id']."')";
it works now :D