2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'upstream/develop' into psr2squizwhite

This commit is contained in:
Frédéric FRANCE
2019-02-03 22:41:57 +01:00
1546 changed files with 29438 additions and 33304 deletions

View File

@@ -35,21 +35,21 @@ if (! $user->admin) accessforbidden();
$dirstandard = array();
$dirsmartphone = array();
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
$dirmenus=array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']);
foreach($dirmenus as $dirmenu)
{
$dirstandard[]=$dirmenu.'standard';
$dirsmartphone[]=$dirmenu.'smartphone';
}
$action=GETPOST('action','aZ09');
$action=GETPOST('action', 'aZ09');
$menu_handler_top=$conf->global->MAIN_MENU_STANDARD;
$menu_handler_smartphone=$conf->global->MAIN_MENU_SMARTPHONE;
$menu_handler_top=preg_replace('/_backoffice.php/i','',$menu_handler_top);
$menu_handler_top=preg_replace('/_frontoffice.php/i','',$menu_handler_top);
$menu_handler_smartphone=preg_replace('/_backoffice.php/i','',$menu_handler_smartphone);
$menu_handler_smartphone=preg_replace('/_frontoffice.php/i','',$menu_handler_smartphone);
$menu_handler_top=preg_replace('/_backoffice.php/i', '', $menu_handler_top);
$menu_handler_top=preg_replace('/_frontoffice.php/i', '', $menu_handler_top);
$menu_handler_smartphone=preg_replace('/_backoffice.php/i', '', $menu_handler_smartphone);
$menu_handler_smartphone=preg_replace('/_frontoffice.php/i', '', $menu_handler_smartphone);
$menu_handler=$menu_handler_top;
@@ -69,16 +69,16 @@ if ($action == 'update')
$leftmenu=''; $mainmenu='';
if (! empty($_POST['menuIdParent']) && ! is_numeric($_POST['menuIdParent']))
{
$tmp=explode('&',$_POST['menuIdParent']);
$tmp=explode('&', $_POST['menuIdParent']);
foreach($tmp as $s)
{
if (preg_match('/fk_mainmenu=/',$s))
if (preg_match('/fk_mainmenu=/', $s))
{
$mainmenu=preg_replace('/fk_mainmenu=/','',$s);
$mainmenu=preg_replace('/fk_mainmenu=/', '', $s);
}
if (preg_match('/fk_leftmenu=/',$s))
if (preg_match('/fk_leftmenu=/', $s))
{
$leftmenu=preg_replace('/fk_leftmenu=/','',$s);
$leftmenu=preg_replace('/fk_leftmenu=/', '', $s);
}
}
}
@@ -89,21 +89,21 @@ if ($action == 'update')
{
$menu->titre=GETPOST('titre', 'alpha');
$menu->leftmenu=GETPOST('leftmenu', 'aZ09');
$menu->url=GETPOST('url','alpha');
$menu->langs=GETPOST('langs','alpha');
$menu->position=GETPOST('position','int');
$menu->enabled=GETPOST('enabled','alpha');
$menu->perms=GETPOST('perms','alpha');
$menu->target=GETPOST('target','alpha');
$menu->user=GETPOST('user','alpha');
$menu->mainmenu=GETPOST('propertymainmenu','alpha');
if (is_numeric(GETPOST('menuIdParent','alpha')))
$menu->url=GETPOST('url', 'alpha');
$menu->langs=GETPOST('langs', 'alpha');
$menu->position=GETPOST('position', 'int');
$menu->enabled=GETPOST('enabled', 'alpha');
$menu->perms=GETPOST('perms', 'alpha');
$menu->target=GETPOST('target', 'alpha');
$menu->user=GETPOST('user', 'alpha');
$menu->mainmenu=GETPOST('propertymainmenu', 'alpha');
if (is_numeric(GETPOST('menuIdParent', 'alpha')))
{
$menu->fk_menu=GETPOST('menuIdParent','alpha');
$menu->fk_menu=GETPOST('menuIdParent', 'alpha');
}
else
{
if (GETPOST('type','alpha') == 'top') $menu->fk_menu=0;
if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu=0;
else $menu->fk_menu=-1;
$menu->fk_mainmenu=$mainmenu;
$menu->fk_leftmenu=$leftmenu;
@@ -144,18 +144,18 @@ if ($action == 'add')
}
$leftmenu=''; $mainmenu='';
if (GETPOST('menuId','int') && ! is_numeric(GETPOST('menuId','int')))
if (GETPOST('menuId', 'int') && ! is_numeric(GETPOST('menuId', 'int')))
{
$tmp=explode('&',GETPOST('menuId','int'));
$tmp=explode('&', GETPOST('menuId', 'int'));
foreach($tmp as $s)
{
if (preg_match('/fk_mainmenu=/',$s))
if (preg_match('/fk_mainmenu=/', $s))
{
$mainmenu=preg_replace('/fk_mainmenu=/','',$s);
$mainmenu=preg_replace('/fk_mainmenu=/', '', $s);
}
if (preg_match('/fk_leftmenu=/',$s))
if (preg_match('/fk_leftmenu=/', $s))
{
$leftmenu=preg_replace('/fk_leftmenu=/','',$s);
$leftmenu=preg_replace('/fk_leftmenu=/', '', $s);
}
}
}
@@ -203,33 +203,33 @@ if ($action == 'add')
if (! $error)
{
$menu = new Menubase($db);
$menu->menu_handler=preg_replace('/_menu$/','',GETPOST('menu_handler','aZ09'));
$menu->type=GETPOST('type','alpha');
$menu->titre=GETPOST('titre','alpha');
$menu->url=GETPOST('url','alpha');
$menu->langs=GETPOST('langs','alpha');
$menu->position=GETPOST('position','int');
$menu->enabled=GETPOST('enabled','alpha');
$menu->perms=GETPOST('perms','alpha');
$menu->target=GETPOST('target','alpha');
$menu->user=GETPOST('user','alpha');
$menu->mainmenu=GETPOST('propertymainmenu','alpha');
if (is_numeric(GETPOST('menuId','int')))
$menu->menu_handler=preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09'));
$menu->type=GETPOST('type', 'alpha');
$menu->titre=GETPOST('titre', 'alpha');
$menu->url=GETPOST('url', 'alpha');
$menu->langs=GETPOST('langs', 'alpha');
$menu->position=GETPOST('position', 'int');
$menu->enabled=GETPOST('enabled', 'alpha');
$menu->perms=GETPOST('perms', 'alpha');
$menu->target=GETPOST('target', 'alpha');
$menu->user=GETPOST('user', 'alpha');
$menu->mainmenu=GETPOST('propertymainmenu', 'alpha');
if (is_numeric(GETPOST('menuId', 'int')))
{
$menu->fk_menu=GETPOST('menuId','int');
$menu->fk_menu=GETPOST('menuId', 'int');
}
else
{
if (GETPOST('type','alpha') == 'top') $menu->fk_menu=0;
else $menu->fk_menu=-1;
$menu->fk_mainmenu=$mainmenu;
$menu->fk_leftmenu=$leftmenu;
if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu=0;
else $menu->fk_menu=-1;
$menu->fk_mainmenu=$mainmenu;
$menu->fk_leftmenu=$leftmenu;
}
$result=$menu->create($user);
if ($result > 0)
{
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler','aZ09'));
header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09'));
exit;
}
else
@@ -275,7 +275,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes')
$form=new Form($db);
$formadmin=new FormAdmin($db);
llxHeader('',$langs->trans("Menu"));
llxHeader('', $langs->trans("Menu"));
if ($action == 'create')
@@ -304,7 +304,7 @@ if ($action == 'create')
});
</script>';
print load_fiche_titre($langs->trans("NewMenu"),'','title_setup');
print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup');
print '<form action="./edit.php?action=add&menuId='.GETPOST('menuId', 'int').'" method="post" name="formmenucreate">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -336,7 +336,7 @@ if ($action == 'create')
// Handler
print '<tr><td class="fieldrequired">'.$langs->trans('MenuHandler').'</td>';
print '<td>';
$formadmin->select_menu_families($menu_handler.(preg_match('/_menu/',$menu_handler)?'':'_menu'),'menu_handler',array_merge($dirstandard,$dirsmartphone));
$formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler)?'':'_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone));
print '</td>';
print '<td>'.$langs->trans('DetailMenuHandler').'</td></tr>';
@@ -388,10 +388,10 @@ if ($action == 'create')
print '</td></tr>';
// Title
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST("titre",'alpha')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" class="minwidth300" name="titre" value="'.dol_escape_htmltag(GETPOST("titre", 'alpha')).'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
// URL
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" class="minwidth500" name="url" value="'.GETPOST("url",'alpha').'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('URL').'</td><td><input type="text" class="minwidth500" name="url" value="'.GETPOST("url", 'alpha').'"></td><td>'.$langs->trans('DetailUrl').'</td></tr>';
// Langs
print '<tr><td>'.$langs->trans('LangFile').'</td><td><input type="text" class="minwidth300" name="langs" value="'.$parent_langs.'"></td><td>'.$langs->trans('DetailLangs').'</td></tr>';
@@ -406,10 +406,10 @@ if ($action == 'create')
print '</select></td></td><td>'.$langs->trans('DetailTarget').'</td></tr>';
// Enabled
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" class="minwidth500" name="enabled" value="'.(GETPOSTISSET('enabled')?GETPOST("enabled",'alpha'):'1').'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" class="minwidth500" name="enabled" value="'.(GETPOSTISSET('enabled')?GETPOST("enabled", 'alpha'):'1').'"></td><td>'.$langs->trans('DetailEnabled').'</td></tr>';
// Perms
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" class="minwidth500" name="perms" value="'.(GETPOSTISSET('perms')?GETPOST('perms','alpha'):'1').'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" class="minwidth500" name="perms" value="'.(GETPOSTISSET('perms')?GETPOST('perms', 'alpha'):'1').'"></td><td>'.$langs->trans('DetailRight').'</td></tr>';
print '</table>';
@@ -426,7 +426,7 @@ if ($action == 'create')
}
elseif ($action == 'edit')
{
print load_fiche_titre($langs->trans("ModifMenu"),'','title_setup');
print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup');
print '<br>';
print '<form action="./edit.php?action=update" method="POST" name="formmenuedit">';
@@ -514,12 +514,12 @@ elseif ($action == 'edit')
// Enabled
print '<tr><td>'.$langs->trans('Enabled').'</td><td><input type="text" class="minwidth500" name="enabled" value="'.dol_escape_htmltag($menu->enabled).'"></td><td>'.$langs->trans('DetailEnabled');
if (! empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled,1)).')';
if (! empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled, 1)).')';
print '</td></tr>';
// Perms
print '<tr><td>'.$langs->trans('Rights').'</td><td><input type="text" class="minwidth500" name="perms" value="'.dol_escape_htmltag($menu->perms).'"></td><td>'.$langs->trans('DetailRight');
if (! empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms,1)).')';
if (! empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms, 1)).')';
print '</td></tr>';
print '</table>';

