//redirect as the page is deprecated $http_host = $_SERVER['HTTP_HOST']; $new_script_name = '/articles/index.php?type=1'; $url = "http://".$http_host.$new_script_name; if (!empty($_SERVER["QUERY_STRING"])) $url.="&".$_SERVER['QUERY_STRING']; header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); exit; include_once "/home/togo-dev/htdocs/common/includes/settings.php"; //include_once ('../common/common_includes.php'); //include_once ('../common/settings.php'); include_once ('settings/articles_includes.php'); include_once ('settings/articles_config.php'); include_once ('settings/articles_settings.php'); //include_once ('../pdb/settings/pdb_settings.php'); //include_once ('../pdb/settings/pdb_includes.php'); //include_once ('../news/settings/news_includes.php'); //include_once ('../news/settings/news_settings.php'); $SUB_APP_ID = "ROADTEST"; $MENU_ID = "NEWS"; $ENTRIESPERPAGE = 8; if ($_POST['Clear']) $_REQUEST['search'] = ""; //reset search fields else if($_GET['Clear']) $_REQUEST['search'] = ""; if (trim($_REQUEST['search'])=="") { $search = ""; //make empty string for search } else { $search = trim($_REQUEST['search']); $SEARCH_HIGHLIGHT = true; } if(isset($_REQUEST['makeid']) && $_REQUEST['makeid']>0) { $makeid=$_REQUEST['makeid']; } if (!$type) { //header ("Location: $cb"."?type=1"); //type 1 is news $type=1; //type 1 is news. } if (!$pageid) { $pageid=1; } if (!$makeid) { $makeid=0; } if($makeid>0) { //cater to makeid search $articleCount = count(getArticleCarReviewIDByMakeID($makeid, isArticlesadmin(), $link)); //$articleCount = count(searchArticlesNew (isArticlesAdmin(), -1, $search, 0, 0, array(1))); //echo $articleCount; //echo('a1'); exit; } else { //cater to text and regular query // The following function is replaced by searchArticles //$articleCount = count(getAllArticles(isArticlesAdmin(), $search, 0, 0, 1)); $articleCount = count(searchArticlesNew (isArticlesAdmin(), -1, $search, 0, 0, array(1))); //echo('a2'); exit; } //calculate pages. $pages = new Pages($ENTRIESPERPAGE, $ENTRIESPERPAGE, $articleCount, $pageid); $pageOffset = $pages->getSQLOffset(); $pageLimit = $pages->getSQLLimit(); $arttype = $type; $section = new Section ($type); //$productMakes = getProductMakeForAllArticles($link); if ($articleCount > 0) { if($makeid>0) { $articles = getArticleCarReviewIDByMakeID2($makeid, isArticlesadmin(), $pageOffset, $pageLimit, $link); } else { // The following function is replaced by searchArticles // $articles = getAllArticles(isArticlesAdmin(), $search, $pageOffset, $pageLimit, 1); //echo('aa'); exit; $articles = searchArticlesNew (isArticlesAdmin(), -1, $search, $pageOffset, $pageLimit, array(1)); } } ?> include "../common/includes/doctype.php"; ?>