<?php
/**
 * @package linea21.core
 * @subpackage admin
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
ob_start();
session_start();
include_once("../lib/functions_auth.php");

if(!isset($_SESSION['sess_is_known'])) header("Location: login.php");

if(isset($_POST['rub']) || isset($_GET['rub'])) {
  if(isset($_POST['rub'])) $rub=$_POST['rub'];
  if(isset($_GET['rub']))	$rub=$_GET['rub'];
} else $rub='all';


include_once("../config/define.php");
include_once("../config/server.php");

if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
  include_once('../class/system/class.bench.php');
  $bench = new bench();
  $bench->start_bench();
}

include_once("../lib/items.php");
include_once("../lib/lib_common.php");
include('../languages/'.LANGUAGE.'/lang_common.'. CHARSET . '.php');
include('../languages/'.LANGUAGE.'/lang_search.'. CHARSET . '.php');
include_once("../class/system/class.".SQL.".php");

$sql_entity=SQL;
$sql_object = new $sql_entity;
$sql_object -> DBInitialise();
$sql_object -> DBConnexion();


if(strtolower(SQL) == 'pgsql') 
{
  $v=pg_version();
  if(str_replace('.', '', $v['client']) >= '83') {
  echo '<p>Search engine is <strong>not available</strong> for pgsql >= 8.3<br />';
  echo 'Your current version is : <strong>'.$v['client'].'</strong></p>';
  exit;
  }
}


$dir="../search";
$sql_inc_file=$dir."/".SQL.".inc.php";
if(file_exists($sql_inc_file)) include_once($sql_inc_file);
$rub_link="search.php";

include_once("header.php");
include_once($dir."/index.php");
include_once("common_menu.php");
include_once($dir."/quickbox.php");
include_once("footer.php");
?>