mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
73 lines
1.7 KiB
PHP
73 lines
1.7 KiB
PHP
|
|
<?PHP
|
|||
|
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.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.
|
|||
|
|
*
|
|||
|
|
* $Id$
|
|||
|
|
* $Source$
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
class modProjet
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
* Initialisation
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
Function modProjet($DB)
|
|||
|
|
{
|
|||
|
|
$this->db = $DB ;
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
*
|
|||
|
|
*
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
Function init()
|
|||
|
|
{
|
|||
|
|
/*
|
|||
|
|
* Activation du module
|
|||
|
|
*/
|
|||
|
|
/*
|
|||
|
|
* Permissions
|
|||
|
|
*/
|
|||
|
|
$sql = array(
|
|||
|
|
"insert into llx_rights_def values (40,'Tous les droits sur les projets','projet','a',0);",
|
|||
|
|
"insert into llx_rights_def values (41,'Lire les projets','projet','r',1);",
|
|||
|
|
"insert into llx_rights_def values (42,'Cr<43>er modifier les projets','projet','w',0);",
|
|||
|
|
//"insert into llx_rights_def values (43,'Modifier les projets d\'autrui','projet','m',0);",
|
|||
|
|
"insert into llx_rights_def values (44,'Supprimer les projets','projet','d',0);"
|
|||
|
|
);
|
|||
|
|
|
|||
|
|
for ($i = 0 ; $i < sizeof($sql) ; $i++)
|
|||
|
|
{
|
|||
|
|
$this->db->query($sql[$i]);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
*
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
Function remove()
|
|||
|
|
{
|
|||
|
|
$sql = "DELETE FROM llx_rights_def WHERE module = 'projet';";
|
|||
|
|
$this->db->query($sql);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
?>
|