28require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
42$langs->loadLangs(array(
'admin',
'blockedlog',
'other'));
45if (!$user->admin || empty(
$conf->blockedlog->enabled)) {
50$action =
GETPOST(
'action',
'aZ09');
51$backtopage =
GETPOST(
'backtopage',
'alpha');
60if (preg_match(
'/set_(.*)/', $action, $reg)) {
63 if (is_array($values)) {
64 $values = implode(
',', $values);
68 header(
"Location: ".$_SERVER[
"PHP_SELF"].($withtab ?
'?withtab='.$withtab :
''));
75if (preg_match(
'/del_(.*)/', $action, $reg)) {
78 header(
"Location: ".$_SERVER[
"PHP_SELF"].($withtab ?
'?withtab='.$withtab :
''));
92$block_static->loadTrackedEvents();
94$title = $langs->trans(
"BlockedLogSetup");
95$help_url=
"EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
97llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-blockedlog page-admin_blockedlog');
101 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
104print
load_fiche_titre($langs->trans(
"ModuleSetup").
' '.$langs->trans(
'BlockedLog'), $linkback);
112print
'<span class="opacitymedium">'.$langs->trans(
"BlockedLogDesc").
"</span><br>\n";
116print
'<div class="div-table-responsive">';
117print
'<table class="noborder centpercent">';
118print
'<tr class="liste_titre">';
119print
'<td>'.$langs->trans(
"Key").
'</td>';
120print
'<td>'.$langs->trans(
"Value").
'</td>';
123print
'<tr class="oddeven">';
124print
'<td class="titlefield">';
125print $langs->trans(
"CompanyInitialKey").
'</td><td>';
126print $block_static->getSignature();
131 print
'<tr class="oddeven">';
132 print
'<td>'.$langs->trans(
"BlockedLogAuthorityUrl").img_info($langs->trans(
'BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote')).
'</td>';
133 print
'<td class="right" width="300">';
135 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
136 print
'<input type="hidden" name="token" value="'.newToken().
'">';
137 print
'<input type="hidden" name="action" value="set_BLOCKEDLOG_AUTHORITY_URL">';
138 print
'<input type="hidden" name="withtab" value="'.$withtab.
'">';
139 print
'<input type="text" name="BLOCKEDLOG_AUTHORITY_URL" value="' .
getDolGlobalString(
'BLOCKEDLOG_AUTHORITY_URL').
'" size="40" />';
140 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'">';
146print
'<tr class="oddeven">';
147print
'<td>'.$langs->trans(
"BlockedLogDisableNotAllowedForCountry").
'</td>';
150print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
151print
'<input type="hidden" name="token" value="'.newToken().
'">';
152print
'<input type="hidden" name="action" value="set_BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY">';
153print
'<input type="hidden" name="withtab" value="'.$withtab.
'">';
155$sql =
"SELECT rowid, code as code_iso, code_iso as code_iso3, label, favorite";
156$sql .=
" FROM ".MAIN_DB_PREFIX.
"c_country";
157$sql .=
" WHERE active > 0";
159$countryArray = array();
160$resql = $db->query($sql);
162 while ($obj = $db->fetch_object($resql)) {
163 $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 :
''));
169print $form->multiselectarray(
'BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY', $countryArray, $selected);
170print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'">';
176print
'<tr class="oddeven">';
177print
'<td class="titlefield">';
178print $langs->trans(
"ListOfTrackedEvents").
'</td><td>';
179$arrayoftrackedevents = $block_static->trackedevents;
180foreach ($arrayoftrackedevents as $key => $val) {
181 print $key.
' - '.$langs->trans($val).
'<br>';
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
blockedlogadmin_prepare_head()
Define head array for tabs of blockedlog tools setup pages.
Class to manage Blocked Log.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.