Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\kbase\faqheader\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. * * CVS Info for $RCSfile$ * * $Revision$ * $Author$ $Date$ ******************************************************************************/ %> <%@page contentType="text/html; charset=UTF-8" session="true"%> <%@page session="true" import="com.edeal.frontline.*"%> <%@page session="true" import="java.util.*"%> <%@page session="true" import="com.edeal.frontline.navigation.*" %> <%@page import="com.edeal.frontline.grid.functions.FaqHeaderSyntaxActions" %> <%@page import="com.edeal.frontline.navigation.EdealBigTabsNavigation.BigTabsParams"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.FAQHeaderBean" id="FAQHeader" scope="request"/> <% 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(); boolean isHabilite = false; // On récupère l'ID de l'acteur connecté String actID = null; if (session != null) { actID = (String)session.getAttribute("effectiveActorID"); if (actID == null) { actID = (String)session.getAttribute("actorID"); if (actID == null) { throw new FrontlineException("there is not an actor ID in session"); } } } //récupérer la langue en cours FlLocale locale = FlLocale.getInstance(session); String langageID = locale.getLanguageID(); //si la langue dans fllocal est null alors français pas defaut if(langageID == null) { try { langageID = dico.getRefIdByCode("Lna", "Val", "fr_FR"); } catch (Exception ex) { } } String fahID = null; try { fahID = FAQHeader.getID(); } catch (FieldNotInitializedException e) { } String ouiStr = Utils.getMessage(session, "L2005", "Oui"); String nonStr = Utils.getMessage(session, "L2006", "Non"); EdealBigTabsNavigation ebtn = new EdealBigTabsNavigation(flRequest); String typologie = null; try { typologie = (String)FAQHeader.getCustomProperty("FahTypoArticle_"); } catch (FieldNotInitializedException e) { typologie = ""; } String questionID; try { questionID = dico.getRefIdByCode("FahTypoArticle_", "QUES"); } catch (FrontlineException e) { questionID = ""; } try{ FAQHeaderBean ficheConn = new FAQHeaderBean(fahID,context); ActorBean actor = new ActorBean(actID,context); String roleADMID = dico.getRefIdByCode("ActRoles", "ADMIN"); /* Role Administrateur*/ String roleTECHADMID = dico.getRefIdByCode("ActRoles", "S_ADM_TECH"); /* Role Administrateur Technique*/ // Liste des Rôles habilités à consulter la fiche Vector<String> RoleesHabilites = null; //Liste des Rôles de l'acteur connecté Vector<String> rolesAct =null; try{ RoleesHabilites = (Vector<String>)ficheConn.getCustomProperty("FahRoleMV_"); }catch(Exception e){ logger.warn("the list RoleesHabilites is empty : "+e.getMessage()); } rolesAct = actor.getActRoles(); if(rolesAct.contains(roleADMID) || rolesAct.contains(roleTECHADMID)){ isHabilite = true; } else{ if(RoleesHabilites != null){ for (String role : RoleesHabilites) { if(rolesAct.contains(role)){ isHabilite = true; break; } } } } }catch(Exception e){ e.printStackTrace(); } %> <title><fl:getMessage code="L70F6" alt="Fiche de connaissance"/></title> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <style> .faqTitle { border: 1px solid #006699; height:15px; padding: 2px 5px; overflow: auto; } .faqContent { border: 1px solid #006699; height:200px; overflow: auto; padding: 2px 5px; } .combobox { height: 90px; overflow: auto; } .message-editor { position: relative; left: 0; right: 0; height: 100%; width: 100%; } .language_without_message { filter: alpha(opacity = 20); -moz-opacity: 0.2; -khtml-opacity: 0.2; opacity: 0.2; } .language_current { border: 1px solid black; } .language_current_without_message { border: 1px solid black; filter: alpha(opacity = 20); -moz-opacity: 0.2; -khtml-opacity: 0.2; opacity: 0.2; } </style> <script language="JavaScript"> function changeLanguage(codeLanguage) { loadFAQ(codeLanguage); //after this we have the new language loadTagFAQHeaderList(); } function loadLanguage() { var langageID = $("#langageID").val(); var ajaxURL = '<fl:webapp/>/get_faq_languages_bar.fl?id=<%= fahID %>&langageID=' + langageID; doAjax(ajaxURL, languageCallBack); } function languageCallBack(index) { if (eDealXmlhttpArr[index].readyState == 4) { $("#div_language").html(eDealXmlhttpArr[index].responseText); } hideWaiting(); } function loadFAQ(codeLanguage) { setLangageID(codeLanguage); $.getJSON("<fl:webapp/>/get_faq_content.fl?id=<%= fahID %>&langageID=" + codeLanguage, function(result) { var f = document.forms[0]; $("#FaqTitle").html(decodeURIComponent(result.faqTitle)); $("#FaqResponse").html(result.faqResponse != "" ? decodeURIComponent(result.faqResponse) : ""); loadLanguage(); }); } function setLangageID(lngID) { $("#langageID").val(lngID); } function loadTagFAQHeaderList() { var faqLngID = $("#langageID").val(); var ajaxURL = '<fl:webapp/>/get_faqh_tag_list_read.fl?id=<%= fahID %>&langageID=' + faqLngID; doAjax(ajaxURL, tagFAQHeaderCallBack); } function tagFAQHeaderCallBack(index) { if (eDealXmlhttpArr[index].readyState == 4) { $("#div_faqh_tag").html(eDealXmlhttpArr[index].responseText); } hideWaiting(); } function doOnLoad() { loadFAQ('<%= langageID %>'); loadTagFAQHeaderList(); loadFaqLinkList(); } function loadFaqLinkList() { var ajaxURL = '<fl:webapp/>/get_faqlink_list_read.fl?id=<%= fahID %>&SfwID=<%= ebtn.getBigTabsParameterValue(EdealBigTabsNavigation.BigTabsParams.SoftwareModule) %>'; doAjax(ajaxURL, faqLinkListCallBack); } function faqLinkListCallBack(index) { if (eDealXmlhttpArr[index].readyState == 4) { $("#div_faqlink").html(eDealXmlhttpArr[index].responseText); } hideWaiting(); } function refreshCmtCm() { _grid__CMT_EMB_CM_js_.render(); } function refreshCmtAn() { _grid__CMT_EMB_AN_js_.render(); } </script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/inputAC_js.jsp"></script> <% if(isHabilite){%> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L70F6\", false, true, \"Fiche de connaissance\") %>" listTitle="<%= Utils.getMessage(session, \"L70F6\", false, true, \"Fiche de connaissance\") %>" ou="<%= \"/read_faqheader.fl?id=\" + fahID %>"> <input type="hidden" name="langageID" id="langageID" value="<%= langageID %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr> <td colspan="5" class="titreFiche"><fl:getProperty name="FAQHeader" property="FahTitle" alt="" /></td> </tr> <tr class="ligne_separation"><td colspan="5"></td></tr> </table> </td> </tr> <tr> <td colspan="3" class="ligne_separation" /> </tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="FahCatID"/> <fl:fieldRead property="FahCatLev1"/> <fl:fieldRead property="FahStatus"/> <fl:fieldRead property="FahBeginDt"/> <fl:fieldRead property="FahExpireDt"/> <fl:fieldRead property="FahIsUpFront" valueIfTrue="<%= ouiStr %>" valueIfFalse="<%= nonStr %>"/> <fl:fieldRead property="FahAudienceID"/> <fl:fieldRead property="FahTypoArticle_"/> <% if(typologie.equalsIgnoreCase(questionID)){ %> <fl:fieldRead property="FahNote_"/> <%} %> </table> </td> <td class="separation"> <div class="separation"></div> </td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="FahActID" bean="true" href="true" disp="/read_actor.fl"/> <fl:fieldRead property="FahOwnrActID" bean="true" href="true" disp="/read_actor.fl"/> <fl:fieldRead property="FahSource"/> <fl:fieldRead property="FahPblChannel"/> <fl:fieldRead property="FahRoleMV_"/> </table> </td> </tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="FAQHeaderTabs"> <fl:sTab id="FICHE" title="<%= Utils.getMessage(session, \"L62EB\", \"Fiche\") %>" onselect="loadLanguage();"> <table class="container" cellpadding="0"> <tr> <td><table width="100%"><tr><td width="35%"></td><td width="35%"></td><td width="30%"><div id="div_language"></div></td></tr></table></td> </tr> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0" width="100%"> <tr class="ligne_separation"> <td></td> </tr> <tr> <td class="titrePartie"> <fl:label field="FaqTitle" /> </td> </tr> <tr> <td> <div id="FaqTitle" class="faqTitle"></div> </td> </tr> <tr class="ligne_separation"> <td></td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"> <td></td> </tr> <tr> <td class="titrePartie"> <fl:label field="FaqResponse"/> </td> </tr> <tr> <td> <div id="FaqResponse" class="faqContent"></div> </td> </tr> <tr class="ligne_separation"> <td></td> </tr> </table> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr> <td class="dataLabel"><fl:getMessage code="F70AC" alt="Mot(s) clé(s)"/></td> <td class="dataValue"> <div style="height: 100%; width: 100%" id="div_faqh_tag"></div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr> <td class="dataLabel"> <label> <fl:getMessage code="F70AD" alt="Fiche(s) connexe(s)"/> </label> </td> <td class="dataValue"> <div style="height: 100%; width: 100%" id="div_faqlink"></div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="CONTACTS" title="<%= Utils.getMessage(session, \"L3106\", \"Contacts\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0" width="100%"> <tr class="fieldline"> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="FahCntctActID" separator="<br>" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> </table> </td> <td class="separation" id="ctct_sep"> <div class="separation"></div> </td> <td class="column2" id="ctct_bloc1_2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" id="FahCntctCorID_label"><fl:label field="FahCntctCorID"/></td> <td class="column2"> <div> <% String correspondents = ""; correspondents = FaqHeaderSyntaxActions.getFaqCorrespondentHtml(session, context, fahID); %> <%= correspondents %> </div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="FICHIERS" title="<%= Utils.getMessage(session, \"L201C\", \"Fichiers\") %>"> <fl:attach name="FAQHeader" colID="FahAttID" edit="false"/> </fl:sTab> <fl:sTab id="CMTCM" title="<%= Utils.getMessage(session, \"L64B4\", false, true, \"Commentaires\") %>" onselect="refreshCmtCm();"> <fl:grid name="CMT_EMB_CM" ajaxUrl="<%= \"/comments_list_ajax_embedded.fl?code=CMT_EMB_CM&CmtFahID=\" + fahID %>"/> </fl:sTab> <fl:sTab id="CMTAN" title="<%= Utils.getMessage(session, \"L70F9\", false, true, \"Annotations\") %>" onselect="refreshCmtAn();"> <fl:grid name="CMT_EMB_AN" ajaxUrl="<%= \"/comments_list_ajax_embedded.fl?code=CMT_EMB_AN&CmtFahID=\" + fahID %>"/> </fl:sTab> </fl:smallTabs> </fl:bigTabs> <%}else{%> <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr style="height: 43px;"> <td width="10"> <img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"> </td> <td colspan="3" valign="top" width="98%"> <table id="BTabs" class="container" cellpadding="0"> <tbody> <tr> <td class="inactif-pos-1" style="text-align: right"> </td> <td class="interInactifActif" style="text-align: right"> </td> <td class="ongletblanc"> Opération non autorisée </td> <td class="actif-fin"> </td><td class="tabRightSpace" style="width: 90%; text-align: right; background: transparent url(<fl:webapp/>/icons/nav/principal_onglet/fd_cell.gif)"> </td> <td class="finTab"> </td> </tr> </tbody></table> </td> <td width="10"><img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"></td> </tr> <tr style="height: 100%;"> <td width="10"><img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"></td> <td background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_g.gif" width="15"><img src="<fl:webapp/>/icons/spacer.gif" height="42" width="15"></td> <td id="content" valign="top" width="98%"> <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%"> <tbody><tr style="height: 100%;"> <td id="content_cell"> <span class="titreFiche"> <p><fl:getMessage code="MF105" alt="Vous n'êtes pas habilités à consulter cette fiche de connaissance" /></p> <!-- <p> <i>You are not authorized to view this form of knowledge</i> </p> --> <hr> <span class="titreFiche" style="font-size: smaller;"></span> </span></td> </tr> </tbody></table> </td> <td background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_d.gif" width="15"><img src="<fl:webapp/>/icons/spacer.gif" height="42" width="15"></td> <td width="10"><img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"></td> </tr> <tr style="height: 15px;"> <td width="10"><img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"></td> <td width="15"><img src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_g.gif" height="15" width="15"></td> <td background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_bas_m.gif" width="98%"><img src="<fl:webapp/>/icons/spacer.gif" height="15" width="15"></td> <td width="15"><img src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_d.gif" height="15" width="15"></td> <td width="10"><img src="<fl:webapp/>/icons/spacer.gif" height="10" width="10"></td> </tr> </tbody></table> <%} %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de