Edit C:\Windows\install\galaxie_p01_01-10\marketing\competitor\read.jsp
<%/****************************************************************************** * Copyright (c) 2000-2005 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.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Vector" %> <%@ page import="java.text.*" %> <%@ page import="com.edeal.frontline.grid.GridData" %> <%@ page import="com.edeal.frontline.*" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <jsp:useBean class="com.edeal.frontline.CompetitorBean" id="Competitor" 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(); String id = null; try { id = Competitor.getID(); } catch (FieldNotInitializedException fnie) { } boolean hasAttachment = false; try{ if (Competitor.getCptAttID()!=null && Competitor.getCptAttID().size()>0) { hasAttachment = true; } }catch(Exception e){} Vector vectCfi = dico.getRefList(session, "NotCfiID"); %> <script type="text/javascript" language="javascript"> //Necessaire pour afficher une barre de defilement sur IE function doSubmit() { //Here you can add your controls return true; } function doDelete(idNote){ //var str = '<fl:link url="/delete_object_ajax.fl?type=Note&id='+idNote+'"/>'; if (confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { doAjax('<fl:link url="/delete_object_ajax.fl?type=Note&id='+idNote+'"/>'); setTimeout("doSearch()",10); setTimeout("refresh()",10); setTimeout("",10); setTimeout("",10); setTimeout("doSearch()",10); setTimeout("refresh()",10); } } function waitNsearch(){ //if (eDealXmlhttp.readyState==4){ doSearch(); //} } function doRead(idNote){ var url = '<fl:link url="<%= \"/read_note.fl\"%>"/>'+'&id='+idNote+'&parent=competitor'; var win = window.open(url,'Note' , 'toolbar=no,location=no,height=400,width=800'); } function doEdit(idNote){ var win = window.open('<fl:link url="<%= \"/view_note.fl\"%>"/>'+'&id='+idNote+'&parent=competitor','Note' , 'toolbar=no,location=no,height=400,width=800'); } function doSearch(){ var f = window.document.forms[0]; var ajaxUrl = _grid__cptnote_js_.getAjaxUrl(); var params = {}; params["type"]= f.ReqCfiID.options[f.ReqCfiID.selectedIndex].value; if (f.ReqWord.value != '<fl:getMessage code="L2067" alt="<Mots clés>" js="true"/>'){ params["word"]= f.ReqWord.value; } _grid__cptnote_js_.callAjaxForHtml(ajaxUrl,params,false); } function refresh(){ var f = window.document.forms[0]; f.ReqCfiID.selectedIndex = 0; f.ReqWord.value = '<fl:getMessage code="L2067" alt="<Mots clés>" js="true"/>'; doSearch(); } function wait10Nrefresh(){ setTimeout("waitNrefresh()", 10); } function waitNrefresh(arrIndex) { //if (eDealXmlhttpArr[arrIndex].readyState == 4) { refresh(); //} } function doOnLoad(){ _grid__cptnote_js_.render(); } </script> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L63AD\", false, true, \"Concurrent\")%>" ou="<%= \"/read_competitor.fl\" + (id != null ? \"?id=\" + id : \"\")%>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"> <fl:getProperty name="Competitor" property="CptName" alt=" "/> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table> <tr valign="top"> <td class="dataLabel" style="text-align: left"><fl:getMessage code="F200B" alt="Web"/></td> <td class="dataValue"><a href="<fl:getProperty name="Competitor" property="CptWeb" alt=""/>" target="_blank"><fl:getProperty name="Competitor" property="CptWeb" alt=" "/></a></td> </tr> <fl:fieldRead property="CptStckExc"/> <fl:fieldRead property="CptIplID"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="CptRopID"/> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> </table> <fl:smallTabs name="COMPNOTENPIGE"> <fl:sTab id="WALL" title="<%= Utils.getMessage(session, \"L81AD\", false, true, \"Mur\") %>"> <div class="wallInTab"> <edWallPost id="wall2" group='{"id": "wall2"}' isReadOnly="false" isRequired="false" isMultiValued="true" childViewsInDifferentGroups="true" async='{"url": "post_object.fl", "parameters":{"objId":"<%=id%>", "objType":"Competitor", "top":"10"}}' toolTip=""> </edWallPost> </div> </fl:sTab> <fl:sTab id="compNote" title="<%= Utils.getMessage(session, \"L63CE\", false, true, \"Liste des notes\") %>" onselect="doSearch()"> <form action="javascript:doSearch()" method="post"> <table class="container" cellpadding="0"> <tr> <td> <table class="container" cellpadding="0" style="width:50%"> <tr> <td class="dataLabel" style="width:250"> <% if(vectCfi != null && !vectCfi.isEmpty()) { %> <select class="select" name="ReqCfiID"> <option value=""><<fl:getMessage code="F203C" alt="Domaine"/>></option> <% for(int i = 0; i < vectCfi.size(); i++) { Vector row = (Vector)vectCfi.elementAt(i); %> <option value="<%= Utils.formatToWeb((String)row.elementAt(0), true) %>"><%= Utils.formatToWeb((String)row.elementAt(1), false) %></option> <% } %> </select> <% } %> </td> <td style="width:10"></td> <td class="dataLabel" style="width:250"> <input class="select" name="ReqWord" type="text" value="<fl:getMessage code="L2067" alt="<Mots clés>" js="true"/>" onfocus="if(this.value == '<fl:getMessage code="L2067" alt="<Mots clés>" js="true"/>') this.value = ''" maxlength="100" onBlur="if(this.value == '') this.value = '<fl:getMessage code="L2067" alt="<Mots clés>" js="true"/>'"> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="dataLabel noPaddingRight" style="width:10%"> <a href="javascript:doSearch()"><input type="image" src="<fl:webapp/>/icons/ico/valid_green2_long.gif" border="0"></a> </td> </tr> </table> </form> <div> <fl:grid height="150" width="100%" name="cptnote" ajaxUrl="<%=\"/list_comp_note_ajax.fl?id=\"+Competitor.getID()%>"/> </div> </fl:sTab> <fl:sTab id="COMPETITOR1" title="<%= context.getAutoDisplayManager().getTitle(session, \"Competitor\", \"Concurrent 1\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Competitor\", \"Concurrent 1\") %>"> <fl:autodisplay name="Competitor" zone="Concurrent 1"/> </fl:sTab> <fl:sTab id="COMPPIGE" title="<%= Utils.getMessage(session, \"L2053\", false, true, \"Liste des piges\") %>" onselect="_grid__PIGE_EMB2_js_.render();"> <div> <% Vector measuringMedias = null; try { measuringMedias = Competitor.getMeasuringMedias(); } catch (FieldNotInitializedException e) {}; if (measuringMedias !=null && measuringMedias.size()>0) { %> <table class="container" cellpadding="0"> <!-- tr class="ligne_separation"><td> </td></tr--> <% DecimalFormat doubleFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##"); SimpleDateFormat monthFormat = FlLocale.getInstance(session).getSimpleDateFormat("MM"); SimpleDateFormat yearFormat = FlLocale.getInstance(session).getSimpleDateFormat("yyyy"); %> <tr> <td nowrap width="10%"> </td> <td width="30%" class="titreInterneSmalltabs" style="text-align: right;"><fl:getMessage code="F2037" alt="Publicité"/> </td> <td width="30%" class="titreInterneSmalltabs" style="text-align: right;"><fl:getMessage code="L201A" alt="Rédactionnel exclusif"/> </td> <td width="25%" class="titreInterneSmalltabs" style="text-align: right;"><fl:getMessage code="L201B" alt="Citations"/> </td> <td nowrap width="5%"> </td> </tr> <% boolean toDisplay = false; String displayMonth = ""; String displayYear = ""; String lastMonth = ""; String lastYear = ""; String month = ""; String year = ""; double publicity = 0; double exclusive = 0; double citation = 0; double publicityS = 0; double exclusiveS = 0; double citationS = 0; MeasuringMediaBean measuringMedia = null; for (int i = 0; i <= measuringMedias.size(); i++) { if (i < measuringMedias.size()) { measuringMedia = (MeasuringMediaBean) measuringMedias.elementAt(i); } if (i == 0) { lastMonth = monthFormat.format(measuringMedia.getMemDate()); lastYear = yearFormat.format(measuringMedia.getMemDate()); } if (i < measuringMedias.size()) { month = monthFormat.format(measuringMedia.getMemDate()); year = yearFormat.format(measuringMedia.getMemDate()); if (!lastMonth.equals(month) || !lastYear.equals(year)) { publicityS = publicity; exclusiveS = exclusive; citationS = citation; publicity = measuringMedia.getPublicityValue(); exclusive = measuringMedia.getExclusiveValue(); citation = measuringMedia.getCitationValue(); displayMonth = lastMonth; displayYear = lastYear; toDisplay = true; lastMonth = month; lastYear = year; } else { publicity += measuringMedia.getPublicityValue(); exclusive += measuringMedia.getExclusiveValue(); citation += measuringMedia.getCitationValue(); } } if (i == measuringMedias.size()) { publicityS = publicity; exclusiveS = exclusive; citationS = citation; displayMonth = lastMonth; displayYear = lastYear; toDisplay = true; } if (toDisplay) { %> <tr> <td nowrap style="width: 10%" class="dataValue" > <%= Utils.formatDate(context, session, displayMonth, displayYear) %> </td> <td style="width: 30%;text-align:right" class="dataValue"> <%= doubleFormat.format(publicityS) %> </td> <td style="width: 30%;text-align:right;" class="dataValue"> <%= doubleFormat.format(exclusiveS) %> </td> <td style="width: 30%;text-align:right" class="dataValue"> <%= doubleFormat.format(citationS) %> </td> <td style="width: 5%"> </td> </tr> <% toDisplay = false; } } %> <tr class="ligne_separation"><td colspan="5"> </td></tr> </table> <table class="container" cellpadding="0"> <tr class="titreInterneSmalltabs"> <td width="1%"></td> <td width="99%"><fl:getMessage code="L2053" alt="Liste des piges"/></td> </tr> <tr class=""><td></td><td class="ligne_separation_couleur" colspan="1"></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <% } %> </div> <div> <fl:grid height="150" width="100%" name="PIGE_EMB2" ajaxUrl="<%=\"/embedded_list_ajax.fl?MemCptID=\"+ Competitor.getID()%>"/> </div> </fl:sTab> <% Vector attID = new Vector(); Vector attFileName = new Vector(); try { attID = Competitor.getCptAttID(); attFileName = Competitor.getCptAttFileName(); }catch (FieldNotInitializedException ex) {} if(attID != null && attID.size() > 0) { %> <fl:sTab id="docs" title="<%=Utils.getMessage(session, \"L201C\", false, true, \"Documents joints\")%>"> <fl:attach name="Competitor" colID="CptAttID" edit="false"/> </fl:sTab> <% } %> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de