View File

@@ -34,29 +34,29 @@ if (! $user->admin) accessforbidden();
$dirstandard = array();
$dirsmartphone = array();
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
$dirmenus=array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']);
foreach($dirmenus as $dirmenu)
{
$dirstandard[]=$dirmenu.'standard';
$dirsmartphone[]=$dirmenu.'smartphone';
}
$action=GETPOST('action','alpha');
$confirm=GETPOST('confirm','alpha');
$action=GETPOST('action', 'alpha');
$confirm=GETPOST('confirm', 'alpha');
$menu_handler_top=$conf->global->MAIN_MENU_STANDARD;
$menu_handler_smartphone=$conf->global->MAIN_MENU_SMARTPHONE;
$menu_handler_top=preg_replace('/(_backoffice\.php|_menu\.php)/i','',$menu_handler_top);
$menu_handler_top=preg_replace('/(_frontoffice\.php|_menu\.php)/i','',$menu_handler_top);
$menu_handler_smartphone=preg_replace('/(_backoffice\.php|_menu\.php)/i','',$menu_handler_smartphone);
$menu_handler_smartphone=preg_replace('/(_frontoffice\.php|_menu\.php)/i','',$menu_handler_smartphone);
$menu_handler_top=preg_replace('/(_backoffice\.php|_menu\.php)/i', '', $menu_handler_top);
$menu_handler_top=preg_replace('/(_frontoffice\.php|_menu\.php)/i', '', $menu_handler_top);
$menu_handler_smartphone=preg_replace('/(_backoffice\.php|_menu\.php)/i', '', $menu_handler_smartphone);
$menu_handler_smartphone=preg_replace('/(_frontoffice\.php|_menu\.php)/i', '', $menu_handler_smartphone);
$menu_handler=$menu_handler_top;
if (GETPOST("handler_origine")) $menu_handler=GETPOST("handler_origine");
if (GETPOST("menu_handler")) $menu_handler=GETPOST("menu_handler");
$menu_handler_to_search=preg_replace('/(_backoffice|_frontoffice|_menu)?(\.php)?/i','',$menu_handler);
$menu_handler_to_search=preg_replace('/(_backoffice|_frontoffice|_menu)?(\.php)?/i', '', $menu_handler);
/*
@@ -71,7 +71,7 @@ if ($action == 'up')
// Get current position
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql.= " WHERE m.rowid = ".GETPOST("menuId","int");
$sql.= " WHERE m.rowid = ".GETPOST("menuId", "int");
dol_syslog("admin/menus/index.php ".$sql);
$result = $db->query($sql);
$num = $db->num_rows($result);
@@ -89,7 +89,7 @@ if ($action == 'up')
// Menu before
$sql = "SELECT m.rowid, m.position";
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql.= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".GETPOST("menuId","int")."))";
$sql.= " WHERE (m.position < ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid < ".GETPOST("menuId", "int")."))";
$sql.= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'";
$sql.= " AND m.entity = ".$conf->entity;
$sql.= " AND m.type = '".$db->escape($current['type'])."'";
@@ -127,7 +127,7 @@ elseif ($action == 'down')
// Get current position
$sql = "SELECT m.rowid, m.position, m.type, m.fk_menu";
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql.= " WHERE m.rowid = ".GETPOST("menuId","int");
$sql.= " WHERE m.rowid = ".GETPOST("menuId", "int");
dol_syslog("admin/menus/index.php ".$sql);
$result = $db->query($sql);
$num = $db->num_rows($result);
@@ -145,7 +145,7 @@ elseif ($action == 'down')
// Menu after
$sql = "SELECT m.rowid, m.position";
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql.= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".GETPOST("menuId","int")."))";
$sql.= " WHERE (m.position > ".($current['order'])." OR (m.position = ".($current['order'])." AND rowid > ".GETPOST("menuId", "int")."))";
$sql.= " AND m.menu_handler='".$db->escape($menu_handler_to_search)."'";
$sql.= " AND m.entity = ".$conf->entity;
$sql.= " AND m.type = '".$db->escape($current['type'])."'";
@@ -180,7 +180,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes')
$db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
$sql.= " WHERE rowid = ".GETPOST('menuId','int');
$sql.= " WHERE rowid = ".GETPOST('menuId', 'int');
$resql=$db->query($sql);
if ($resql)
{
@@ -211,10 +211,10 @@ $formadmin=new FormAdmin($db);
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
llxHeader('',$langs->trans("Menus"),'','',0,0,$arrayofjs,$arrayofcss);
llxHeader('', $langs->trans("Menus"), '', '', 0, 0, $arrayofjs, $arrayofcss);
print load_fiche_titre($langs->trans("Menus"),'','title_setup');
print load_fiche_titre($langs->trans("Menus"), '', 'title_setup');
$h = 0;
@@ -245,18 +245,18 @@ if ($action == 'delete')
{
$sql = "SELECT m.titre";
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql.= " WHERE m.rowid = ".GETPOST('menuId','int');
$sql.= " WHERE m.rowid = ".GETPOST('menuId', 'int');
$result = $db->query($sql);
$obj = $db->fetch_object($result);
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId','int'),$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".GETPOST('menuId', 'int'), $langs->trans("DeleteMenu"), $langs->trans("ConfirmDeleteMenu", $obj->titre), "confirm_delete");
}
print '<form name="newmenu" class="nocellnopadd" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" action="change_menu_handler">';
print $langs->trans("MenuHandler").': ';
print $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/',$menu_handler)?'':'_menu'),'menu_handler',array_merge($dirstandard,$dirsmartphone));
print $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler)?'':'_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone));
print ' &nbsp; <input type="submit" class="button" value="'.$langs->trans("Refresh").'">';
print '</form>';
@@ -266,8 +266,8 @@ print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("TreeMenuPersonalized").'</td>';
print '<td class="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td>';
print '<td class="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('', 'object_category').' '.$langs->trans("UndoExpandAll").'</a>';
print ' | <a href="#">'.img_picto('', 'object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td>';
print '</tr>';
print '<tr>';
@@ -327,17 +327,17 @@ if ($conf->use_javascript_ajax)
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.
'<strong> &nbsp; <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
'</td><td class="right">'.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
'&nbsp; &nbsp; &nbsp;'.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down","1downarrow").'</a>'.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'.
'</td></tr></table>',
'buttons'=>'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'buttons'=>'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
'&nbsp; &nbsp; &nbsp;'.
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down","1downarrow").'</a>'
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Up", "1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Down", "1downarrow").'</a>'
);
$i++;
}

View File

@@ -29,7 +29,7 @@ $langs->loadLangs(array("user","other","admin"));
if (! $user->admin) accessforbidden();
$action=GETPOST('action','alpha');
$action=GETPOST('action', 'alpha');
/*
@@ -38,13 +38,13 @@ $action=GETPOST('action','alpha');
if ($action == 'activate_hidemenu')
{
dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1','chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1', 'chaine', 0, '', $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
elseif ($action == 'disable_hidemenu')
{
dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity);
dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", $conf->entity);
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
@@ -54,9 +54,9 @@ elseif ($action == 'disable_hidemenu')
* View
*/
llxHeader('',$langs->trans("Setup"));
llxHeader('', $langs->trans("Setup"));
print load_fiche_titre($langs->trans("Menus"),'','title_setup');
print load_fiche_titre($langs->trans("Menus"), '', 'title_setup');
$h = 0;
@@ -93,11 +93,11 @@ print '<td colspan="3">'.$langs->trans("HideUnauthorizedMenu").'</td>';
print '<td align="center">';
if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_hidemenu">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_hidemenu">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_hidemenu">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_hidemenu">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
}
print "</td>";
print '</tr>';