/* ####################################################################### # DWodp live # - version 1.2.5 # - Copyright (c) 2003-2007 Dominion Web Design # - http://www.dominion-web.com/products/dwodp_live/ ####################################################################### # # This file is part of DWodp live. # # DWodp live is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # DWodp live is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with DWodp live; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA # ####################################################################### # You should only need to edit ./includes/config.inc.php and the # templates in ./templates/ directory ####################################################################### */ error_reporting (E_ERROR | E_WARNING | E_PARSE); require ("./includes/config.inc.php"); require ("./includes/classes.inc.php"); global $rooturl, $searchstring, $filename; $filename = $_SERVER['SCRIPT_NAME']; ////////////////////////////////////////////////////////////////////////////// // Get core variables // Set the query string for links depending on whether short mode is selected if ($use_short == 1) { $browseurl = $filename; } else { $browseurl = $filename . "?c="; } // Set the category depending on short mode if ($use_short == 1) { $browse = str_replace($_SERVER['SCRIPT_NAME'], "", $_SERVER['PHP_SELF']); } else { $browse = $_GET['c']; } $searchdecode = 0; if ($_GET['s'] && $use_short <> 1) { $searchdecode = 1; } elseif (strstr($browse, "/search") && $use_short == 1) { $browse = str_replace("/search", "", $browse); $searchdecode = 1; } // Clean up category for invalid characters $browse = CheckSlashesRemove($browse); $browse = str_replace("..", "", $browse); $browse = str_replace("<", "<", $browse); $browse = str_replace(">", ">", $browse); // Set the attribution category if ($browse) { $attributioncat = encodecategory($browse); } else { $attributioncat = "/"; } // Set the search string $searchstring = $_POST['search']; if ($searchstring == "") { $searchstring = $_GET['search']; } $searchstring = str_replace("..", "", $searchstring); $searchstring = str_replace("<", "<", $searchstring); $searchstring = str_replace(">", ">", $searchstring); $start = $_GET['start']; $morecat = $_GET['morecat']; $DocumentEncoding = 'UTF-8'; ////////////////////////////////////////////////////////////////////////////// // Set the breadcrumb trail if (($browse) && ($browse <> "/")) { $cat = $browse; $breadcrumb = "
"; } elseif ($searchstring) { $breadcrumb = ""; } ////////////////////////////////////////////////////////////////////////////// // Set search restriction if category is defined if (($browse <> "") && ($browse <> "/")) { $currentcatfix = substr(encodecategory($browse), 1); $searchoptions = " "; } else { $searchoptions = ""; } ////////////////////////////////////////////////////////////////////////////// // Set the DMOZ template config // Set variables to look for in the DMOZ template // This is the bit that changes when they change their template $LinkStart = '"; // Look for end string on a category $CatEnd = '