git-svn-id: https://192.168.0.254/svn/Proyectos.MatritumCantat_Web/trunk@2 8e3496fd-7892-4c45-be36-0ff06e9dacc6
41 lines
1.0 KiB
PHP
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; }}
|
|
}
|
|
?>
|