This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
MatritumCantat_Web/www/includes/perfiles.php
2012-09-18 20:02:43 +00:00

41 lines
1.0 KiB
PHP

<?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; }}
}
?>