Merge pull request #9715 from inoveaconseil/datapolicies
Dolibarization DataPolicies
This commit is contained in:
commit
5d2f34dc1e
@ -91,8 +91,6 @@ class modDataPolicies extends DolibarrModules {
|
||||
'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
|
||||
'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
|
||||
'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
'css' => array('/datapolicies/css/datapolicies.css.php'), // Set this to relative path of css file if module has its own css file
|
||||
'js' => array('/datapolicies/js/datapolicies.js.php'), // Set this to relative path of js file if module must load a js on all pages
|
||||
'hooks' => array('data' => array('membercard', 'contactcard', 'thirdpartycard'), 'entity' => $conf->entity) // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
);
|
||||
|
||||
@ -121,17 +119,17 @@ class modDataPolicies extends DolibarrModules {
|
||||
// 1=>array('datapolicies_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array(
|
||||
array('DATAPOLICIES_TIERS_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_TIERS_PROSPECT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_TIERS_PROSPECT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_TIERS_FOURNISSEUR', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_CONTACT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_CONTACT_PROSPECT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_CONTACT_PROSPECT_CLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_CONTACT_FOURNISSEUR', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_ADHERENT', 'chaine', '', 'Nombre de mois avant suppression des données', 0),
|
||||
array('DATAPOLICIES_TIERS_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_TIERS_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_TIERS_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_TIERS_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_CONTACT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_CONTACT_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_CONTACT_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_CONTACT_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
array('DATAPOLICIES_ADHERENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
|
||||
);
|
||||
|
||||
$country = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
|
||||
@ -235,25 +233,25 @@ class modDataPolicies extends DolibarrModules {
|
||||
|
||||
// Extrafield contact
|
||||
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'thirdparty', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0);
|
||||
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0);
|
||||
|
||||
// Extrafield Tiers
|
||||
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'contact', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0);
|
||||
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0);
|
||||
|
||||
// Extrafield Adherent
|
||||
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'adherent', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', "DATAPOLICIES_consentement", 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', "DATAPOLICIES_opposition_traitement", 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', "DATAPOLICIES_opposition_prospection", 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
|
||||
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0);
|
||||
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseom.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -134,7 +134,7 @@ class ActionsDatapolicies
|
||||
header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv');
|
||||
header('Pragma: no-cache');
|
||||
$object->fetch(GETPOST('socid'));
|
||||
echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL;
|
||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL;
|
||||
echo $object->name . ';';
|
||||
echo ';';
|
||||
echo ';';
|
||||
@ -158,7 +158,7 @@ class ActionsDatapolicies
|
||||
header('Pragma: no-cache');
|
||||
$soc = $object->fetch_thirdparty();
|
||||
|
||||
echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL;
|
||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL;
|
||||
echo $object->lastname . ';';
|
||||
echo $object->firstname . ';';
|
||||
echo $object->getCivilityLabel() . ';';
|
||||
@ -182,7 +182,7 @@ class ActionsDatapolicies
|
||||
header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv');
|
||||
header('Pragma: no-cache');
|
||||
$soc = $object->fetch_thirdparty();
|
||||
echo 'Nom;Prénom;Civilite;Tiers;Poste/Fonction;Adresse;CP;Ville;Département;Pays;Email;Tel Pro;Tel Perso;Tel Portable;Messagerie instantanée;Date de naissance;' . PHP_EOL;
|
||||
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL;
|
||||
echo $object->lastname . ';';
|
||||
echo $object->firstname . ';';
|
||||
echo $object->getCivilityLabel() . ';';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
@ -56,7 +56,6 @@ Class DataPolicies extends Contact
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
//echo "<pre>".print_r($obj,1)."</pre>";
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->rowid);
|
||||
|
||||
@ -92,7 +91,6 @@ Class DataPolicies extends Contact
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
//echo "<pre>".print_r($obj,1)."</pre>";
|
||||
$societe = new Societe($db);
|
||||
$societe->fetch($obj->rowid);
|
||||
|
||||
@ -128,7 +126,6 @@ Class DataPolicies extends Contact
|
||||
$i = 0;
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
//echo "<pre>".print_r($obj,1)."</pre>";
|
||||
$adherent = new Adherent($db);
|
||||
$adherent->fetch($obj->rowid);
|
||||
|
||||
@ -153,7 +150,6 @@ Class DataPolicies extends Contact
|
||||
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
||||
$replyto = $from;
|
||||
$sendto = $contact->email;
|
||||
//echo "<pre>".print_r($contact,1)."</pre>";
|
||||
$code= md5($contact->email);
|
||||
if (!empty($contact->default_lang)) {
|
||||
$l = $contact->default_lang;
|
||||
@ -243,8 +239,8 @@ Class DataPolicies extends Contact
|
||||
|
||||
|
||||
$substitutionarray = array(
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
);
|
||||
$subject = make_substitutions($subject, $substitutionarray);
|
||||
$message = make_substitutions($message, $substitutionarray);
|
||||
@ -308,8 +304,8 @@ Class DataPolicies extends Contact
|
||||
|
||||
|
||||
$substitutionarray = array(
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
);
|
||||
$subject = make_substitutions($subject, $substitutionarray);
|
||||
$message = make_substitutions($message, $substitutionarray);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file rgpd/css/rgpd.css.php
|
||||
* \ingroup rgpd
|
||||
* \brief CSS file for module rgpd.
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled. Language code is found on url.
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1);
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);
|
||||
if (! defined('NOLOGIN')) define('NOLOGIN',1); // File must be accessed by logon page so without login
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
session_cache_limiter(false);
|
||||
|
||||
// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS
|
||||
/*if (empty($user->id) && ! empty($_SESSION['dol_login']))
|
||||
{
|
||||
$user->fetch('',$_SESSION['dol_login']);
|
||||
$user->getrights();
|
||||
}*/
|
||||
|
||||
|
||||
// Define css type
|
||||
header('Content-type: text/css');
|
||||
// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access.
|
||||
// You can use CTRL+F5 to refresh your browser cache.
|
||||
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||
else header('Cache-Control: no-cache');
|
||||
|
||||
?>
|
||||
|
||||
.myclasscss {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Library javascript to enable Browser notifications
|
||||
*/
|
||||
|
||||
if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1');
|
||||
if (!defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1);
|
||||
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1);
|
||||
if (!defined('NOLOGIN')) define('NOLOGIN', 1);
|
||||
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1);
|
||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
|
||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
|
||||
|
||||
/**
|
||||
* \file datapolicies/js/datapolicies.js.php
|
||||
* \ingroup datapolicies
|
||||
* \brief JavaScript file for module datapolicies.
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
$res=0;
|
||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
||||
if (! $res && ! empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res=@include($_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php");
|
||||
// Try main.inc.php into web root detected using web root caluclated from SCRIPT_FILENAME
|
||||
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
|
||||
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
|
||||
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/main.inc.php")) $res=@include(substr($tmp, 0, ($i+1))."/main.inc.php");
|
||||
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/../main.inc.php")) $res=@include(substr($tmp, 0, ($i+1))."/../main.inc.php");
|
||||
// Try main.inc.php using relative path
|
||||
if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php");
|
||||
if (! $res && file_exists("../../../main.inc.php")) $res=@include("../../../main.inc.php");
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
// Define js type
|
||||
header('Content-Type: application/javascript');
|
||||
// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access.
|
||||
// You can use CTRL+F5 to refresh your browser cache.
|
||||
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||
else header('Cache-Control: no-cache');
|
||||
?>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 SuperAdmin
|
||||
# Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
#
|
||||
# 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
|
||||
@ -90,3 +90,4 @@ MailSent = Email has been sent
|
||||
#ERROR
|
||||
ErrorSubjectIsRequired= Error : The subject of email is required. Indicate it in the module setup
|
||||
=Due to a technical problem, we were unable to register your choice. We apologize for that. Contact us to send us your choice.
|
||||
NUMBER_MONTH_BEFORE_DELETION = Number of month before deletion
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 INOVEA CONSEIl info@inovea-conseil.com
|
||||
# Copyright (C) 2018 INOVEA CONSEil info@inovea-conseil.com
|
||||
#
|
||||
# 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
|
||||
@ -94,3 +94,4 @@ MailSent=L'email a bien été envoyé
|
||||
#ERROR
|
||||
ErrorSubjectIsRequired=Erreur : vous n'avez pas indiqué l'objet de l'email dans la configuration
|
||||
=Suite à un problème technique, nous n'avons pas pu enregistrer votre choix. Nous nous en excusons. Contactez-nous pour nous transmettre votre choix.
|
||||
NUMBER_MONTH_BEFORE_DELETION = Nombre de mois avant suppression des données
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
@ -45,14 +45,6 @@ function datapoliciesAdminPrepareHead()
|
||||
$head[$h][2] = 'settings';
|
||||
$h++;
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
//$this->tabs = array(
|
||||
// 'entity:+tabname:Title:@datapolicies:/datapolicies/mypage.php?id=__ID__'
|
||||
//); // to add new tab
|
||||
//$this->tabs = array(
|
||||
// 'entity:-tabname:Title:@datapolicies:/datapolicies/mypage.php?id=__ID__'
|
||||
//); // to remove a tab
|
||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicies');
|
||||
|
||||
return $head;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user