Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\scriptelement\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" import="com.edeal.frontline.*,java.util.*,java.text.*, com.edeal.frontline.navigation.*"%> <%@ page import="java.util.Vector,com.edeal.frontline.controller.ControllerServlet" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ScriptElementBean" id="ScriptElement" 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(); Vector jsBeenIncluded = (Vector)request.getAttribute(ControllerServlet.JS_BEEN_INCLUDED_ATTR); if (jsBeenIncluded == null) jsBeenIncluded = new Vector(); String id = null; try{ id = ScriptElement.getID(); }catch(Exception e){ id = flRequest.getRequestParameterOrAttribute("id"); } int seqNum = 0; try { seqNum = ScriptElement.getSceSeqNum(); } catch (FieldNotInitializedException fnie) { } DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("0000"); try { ScriptElement.getSceType(); } catch (FieldNotInitializedException fnie) { ScriptElement.setSceType(dico.getRefIdByCode("SceType", "FRE")); } String sceType = null; try { sceType = ScriptElement.getSceType(); } catch (FieldNotInitializedException fnie) { } int hasAnswers = 0; try {hasAnswers = ScriptElement.getSceHasAnswers();} catch (FieldNotInitializedException e) {} try { ScriptElement.getSceDispType(); } catch (FieldNotInitializedException fnie) { ScriptElement.setSceDispType(dico.getRefIdByCode("SceDispType", "COMBO")); } String sceDispType = null; try { sceDispType = ScriptElement.getSceDispType(); } catch (FieldNotInitializedException fnie) { } //we want to show how many scripts use that element. String utilisation = "0"; String[][] query = {{"LseScriptElementID = " + Utils.formatToSQL(context, id)}}; String[] fields = {"LseID" , "LseScriptID" , "LseScriptID:ScrLabel", "LseScriptID:ScrSeqNum"}; String[] orderBy = {"LseScriptID:ScrSeqNum"}; Vector linksList = LinkScriptElementBean.listSummary(session , fields, query, orderBy); if (linksList != null && linksList.size() > 0) { if (linksList.size() == 1) { String scriptID = (String)((Hashtable)linksList.elementAt(0)).get("LseScriptID"); utilisation = "<a href='" + flRequest.computeURL("/read_script.fl?id=" + scriptID, true, true, true) + "'>1</a>"; } else { utilisation = "<a href=\"javascript:var win = window.open('" + flRequest.computeURL("/list_custon_listscript.fl?id="+id) +"', '', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=650,height=400')\">" + linksList.size() + "</a>"; } } boolean canBeModified = true; String[][] query3 = {{"SerLseID:LseScriptElementID = " + Utils.formatToSQL(context, id)}}; String[] fields3 = {"SerID"}; Vector responses = ScriptElementResponseBean.listSummary(session , fields3, query3); //if the element is used by more than one script OR there are recorded responses, it can't be modified. if ((linksList!=null && linksList.size() > 1) || (responses != null && responses.size() > 0)) { canBeModified = false; } boolean canBeDeleted = true; if (responses != null && responses.size() > 0) { canBeDeleted = false; } boolean isPopUp = false; String popUp = flRequest.getRequestParameterOrAttribute("popUp"); if ("1".equals(popUp)){ isPopUp = true; } %> <%if (isPopUp){%> <html> <head> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp" type="text/css"> <%}%> <style type="text/css"> .dataValueX { overflow: hidden; margin: 0px; padding: 0px; padding-left: 10px; font-size: small; font-size: expression("x-small"); color: rgb(0, 0, 0); font-family: Arial, Verdana, sans-serif; vertical-align: top; padding: 4px; } .borderLineOne { border-right: 1px dashed #9EC6D0; border-bottom: 1px dashed #9EC6D0; } .borderLineTwo { border-right: 1px dashed #9EC6D0; } </style> <% if(! jsBeenIncluded.contains("/js/smalltabs.jsp")){%> <script language="javascript" type="text/javascript" src="/js/smalltabs.jsp"></script> <%}%> <% if(! jsBeenIncluded.contains("/js/utils.js")){%> <script language="javascript" src="/js/utils.js"></script> <%}%> <% if (isPopUp) {%> <% if(! jsBeenIncluded.contains("/js/ajax/ajax.js")){%> <script type="text/javascript" language="javascript" src="/js/ajax/ajax.js"></script> <%}%> <% if(! jsBeenIncluded.contains("/js/master_js.jsp")){%> <script type="text/javascript" language="javascript" src="/js/master_js.jsp"></script> <%}%> <% if(! jsBeenIncluded.contains("/js/ajax/sarissa.js")){%> <script type="text/javascript" language="javascript" src="/js/ajax/sarissa.js"></script> <% } %> <% } %> <script> function doModify() { <% if (!canBeModified) { %> alert('<fl:getMessage code="M606F" alt="Des réponses ont déjà été enregistrées pour cet élément de script et/ou il est lié à plusieurs scripts. Il n\'est donc pas possible de le modifier." js="true"/>'); <% } else { %> window.parent.location = '<fl:webapp/>/edit_scriptelement.fl?id=<%=id%>'; <% } %> } function doDelete() { <% if (!canBeDeleted) { %> alert('<fl:getMessage code="M6071" alt="Des réponses ont déjà été enregistrées pour cet élément de script. il n\'est donc pas possible de le supprimer." js="true"/>'); <% } else { %> if (confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { window.parent.location = '<fl:link url="<%= \"/delete_scriptelement.fl?id=\" + id %>"/>'; } <% } %> } function waitNviewScript(scriptID){ setTimeout('viewScript('+'\''+scriptID+'\''+')', 5); } function viewScript(scriptID){ window.top.location = '<%=flRequest.computeURL("/read_script.fl?1=1", true, true, true)%>'+'&id='+scriptID; } function refreshObj() { ajaxUrl = _grid__OBJARGELTS_js_.getAjaxUrl(); params ={}; params["LsoScriptElementID"]='<%= ScriptElement.getID() %>'; _grid__OBJARGELTS_js_.callAjaxForHtml(ajaxUrl,params,false); } function doOnLoad() { _grid__OBJARGELTS_js_.render(); } </script> <%if (isPopUp){%> <title><fl:getMessage code="L2025" alt="e-Deal"/></title> </head> <div class="main_body" style="border:none; height: 100%"> <%}%> <body> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L61EF\", false, true, \"Elément de script\")%>" ou="<%=\"/read_scriptelement.fl?id=\"+id%>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"><fl:getProperty name="ScriptElement" property="SceLabel" alt=""/></td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F202D" alt="Numéro"/></td> <td class="dataValue"><%= df.format((long)seqNum) %></td> </tr> <fl:fieldRead property="SceJSPPage" alt=" "/> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6149" alt="Réponses"/></td> <td class="dataValue"> <%= (hasAnswers == 1) ? Utils.getMessage(session, "L2005", "Oui") : Utils.getMessage(session, "L2006", "Non") %> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F604D" alt="Type de réponse"/></td> <td class="dataValue"> <fl:getProperty name="ScriptElement" property="SceType" alt=" "/> </td> </tr> <% if (sceType.equals(dico.getRefIdByCode("SceType", "FRE"))) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6051" alt="Taille zone"/></td> <td class="dataValue"> <fl:getProperty name="ScriptElement" property="SceInputSize" alt=" "/> </td> </tr> <% } %> <% if (sceType.equals(dico.getRefIdByCode("SceType", "REF")) || sceType.equals(dico.getRefIdByCode("SceType", "LST"))) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F604E" alt="Type affichage réponse"/></td> <td class="dataValue"> <fl:getProperty name="ScriptElement" property="SceDispType" alt=" "/> </td> </tr> <% } %> <% if ( (sceType.equals(dico.getRefIdByCode("SceType", "REF")) || sceType.equals(dico.getRefIdByCode("SceType", "LST"))) && (sceDispType.equals(dico.getRefIdByCode("SceDispType", "RADIO")) || sceDispType.equals(dico.getRefIdByCode("SceDispType", "CHECK"))) ) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6050" alt="Nb colonnes"/></td> <td class="dataValue"> <fl:getProperty name="ScriptElement" property="SceColumnsNb" alt=" "/> </td> </tr> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="SceCategory" alt=" "/> <fl:fieldRead property="SceLanguage" alt=" "/> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6088" alt="Utilisation"/></td> <td class="dataValue"> <fl:getMessage code="L620F" alt="Cet élément de script est utilisé par"/> <%=(isPopUp == false ? utilisation : (linksList != null ? ""+linksList.size() : "0"))%> <fl:getMessage code="L6210" alt="script(s)"/> </td> </tr> <% if (sceType.equals(dico.getRefIdByCode("SceType", "REF"))) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6011" alt="Table de référence"/></td> <td class="dataValue"> <% String oldSceTabID = null; try { oldSceTabID = ScriptElement.getSceRefTable(); } catch (FieldNotInitializedException e) { } String[] tabFields = {"TabID", "TabName"}; String[] tabOrderBy = {"TabName"}; String[][] tabQuery = {{"TabID = " + Utils.formatToSQL(context, oldSceTabID)}}; Vector tablesList = TablesBean.listSummary(session, tabFields, tabQuery, tabOrderBy); if (tablesList != null && tablesList.size() == 1) { Hashtable line = (Hashtable)tablesList.elementAt(0); String tabID = (String)line.get("TabID"); String tabName = (String) line.get("TabName"); %> <%= tabName %> <% } %> </td> </tr> <% } %> <% if (sceType.equals(dico.getRefIdByCode("SceType", "REF")) || sceType.equals(dico.getRefIdByCode("SceType", "LST"))) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F604F" alt="Texte associé"/></td> <td class="dataValue"> <% int associatedText = 0; try { associatedText = ScriptElement.getSceAssociatedText(); } catch (FieldNotInitializedException fnie) { } %> <% if (associatedText == 0) { %> <fl:getMessage code="L2006" alt="Non"/> <% } else { %> <fl:getMessage code="L2005" alt="Oui"/> <% } %> </td> </tr> <% } %> <% if ( (sceType.equals(dico.getRefIdByCode("SceType", "REF")) || sceType.equals(dico.getRefIdByCode("SceType", "LST"))) && (sceDispType.equals(dico.getRefIdByCode("SceDispType", "RADIO")) || sceDispType.equals(dico.getRefIdByCode("SceDispType", "CHECK"))) ) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6052" alt="Ajouter Autre"/></td> <td class="dataValue"> <% int hasOther = 0; try { hasOther = ScriptElement.getSceHasOther(); } catch (FieldNotInitializedException fnie) { } %> <% if (hasOther == 0) { %> <fl:getMessage code="L2006" alt="Non"/> <% } else { %> <fl:getMessage code="L2005" alt="Oui"/> <% } %> </td> </tr> <% } %> </table> </td> </tr> </table> <fl:notes name="SceDescription" title="Description"><fl:getProperty name="ScriptElement" property="SceDescription" alt=" "/></fl:notes> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="ElmentScriptTabs"> <% if (sceType.equals(dico.getRefIdByCode("SceType", "LST"))) { %> <fl:sTab id="LISTEREP" title="<%= Utils.getMessage(session, \"L6137\", \"Liste Réponses Possibles\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldRead property="SceLstAnswer0" label="1"/> <fl:fieldRead property="SceLstAnswer1" label="2"/> <fl:fieldRead property="SceLstAnswer2" label="3"/> <fl:fieldRead property="SceLstAnswer3" label="4"/> <fl:fieldRead property="SceLstAnswer4" label="5"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldRead property="SceLstAnswer5" label="6"/> <fl:fieldRead property="SceLstAnswer6" label="7"/> <fl:fieldRead property="SceLstAnswer7" label="8"/> <fl:fieldRead property="SceLstAnswer8" label="9"/> <fl:fieldRead property="SceLstAnswer9" label="10"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldRead property="SceLstAnswer10" label="11"/> <fl:fieldRead property="SceLstAnswer11" label="12"/> <fl:fieldRead property="SceLstAnswer12" label="13"/> <fl:fieldRead property="SceLstAnswer13" label="14"/> <fl:fieldRead property="SceLstAnswer14" label="15"/> </table> </td> </tr> </table> </fl:sTab> <% } %> <% String sceRefTable = null; try { sceRefTable = ScriptElement.getSceRefTable(); } catch (FieldNotInitializedException fnie) { } if (sceType.equals(dico.getRefIdByCode("SceType", "REF"))) { %> <fl:sTab id="REFERENTIEL" title="<%= Utils.getMessage(session, \"L6019\", \"Valeurs de référence\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <% boolean isBlueRef = false; try { Vector refList = dico.getRefList(session, sceRefTable , "Te1"); if (refList != null && refList.size() > 0) { for (int i=0 ; i < refList.size() ; i++) { String refValTe1 = (String) ((Vector) refList.elementAt(i)).elementAt(1); %> <tr class="fieldline"> <td style="<%= (isBlueRef? "background : #EBF4F6" : "background : #FFFFFF" )%>" class="dataValueX borderLineOne" width="10%" > <%= i+1 %> </td> <td style="<%= (isBlueRef? "background : #EBF4F6" : "background : #FFFFFF" )%>" class="dataValueX borderLineOne" width="80%" > <%= refValTe1 %> </td> </tr> <% isBlueRef = !isBlueRef; } } } catch (FrontlineException fe) { } %> </table> </td> </tr> </table> </fl:sTab> <% } %> <fl:sTab id="OBJECTION" title="<%= Utils.getMessage(session, \"L61FC\", \"Liste des objections / arguments\") %>" onselect="refreshObj();"> <fl:grid height="150" displayFirst="true" name="OBJARGELTS" ajaxUrl="<%= \"/embedded_list_ajax.fl?LsoScriptElementID=\" + ScriptElement.getID() %>" /> </fl:sTab> <% try { String picID = ScriptElement.getSceImage(); %> <fl:sTab id="IMAGE" title="<%= Utils.getMessage(session, \"F6025\", \"Image\") %>"> <table> <tr class="fieldline"> <td class="dataValue"><img src="<fl:webapp/>/download?id=<%= picID %>" border="0" alt="<fl:getMessage code="F6025" alt="Image"/>"></td> </tr> </table> </fl:sTab> <% } catch (FieldNotInitializedException ex) {} %> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de