case 'formShelfList': $list = listGenerator::createFormShelfList($engine->cleanGet['MYSQL']['formID']); $form = forms::get($engine->cleanGet['MYSQL']['formID']); localvars::add('subTitle', ' - ' . $form['title']); $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=selectForm">Select Form</a>', $siteRoot); $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=form&formID=%s">%s</a>', $siteRoot, $form['ID'], $form['title']); break; case 'project': $list = listGenerator::createProjectObjectList($engine->cleanGet['MYSQL']['projectID']); $project = projects::get($engine->cleanGet['MYSQL']['projectID']); localvars::add('subTitle', ' - ' . $project['projectName']); $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=selectProject">Select Project</a>', $siteRoot); $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=project&projectID=%s">%s</a>', $siteRoot, $project['ID'], $project['projectName']); break; case 'all': $list = listGenerator::createAllObjectList(); localvars::add('subTitle', ' - All Objects'); $breadCrumbs[] = sprintf('<a href="%sdataView/list.php?listType=all">All Objects</a>', $siteRoot); break; default: $list = listGenerator::createInitialSelectList(); break; } localvars::add("list", $list); // Make breadcrumbs $crumbs = ''; foreach ($breadCrumbs as $breadCrumb) { $crumbs .= "<li>{$breadCrumb}</li>"; } localvars::add("breadcrumbs", $crumbs); localVars::add("results", displayMessages());
$searchPOST = sessionGet('searchPOST'); if ($searchPOST) { $results = mfcsSearch::search($searchPOST); if ($results === FALSE) { throw new Exception("Error retrieving results"); } } } else { log::insert("Data View: Search: Delete post"); sessionDelete('searchPOST'); } } } } if (isset($results)) { localvars::add("objectTable", listGenerator::createAllObjectList(0, 50, NULL, $results)); } // build the search interface, we do this regardless of try { $interface = mfcsSearch::buildInterface(); localvars::add("searchInterface", $interface); } catch (Exception $e) { log::insert("Data View: Search: Error", 0, 0, $e->getMessage()); errorHandle::errorMsg($e->getMessage()); } // Make breadcrumbs $crumbs = ''; foreach ($breadCrumbs as $breadCrumb) { $crumbs .= "<li>{$breadCrumb}</li>"; } localvars::add("breadcrumbs", $crumbs);