01-22-2019, 01:47 PM
There are 2 things you can do with ajax parser files. I tend not to like to clog up my pages table with parser files, so I tend to not use the securePage function and instead do something like...
require_once("../../users/init.php"); /obviously with your own path
$db = DB::getInstance();
if(!hasPerm([2,3],$user->data()->id)){
die("Not logged in");
}
If you really want the parsers files to use securePage, then you have to add the folder that they're stored in to the z_us_root file.
require_once("../../users/init.php"); /obviously with your own path
$db = DB::getInstance();
if(!hasPerm([2,3],$user->data()->id)){
die("Not logged in");
}
If you really want the parsers files to use securePage, then you have to add the folder that they're stored in to the z_us_root file.