| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:47:34 2008 ] | [ phpMyFAQ 1.6.1 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * $Id: search.php,v 1.3.2.12.2.12 2006/05/10 19:55:06 thorstenr Exp $ 4 * 5 * The fulltext search page 6 * 7 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 8 * @author Periklis Tsirakidis <tsirakidis@phpdevel.de> 9 * @since 2002-09-16 10 * @copyright (c) 2001-2006 phpMyFAQ Team 11 * 12 * The contents of this file are subject to the Mozilla Public License 13 * Version 1.1 (the "License"); you may not use this file except in 14 * compliance with the License. You may obtain a copy of the License at 15 * http://www.mozilla.org/MPL/ 16 * 17 * Software distributed under the License is distributed on an "AS IS" 18 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 19 * License for the specific language governing rights and limitations 20 * under the License. 21 */ 22 23 if (!defined('IS_VALID_PHPMYFAQ')) { 24 header('Location: http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])); 25 exit(); 26 } 27 28 // HACK: (re)evaluate the Category object w/o passing the user language 29 // so the result set of a Search will have the Category Path 30 // for any of the multilanguage faq records and the Category list 31 // on the left pane will not be affected 32 $tree = new Category(); 33 $tree->transform(0); 34 35 if (isset($_GET['suchbegriff']) || isset($_GET['search'])) { 36 if (isset($_GET['suchbegriff'])) { 37 $suchbegriff = $db->escape_string(strip_tags($_GET['suchbegriff'])); 38 $searchcategory = isset($_GET['searchcategory']) ? $db->escape_string(strip_tags($_GET['searchcategory'])) : '%'; 39 } 40 if (isset($_GET['search'])) { 41 $suchbegriff = $db->escape_string(strip_tags($_GET['search'])); 42 $searchcategory = isset($_GET['searchcategory']) ? $db->escape_string(strip_tags($_GET['searchcategory'])) : '%'; 43 } 44 $printResult = searchEngine($suchbegriff, $searchcategory); 45 } else { 46 $printResult = $PMF_LANG['help_search']; 47 $suchbegriff = ''; 48 } 49 50 Tracking('fulltext_search', $suchbegriff); 51 52 $tree->buildTree(); 53 54 $baseUrl = 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER["HTTP_HOST"].str_replace ('/index.php', '', $_SERVER['PHP_SELF']); 55 $firefoxPluginTitle = ''; 56 $MSIEPluginTitle = ''; 57 58 if (file_exists(dirname(__FILE__).'/'.$_SERVER['HTTP_HOST'].'.pmfsearch.src')) { 59 $firefoxPluginTitle = '<p><a class="searchplugin" href="javascript:addEngine(\''.$baseUrl.'\', \''.$_SERVER['HTTP_HOST'].'.pmfsearch\', \'png\', \'Web\')">'.$PMF_LANG['ad_search_plugin_install'].'</a></p>'; 60 } 61 if (file_exists(dirname(__FILE__).'/'.$_SERVER['HTTP_HOST'].'.pmfsearch.xml')) { 62 $MSIEPluginTitle = '<p><a class="searchplugin" href="#" onclick="window.external.AddSearchProvider("'.$baseUrl.'/'.$_SERVER['HTTP_HOST'].'.pmfsearch.xml");">'.$PMF_LANG['ad_msiesearch_plugin_install'].'</a></p>'; 63 } 64 65 $tpl->processTemplate('writeContent', array( 66 'msgSearch' => $PMF_LANG['msgSearch'], 67 'searchString' => $suchbegriff, 68 'selectCategories' => $PMF_LANG['msgSelectCategories'], 69 'allCategories' => $PMF_LANG['msgAllCategories'], 70 'printCategoryOptions' => $tree->printCategoryOptions(0), 71 'writeSendAdress' => $_SERVER['PHP_SELF'].'?'.$sids.'action=search', 72 'msgSearchWord' => $PMF_LANG['msgSearchWord'], 73 'printResult' => $printResult, 74 'msgFirefoxPluginTitle' => $firefoxPluginTitle, 75 'msgMSIEPluginTitle' => $MSIEPluginTitle)); 76 77 $tpl->includeTemplate('writeContent', 'index');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |