Author Topic: php/HTML Admin panel Structure  (Read 513 times)

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
php/HTML Admin panel Structure
« on: January 27, 2009, 06:36:41 AM »
So with finishing the tutorial and ofcourse adding a few features, i moved onto my admin panel,taken in the suggestions from the last post I have designed this around the "role" system. Each user at login as there "title" checked, which will display a menu system based on there title/rank.

Now fully separating the admin panel from the normal users i created a "admin" folder in my htdocs, in which i moved my admin index,header,footer, and all corresponding files that differ from the normal users UI. Now to call the files from the admin folder was easy

Code: [Select]
header('Location: admin/adminindex.php');
My dilemma is however, how do i go backwards? yes it will load and properly display the /admin folder, but without copying over smarty.php,and login-check.php etc into my admin folder, it will not load.So how would I display from the /admin folder, yet pull library's from the /root folder? I am certain it has to do with specifying a correct location for the file, just unsure how to call a parent item from a subfolder.
« Last Edit: January 27, 2009, 06:42:59 AM by AcidicOne »
People Like You, Are the Reason People Like Me Need Medication

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: php/HTML Admin panel Structure
« Reply #1 on: January 27, 2009, 07:49:16 AM »
./ = current folder
../ = parent folder

You can use it like ../../smarty/ if it's several folders above.

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
Re: php/HTML Admin panel Structure
« Reply #2 on: January 27, 2009, 07:55:29 AM »
as always zeggy you rock,worked like a charm
People Like You, Are the Reason People Like Me Need Medication

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal