Просмотр поста

.
nalajcie

i do it in other way (in my opinion better)

So first is to create a stop.php file and put it in /incfiles/ folder.
stop.php content is simple

<div class="YOUROWNCLASS"><br/>Access to site only for<br/>REGISTERED USERS<br/><br/></div>


Ok and when You do that now its time to put that on every site you want to block from non registered users. Go to file like /forum/index.php or other and find that:

require('../incfiles/core.php');


below that code You input this:

/* non registered blocker */
if (!$user_id)
{
require_once('../incfiles/head.php');
require_once('../incfiles/stop.php');
require_once('../incfiles/end.php');
exit;
}


And it must look like that:
require('../incfiles/core.php');

/* non registered blocker */
if (!$user_id)
{
require_once('../incfiles/head.php');
require_once('../incfiles/stop.php');
require_once('../incfiles/end.php');
exit;
}


And that is all.
Whenever You want to change style of site visible to non registered users you only modify one file stop.php and of course css style which you use in it.

P.S.
If You want to block file in main folder then remember to delete
../
before
incfiles/