function smarty_function_andropage($params, &$smarty) { if (count($params) == 0) { $smarty->trigger_error('AndroPage: Missing Arguments'); return; } if (!isset($params['filters'])) { $smarty->trigger_error('AndroPage: Missing filters argument'); return; } $filters = array(); $x1 = explode("|", $params['filters']); foreach ($x1 as $x) { $x2 = explode("=", $x); $filters[$x2[0]] = $x2[1]; } $url = 'index.php?gp_page=' . $params['page'] . '&gp_post=smarty&gp_uid=' . sessionGet('UID') . '&st2login=1&gp_pwd=' . sessionGET('PWD'); foreach ($filters as $filterName => $filterVal) { $url .= '&ap_' . $filterName . '=' . $filterVal; } echo file_get_contents('http://' . $_SERVER['SERVER_NAME'] . '/' . $GLOBALS['AG']['tmpPathInsert'] . $url); }
header('Location: ' . $_SERVER['PHP_SELF']); exit; // $results = mfcsSearch::search($engine->cleanPost['MYSQL']); // if($results === FALSE) throw new Exception("Error retrieving results"); } catch (Exception $e) { log::insert("Data View: Search: Error", 0, 0, $e->getMessage()); errorHandle::errorMsg($e->getMessage()); } } else { if (!is_empty(sessionGet('searchResults'))) { log::insert("Data View: Search: get results"); $results = sessionGet('searchResults'); } else { if (!is_empty(sessionGet('searchQuery'))) { log::insert("Data View: Search: get saved search"); $searchQuery = sessionGET('searchQuery'); try { $results = mfcsSearch::search($searchQuery); if ($results === FALSE) { throw new Exception("Error retrieving results"); } sessionSet("searchResults", $results); } catch (Exception $e) { log::insert("Data View: Search: Error", 0, 0, $e->getMessage()); errorHandle::errorMsg($e->getMessage()); } } else { if (isset($engine->cleanGet['MYSQL']['page'])) { log::insert("Data View: Search: page"); $searchPOST = sessionGet('searchPOST'); if ($searchPOST) {