I am working on a client login area for a client of mine. I am using PHP and MySQL for the design of this. I will have three tables for the area, well to start with. One will be ?user? (which will be the clients), ?admin? and ?function?. I have setup the user table with your basic info plus a column called ?functionaccess?. I have the sessions working for the users and I will have no problem setting up a login and session for the admin. The capabilities they want once inside the admin area is where I am having a problem. They want to have 10 functions that are possible to show up when a given used logins in, they want to be able to choose which functions a user sees from the admin area. So you would have a page with a pull down menu at the top, choose a user and below would be the 10 functions with a check box next to each one (check for access). The functions can be something as simple as 10 different links to pages that they can click on.
So the function table would (for now) have columns like functionName, functionDescrip and functionLink. So for each function that shows up on the users page would look something like
< a href="$functionLink?>$functionName
This is what I was think for the admin page with the list of functions and check boxes. Each check box would have a name of func1, func2, func3 and so on to 10. Each variable would have a value of ?0? or ?1? Then you remember ?functionaccess? from the ?user? table. Well these 10 ?funcX? variables would build the ?permissions? for each users function access.
Something like $functionaccess = ?$func1? . ?$func2? . ?$func3? . ?$func4? and so on. When your done you have a functionaccess variable of 1s and 0s (1001100101) this would determine the access for each user.
Now I think I can do most of that (maybe) . I am having a problem thanking of a why to use the 10 digit number in a useful why when displaying the correct functions for each user. How do I bring that number back into play on the user side when display there functions. Some way to break the number back apart and use it in a switch statement or an array or something that will cause the correct functions to be shown. If anyone can write a script that can do this, that would be great, or point me in the right direction that would be helpful. I can pay some based on the amount of help received if necessary. Or I may be think of this all wrong, that would be good to know as well, I am somewhat new to PHP.
Let me know also if anyone is interested in doing the entire setup for a fee and let me know how much that would be.