File: /home/mckernan/public_html/iJournal/index.php
<?php
set_time_limit(0);
// init
define('DB_PREFIX', 'mckernan_ijnl_');
// include files
require "includes/functions.php";
// get request
if (isset($_POST['mod'])) $mode = $_POST['mod'];
if (isset($_POST['act'])) $action = $_POST['act'];
if (isset($_GET['mod'])) $mode = $_GET['mod'];
if (isset($_GET['act'])) $action = $_GET['act'];
$mode = whitelist_request('mode', $mode);
$action = whitelist_request('action', $mode, $action);
$inc = "includes/" . $mode . "/" . $action . ".php";
// get sid
$sid = getRawSID();
// process request
if (file_exists($inc))
{
require $inc;
}
else
{
header('Server: ');
header('X-Powered-By: ');
header("HTTP/1.0 404 Not Found");
}
?>