include "/srv/athenace/lib/shared/common.php"; include "/srv/athenace/lib/intranet/common.php"; include "/srv/athenace/lib/shared/functions_form.php"; $fields = array("content", "custid", "price", "contactsid", "staffid", "notes"); foreach ($fields as $field) { if (!isset($_POST[$field])) { $_POST[$field] = ''; } } // Check if we have Form Data to process if (isset($_GET['go']) && $_GET['go'] == "y") { $logContent = "\n"; // Insert into DB $quotesNew = new Quotes(); $quotesNew->setCustid($_POST['custid']); $quotesNew->setIncept(time()); $quotesNew->setContent($_POST['content']); $quotesNew->setPrice($_POST['price']); $quotesNew->setNotes($_POST['notes']); $quotesid = $quotesNew->insertIntoDB(); $logresult = logEvent(1, $logContent); header("Location: /quotes/?id=" . $quotesid); exit; } // Define elements for the HTML Header include $pagescript = array('/pub/js/jquery.js'); $pagestyle = array(); include "../tmpl/header.php"; ?> <h1>Add a New Quote</h1>