<?php
/***********************************\
| DanPHPSupport |
| A Support System written in PHP |
|-----------------------------------|
| Written by Daniel Lo Nigro of |
| DanSoft Australia |
| http://www.dansoftaustralia.net/ |
|-----------------------------------|
| Please feel free to distribute |
| this script, as long as this |
| header stays attached. |
\***********************************/
// VERSION: 1.0 (Build 7)
// $Date: 2006-10-13 21:30:59 +1000 (Fri, 13 Oct 2006) $
// $Id: index.php 2 2006-10-13 11:30:59Z daniel15 $
// index.php: The main file
include "includes/Library.php";
// Enable gzip compression
// If you're having problems with pages not loading (particularly with IIS), comment out this line
//ob_start("ob_gzhandler");
// Array of all available pages
$supportPages = array('index', 'kb_cat', 'kb_index', 'kb_search', 'kb_view', 'login', 'register', 'ticket_main', 'ticket_post', 'ticket_submit', 'ticket_view');
// If no page is passed
if (!isset($_GET['page'])) $_GET['page'] = 'index';
// Tell scripts that we are in the support section
define("IN_SUPPORT", true);
$_GET['page'] = htmlentities($_GET['page']);
// Check if it is a valid page
if (!in_array($_GET['page'], $supportPages))
die("ERROR: The page you requested is not a valid page!");
// If page is valid, let's use it!
include "pages/main/page_{$_GET['page']}.php";
?>