<?php

	/*
	*	Gekko - Open Source Web Development Framework
	*	------------------------------------------------------------------------
	*	Copyright (C) 2004-2005, J. Carlos Nieto <xiam@users.sourceforge.net>
	*	This program is Free Software.
	*
	*	@package	Gekko
	*	@license	http://www.gnu.org/copyleft/gpl.html GNU/GPL License 2.0
	*	@author		J. Carlos Nieto <xiam@users.sf.net>
	*	@version	CVS: $Id:$
	*	@link		http://gekkoware.sourceforge.net
	*/

	if (!defined("IN-GEKKO")) die("Get a life!");

	function mkModuleChooser($smodules = null, $all = true) {
		$smodules = explode(",", $smodules);
		$modules = modCore::getModules();
		$modlist[] = mkCheckBox("modules[]", _l("L_ANY"), $all, "*");
		foreach ($modules as $module) {
			if (file_exists(GEKKO_ROOT."modules/$module/main.inc.php")) {
				$modlist[] = mkCheckBox("modules[]", $module, in_array($module, $smodules), $module);
			}
		}
		return implode("<br />", $modlist);
	}
?>