Location: PHPKode > projects > SkullPuppy > Project/public/index.php
<?php

//error_reporting(E_ALL ^ E_NOTICE);

// bootstrap code
include('../library/SP/Base.php');

// setup the routes
$router = SP_Router::getInstance();

// authenticate
$auth = new SP_Security_Auth();

// check for hackers
$gw = new SP_Security_Gateway();
$gw->idRedirect('/stopHack');
$gw->ipRedirect('/stopIpHack');
$gw->toll(array(
		//'user_id'
	),'id');
$gw->toll(array(
		//'x.x.x.x'
	),'ip');
$gw->collectToll();

// create new controller
$c = new SP_Controller();

// verify auth
if(!$auth->isValid($_SESSION['auth']) &&
		$c->controller != 'login') {
	$_SESSION['REDIRECTER'] = SP_HTTP::getFullUrl();
	SP_HTTP::location(SP_HTTP::url(array(
		controller => 'login'
	)));
}

// dispatch controller
$c->dispatch();

?>
Return current item: SkullPuppy