Correction menu, Typo title and forbidden access for doc

This commit is contained in:
Dany De Bontridder 2015-08-25 01:21:03 +02:00
parent bfeafc5f10
commit b2ca4e1ab4
3 changed files with 18 additions and 14 deletions

View file

@ -1,6 +1,6 @@
<!doctype html>
<HTML><HEAD>
<TITLE>Noaliss - Mise à jour</TITLE>
<TITLE>Noalyss - Mise à jour</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF8">
</title>
<head>

View file

@ -183,19 +183,23 @@ if (isset($_REQUEST['ac']))
pm_id_v3,pm_id_v2,pm_id_v1
from v_menu_profile where code= upper($1) and p_id=$2',
array($AC,$user_profile));
if ( count($amenu_id) != 1 ) {
throw new Exception(_('Erreur menu'));
try {
if ( count($amenu_id) != 1 ) {
throw new Exception(_('Erreur menu'),10);
}
$module_id=$cn->get_value('select case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end
from v_menu_profile where p_id=$1 and upper(code)=upper($2)',
array($user_profile,$AC));
$g_user->audit();
// Show module and highligt selected one
show_module($module_id);
show_menu( $amenu_id[0]['pm_id_v3']);
show_menu( $amenu_id[0]['pm_id_v2']);
show_menu($amenu_id[0]['pm_id_v1']);
} catch (Exception $e) {
if ( $e->getCode() == 10 ) alert(_('Accès menu impossible'));
}
$module_id=$cn->get_value('select case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end
from v_menu_profile where p_id=$1 and upper(code)=upper($2)',
array($user_profile,$AC));
$g_user->audit();
// Show module and highligt selected one
show_module($module_id);
show_menu( $amenu_id[0]['pm_id_v3']);
show_menu( $amenu_id[0]['pm_id_v2']);
show_menu($amenu_id[0]['pm_id_v1']);
}
else
{

View file

@ -49,7 +49,7 @@ if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id
}
else
{
echo h2(_("Ce document n'est pas accessible"),"error");
$forbidden = _("Ce document n'est pas accessible");
?>
<div style="margin:0px;padding:0px;background-color:red;text-align:center;">
<h2 class="error"><?php echo $forbidden ?></h2>;