Edit C:\galaxie\Back\galaxie\marketing\scriptresponse\notes.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.*,java.lang.reflect.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath!=null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } DataDictionary dico = context.getDataDictionary(); String scriptID = Utils.getRequestParameter(context, request, "scriptID"); String perID = Utils.getRequestParameter(context, request, "perID"); String notes = ""; String[][] querySrp = {{"SrpScriptID = " + Utils.formatToSQL(context, scriptID) , "SrpPersonID = " + Utils.formatToSQL(context, perID)}}; Vector listSrp = ScriptResponseBean.list(session , querySrp); if (listSrp != null && listSrp.size() > 0 ) { ScriptResponseBean scriptResponse = (ScriptResponseBean) listSrp.elementAt(0); try { notes = scriptResponse.getSrpNotes(); } catch (FieldNotInitializedException e) {} } ScriptBean script = new ScriptBean(scriptID, session); int duration = -1; try { duration = script.getScrAverageDuration(); } catch (FieldNotInitializedException e) {} int durationMin = duration / 60; int durationSec = duration - durationMin * 60; String durationStr = ((durationMin < 10) ? "0" + new Integer(durationMin).toString() : new Integer(durationMin).toString()) + ":" + ((durationSec < 10) ? "0" + new Integer(durationSec).toString() : new Integer(durationSec).toString()); //IF WE ALREADY HAVE THIS PERSON'S ANSWER TO THIS SCRIPT, WE WANT TO DISPLAY THE NOTES String timer = (String)request.getAttribute("timer"); if (timer == null){ timer = new Long(new Date().getTime()).toString(); } %> <html> <head> <script language="JavaScript"> function appendToNotes(str) { document.forms[0].SrpNotes.focus(); document.forms[0].SrpNotes.value = document.forms[0].SrpNotes.value + " " + str + " "; document.forms[0].SrpNotes.focus(); } </script> </head> <body> <table style="width: 90%" class="container" align="center"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie" width="90%"> <fl:getMessage code="F2024" alt="Notes"/> </td> <td align="right" width="10%" nowrap> <input name="timerView" type="text" size="5" onFocus="blur()"><%= (duration != -1) ? " / " + durationStr : "" %> <input type="hidden" name="timer" value="<%=timer%>"/> </td> </tr> <tr class="ligne_separation_couleur"><td colspan="2"></td></tr> <tr class="ligne_separation"><td></td></tr> <%-- Raccourcis --%> <tr> <td class="dataValue" colspan="2"> <a href="javascript:appendToNotes('<fl:getMessage code="L61F5" alt="Désire recevoir la documentation" js="true"/>')"><fl:getMessage code="L61F4" alt="Documentation"/></a> <a href="javascript:appendToNotes('<fl:getMessage code="L61F6" alt="Souhaite recevoir une invitation pour" js="true"/>')"><fl:getMessage code="L61F7" alt="Invitation"/></a> <a href="javascript:appendToNotes('<fl:getMessage code="L61F8" alt="Souhaite être contacté par un conseiller" js="true"/>')"><fl:getMessage code="L61F9" alt="Contact"/></a> </td> </tr> <tr> <td class="dataValue" colspan="2"> <textarea style="width: 100%" rows="4" name="SrpNotes"><%=notes%></textarea> </td> </tr> </table> <script> var startDate = '<%=timer%>'; function show(){ var Digital=new Date().getTime(); var diff = Digital - startDate; var minutes = Math.floor(diff / (1000 * 60)); var seconds = Math.floor((diff - minutes * 1000 * 60) / 1000); if (minutes<=9) minutes="0"+minutes; if (seconds<=9) seconds="0"+seconds; document.forms[0].timerView.value=minutes+":"+seconds; setTimeout("show()",1000); } show(); </script> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de