17
Do not mix Smarty code <{.... inside your PHP file. Smarty code is for templates, which need to be loaded by the PHP code first. No need to do that, this will make it only more complex.
If you use Demian's example, you have to place your HTML code by replacing 'HTML CONTENT GOES HERE '.
Before the first PHP ending tag ?> , you must do the validation for the access with PHP code.
With the code snippets I gave you, you can find out about the user his id or the groups he belongs to.
With these you have to do a check for failing (to meet the criteria) eg:
if (!$userisok) {
redirect_header(XOOPS_URL.'/index.php', 3, _NOPERM);
exit();
}
This will prevent the user from seeing the page with a not permitted warning and bring him back to the home page.