27require 
'../../main.inc.php';
 
   28require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
 
   29require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
 
   30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
 
   31require_once DOL_DOCUMENT_ROOT.
'/datapolicy/lib/datapolicy.lib.php';
 
   34$langs->loadLangs(array(
'admin', 
'companies', 
'members', 
'datapolicy'));
 
   38$action = 
GETPOST(
'action', 
'aZ09');
 
   39$backtopage = 
GETPOST(
'backtopage', 
'alpha');
 
   44  $l = $langs->defaultlang;
 
   48if (!isModEnabled(
"datapolicy")) {
 
   60include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
 
   62if ($action == 
'setvalue' && $user->admin) {
 
   64  $sub = 
"DATAPOLICYSUBJECT_".$l;
 
   66  $cont = 
"DATAPOLICYCONTENT_".$l;
 
   68  $cont = 
"TXTLINKDATAPOLICYACCEPT_".$l;
 
   70  $cont = 
"TXTLINKDATAPOLICYREFUSE_".$l;
 
   72  $sub = 
"DATAPOLICYACCEPT_".$l;
 
   74  $sub = 
"DATAPOLICYREFUSE_".$l;
 
   95$page_name = 
"datapolicySetup";
 
   99$linkback = 
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
 
  108print 
"<script type='text/javascript'> 
  109        $(document).ready(function(){ 
  110         $('#default_lang').change(function(){ 
  111         lang=$('#default_lang').val(); 
  112                    window.location.replace('" . $_SERVER[
'PHP_SELF'].
"?l='+lang); 
  117print 
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'?l='.$l.
'">';
 
  118print 
'<input type="hidden" name="token" value="'.newToken().
'">';
 
  119print 
'<input type="hidden" name="action" value="setvalue">';
 
  122  print 
'<tr><td>'.$form->editfieldkey(
'DefaultLang', 
'default_lang', 
'', 
null, 0).
'</td><td colspan="3" class="maxwidthonsmartphone">'.
"\n";
 
  123  print 
img_picto(
'', 
'language', 
'class="pictofixedwidth"');
 
  124  print $formadmin->select_language((
GETPOST(
'l') ? 
GETPOST(
'l') : $langs->defaultlang), 
'default_lang', 0, 0, 1, 0, 0, 
'maxwidth200onsmartphone');
 
  127$subject = 
'DATAPOLICYSUBJECT_'.$l;
 
  128$linka = 
'TXTLINKDATAPOLICYACCEPT_'.$l;
 
  129$linkr = 
'TXTLINKDATAPOLICYREFUSE_'.$l;
 
  130$content = 
'DATAPOLICYCONTENT_'.$l;
 
  131$acc = 
'DATAPOLICYACCEPT_'.$l;
 
  132$ref = 
'DATAPOLICYREFUSE_'.$l;
 
  133print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  134print $langs->trans(
'DATAPOLICYSUBJECTMAIL').
'</td><td>';
 
  135print 
'<input type="text" name="'.$subject.
'" value="'.$conf->global->$subject.
'" />';
 
  137print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  138print $langs->trans(
'DATAPOLICYCONTENTMAIL').
'</td><td>';
 
  139print 
'<span class="opacitymedium">';
 
  140print $langs->trans(
'DATAPOLICYSUBSITUTION');
 
  141print 
'__LINKACCEPT__,__LINKREFUSED__,__FIRSTNAME__,__NAME__,__CIVILITY__';
 
  143$doleditor = 
new DolEditor($content, $conf->global->$content, 
'', 250, 
'Full', 
'', 
false, 
true, 1, 200, 70);
 
  146print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  147print $langs->trans(
'TXTLINKDATAPOLICYACCEPT').
'</td><td>';
 
  148print 
'<input type="text" name="'.$linka.
'" value="'.$conf->global->$linka.
'" />';
 
  150print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  151print $langs->trans(
'TXTLINKDATAPOLICYREFUSE').
'</td><td>';
 
  152print 
'<input type="text" name="'.$linkr.
'" value="'.$conf->global->$linkr.
'" />';
 
  154print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  156print $langs->trans(
'DATAPOLICYACCEPT').
'</td><td>';
 
  158$doleditor = 
new DolEditor($acc, $conf->global->$acc, 
'', 250, 
'Full', 
'', 
false, 
true, 1, 200, 70);
 
  161print 
'<tr class"oddeven"><td class="fieldrequired">';
 
  162print $langs->trans(
'DATAPOLICYREFUSE').
'</td><td>';
 
  164print $langs->trans(
'');
 
  165$doleditor = 
new DolEditor($ref, $conf->global->$ref, 
'', 250, 
'Full', 
'', 
false, 
true, 1, 200, 70);
 
  170print 
'<br><center><input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'"></center>';
 
  178print $langs->trans(
'SendAgreementText');
 
  179print 
'<a class="button" href="'.DOL_URL_ROOT.
'/datapolicy/admin/mailing.php">'.$langs->trans(
'SendAgreementRequestByEmail').
'</a>';
 
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
 
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
 
Class to manage a WYSIWYG editor.
 
datapolicyAdminPrepareHead()
Prepare admin pages header.
 
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
 
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
 
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
 
dol_get_fiche_end($notab=0)
Return tab footer of a card.
 
setEventMessage($mesgs, $style='mesgs', $noduplicate=0)
Set event message in dol_events session object.
 
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
 
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
 
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
 
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.