load('search'); $search = new Search(); $info = $search->search($data); $search_results = $info[0]; $total = $info[1]; $search = $info[2]; if (strlen($search_results) == 0) { $search_results = $lang['search_no_results']; } $template->assign("LIST", $search_results); $template->assign("TOTAL", $total); $text = new Text(); $template->assign("SEARCH_INFO", $text->format_text($search)); $template->assign_if("search_results", 1); $title = $lang['search_results_title']; } else { $tags = new Taglist(); $taglist_s = $tags->list_tags('all', 'form'); $template->assign("SEARCH_TAGS", $taglist_s[0]); $format_list_s = $list->list_lists('', 'form'); $template->assign("SEARCH_LISTS", $format_list_s); $template->assign_if("form", 1); $title = $lang['search_title']; } // Process template $template->assign("PAGE_TITLE", $title); $template->assign("HEAD_TITLE", $site->site_title($title, 1)); $template->pparse("layout/search.tmpl"); ?>