5
Where is the file located?
cp_header.php is only to be included from modules/[name]/admin
If you need to put access restrictions on pages in the modules/[name]/ folder, you should use code similar to your previously mentioned
if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->mid())) {
$isadmin = true;
} else {
$isadmin = false;
}