Code: Select all
if($_GET['page'] == 'page1') {
include('page1.php');
} elseif($_GET['page'] == 'settings') {
include('settings.php');
} elseif($_GET['page'] == 'info') {
include('info.php');
} else {
include('404.php');
}Code: Select all
<?php
session_start();
if(!$_SESSION['user']) {
header("Location: index.php");
die();
} elseif((!is_numeric($_GET['userID'])) || (strlen($_GET['userID']) == 0)) {
header("Location: main.php");
die();
} else {
if($_SESSION['admin_id'] != $_GET['userID']) {
if($_SESSION['access'] < 2) {
// Carry on!
} else {
header("Location: main.php?page=settings&userID=".$_SESSION['admin_id']);
die();
}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...Code: Select all
if($_SESSION['admin_id'] != $_GET['userID']) {
if($_SESSION['access'] < 2) {
// Carry on!
} else {
header("Location: main.php?page=settings&userID=".$_SESSION['admin_id']);
die();
}
}Code: Select all
<?php
session_start();
if(!$_SESSION['user']) {
header("Location: index.php");
die();
} elseif((!is_numeric($_GET['userID'])) || (strlen($_GET['userID']) == 0)) {
header("Location: main.php");
die();
} elseif(($_SESSION['admin_id'] != $_GET['userID']) && ($_SESSION['access'] < 2)) {
header("Location: main.php?page=settings&userID=".$_SESSION['admin_id']);
die();
} else {?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">...