CMS - Admin Controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Smitro

    CMS - Admin Controls

    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.
  • Colin McKinnon

    #2
    Re: CMS - Admin Controls

    Smitro wrote:
    [color=blue]
    > 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?
    >[/color]

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

    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.

    C.

    Comment

    • punkstar

      #3
      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_nam e" and "config_val ue".

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

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

      while($item = mysql_fetch_ass oc($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_lev el" to the table and changing the sql to "SELECT * FROM
      `config` WHERE `access_level` <= '".$my_access_l evel."'";

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

      Comment

      Working...