03-28-2017, 05:54 AM
Hi,
Im using an index page which is calling all the pages that i want. For exemple when i click on a lick my url is likeAs you can see im getting different parameters and when i set the page "APage.php" to private, it doesn't work, i still can access to the page.
Here a part of the code of my index.php
<div id="wrapper-wrapper">
<?php require("partials/nav.php"); ?>
<div id="page-wrapper" class="admin">
<?php
if (!isset($_GET['page'])){
require("pages/main.php");
}else{
if(isset($_GET['page']) && preg_match("/^[-a-z0-9_&]+$/i",$_GET['page'])){
$page=strtolower($_GET['page']);
if (file_exists("pages/$page.php")){
require ("pages/$page.php");
}else if(file_exists("admin/pages/$page.php")){
require ("admin/pages/$page.php");
}else{
require ("pages/404.php");
}
}else{
require ("pages/404.php");
}
}
?>
</div>
</div>
How can i use the permission without modifying all my php pages ?
Regards,
Im using an index page which is calling all the pages that i want. For exemple when i click on a lick my url is like
Code:
index.php?page=APage.php&projectName=name
Here a part of the code of my index.php
<div id="wrapper-wrapper">
<?php require("partials/nav.php"); ?>
<div id="page-wrapper" class="admin">
<?php
if (!isset($_GET['page'])){
require("pages/main.php");
}else{
if(isset($_GET['page']) && preg_match("/^[-a-z0-9_&]+$/i",$_GET['page'])){
$page=strtolower($_GET['page']);
if (file_exists("pages/$page.php")){
require ("pages/$page.php");
}else if(file_exists("admin/pages/$page.php")){
require ("admin/pages/$page.php");
}else{
require ("pages/404.php");
}
}else{
require ("pages/404.php");
}
}
?>
</div>
</div>
How can i use the permission without modifying all my php pages ?
Regards,