More precicely, if (zp_loggedin()) will tell you if the viewer is logged in as an admin. acrylian' code is more precice on what kind of administrator is logged in. Most of the time it is not improtant what the admin's rights are so zp_loggedin() is appropriate. Also, it works anywhere. If you use if(($_zp_loggedin & ADMIN_RIGHTS)) within a function you will need to declare global $_zp_loggedin;