HI all,
i have a website, which i run from one index page..
i call the contents, which are located in another page..
now.. when a member logs in a session called sysuser is created containing their member id..
now the problem comes with the pages, i have three folders..
one is called ADMIN (contains the admin pages)
one is called MEMBER (contains the members pages)
the third is just called Pages (contains the main site)
now, what i have noticed is that if someone types in for instance ?pageid=ADMIN/page
then they can access that page but i need to stop that,.
now i have a small piece of code
if ($sysuser <> "100001")
{
$PageID = str_replace("Admin/","" , $PageID);
}
if ($sysuser == "")
{
$PageID = str_replace("Member/","" , $PageID);
}
which removes the folder name, if they are not logged in.. but now i get a no such file or directory. because for example ADMIN/Member exists but MEMBER does not.
how can i change this so that if Admin/ appears at the starte of PageID it chages Pageid to something else completely..
there are a lot of pages in Admin and Members so i could do it for each page, btu that is a waste of coding..
please help
i have a website, which i run from one index page..
i call the contents, which are located in another page..
now.. when a member logs in a session called sysuser is created containing their member id..
now the problem comes with the pages, i have three folders..
one is called ADMIN (contains the admin pages)
one is called MEMBER (contains the members pages)
the third is just called Pages (contains the main site)
now, what i have noticed is that if someone types in for instance ?pageid=ADMIN/page
then they can access that page but i need to stop that,.
now i have a small piece of code
if ($sysuser <> "100001")
{
$PageID = str_replace("Admin/","" , $PageID);
}
if ($sysuser == "")
{
$PageID = str_replace("Member/","" , $PageID);
}
which removes the folder name, if they are not logged in.. but now i get a no such file or directory. because for example ADMIN/Member exists but MEMBER does not.
how can i change this so that if Admin/ appears at the starte of PageID it chages Pageid to something else completely..
there are a lot of pages in Admin and Members so i could do it for each page, btu that is a waste of coding..
please help