<?php

// index.php - Front page
// ------------------------------------------------------------------------
// Copyright (c) 2001, 2002 The phpBugTracker Group
// Copyright (c) 2004, 2005 David Han Sze Chuen, Denis Guinnepain for Air Liquide Medical Systems (Taema)
// Copyright (c) 2005, 2006, 2015 Denis Guinnepain
 
// ------------------------------------------------------------------------
// This file is part of Diamentis

// Diamentis 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; either version 2 of the License, or
// (at your option) any later version.

// Diamentis 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 phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------

include 'include.php';

if ($u != 'nobody') {
    $pref = $db->GetOne('select saved_queries from '.TBL_USER_PREF." where user_id='".$u."'");
    if ((isset($pref['saved_queries'])) && ($pref['saved_queries'])) {
	// Grab the saved queries if there are any and user wants them
	$t->assign('queries',
	    $db->getAll("select * from ".TBL_SAVED_QUERY." where user_id = '$u'"));
    }
}
$t->assign('Message',WELCOME_MESSAGE);
$t->wrap('index.html', 'home');

?>
