4
Thanks for the answers.
I solved it using this code.
For now it works well. I'll keep doing tests.
<?php include dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../mainfile.php';
if (isset($GLOBALS['xoopsUser']) && is_object($GLOBALS['xoopsUser'])) { ?>
<html>Any content</html>
<?php }else {redirect_header(XOOPS_URL . "/user.php");} include(XOOPS_ROOT_PATH."/footer.php"); ?>
Thank you and Happy New Year