30require
'../../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/menubase.class.php';
42$langs->loadLangs(array(
"other",
"admin",
"uxdocumentation"));
44$cancel =
GETPOST(
'cancel',
'alphanohtml');
51$dirstandard = array();
52$dirsmartphone = array();
53$dirmenus = array_merge(array(
"/core/menus/"), (array)
$conf->modules_parts[
'menus']);
54foreach ($dirmenus as $dirmenu) {
55 $dirstandard[] = $dirmenu.
'standard';
56 $dirsmartphone[] = $dirmenu.
'smartphone';
59$action =
GETPOST(
'action',
'aZ09');
65$menu_handler_top = preg_replace(
'/_backoffice.php/i',
'', $menu_handler_top);
66$menu_handler_top = preg_replace(
'/_frontoffice.php/i',
'', $menu_handler_top);
67$menu_handler_smartphone = preg_replace(
'/_backoffice.php/i',
'', $menu_handler_smartphone);
68$menu_handler_smartphone = preg_replace(
'/_frontoffice.php/i',
'', $menu_handler_smartphone);
70$menu_handler = $menu_handler_top;
72if (
GETPOST(
"handler_origine")) {
73 $menu_handler =
GETPOST(
"handler_origine");
76 $menu_handler =
GETPOST(
"menu_handler");
85if ($action ==
'add') {
87 header(
"Location: ".DOL_URL_ROOT.
"/admin/menus/index.php?menu_handler=".$menu_handler);
93 if (
GETPOST(
'menuIdParent',
'alphanohtml') && !is_numeric(
GETPOST(
'menuIdParent',
'alphanohtml'))) {
94 $tmp = explode(
'&',
GETPOST(
'menuIdParent',
'alphanohtml'));
95 foreach ($tmp as $s) {
96 if (preg_match(
'/fk_mainmenu=/', $s)) {
97 $mainmenu = preg_replace(
'/fk_mainmenu=/',
'', $s);
99 if (preg_match(
'/fk_leftmenu=/', $s)) {
100 $leftmenu = preg_replace(
'/fk_leftmenu=/',
'', $s);
105 $langs->load(
"errors");
108 if (!
GETPOST(
'menu_handler')) {
109 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"MenuHandler")),
null,
'errors');
113 if (!$error && !
GETPOST(
'type')) {
114 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Position")),
null,
'errors');
118 if (!$error && !
GETPOST(
'url')) {
119 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"URL")),
null,
'errors');
123 if (!$error && !
GETPOST(
'titre')) {
124 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Title")),
null,
'errors');
128 if (!$error &&
GETPOST(
'menuIdParent',
'alphanohtml') &&
GETPOST(
'type') ==
'top') {
129 setEventMessages($langs->trans(
"ErrorTopMenuMustHaveAParentWithId0"),
null,
'errors');
133 if (!$error && !
GETPOST(
'menuIdParent',
'alphanohtml') &&
GETPOST(
'type') ==
'left') {
134 setEventMessages($langs->trans(
"ErrorLeftMenuMustHaveAParentId"),
null,
'errors');
140 $menu->menu_handler = preg_replace(
'/_menu$/',
'',
GETPOST(
'menu_handler',
'aZ09'));
143 $menu->prefix = (
string)
GETPOST(
'picto',
'restricthtmlallowclass');
150 $menu->showtopmenuinframe =
GETPOSTINT(
'showtopmenuinframe');
152 $menu->mainmenu = (
string)
GETPOST(
'propertymainmenu',
'alphanohtml');
153 if (is_numeric(
GETPOST(
'menuIdParent',
'alphanohtml'))) {
154 $menu->fk_menu = (int)
GETPOST(
'menuIdParent',
'alphanohtml');
156 if (
GETPOST(
'type',
'alphanohtml') ==
'top') {
161 $menu->fk_mainmenu = $mainmenu;
162 $menu->fk_leftmenu = $leftmenu;
165 $result = $menu->create($user);
167 header(
"Location: ".DOL_URL_ROOT.
"/admin/menus/index.php?menu_handler=".
GETPOST(
'menu_handler',
'aZ09'));
176if ($action ==
'update') {
180 if (
GETPOST(
'menuIdParent',
'alphanohtml') && !is_numeric(
GETPOST(
'menuIdParent',
'alphanohtml'))) {
181 $tmp = explode(
'&',
GETPOST(
'menuIdParent',
'alphanohtml'));
182 foreach ($tmp as $s) {
183 if (preg_match(
'/fk_mainmenu=/', $s)) {
184 $mainmenu = preg_replace(
'/fk_mainmenu=/',
'', $s);
186 if (preg_match(
'/fk_leftmenu=/', $s)) {
187 $leftmenu = preg_replace(
'/fk_leftmenu=/',
'', $s);
194 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"URL")),
null,
'errors');
203 $menu->prefix = (
string)
GETPOST(
'picto',
'restricthtmlallowclass');
212 $menu->mainmenu = (
string)
GETPOST(
'propertymainmenu',
'alphanohtml');
213 $menu->showtopmenuinframe =
GETPOSTINT(
'showtopmenuinframe');
215 if (is_numeric(
GETPOST(
'menuIdParent',
'alphanohtml'))) {
216 $menu->fk_menu = (int)
GETPOST(
'menuIdParent',
'alphanohtml');
218 if (
GETPOST(
'type',
'alphanohtml') ==
'top') {
223 $menu->fk_mainmenu = $mainmenu;
224 $menu->fk_leftmenu = $leftmenu;
227 $result = $menu->update($user);
229 setEventMessages($langs->trans(
"RecordModifiedSuccessfully"),
null,
'mesgs');
239 header(
"Location: ".DOL_URL_ROOT.
"/admin/menus/index.php?menu_handler=".$menu_handler);
245 header(
"Location: ".DOL_URL_ROOT.
"/admin/menus/index.php?menu_handler=".$menu_handler);
259llxHeader(
'', $langs->trans(
'Menu'),
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-menus_edit');
262if ($action ==
'create') {
263 print
'<script type="text/javascript">
264 jQuery(document).ready(function() {
265 function init_topleft()
267 if (jQuery("#topleft").val() == \'top\')
269 jQuery("#menuIdParent").prop("disabled", true);
270 jQuery("#menuIdParent").val(\'\');
271 jQuery("#propertymainmenu").removeAttr("disabled");
272 jQuery("#propertymainmenu").val(\'\');
274 if (jQuery("#topleft").val() == \'left\')
276 jQuery("#menuIdParent").removeAttr("disabled");
277 jQuery("#propertymainmenu").prop("disabled", true);
281 jQuery("#topleft").click(function() {
289 print
'<form action="'.DOL_URL_ROOT.
'/admin/menus/edit.php?menuId='.
GETPOSTINT(
'menuId').
'" method="POST" name="formmenucreate" spellcheck="false">';
290 print
'<input type="hidden" name="action" value="add">';
291 print
'<input type="hidden" name="token" value="'.newToken().
'">';
295 print
'<div class="div-table-responsive">';
296 print
'<table class="border centpercent">';
300 $parent_mainmenu =
'';
301 $parent_leftmenu =
'';
306 $sql =
"SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs";
307 $sql .=
" FROM ".MAIN_DB_PREFIX.
"menu as m";
308 $sql .=
" WHERE m.rowid = ".(GETPOSTINT(
'menuId'));
309 $res =
$db->query($sql);
311 while ($menu =
$db->fetch_array($res)) {
312 $parent_rowid = $menu[
'rowid'];
313 $parent_mainmenu = $menu[
'mainmenu'];
314 $parent_leftmenu = $menu[
'leftmenu'];
315 $parent_langs = $menu[
'langs'];
316 $parent_level = $menu[
'level'];
322 print
'<tr><td class="fieldrequired">'.$form->textwithpicto($langs->trans(
'MenuHandler'), $langs->trans(
'DetailMenuHandler')).
'</td>';
324 $formadmin->select_menu_families($menu_handler.(preg_match(
'/_menu/', $menu_handler) ?
'' :
'_menu'),
'menu_handler', array_merge($dirstandard, $dirsmartphone));
326 print
'<td></td></tr>';
329 print
'<tr><td class="nowrap fieldrequired">'.$form->textwithpicto($langs->trans(
'MenuForUsers'), $langs->trans(
'DetailUser')).
'</td>';
330 print
'<td><select class="flat width150" name="user" id="menuuser">';
331 print
'<option value="2" selected>'.$langs->trans(
"AllMenus").
'</option>';
332 print
'<option value="0">'.$langs->trans(
'Internal').
'</option>';
333 print
'<option value="1">'.$langs->trans(
'External').
'</option>';
337 print
'<td></td></tr>';
340 print
'<tr><td class="fieldrequired">'.$langs->trans(
'Position').
'</td><td>';
342 print $langs->trans(
'Left');
343 print
'<input type="hidden" name="type" value="left">';
345 print
'<select name="type" class="flat width150" id="topleft">';
346 print
'<option value=""> </option>';
347 print
'<option value="top"'.(GETPOST(
"type") ==
'top' ?
' selected' :
'').
'>'.$langs->trans(
'Top').
'</option>';
348 print
'<option value="left"'.(GETPOST(
"type") ==
'left' ?
' selected' :
'').
'>'.$langs->trans(
'Left').
'</option>';
353 jQuery(document).ready(function() {
354 jQuery("#topleft").on("change", function() {
355 console.log("We change the type topleft with ");
356 if (jQuery("#topleft").val() == "top") {
357 jQuery(".menuidparent").hide();
359 jQuery(".menuidparent").show();
365 print
'</td><td>'.$langs->trans(
'DetailType').
'</td></tr>';
368 print
'<tr><td class="fieldrequired">'.$langs->trans(
'MainMenuCode').
'</td>';
369 print
'<td><input type="text" class="minwidth300" id="propertymainmenu" name="propertymainmenu" value="'.(GETPOSTISSET(
"propertymainmenu") ?
GETPOST(
"propertymainmenu",
'alphanohtml') :
'').
'"></td>';
371 print $langs->trans(
"Example").
': mytopmenukey';
375 print
'<tr class="menuidparent"><td>'.$langs->trans(
'MenuIdParent').
'</td>';
377 print
'<td>'.$parent_rowid.
'<input type="hidden" name="menuIdParent" value="'.$parent_rowid.
'"></td>';
379 print
'<td><input type="text" class="minwidth300" id="menuIdParent" name="menuIdParent" value="'.(GETPOSTISSET(
"menuIdParent") ?
GETPOST(
"menuIdParent",
'alphanohtml') :
'').
'"></td>';
381 print
'<td>'.$langs->trans(
'DetailMenuIdParent');
382 print
', '.$langs->trans(
"Example").
': fk_mainmenu=abc&fk_leftmenu=def';
386 print
'<tr><td class="fieldrequired">'.$langs->trans(
'Title').
'</td>';
387 print
'<td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag(
GETPOST(
"titre",
'alphanohtml')).
'"></td><td>'.$langs->trans(
'DetailTitre').
'</td></tr>';
390 print
'<tr><td>'.$langs->trans(
'LangFile').
'</td>';
391 print
'<td><input type="text" class="minwidth300" name="langs" value="'.dol_escape_htmltag($parent_langs).
'"></td><td>'.$langs->trans(
'DetailLangs').
'</td></tr>';
394 print
'<tr><td>'.$langs->trans(
'Image').
'</td>';
395 print
'<td><input type="text" class="minwidth300" name="picto" value="'.dol_escape_htmltag(
GETPOST(
"picto",
'alphanohtml')).
'"></td><td>'.$langs->trans(
'Example').
': fa-globe-americas';
396 print
'<span class="opacitymedium small">';
397 print
' ';
398 print
dolButtonToOpenUrlInDialogPopup(
'popup_picto_id', $langs->transnoentitiesnoconv(
"DocIconsList"), $langs->transnoentitiesnoconv(
"DocIconsList"),
'/admin/tools/ui/components/icons.php?hidenavmenu=1&displayMode=icon-only#img-picto-section-list',
'',
'');
403 print
'<tr><td class="fieldrequired">'.$langs->trans(
'URL').
'</td>';
404 print
'<td><input type="text" class="minwidth500" name="url" value="'.dol_escape_htmltag(
GETPOST(
"url",
'alphanohtml')).
'"></td><td>'.$langs->trans(
'DetailUrl').
'</td></tr>';
407 print
'<tr><td>'.$langs->trans(
'OpenLinkInto').
'</td><td><select class="flat" name="target" id="target">';
408 print
'<option value=""'.(isset($menu->target) && $menu->target ==
"" ?
' selected' :
'').
'>'.$langs->trans(
'SameWindow').
'</option>';
409 print
'<option value="_blank"'.(isset($menu->target) && $menu->target ==
"_blank" ?
' selected' :
'').
'>'.$langs->trans(
'NewWindow').
'</option>';
412 print
'</td><td></td></tr>';
416 print
'<tr class="hideforleftmenu"><td>'.$langs->trans(
'ShowTopMenuURLIntoAFrame').
'</td>';
417 print
'<td><input type="checkbox" value="1" name="showtopmenuinframe"'.(GETPOSTINT(
"showtopmenuinframe") ?
' checked="checked"' :
'').
'"></td><td></td></tr>';
421 print
'<tr><td>'.$langs->trans(
'Position').
'</td>';
422 print
'<td><input type="number" class="minwidth50 maxwidth75" name="position" value="'.(GETPOSTISSET(
"position") ?
GETPOSTINT(
"position") : 100).
'"></td><td>'.$langs->trans(
'DetailPosition').
'</td></tr>';
425 print
'<tr><td>'.$langs->trans(
'Enabled').
'</td>';
426 print
'<td><input type="text" class="minwidth500" name="enabled" value="'.(GETPOSTISSET(
'enabled') ?
GETPOST(
"enabled",
'alphanohtml') :
'1').
'"></td><td>'.$langs->trans(
'DetailEnabled').
'</td></tr>';
429 print
'<tr><td>'.$langs->trans(
'Rights').
'</td>';
430 print
'<td><input type="text" class="minwidth500" name="perms" value="'.(GETPOSTISSET(
'perms') ?
GETPOST(
'perms',
'alphanohtml') :
'1').
'"></td><td>'.$langs->trans(
'DetailRight').
'</td></tr>';
437 print $form->buttonsSaveCancel();
440} elseif ($action ==
'edit') {
443 print
'<form action="./edit.php" method="POST" name="formmenuedit" specllcheck="false">';
444 print
'<input type="hidden" name="action" value="update">';
445 print
'<input type="hidden" name="token" value="'.newToken().
'">';
446 print
'<input type="hidden" name="handler_origine" value="'.$menu_handler.
'">';
447 print
'<input type="hidden" name="menuId" value="'.GETPOSTINT(
'menuId').
'">';
451 print
'<div class="div-table-responsive">';
452 print
'<table class="border centpercent">';
459 print
'<tr><td>'.$form->textwithpicto($langs->trans(
'MenuID'), $langs->trans(
'DetailId')).
'</td><td>'.$menu->id.
'</td><td></td></tr>';
462 print
'<tr><td>'.$form->textwithpicto($langs->trans(
'MenuModule'), $langs->trans(
'DetailMenuModule')).
'</td><td>'.(empty($menu->module) ?
'Core' : $menu->module).
'</td><td></td></tr>';
465 if ($menu->menu_handler ==
'all') {
466 $handler = $langs->trans(
'AllMenus');
468 $handler = $menu->menu_handler;
470 print
'<tr><td class="fieldrequired">'.$form->textwithpicto($langs->trans(
'MenuHandler'), $langs->transnoentitiesnoconv(
"DetailMenuHandler")).
'</td><td>'.$handler.
'</td>';
471 print
'<td></td></tr>';
474 print
'<tr><td class="nowrap fieldrequired">'.$langs->trans(
'MenuForUsers').
'</td><td>';
475 print
'<select class="flat" name="user" id="menuuser">';
476 print
'<option value="2"'.($menu->user == 2 ?
' selected' :
'').
'>'.$langs->trans(
"AllMenus").
'</option>';
477 print
'<option value="0"'.($menu->user == 0 ?
' selected' :
'').
'>'.$langs->trans(
'Internal').
'</option>';
478 print
'<option value="1"'.($menu->user == 1 ?
' selected' :
'').
'>'.$langs->trans(
'External').
'</option>';
481 print
'</td><td>'.$langs->trans(
'DetailUser').
'</td></tr>';
484 print
'<tr><td class="fieldrequired">'.$langs->trans(
'Position').
'</td>';
485 print
'<td>'.$langs->trans(ucfirst($menu->type));
486 print
'<input type="hidden" name="type" value="'.$menu->type.
'">';
488 print $langs->transnoentitiesnoconv(
"DetailType");
492 if ($menu->type ==
'top') {
493 print
'<tr><td class="fieldrequired">'.$langs->trans(
'MainMenuCode').
'</td>';
494 print
'<td><input type="text" class="minwidth300" id="propertymainmenu" name="propertymainmenu" value="'.(GETPOST(
"propertymainmenu",
'alphanohtml') ?
GETPOST(
"propertymainmenu",
'alphanohtml') : $menu->mainmenu).
'"></td>';
496 print $langs->trans(
"Example").
': mytopmenukey';
501 print
'<tr class="hideforleftmenu"><td class="fieldrequired">'.$langs->trans(
'MenuIdParent');
503 $valtouse = $menu->fk_menu;
504 if ($menu->fk_mainmenu) {
505 $valtouse =
'fk_mainmenu='.$menu->fk_mainmenu;
507 if ($menu->fk_leftmenu) {
508 $valtouse .=
'&fk_leftmenu='.$menu->fk_leftmenu;
510 print
'<td><input type="text" name="menuIdParent" value="'.dol_escape_htmltag(GETPOSTISSET(
'menuIdParent') ?
GETPOST(
'menuIdParent') : $valtouse).
'" class="minwidth300"></td>';
511 print
'<td>'.$langs->trans(
'DetailMenuIdParent');
512 print
', <span class="opacitymedium">'.$langs->trans(
"Example").
': fk_mainmenu=abc&fk_leftmenu=def</span>';
519 print
'<tr><td class="fieldrequired">'.$langs->trans(
'Title').
'</td>';
520 print
'<td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag($menu->title).
'"></td><td>'.$langs->trans(
'DetailTitre').
'</td></tr>';
523 print
'<tr><td>'.$langs->trans(
'LangFile').
'</td>';
524 print
'<td><input type="text" class="minwidth300" name="langs" value="'.dol_escape_htmltag($menu->langs).
'"></td><td>'.$langs->trans(
'DetailLangs').
'</td></tr>';
527 print
'<tr><td>'.$langs->trans(
'Image').
'</td>';
528 print
'<td><input type="text" class="minwidth300" name="picto" value="'.dol_escape_htmltag($menu->prefix).
'"></td><td>'.$langs->trans(
'Example').
': fa-globe-americas';
529 print
'<span class="opacitymedium small">';
530 print
' ';
531 print
dolButtonToOpenUrlInDialogPopup(
'popup_picto_id', $langs->transnoentitiesnoconv(
"DocIconsList"), $langs->transnoentitiesnoconv(
"DocIconsList"),
'/admin/tools/ui/components/icons.php?hidenavmenu=1&displayMode=icon-only#img-picto-section-list',
'',
'');
536 print
'<tr><td class="fieldrequired">'.$langs->trans(
'URL').
'</td>';
537 print
'<td><input type="text" class="quatrevingtpercent" name="url" value="'.dol_escape_htmltag($menu->url).
'"></td><td>'.$langs->trans(
'DetailUrl').
'</td></tr>';
540 print
'<tr><td>'.$langs->trans(
'OpenLinkInto').
'</td><td>';
541 print
'<select class="flat" id="target" name="target">';
542 print
'<option value=""'.($menu->target ==
"" ?
' selected' :
'').
'>'.$langs->trans(
'SameWindow').
'</option>';
543 print
'<option value="_blank"'.($menu->target ==
"_blank" ?
' selected' :
'').
'>'.$langs->trans(
'NewWindow').
'</option>';
546 print
'</td><td></td></tr>';
549 if (
getDolGlobalString(
"MAIN_FEATURE_TO_SHOW_TOP_MENU_URL_IN_FRAME") && $menu->type ==
'top') {
550 print
'<tr class="hideforleftmenu"><td>'.$langs->trans(
'ShowTopMenuURLIntoAFrame').
'</td>';
551 print
'<td><input type="checkbox" value="1" name="showtopmenuinframe" '.($menu->showtopmenuinframe ?
' checked="checked"' :
'').
'"></td><td></td></tr>';
555 print
'<tr><td>'.$langs->trans(
'Position').
'</td>';
556 print
'<td><input type="number" class="minwidth50 maxwidth75" name="position" value="'.((int) $menu->position).
'"></td><td>'.$langs->trans(
'DetailPosition').
'</td></tr>';
559 print
'<tr><td>'.$langs->trans(
'Enabled').
'</td>';
560 print
'<td><input type="text" class="minwidth500" name="enabled" value="'.dol_escape_htmltag($menu->enabled).
'"></td><td>'.$langs->trans(
'DetailEnabled');
561 if (!empty($menu->enabled)) {
562 print
' <span class="opacitymedium">('.$langs->trans(
"ConditionIsCurrently").
':</span> '.
yn((
int)
dol_eval((
string) $menu->enabled, 1, 1,
'1') <= 0 ? 0 : 1).
')';
567 print
'<tr><td>'.$langs->trans(
'Rights').
'</td>';
568 print
'<td><input type="text" class="minwidth500" name="perms" value="'.dol_escape_htmltag($menu->perms).
'"></td><td>'.$langs->trans(
'DetailRight');
569 if (!empty($menu->perms)) {
570 print
' <span class="opacitymedium">('.$langs->trans(
"ConditionIsCurrently").
':</span> '.
yn((
int)
dol_eval((
string) $menu->perms, 1, 1,
'1') <= 0 ? 0 : 1).
')';
579 print $form->buttonsSaveCancel();
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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, $morecssdiv='')
Show tabs of a record.
dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled='', $morecss='classlink button bordertransp', $jsonopen='', $jsonclose='', $accesskey='')
Return HTML code to output a button to open a dialog popup box.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.