<?php
# This file is part of the Savane project
# <http://gna.org/projects/savane/>
#
# $Id: projects 4997 2005-11-17 17:40:38Z yeupou $
#
# Copyright 1999-2000 (c) The SourceForge Crew
# Copyright 2000-2003 (c) Free Software Foundation
#
# Copyright 2002-2005 (c) Mathieu Roy <yeupou--gnu.org>
#
# The Savane project 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.
#
# The Savane project 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 the Savane project; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

# The context of this page cannot be guessed later, we have to hardcode it
define(CONTEXT, "project");
require "./include/pre.php";  

register_globals_off();

# Extract the group name
$pathinfo = basename(ereg_replace("\?.*", "", $_SERVER[REQUEST_URI]));

$res_grp=db_query("SELECT * FROM groups WHERE unix_group_name='".safeinput($pathinfo)."'");


# group was not found

if (db_numrows($res_grp) < 1) {

	echo db_error();
	exit_error("Invalid Group","That group does not exist.");

} else {

	# set up the group_id
        $group_name=$pathinfo;
	$group_id=db_result($res_grp,0,'group_id');

	$project=new Project($group_id);

	# now show the project page
	include ('./include/project_home.php');

}

?>
