E
E
eellazy2016-08-10 14:19:58
CMS
eellazy, 2016-08-10 14:19:58

How to separate the client part from the administrator?

Hello!
Interested in the moment when creating your CMS. How to separate the site that the client sees and the site control panel that the administrator sees.
Let's take the same about WordPress.
When you go to / wp-admin, you are redirected to the entrance to the admin panel. How to do the same? So that in the future it would be possible to put your own templates on the site. Can anyone show or throw an example of the structure of such a CMS. Here's what I see now (maybe I'm wrong)
config - a folder with a connection to the database
admin - a folder with the admin part, there are admin part templates, functionality
content - a folder with languages, themes for the client

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr_Romanov, 2016-08-10
@Mr_Romanov

Make the access_level field in the table with users.
After logging in, cache this value, for example, store it in the session so as not to run every time in the database.
Well, if /cabinet/ is the same for both a regular user and an administrator in index.php in 1 period, make an inculd with check.php which, depending on the access_level, adds or subtracts functionality to /cabinet/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question