Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\software\read.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.SiteBean" %> <%@ page import="com.edeal.frontline.MenuByRoleBean" %> <%@ page import="com.edeal.frontline.MenuBean" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.SoftwareBean" id="Software" scope="request"/> <%@ page isELIgnored="false"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Software.getSfwID(); } catch (FieldNotInitializedException e) {} String sfwName = null; try { sfwName = Software.getSfwName(); } catch (FieldNotInitializedException e) {} boolean sfwStandard = false; try { sfwStandard = Software.isSfwStandard(); } catch (FieldNotInitializedException e) {} Vector menus = new Vector(); Hashtable menuByRolesH = new Hashtable(); if (id != null) { //get the different menus for this software String[] fields1 = {"MenID", "MenLabel", "MenValue", "MenDefault"}; String[][] query1 = {{"MenSfwID = " + Utils.formatToSQL(context, id)}}; String[] orderBy1 = {"MenValue DESC"}; menus = MenuBean.listSummary(context, fields1, query1, orderBy1); //get the different menuByRoles for this software String[] fields2 = {"MbrID", "MbrRole", "MbrMenID"}; String[][] query2 = {{"MbrMenID:MenSfwID = " + Utils.formatToSQL(context, id)}}; Vector menuByRoles = MenuByRoleBean.listSummary(context, fields2, query2); //Hashtable menuByRolesH : key role id, value menu id for (int i=0 ; i<menuByRoles.size() ; i++) { Hashtable mbr = (Hashtable)menuByRoles.elementAt(i); menuByRolesH.put(mbr.get("MbrRole"), mbr.get("MbrMenID")); } } //all available roles Vector roles = dico.getRefList(session, "Rol", "Te1"); String ouiStr = Utils.getMessage(session, "L2005", "Oui"); String nonStr = Utils.getMessage(session, "L2006", "Non"); Vector sfwRoleHidde = null; try { sfwRoleHidde = (Vector)Software.getSfwRoleHidden(); } catch (FieldNotInitializedException e) {} %> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L645A\", false, true, \"Logiciel\") %>" ou="<%= \"/read_software.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"> <%= Utils.formatToWeb(sfwName,false) %> </td> </tr> <tr class="ligne_separation"> <td colspan="3" ></td> </tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0" border=0> <fl:fieldRead property="SfwCode" /> <fl:fieldRead property="SfwPosition" /> <fl:fieldRead property="SfwStandard" valueIfTrue="<%= ouiStr %>" valueIfFalse="<%= nonStr %>"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0" border=0> <tr class="fieldline"> <td id="SfwDisplayName_label" class="dataLabel"><fl:label code="L6015"/></td> <td id="SfwDisplayName_value" class="dataValue"> <% String fullTitle = null; try { if (Software.isSfwDisplayNameIsCode()) fullTitle = Utils.getMessage(session, Software.getSfwDisplayName(), "Libellé indisponible"); } catch (Exception e) {} %> <fl:getProperty name="Software" property="SfwDisplayName" alt=""/><%= fullTitle == null ? "" : " (" + fullTitle + ")"%> </td> </tr> <fl:fieldRead property="SfwHidden" valueIfTrue="<%= ouiStr %>" valueIfFalse="<%= nonStr %>"/> <fl:fieldRead property="SfwInactive" valueIfTrue="<%= ouiStr %>" valueIfFalse="<%= nonStr %>"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <fl:smallTabs name="SoftRead"> <fl:sTab id="MENU" title="<%= Utils.getMessage(session, \"L625A\", false, true, \"Menu par rôle\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table> <% //for each role for (int i=0 ; i < roles.size() ; i++) { String roleID = (String)((Vector)roles.elementAt(i)).elementAt(0); String roleName = (String)((Vector)roles.elementAt(i)).elementAt(1); %> <tr class="fieldline"> <td class="dataLabel"><%= roleName %></td> <td class="dataValue"> <% //display corresponding menu if any for (int j=0 ; j < menus.size() ; j++) { Hashtable menu = (Hashtable)menus.elementAt(j); String menuID = (String)menu.get("MenID"); String menuLabel = menu.get("MenLabel") + (menu.get("MenDefault").equals(Boolean.TRUE) ? " *" : ""); if (menuByRolesH.get(roleID)!=null && menuByRolesH.get(roleID).equals(menuID)) { %> <c:set var="menuID" value="<%=menuID %>"/> <a href='<fl:link url="/read_menu.fl?id=${menuID}"/>' target="_blank"><%= menuLabel %></a> <% } %> <% } %> </td> </tr> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <% for (int i=0 ; i < roles.size() ; i++) { String roleID = (String)((Vector)roles.elementAt(i)).elementAt(0); %> <tr class="fieldline"> <td class="dataLabel" id="SfwRoleHidden_label"><div><label title="<fl:getMessage code="F60AB" alt="Caché"/>" for="SfwRoleHidden"><fl:getMessage code="F60AB" alt="Caché"/></label></div></td> <td class="dataValue" id="SfwRoleHidden_value"><div class="input"><%= sfwRoleHidde != null && sfwRoleHidde.contains(roleID) ? ouiStr : nonStr %></div></td> </tr> <% } %> </table> </td> </tr> </table> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de