log::insert("Data Entry: Object: Error", 0, 0, $e->getMessage()); errorHandle::errorMsg($e->getMessage()); $error = TRUE; } // build the form for displaying if (forms::validID()) { try { if (($builtForm = forms::build($engine->cleanGet['MYSQL']['formID'], $engine->cleanGet['MYSQL']['objectID'], $error)) === FALSE) { throw new Exception("Error building form."); } localvars::add("form", $builtForm); localvars::add("leftnav", navigation::buildProjectNavigation($engine->cleanGet['MYSQL']['formID'])); localvars::add("objectID", $engine->cleanGet['MYSQL']['objectID']); ////////// // Project Tab Stuff $selectedProjects = objects::getProjects($engine->cleanGet['MYSQL']['objectID']); localVars::add("projectOptions", projects::generateProjectChecklist($selectedProjects)); // Project Tab Stuff ////////// } catch (Exception $e) { log::insert("Data Entry: Object: Error", $engine->cleanGet['MYSQL']['objectID'], $engine->cleanGet['MYSQL']['formID'], $e->getMessage()); errorHandle::errorMsg($e->getMessage()); } } localVars::add("results", displayMessages()); // Display warning if form is not part of current project forms::checkFormInCurrentProjects($engine->cleanGet['MYSQL']['formID']); localvars::add("actionHeader", isnull($engine->cleanGet['MYSQL']['objectID']) ? "Add" : "Edit"); localvars::add("parentHeader", isnull($parentObject) ? "" : "<h2>Adding Child to Parent '" . $parentObject['data'][$form['objectTitleField']] . "'</h2>"); $engine->eTemplate("include", "header"); ?>