well one way to do it; providing the protected files are in a sub directory of your main forum is to copy global.php from the admincp directory into your protected files directory and require it on every protected page, it'll do the rest for you. Same thing cept with global.php from modcp directory if you want to make mod only pages.
this will only work if the files (both global.php and the protected file) are in the same dir which is a sub dir of your main forum ie:
www.yourforums.com/forum/protecteddir/file.php