<?php
/**
* @version $Id: version.php,v 1.8 2005/07/21 
* @package Mambo
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/

/** Version information */
class Perfiles {

    var $CONS_PERFIL_0 = 'cantante';
    var $CONS_PERFIL_1 = 'tesorero';
    var $CONS_PERFIL_2 = 'directivo';        
    
	var $Id;
	var $Perfil; //cantante, tesorero, directivo
    var $DataBase;

function Perfiles($pId, $PDataBase){
    $this->DataBase = $PDataBase;    
    $this->Id = $pId;

	$cadena = "select perfil from #__comprofiler WHERE user_id = " . $this->Id;
	$this->DataBase->setQuery($cadena);
	$row = $this->DataBase->loadObjectList();
    $this->Perfil = $row[0]->perfil; 
}

function esTesorero() {
    return ($this->Perfil == $this->CONS_PERFIL_1);
}

function esDirectivo() {
    return ($this->Perfil == $this->CONS_PERFIL_2);
}
//function isAdmin() {	if ($this->id >= "25") { //25 for Super Admin 24 For Administrators group		return true;	} else {	return false;	}}
}
?>
