* User: roessler * Date: 16/09/15 * Time: 1:22 PM */ /** * Backend page for administrators and Staff of Cyril's Classic Cars to add and view models */ require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'config/config.php'; if (isset($_SESSION['authenticated'])) { if ($_SESSION['authenticated'] == true) { $addResult = null; $makeCon = new MakeController(); $modelCon = new ModelController(); if (isset($_POST['hdnAction'])) { if ($_POST['hdnAction'] == 'insert') { $result = $modelCon->insertModel($_POST['txtModelName'], $_POST['txtMakeId']); if ($result->errorInfo()[2] == null) { $addResult = true; } else { $addResult = $result->errorInfo()[2]; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->