Hmm...well, to start with I don't think you want if (!strpos($post['membergroupids'], 314)), because basically that will only check for 314 if it is the first (or only) member group id. It would be better to use is_member_of($post, 314). Also, I don't understand how field24 works so I can't write the entire condition for you - what's expected in that field, and how does it affect whether or not a user gets a bar?
|