|
Posted by zman on 05/11/06 05:11
bryan wrote:
> I'm making a site that I'm having trouble wrapping my head around...it
> makes sense in my head but I can't seem to figure out the best way to
> code it.
>
> Basically, there are different users levels...
> beta, free, paid, etc...
> and there are different user types
> example: gamer, programmer, dog... etc
> but each user has his own set of "objects" he can use...for example a
> dog would have his bones, collar, etc
> a gamer would have his PC, photos, videos etc... a programmer would
> have his favorite projects, his current projects, his ideas, and to do
> lists etc
>
> and they can pay for new "objects" or "features" basically, I need to
> figure out how to keep track of all this in the most optimized way as
> possible... here's an example
> User level: paid
> User type: programmer
> because he's a paying user, he gets all the objects for his user type,
> make sense? so we need to then ON his "control panel" let him see the
> objects he has since he's paid so like in a 3 column layout... blocks
> on left and right and then a center column with.. whatever..so example
> blocks would be, projects, blog...etc I hope this makes sense. any help
> is much appreciated.
create three session variables
UserType
UserLevel
lets say that UserTyoe=1 is dog
If UserType=1 Then
give access to all dog objects
end if
Now to solve the type and level hieracrhy
If UserLevel=1 then
Case UserType
1: give access to all dog objects
2: give access to all gamer objects
......
End Case
elseif UserType=2 Then
Case UserType
1: give access to all dog objects
2: give access to all gamer objects
......
End Case
.....
and so on
Hope this helps
Zafar
--------------------------------------------------------------
http://www.vbuniverse.com
[Back to original message]
|