<?php
/**
 * FusionForge Projects Redirector
 *
 * Copyright 1999-2001 (c) VA Linux Systems
 * Copyright 2002-2004 (c) GForge Team
 * Copyright 2010 (c) FusionForge Team
 * http://fusionforge.org/
 *
 * This file is part of FusionForge. FusionForge 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 Licence, or (at your option)
 * any later version.
 *
 * FusionForge 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 FusionForge; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

require_once 'env.inc.php';
require_once $gfcommon.'include/pre.php';    

//
//	IMPORTANT NOTE!!
//	Setting up the $project object is all being 
//	handled in the logger now
//	This was done so the logger would accurately record these pages
//

//
//	test to see if the logger was successful in setting up the objects
//
if (!$group_id || !$project) {
	exit_no_group();
} else {
	$subpage = getStringFromRequest('subpage');

	if ($subpage == "admin") {
		session_redirect(util_make_url("/project/admin/?group_id=$group_id"));
	} else if ($subpage == "files" || $subpage == "download" || $subpage == "dl") {
		if (getStringFromRequest('subpage2') == "release") {
			session_redirect(util_make_url("/frs/admin/qrs.php?group_id=$group_id"));
		} else {
			session_redirect(util_make_url("/frs/?group_id=$group_id"));
		}
	} else if ($subpage == "cvs") {
		header("Location: ".account_group_cvsweb_url($project->getUnixName()));
		exit();
	} else {
		//show the project summary page
		include $gfwww.'include/project_home.php';
	}
}

// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:

?>
