getArray('search_prefs'); $search_handlers['news'] = ADLAN_0; $search_handlers['comments'] = SEALAN_6; $search_handlers['users'] = SEALAN_7; $search_handlers['downloads'] = ADLAN_24; $search_handlers['pages'] = SEALAN_39; preg_match("/^(.*?)($|-)/", mysql_get_server_info(), $mysql_version); if (version_compare($mysql_version[1], '4.0.1', '<')) { $mysql_supported = false; } else { $mysql_supported = true; } foreach($pref['e_search_list'] as $file) { if (is_readable(e_PLUGIN.$file."/e_search.php") && !isset($search_prefs['plug_handlers'][$file])) { $search_prefs['plug_handlers'][$file] = array('class' => 0, 'pre_title' => 1, 'pre_title_alt' => '', 'chars' => 150, 'results' => 10); $save_search = TRUE; } if (is_readable(e_PLUGIN.$file.'/search/search_comments.php') && !isset($search_prefs['comments_handlers'][$file])) { include_once(e_PLUGIN.$file.'/search/search_comments.php'); $search_prefs['comments_handlers'][$file] = array('id' => $comments_type_id, 'class' => '0', 'dir' => $file); unset($comments_type_id); $save_search = TRUE; } } if (!isset($search_prefs['boundary'])) { $search_prefs['boundary'] = 1; $save_search = TRUE; } if ($save_search) { $serialpref = addslashes(serialize($search_prefs)); $sql -> db_Update("core", "e107_value='".$serialpref."' WHERE e107_name='search_prefs'"); } if (isset($_POST['update_main'])) { foreach($search_handlers as $s_key => $s_value) { $search_prefs['core_handlers'][$s_key]['class'] = $_POST['core_handlers'][$s_key]['class']; $search_prefs['core_handlers'][$s_key]['order'] = $_POST['core_handlers'][$s_key]['order']; } foreach ($search_prefs['plug_handlers'] as $plug_dir => $active) { $search_prefs['plug_handlers'][$plug_dir]['class'] = $_POST['plug_handlers'][$plug_dir]['class']; $search_prefs['plug_handlers'][$plug_dir]['order'] = $_POST['plug_handlers'][$plug_dir]['order']; } foreach ($search_prefs['comments_handlers'] as $key => $value) { $search_prefs['comments_handlers'][$key]['class'] = $_POST['comments_handlers'][$key]['class']; } $search_prefs['google'] = $_POST['google']; $tmp = addslashes(serialize($search_prefs)); admin_update($sql -> db_Update("core", "e107_value='".$tmp."' WHERE e107_name='search_prefs'")); } if (isset($_POST['update_handler'])) { if ($query[1] == 'c') { $handler_type = 'core_handlers'; } else if ($query[1] == 'p') { $handler_type = 'plug_handlers'; } $search_prefs[$handler_type][$query[2]]['class'] = $_POST['class']; $search_prefs[$handler_type][$query[2]]['chars'] = $tp -> toDB($_POST['chars']); $search_prefs[$handler_type][$query[2]]['results'] = $tp -> toDB($_POST['results']); $search_prefs[$handler_type][$query[2]]['pre_title'] = $_POST['pre_title']; $search_prefs[$handler_type][$query[2]]['pre_title_alt'] = $tp -> toDB($_POST['pre_title_alt']); $tmp = addslashes(serialize($search_prefs)); admin_update($sql -> db_Update("core", "e107_value='".$tmp."' WHERE e107_name='search_prefs'")); } if (isset($_POST['update_prefs'])) { $search_prefs['relevance'] = $_POST['relevance']; $search_prefs['user_select'] = $_POST['user_select']; $search_prefs['multisearch'] = $_POST['multisearch']; $search_prefs['selector'] = $_POST['selector']; $search_prefs['time_restrict'] = $_POST['time_restrict']; $search_prefs['time_secs'] = $_POST['time_secs'] > 300 ? 300 : $tp -> toDB($_POST['time_secs']); if ($_POST['search_sort'] == 'mysql') { if ($mysql_supported) { $search_prefs['mysql_sort'] = TRUE; } else { $search_prefs['mysql_sort'] = FALSE; $ns -> tablerender(LAN_ERROR, "