CMS - Admin Controls

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi, I'm in the middle of building a Content  
Management System to be used by out school. It has  
gotten to the stage where I'm going to have to  
start building admin pages so that others can be  
admins, So I'm going to have to rewrite several  
pages to cater for this. What I'm wondering is,  
what is the best way to store admin variables?  
Should I put them in a table in MySQL or in a flat  
file? Do you think that it would slow my server  
down conciderably if I added another 3 sql querys  
to every page and had 100 users on using the site  
at once?

I'm running it on an IIS server (Server 2003)  
which is not normal for me (I like my Linux), so  
I'm just hoping it doesn't eat away all the memory  
slowly throughout a day.

I know a couple of poeple have created and  
contributed to CMS' before so if you have any tips  
or pointers in this area let me know.

Re: CMS - Admin Controls

Smitro wrote:

Quoted text here. Click to load it

I'm wondering why you need 3 queries to read in the config. Tried joins?

I'd really have to try to make this go slow, even on a Microsoft platform.
If it is a problem write some cacheing code in PHP.


Re: CMS - Admin Controls

admin variables?

why dont you use a table like ipb, i think it is, use. This being a
config table with the column names "config_name" and "config_value".

You can then use one query to pull out all the information.. then:

$sql = "SELECT * FROM `config`";
$dosql = mysql_query($sql,$connect);

while($item = mysql_fetch_assoc($dosql))
  $config[$item['config_name']] = $item['config_value'];

..and then you have all of your config values?

You could even set access levels for all of your admins, to only pull
the variables that they are allowed to access by adding an
"access_level" to the table and changing the sql to "SELECT * FROM
`config` WHERE `access_level` <= '".$my_access_level."'";

How would 100 users be in the admin area? If thats what you meant by
the 3 more queries..

Site Timeline