Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
eaf6df27
Commit
eaf6df27
authored
18 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Nouveau fichier
parent
0886047c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/docs/index.php
+67
-0
67 additions, 0 deletions
htdocs/docs/index.php
htdocs/docs/pre.inc.php
+117
-0
117 additions, 0 deletions
htdocs/docs/pre.inc.php
htdocs/includes/modules/modDocument.class.php
+131
-0
131 additions, 0 deletions
htdocs/includes/modules/modDocument.class.php
with
315 additions
and
0 deletions
htdocs/docs/index.php
0 → 100644
+
67
−
0
View file @
eaf6df27
<?php
/* Copyright (C) 2007 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$
*/
/**
\file htdocs/docs/index.php
\ingroup document
\brief Page d'accueil module document
\version $Revision$
*/
require
(
"./pre.inc.php"
);
$langs
->
load
(
"admin"
);
if
(
!
$user
->
admin
)
accessforbidden
();
/*
* Affichage page configuration module societe
*
*/
$form
=
new
Form
(
$db
);
llxHeader
();
print_fiche_titre
(
$langs
->
trans
(
"Documents"
),
''
,
'document'
);
print
"<br>"
;
print_titre
(
$langs
->
trans
(
"Documents"
));
print
"<table class=
\"
noborder
\"
width=
\"
100%
\"
>
\n
"
;
print
"<tr class=
\"
liste_titre
\"
>
\n
"
;
print
' <td>'
.
$langs
->
trans
(
"Name"
)
.
'</td>'
;
print
' <td>'
.
$langs
->
trans
(
"Description"
)
.
'</td>'
;
print
' <td>'
.
$langs
->
trans
(
"Example"
)
.
'</td>'
;
print
' <td align="center">'
.
$langs
->
trans
(
"Activated"
)
.
'</td>'
;
print
' <td> </td>'
;
print
"</tr>
\n
"
;
print
'</table>'
;
$db
->
close
();
llxFooter
(
'$Date$ - $Revision$'
);
?>
This diff is collapsed.
Click to expand it.
htdocs/docs/pre.inc.php
0 → 100644
+
117
−
0
View file @
eaf6df27
<?php
/* Copyright (C) 2007 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$
*/
/**
\file htdocs/pre.inc.php
\brief Fichier gestionnaire du menu de gauche de l'accueil
\version $Revision$
*/
require
(
"../main.inc.php"
);
$user
->
getrights
();
function
llxHeader
(
$head
=
""
)
{
global
$user
,
$conf
,
$langs
;
top_menu
(
$head
);
$menu
=
new
Menu
();
if
(
$conf
->
societe
->
enabled
&&
$user
->
rights
->
societe
->
lire
)
{
$langs
->
load
(
"companies"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/societe.php"
,
$langs
->
trans
(
"Companies"
));
if
(
is_dir
(
"societe/groupe"
))
{
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/societe/groupe/index.php"
,
$langs
->
trans
(
"MenuSocGroup"
));
}
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/contact/index.php"
,
$langs
->
trans
(
"Contacts"
));
}
if
(
$conf
->
commercial
->
enabled
&&
$user
->
rights
->
commercial
->
lire
)
{
$langs
->
load
(
"commercial"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/comm/index.php"
,
$langs
->
trans
(
"Commercial"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/clients.php"
,
$langs
->
trans
(
"Customers"
));
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/prospect/prospects.php"
,
$langs
->
trans
(
"Prospects"
));
if
(
$user
->
rights
->
propale
->
lire
)
{
$langs
->
load
(
"propal"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/comm/propal.php"
,
$langs
->
trans
(
"Prop"
));
}
}
if
(
$conf
->
compta
->
enabled
||
$conf
->
comptaexpert
->
enabled
)
{
$langs
->
load
(
"compta"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/compta/index.php"
,
$langs
->
trans
(
"MenuFinancial"
));
if
(
$user
->
rights
->
facture
->
lire
)
{
$langs
->
load
(
"bills"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/compta/facture.php"
,
$langs
->
trans
(
"Bills"
));
}
}
if
(
$conf
->
fichinter
->
enabled
&&
$user
->
rights
->
ficheinter
->
lire
)
{
$langs
->
trans
(
"interventions"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fichinter/index.php"
,
$langs
->
trans
(
"Interventions"
));
}
if
((
$conf
->
produit
->
enabled
||
$conf
->
service
->
enabled
)
&&
$user
->
rights
->
produit
->
lire
)
{
$langs
->
load
(
"products"
);
$chaine
=
""
;
if
(
$conf
->
produit
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Products"
);
}
if
(
$conf
->
produit
->
enabled
&&
$conf
->
service
->
enabled
)
{
$chaine
.
=
"/"
;
}
if
(
$conf
->
service
->
enabled
)
{
$chaine
.
=
$langs
->
trans
(
"Services"
);
}
$menu
->
add
(
DOL_URL_ROOT
.
"/product/index.php"
,
"
$chaine
"
);
}
if
(
$conf
->
commande
->
enabled
&&
$user
->
rights
->
commande
->
lire
)
{
$langs
->
load
(
"orders"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/commande/index.php"
,
$langs
->
trans
(
"Orders"
));
}
if
(
$conf
->
document
->
enabled
)
{
$menu
->
add
(
DOL_URL_ROOT
.
"/docs/index.php"
,
$langs
->
trans
(
"Documents"
));
}
if
(
$conf
->
fournisseur
->
enabled
&&
$user
->
rights
->
fournisseur
->
commande
->
lire
)
{
$langs
->
load
(
"suppliers"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/fourn/index.php"
,
$langs
->
trans
(
"Suppliers"
));
}
left_menu
(
$menu
->
liste
);
}
?>
This diff is collapsed.
Click to expand it.
htdocs/includes/modules/modDocument.class.php
0 → 100644
+
131
−
0
View file @
eaf6df27
<?php
/* Copyright (C) 2007 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$
*/
/**
\defgroup document Module document
\brief Module pour gérer le suivi des documents
*/
/**
\file htdocs/includes/modules/modDocument.class.php
\ingroup document
\brief Fichier de description et activation du module Document
*/
include_once
"DolibarrModules.class.php"
;
/**
\class modDocument
\brief Classe de description et activation du module Document
*/
class
modDocument
extends
DolibarrModules
{
/**
* \brief Constructeur. Definit les noms, constantes et boites
* \param DB handler d'accès base
*/
function
modDocument
(
$DB
)
{
$this
->
db
=
$DB
;
$this
->
id
=
'document'
;
// Same value xxx than in file modXxx.class.php file
$this
->
numero
=
51
;
$this
->
family
=
"other"
;
$this
->
name
=
"Document"
;
$this
->
description
=
"Gestion des documents"
;
$this
->
revision
=
explode
(
' '
,
'$Revision$'
);
$this
->
version
=
$this
->
revision
[
1
];
$this
->
const_name
=
'MAIN_MODULE_DOCUMENT'
;
$this
->
special
=
2
;
//$this->picto='document';
// Dir
$this
->
dirs
=
array
();
$this
->
dirs
[
0
]
=
DOL_DATA_ROOT
.
"/ged"
;
// Config pages
$this
->
config_page_url
=
array
(
"document.php"
);
// Dépendances
$this
->
depends
=
array
();
$this
->
requiredby
=
array
();
$this
->
conflictwith
=
array
();
$this
->
langfiles
=
array
(
"orders"
,
"bills"
,
"companies"
);
// Constantes
$this
->
const
=
array
();
// Boites
$this
->
boxes
=
array
();
// Permissions
$this
->
rights
=
array
();
$this
->
rights_class
=
'document'
;
$r
=
0
;
$this
->
rights
[
$r
][
0
]
=
510
;
$this
->
rights
[
$r
][
1
]
=
'Lire les documents'
;
$this
->
rights
[
$r
][
2
]
=
'r'
;
$this
->
rights
[
$r
][
3
]
=
1
;
$this
->
rights
[
$r
][
4
]
=
'lire'
;
$r
++
;
$this
->
rights
[
$r
][
0
]
=
511
;
$this
->
rights
[
$r
][
1
]
=
'Supprimer les documents clients'
;
$this
->
rights
[
$r
][
2
]
=
'd'
;
$this
->
rights
[
$r
][
3
]
=
0
;
$this
->
rights
[
$r
][
4
]
=
'supprimer'
;
}
/**
* \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
* Définit également les répertoires de données à créer pour ce module.
*/
function
init
()
{
global
$conf
;
// Permissions
$this
->
remove
();
$sql
=
array
();
return
$this
->
_init
(
$sql
);
}
/**
* \brief Fonction appelée lors de la désactivation d'un module.
* Supprime de la base les constantes, boites et permissions du module.
*/
function
remove
()
{
$sql
=
array
();
return
$this
->
_remove
(
$sql
);
}
}
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment