hi i create small cms for my client and i want limit for special customer spicial functions. I think to make some code which system can read and open only staff which i allow to open. But i still think  what kind code i can create so it will small and then i can open and read. Something as md5 but what i can easily open and read what inside of code.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

greetings , umaxim, , From what I can understand from your question, you want to have "Limited Access" to special functions, that only the Staff can use, I might use a "Log In" or "Sign In" type of access, where your staff will use a "User Name" and "Password" to get access to to special functions, There are many ways to do this, I would recommend as a place to start, to read an article here at EE for user Access control -

I di not understand when you said "i can easily open and read what inside of code", as there may or may not be a "hard way" to open and read something, but I do not know what you are tring to read, sorry. . .

ask questions if I did not get what you are talking about, or there are other things you need. . . .
umaximAuthor Commented:
Ok i create a script which have a lot of function as forum, statistics all many function. so not some of my client do not wont to pay me for all function i want limit their function on side. For example if i put some generated code in control panel so script can read it and disable some function which i decide to disable. For example one client want forum but another do not need it. i do not want to delete it from code i just want to disable it. The best way for me it make some key which will show all information what is on and what is off.
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
Hmmm very expendable subject. First i guess you've coded  user everything userbased. I mean users of firm first should register themselves as a personal. At that point you should assign a role to them from an admin panel which only you(super admins) can change. Everyone can change their sub personel up to their own role. By using role definitions you can give yourself a superadmin role and can open and close everything. BUT as you know i someone like us captures the php files there is nothing you can do unless you encode and secure your code (by using something like ioncude vs.).

Another approach is the module approach. You may place all the core part of every part in a seperate file and put that in the modules folder. for instance you name the file as forum.module. A code should take a list of that dir and understand what modules are installed and act according to this. By using this method you can easily pur or delete the module file and activate the modules only your clients paid for.

I hope i can light the candle for you :) btw i really wish yo see the codes (apart from modules) if you implement the module approach and finish.
cys bb
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

I am beginning to see some of what you may need,
Some CMS, have all pages accessed from the main page, like this -
so if your user has a special "Key" or unique identifier (md5 is used sometimes for this), then you can block any page call for the forum from a user that does not have that forum enabled.

For making a Key, you might use some code like
$user_name = 'Slick812';
$key = md5($user_name);
// but there are more than one way to do this
// I do not see this Key as something you need to do

Since you have more than one thing to disable, you may need to store a list for each user in a file or database, that lists the areas (functions, pages) that are allowed (or disabled) for that user. Maybe something like -

$sql = "SELECT id,  forum, func1, func2, bloc  FROM userTable WHERE name = 'Slick812' LIMIT 1";
$res = mysql_query($sql);

where " forum, func1, func2, bloc " are the boolean values for a user to have access to the Forum, Function1, Function2, advertising Bloc , or whatever you may need for your uses. And, $forum == true; a boolean. You could store these in the -
information, maybe like -
$_SESSION[$id] = array($forum, $func1, $func2, $bloc);

you could  test for access -
if ($_SESSION[$id][0]) {code for the Forum since it is allowed }

but I can see that depending on your needs and the way you set up your CMS, , and the way you want to access your MySQL database tables, this can get more and more complex as you add more things to allow and to block.
I hope this helps, but I do not have much of an Idea of what you need or how you want to structure the parts (user access, database, sign in, functions) to have it work like you need.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
umaximAuthor Commented:
Ok i have a module system all my module is separate file and class. So I do not need allow or block file for user i need to block it for everyone. I need to make if client do not pay for forum it do not allow to any one go there. So if admin or owner of website try to open forum it said you do not have a permission for this module. Please buy it. So this why i want to have some key so if he will come tomo and pay for forum module i just need to activate it in my admin and it automatically activate on website to. so i do not need to ask him for ftp or access to his hosting. I just want to use some key to identify his website when for example his website will try to open link mywebsite/access.php to check what module is on.
@ umaxim, ,
I can see what you want to do from what you say in your last post here.
But as in all PHP coding, there are more than One way to do that sort of thing.
In my last post - ID:35237184 - I tried to give some information and some php code examples for what might be a way to "START" your development methods, and then test it and then change it until you get something to work, as you want it to work.
But you did not say anything about if you could use my suggestions or not. And You have NOT given enough information about your methods you use in your several different "modules" as to give me any Idea about how to help you, to get the code you need to have something work.

I showed you a way to have a unique KEY
$user_name = 'Slick812';
$key = md5($user_name);

However, I do not know what to suggest as a way of attaching values to this key, since I do not know the ways you want to use these values? ?
Maybe someone else can help you. I can only help if you post a short php code segment and say that it does not work, or how can you change this code to do what you need.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.