// ******************************************************************* // directory a copy of index.php with some added functions // for use with .htaccess // ******************************************************************* $self = "directory"; //this files name same as in the Files line of .htaccess include("include/config.php"); include("include/common.php"); include("include/functions.php"); //page generation time is may be inaccurate on a multi-CPU box if ($debug == "1" || $timer == "1"){$start_time = getmicrotime();} // determine wether to use SESSION_IDs // simple but should help the more popular bots spider your pages, as well as many automated // recipricol link checkers. You can uncomment the example and enter you browser's user // agent string for testing $agent = $_SERVER['HTTP_USER_AGENT']; if ((stristr($agent, "rchive"))|| // for testing ... // (stristr($agent, "your browser"))|| (stristr($agent, "IE"))|| (stristr($agent, "bot"))|| (stristr($agent, "crawl"))|| (stristr($agent, "index"))|| (stristr($agent, "eeves"))|| (stristr($agent, "eck"))|| (stristr($agent, "link"))|| (stristr($agent, "cooter"))|| (stristr($agent, "slurp"))|| (stristr($agent, "pider"))) { $usesession="no"; } else { include("include/session.php"); $usesession="yes"; session_start(); } // grab the values from the search form // $logic = $_POST['logic'];if (empty($logic)){$term = $_GET['logic'];} $term = $_POST['term'];if (empty($term)){$term = $_GET['term'];} if (!empty($_GET['sr'])){$sr = $_GET['sr'];} if (!empty($_GET['pp'])){$pp = $_GET['pp'];} if (!empty($_GET['cp'])){$cp = $_GET['cp'];} $language = $gl["Language"]; include("include/lang/$language.php"); $theme = $gl["Theme"]; include("themes/$theme/tables.php"); if(!empty($PATH_INFO)){ $url_array = explode("/",$PATH_INFO); if ($url_array[1] == "new.html"){$show="new";} if ($url_array[1] == "popular.html"){$show="pop";} if ($url_array[1] == "cool.html"){$show="cool";} if ($url_array[1] == "add.html"){$show="add";} if ($url_array[1] == "about.html"){$show="about";} if ($url_array[1] == "review.html"){$show="review";} if ($url_array[1] == "update.html"){$show="update";} if ($url_array[1] == "owner.html"){$show="owner";} if ($url_array[1] == "review_add.html"){$show="review_add";} if (is_numeric (ereg_replace (".html", '', $url_array[1]))){ $PID = (ereg_replace (".html", '', $url_array[1])); } } else {$PID ="";} // ////////$here = "$gl[BaseURL]$gl[BasePath]"; ?>
include("themes/$theme/header.php"); include("themes/$theme/navbar.top.php"); if(isset($term)){ include("include/results.php"); include("include/related.php"); } if(isset($show)){ if($show == "new" || $show == "pop" || $show == "cool"){ include("include/show.php"); } else {include("include/$show.php");} } if(!isset($term) and !isset($show)){ if(!isset($PID)){ $PID=0; include("include/main.cats.php"); } else { include("include/line.cat.php"); include("include/main.cats.php"); include("include/sites.php"); include("include/related.php"); } } if ($random == "1"){ include("include/random.php"); } include("themes/$theme/navbar.bottom.php"); if ($timer == "1"){ $stop_time = getmicrotime(); $run_time = $stop_time - $start_time; echo " |