Spaces must be put around `!`. Also, each `if` condition must use opening and closing braces on separate lines.

Check out the style guide: http://ellislab.com/codeigniter/user-guide/general/styleguide.html