I have something similar to what you want on my site.
Let me find the code...
I have a table called usergroup. It has a groupid, for example groupid "1" is administrators.
In the users table i would have a collumn called level, which for ME would contain the level "1" (the super admin level).
Then it selects my level from the table usergroups and checks if my permissions = yes
ie
PHP Code:
if ($userlevel[caneditphoto] == "yes"){
}
etc
PHP Code:
// User Permission check, tested 11/04/08
//
if ($_SESSION[id] != ""){
$userpermcheck = mysql_query("SELECT * FROM `usergroup` WHERE `groupid` = '$userdet[level]'");
$userperm = mysql_fetch_array($userpermcheck);
}
//
// User Permission check, tested 11/04/08
Excuse messy coding, only 14 years old lmao.
But still its easy to do. If you need any more help then just reply, if i have posted the wrong response feel free to spam me

lmao
Oh and you would have the default table values for permissions such as logout as yes. :P