<?PHP
// ------------------------------------------------------------------------- //
// <G a n e s h a> - Free Web Based Training System                          //
// ------------------------------------------------------------------------- //
// <G a n e s h a> - Plate-forme de téléformation gratuite et en open source //
// ------------------------------------------------------------------------- //
// Copyright (C) 2001-2003  Anéma Formation  <http://www.anema.fr/>          //
// ------------------------------------------------------------------------- //
//            Developer : Georges CALDEIRA <gcaldeira@anemalab.org>          //
// ------------------------------------------------------------------------- //
//               Infos on project <http://anemalab.org/>                     //
// ------------------------------------------------------------------------- //
//  This program 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.                                      //
//                                                                           //
//  This program 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 this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //

/**
* Page de selection des groupes pour le stagiaire
*
* @author	Georges Caldeira <gcaldeira@anemalab.org>
* @package	GaneshaCommun
*/
	/**
	* include des fichiers + verification de la cnx
	*/
	include_once("anema.inc.php");
	InitPageHtml($st_titre['multigrp'].$guser ) ;

?>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="30%" valign="middle"><a href="<?PHP echo HTTP_MAIN ?>index<?PHP echo $ext ?>" target="_top" onMouseOver="window.status='<?PHP echo $header['exit']?> Ganesha';return true;" onMouseOut="window.status='Ganesha <?PHP echo VERSION?>';return true;" >
    <img src="<?PHP echo HTTP_IMAGES ?>logo_small.gif" border="0" alt="<?PHP echo $header['exit']?> Ganesha"></A>
    </td>
    <td width="30%" align="middle" valign="middle">&nbsp;</td>
    <td width="40%" valign="bottom">
	<div align="right"><a href="http://www.anemalab.org" target="_blank" onMouseOver="window.status='Ganesha by AnemaLab.org';return true;" onMouseOut="window.status='Ganesha <?PHP echo VERSION?>';return true;" >
    <img src="<?PHP echo HTTP_IMAGES ?>ganesha_small_white.gif" alt="Ganesha" border="0" ></a><br><i class="comment"><?PHP echo VERSION?> </i>
    <br><br>
    <b><?PHP echo $TheDate?>
    <br><?PHP echo $header['hello'].CSS($guser) ; ?></b>
    </div>
    </td>
  </tr>
</table>
<?PHP
Title($st_titre['multigrp'].CSS($guser)) ;
BR(5);

put('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
put(' <tr><td width="20%">&nbsp;</td>');
put('     <td width="60%">');
BeginBorder("50%",$color2);
put('       <table width="100%" border="0" cellspacing="0" cellpadding="5">');
put('       <tr align="left" bgColor="'.$color2.'" >');
put('         <td width="30%" class="title2" align="middle" >'.$tu_table['ngroupe'].'</td>');
put('       </tr>');

$last = $ClsMembre->GetGroupe($guserid)	;
$nb	  = $ClsGroupe->InitList($guserid)	;
$ind  = 0 ;
while ( $ret = $ClsGroupe->NextItem() ) {
	$url = HTTP_GANESHA."index".$ext."?connexion=".$gconnexionid."&menu=1&multigroupe=".$ret['id_groupe']	;
	$cur = ($ret['id_groupe']==$last['idgroupe']?"&nbsp;&nbsp;&nbsp;&nbsp;<b>".$st_texte['derniergrp']."</b>":"");
	put('       <tr bgcolor="'.GetColor($ind++).'">');
	$img = '<img src="'.HTTP_IMAGES.'groupe.gif" border="0" alt="">';
	put('         <td><a href="'.$url.'" class="student" >'.$img.'&nbsp;'.CSS(Unreplace($ret['name'])).'</a>'.$cur.'</td>')	;
	put('       </tr>') ;
} 

put('       </table>')	;
CloseBorder()	;
put('     </td>');
put('     <td width="20%">');
defaultNews();
put('     </td>');
put(' </tr></table>');
BR(5)			;
Footer()		;
ClosePageHtml()	;
?>