1) I've not looked at your pastebin code, only your sample.
2) It's been 2+ years since I had to think about if/then/else statements.
My guess, 'elseif' gets skipped when first 'if' condition is met.
Meaning, if true elseif <skipped, first if was true, nothing 'else' to do>.
Try starting comparison high, working down low.
if owner elseif superadmin elseif admin