Jump to content

Would an array do the trick?


penguin0

Recommended Posts

Oh, now I get it.  I thought at the top you were adding them.  Now I see thats where you declare who can view it.

 

Both.

 

[pre]

admin    =  32  = 100000

pageman  =  16  = 010000

menuman  =  8  = 001000

userman  =  4  = 000100

rateman  =  2  = 000010

user    =  1  = 000001

[/pre]

 

if perms is admins, pagemans and menumans only then perms = 111000

 

So you only have permission if your particular "1" is in there

The sum of the userlevels of those allowed to view it

 

If it's users and admins only, then 33 (32 + 1)

 

If everyone then 32+16+8+4+2+1 = 63

 

 

Correction to previous post (just a single "&"):

 

SELECT ... WHERE view & $userlevel

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.