public static function templateMatches($matches) { $search = mfcs::$engine->retTempObj("mfcsSearch"); $attPairs = attPairs($matches[1]); $output = "Error in mfcsSearch"; switch ($attPairs['name']) { case "formList": $output = mfcsSearch::formListing(); break; default: $output = "Error: name function '" . $attPairs['name'] . "' not found."; } return $output; }
$result = users::updateUserProjects(); break; default: break; } } else { if (isset($engine->cleanGet['MYSQL']['action'])) { switch ($engine->cleanGet['MYSQL']['action']) { case 'selectChoices': $field = forms::getField($engine->cleanGet["MYSQL"]['formID'], $engine->cleanGet["MYSQL"]['fieldName']); $fieldChoices = forms::getFieldChoices($field); $result = forms::drawFieldChoices($field, $fieldChoices); die($result); break; case 'searchFormFields': die(mfcsSearch::formFieldOptions($engine->cleanGet["MYSQL"]['formID'])); break; case 'paginationPerPage': $result = users::setField('pagination', $engine->cleanGet["MYSQL"]['perPage']); die(json_encode($result ? "TRUE" : "FALSE")); break; case 'paginationJumpToIDNO': $objects = objects::getAllObjectsForForm($engine->cleanGet['MYSQL']['formID'], "idno"); for ($I = 0; $I < count($objects); $I++) { if (strtolower($objects[$I]['idno']) == strtolower($engine->cleanGet['MYSQL']['idno'])) { header('Location: ' . localvars::get("siteroot") . "dataView/list.php?listType=form&formID=" . $engine->cleanGet['MYSQL']['formID'] . "&page=" . ceil($I / 25)); } } $result = "IDNO not found"; break; }
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); localVars::add("results", displayMessages()); log::insert("Data View: Search: View Page"); $engine->eTemplate("include", "header"); ?>