<?php
/*
* Gallery controller page - galleryadmin.php
* This page is the controller for gallery management
* This page should be used as the admin 'homepage'
*
* Non-database solution
*
* @author Aaron Maclean
*/
// Hardcoded password for authorised people to C-U-D
$password = 'ChangeMe!';
private function create($input){
global $password;
if($input != FALSE){
}
else {
// display form
}
}
private function manage($input){
global $password;
if($input != FALSE){
}
else {
// display form
}
}
// galleryadmin.php?task=
if(isset($_GET['task'])){
switch($_GET['task']){
case 'create':
echo ( (!empty($_POST)) ? create($_POST) : create(FALSE) );
break;
case 'manage':
echo ( (!empty($_POST)) ? manage($_POST) : manage(FALSE) );
break;
default:
echo 'Task not recognised.';
break;
}
}
?>