I have added a page to my site to post some charts. I used the code from the appgini website tutorial.
Code: Select all
<?php
define('PREPEND_PATH', '../');
$hooks_dir = dirname(__FILE__);
include("$hooks_dir/../defaultLang.php");
include("$hooks_dir/../language.php");
include("$hooks_dir/../lib.php");
/* grant access to the groups 'Admins' and 'Data entry' */
include_once("$hooks_dir/../header.php");
$mi = getMemberInfo();
if(!in_array($mi['group'], array('Admins'))){
echo "Access denied";
exit;
}
echo 'Welcome to the SERP COVID19 Live Dashboard';
include_once("$hooks_dir/../footer.php");
?>
The page works great locally. But on the server in takes minutes to load.
If I just post the page without the code above it loads fine, as does the charts. Of course I want to use the code above to limit access and to have to page look like my others.
Anything look wrong with the code? Any thoughts?
Thanks in advance.
Jim