<?php
/**
 * Search page
 * 
 * Search page for admin UI only
 * 
 * @package linea21\core\admin
 * @author $Author$ - linea21 <info@linea21.com>
 * @version $Id$ 
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
ob_start();
session_start();

if(!isset($_SESSION['authenticated'])) 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('../languages/'.U_L.'/lang_common.'. CHARSET . '.php');
include('../languages/'.U_L.'/lang_search.'. CHARSET . '.php');
IncludeUserfiles();


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(THEME_ADMIN_PATH."index.php");
?>