25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31 $langs->loadLangs(array(
"admin",
"other",
"blockedlog"));
33 if (!$user->admin || empty($conf->blockedlog->enabled))
accessforbidden();
35 $action =
GETPOST(
'action',
'aZ09');
36 $backtopage =
GETPOST(
'backtopage',
'alpha');
38 $withtab =
GETPOST(
'withtab',
'int');
46 if (preg_match(
'/set_(.*)/', $action, $reg))
50 if (is_array($values)) $values = implode(
',', $values);
54 header(
"Location: ".
$_SERVER[
"PHP_SELF"].($withtab ?
'?withtab='.$withtab :
''));
61 if (preg_match(
'/del_(.*)/', $action, $reg))
66 Header(
"Location: ".
$_SERVER[
"PHP_SELF"].($withtab ?
'?withtab='.$withtab :
''));
78 $form =
new Form($db);
81 llxHeader(
'', $langs->trans(
"BlockedLogSetup"));
85 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
96 print '<span class="opacitymedium">'.$langs->trans(
"BlockedLogDesc").
"</span><br>\n";
100 print '<table class="noborder centpercent">';
101 print '<tr class="liste_titre">';
102 print '<td>'.$langs->trans(
"Key").
'</td>';
103 print '<td>'.$langs->trans(
"Value").
'</td>';
106 print '<tr class="oddeven">';
107 print '<td class="titlefield">';
108 print $langs->trans(
"CompanyInitialKey").
'</td><td>';
109 print $block_static->getSignature();
112 if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY)) {
114 print '<tr class="oddeven">';
115 print '<td>'.$langs->trans(
"BlockedLogAuthorityUrl").img_info($langs->trans(
'BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote')).
'</td>';
116 print '<td class="right" width="300">';
118 print '<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
119 print '<input type="hidden" name="token" value="'.newToken().
'">';
120 print '<input type="hidden" name="action" value="set_BLOCKEDLOG_AUTHORITY_URL">';
121 print '<input type="hidden" name="withtab" value="'.$withtab.
'">';
122 print '<input type="text" name="BLOCKEDLOG_AUTHORITY_URL" value="'.$conf->global->BLOCKEDLOG_AUTHORITY_URL.
'" size="40" />';
123 print '<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'">';
129 print '<tr class="oddeven">';
130 print '<td>'.$langs->trans(
"BlockedLogDisableNotAllowedForCountry").
'</td>';
133 print '<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
134 print '<input type="hidden" name="token" value="'.newToken().
'">';
135 print '<input type="hidden" name="action" value="set_BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY">';
136 print '<input type="hidden" name="withtab" value="'.$withtab.
'">';
138 $sql =
"SELECT rowid, code as code_iso, code_iso as code_iso3, label, favorite";
139 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_country";
140 $sql .=
" WHERE active > 0";
142 $countryArray = array();
143 $resql = $db->query($sql);
146 while ($obj = $db->fetch_object(
$resql))
148 $countryArray[$obj->code_iso] = ($obj->code_iso && $langs->transnoentitiesnoconv(
"Country".$obj->code_iso) !=
"Country".$obj->code_iso ? $langs->transnoentitiesnoconv(
"Country".$obj->code_iso) : ($obj->label !=
'-' ? $obj->label :
''));
152 $seledted = empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) ? array() : explode(
',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY);
154 print $form->multiselectarray(
'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY', $countryArray, $seledted);
155 print '<input type="submit" class="button" value="'.$langs->trans(
"Modify").
'">';
161 print '<tr class="oddeven">';
162 print '<td class="titlefield">';
163 print $langs->trans(
"ListOfTrackedEvents").
'</td><td>';
164 $arrayoftrackedevents = $block_static->trackedevents;
165 foreach ($arrayoftrackedevents as $key => $val)
167 print $key.
' - '.$langs->trans($val).
'<br>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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).
blockedlogadmin_prepare_head()
Define head array for tabs of blockedlog tools setup pages.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
Class to manage Blocked Log.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
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.