<?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 options de la partie Admin
* @author	Georges Caldeira <gcaldeira@anemalab.org>
* @package	GaneshaAdmin
*/
	/**
	* include des fichiers + verification de la cnx
	*/
	include_once("anema.inc.php");

	debugf(__FILE__);

	/**#@+
    * @access public
	* @ignore
	*/
	define('SUBMENU',	MENU_OPTION);	
	define('ACTION',	(isset($HTTP_GET_VARS['action'])?$HTTP_GET_VARS['action']:''))	;
	define('PAGE',		HTTP_ADMIN."options.php?menu=2&connexion=".$gconnexionid)	;
	/**#@-*/
	
/**
* Gestion de la page option de l'admin
* @author	Georges Caldeira <gcaldeira@anemalab.org>
* @access	public
* @package	GaneshaAdmin
*/
class PageOptionAdmin {
		
	/**
	* Affiche la liste des societes
	* @access	public
	*/
     function liste() { 
	 	global $color3, $color1, $ad_pmenu, $ad_texte ;
	    GetTitre($ad_pmenu[2]);
	    BR();
		BeginBorder('90%',$color3);
		BR();
        BeginFormulaire(PAGE.'&action=modif_config') ;
        AddTitreText('<b><u>'.$ad_texte['optglobal'].'</u></b>',$color1);
        AddCheck($ad_texte['optgraph'],'OPT_MENU_GRAPH_ACTIVE',1,OPT_MENU_GRAPH_ACTIVE);
        AddCheck($ad_texte['optbno'],'OPT_BNO_ACTIVE',2,OPT_BNO_ACTIVE);
        AddCheck($ad_texte['optavl'],'OPT_EVALANX_ACTIVE',3,OPT_EVALANX_ACTIVE);
        AddCheck($ad_texte['optmail'],'OPT_MAIL_ACTIVE',4,OPT_MAIL_ACTIVE);
        AddCheck($ad_texte['optupload'],'OPT_UPLOAD_ACTIVE',5,OPT_UPLOAD_ACTIVE);
        AddCheck($ad_texte['optskin'],'OPT_SKIN_ACTIVE',8,OPT_SKIN_ACTIVE);
        AddCheck($ad_texte['optcalendar'],'OPT_CALENDAR_ACTIVE',9,OPT_CALENDAR_ACTIVE);
        AddCheck($ad_texte['optnews'],'OPT_NEWS_ACTIVE',10,OPT_NEWS_ACTIVE);
        AddCheck($ad_texte['optmsg'],'OPT_ONLY_OBJECT_WM_ACTIVE',16,OPT_ONLY_OBJECT_WM_ACTIVE);
        AddCheck($ad_texte['optchat'],'OPT_WINDOW_CHAT',17,OPT_WINDOW_CHAT);
        AddCheck($ad_texte['optgrp'],'CREATE_DIR_GRP',18,CREATE_DIR_GRP);
                
        AddTitreText('<b><u>'.$ad_texte['optstag'].'</u></b>',$color1);
        AddCheck($ad_texte['optupdoc'],'OPT_STUDENT_UPLOAD_DOC_ACTIVE',6,OPT_STUDENT_UPLOAD_DOC_ACTIVE);
        AddCheck($ad_texte['optfiche'],'OPT_FICHE_ACTIVE',7,OPT_FICHE_ACTIVE);
        AddCheck($ad_texte['optmembre'],'OPT_STUDENT_SHOW_GROUPE_ACTIVE',11,OPT_STUDENT_SHOW_GROUPE_ACTIVE);
        AddCheck($ad_texte['optgrpmemb'],'OPT_STUDENT_SHOW_RESULT_ACTIVE',12,OPT_STUDENT_SHOW_RESULT_ACTIVE);
        AddCheck($ad_texte['optgrpres'],'OPT_STUDENT_SHOW_DETAIL_ACTIVE',13,OPT_STUDENT_SHOW_DETAIL_ACTIVE);

       	AddTitreText('<b><u>'.$ad_texte['opttut'].'</u></b>',$color1);
        AddCheck($ad_texte['optadmin'],'OPT_AUTORIZ_TUTOR_ADMIN',14,OPT_AUTORIZ_TUTOR_ADMIN);

        AddTitreText('<b><u>'.$ad_texte['optpadmin'].'</u></b>',$color1);
        AddCheck($ad_texte['optright'],'OPT_MENU_ADMIN_LEFT_ACTIVE',15,OPT_MENU_ADMIN_LEFT_ACTIVE);

        EndFormulaire();
        CloseBorder();
        
	    BR();
		BeginBorder('90%',$color3);
		BR();
        BeginFormulaire(PAGE.'&action=modif_config2') ;
        AddTitreText('<b><u>'.$ad_texte['optglobal'].'</u></b>',$color1);
        AddText('Répertoire pour les groupes',DIR_GRP,1,true,10);
        AddText($ad_texte['optcodegrp'],GRP_CODE,2,true,5);
        AddText($ad_texte['optcodemod'],MOD_CODE,3,true,5);
        AddText($ad_texte['opttimeout'],TIME_OUT_CNX,9,true,5);                
        AddTitreText('<b><u>'.$ad_texte['debug'].'</u></b>',$color1);
        AddCheck($ad_texte['optsql'],'TRACE',4,TRACE);
        AddCheck($ad_texte['optadebug'],'DEBUG',5,DEBUG);
        AddCheck($ad_texte['optaicc'],'DEBUG_AICC',6,DEBUG_AICC);
        AddTitreText('<b><u>'.$ad_texte['optupload'].'</u></b>',$color1);
        AddText($ad_texte['optsize'],MAX_FILE_SIZE,7,true,5);
        AddTitreText('<b><u>'.$ad_texte['optwebmail'].'</u></b>',$color1);
        AddText($ad_texte['optcaracwm'],MAX_CAR_MSG_WM,8,true,5);
        EndFormulaire("VerifOpptions2");
        CloseBorder();        
        GoTop();
     }

	/**
	* Supprime un item de la table
	* @access	public
	*/
	function del() {
	}

	/**
	* Affiche un formulaire pour modifier une societe
	* @access	public
	*/
     function modif() { 
     }

	/**
	* Affiche un formulaire pour une societe
	* @access	public
	*/
	function add() {	
	}

	/**
	* Traitement des variables POST et redirection
	* @access	public
	*/	
	function traite_post() {
		global $HTTP_POST_VARS, $ClsOptions;
		if (count($HTTP_POST_VARS) > 0) {
			$url = 	PAGE.'&action=liste';
			switch(ACTION) {
			case 'modif_config':	
				$ClsOptions->update($HTTP_POST_VARS);
				break;
			case 'modif_config2':	
				$ClsOptions->update2($HTTP_POST_VARS);
				break;
			}
			location($url);
			exit();				
		}
	}

	/**
	* Traitement des variables GET et redirection
	* @access	public
	*/		
	function traite_get() {
	}

} // class 


/**
* Instance de la classe PageOptionAdmin
* @var	object	PageOptionAdmin
*/
$ClsPageAdmin = new PageOptionAdmin ;

	
	// Affichage de la page
	pageAdmin();

?>