Edit C:\Windows\install\galaxie_p01_01-10\marketing\form\stat.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. * * ******************************************************************************/ %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.FormBean" id="Form" scope="request"/> <jsp:useBean class="com.edeal.frontline.FormReturnBean" id="FormReturn" scope="request"/> <link href="<fl:webapp/>/css/common_css.jsp" rel="stylesheet" type="text/css"> <%@page session="true" import="java.util.*, com.edeal.frontline.*, javax.servlet.http.HttpSession, com.edeal.frontline.navigation.FlRequest, java.text.*"%> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); //HttpSession session = flRequest.getSession(); DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("0000"); DecimalFormat df2 = FlLocale.getInstance(session).getDecimalFormat("#,##0"); DecimalFormat df3 = FlLocale.getInstance(session).getDecimalFormat("#,#00.0"); String frmID = flRequest.getRequestParameterOrAttribute("id"); String id = flRequest.getRequestParameterOrAttribute("id"); FormBean formObj = null; try { formObj = new FormBean(frmID , session); } catch (FrontlineException fe) { } if (formObj != null) { int nbReturned = formObj.getNbReturned(); int nbEntered = formObj.getNbEntered(); int[] res = formObj.getNbYesBasic(); int seqNum = -1; try { seqNum = formObj.getFrmSeqNum(); } catch (FieldNotInitializedException fnie) { } String label = null; try { label = formObj.getFrmLabel(); } catch (FieldNotInitializedException fnie) { } String q0 = null; try { q0 = formObj.getFrmBasicQuestion0(); } catch (FieldNotInitializedException fnie) { } String q1 = null; try { q1 = formObj.getFrmBasicQuestion1(); } catch (FieldNotInitializedException fnie) { } String q2 = null; try { q2 = formObj.getFrmBasicQuestion2(); } catch (FieldNotInitializedException fnie) { } %> <script language="javascript"> function doSubmit(){ var mf = document.forms[0]; prepNumsForSubmit(separateurDecimal, separateurMilliers, mf.FrnNbReturn); ctrlDateField(mf.FrnDate, '<fl:getMessage code="M604B" alt="Le champ Date est obligatoire." js="true"/>'); if (mf.FrnDate.value==''){ alert('<fl:getMessage code="M60D5" alt="Champ date incorrect. Veuillez corriger" js="true"/>'); mf.FrnDate.focus(); return; } if (mf.FrnNbReturn.value==''){ alert('<fl:getMessage code="M302F" alt="Format de nombre incorrect. Veuillez corriger." js="true"/>'); mf.FrnNbReturn.focus(); return; } presentFieldsValue(); mf.submit(); } function viewFormReturn(idFrn, nbRet, date){ var f = document.forms[0]; f.FrnFormID.value = '<%=frmID%>'; f.FrnID.value=idFrn; f.FrnNbReturn.value=nbRet; f.FrnDate.value=date; } function delFormReturn(idFrn, formID){ var f = document.forms[0]; //On set l'id a null en cas de sauve f.FrnID.value=''; var str = '<%=flRequest.computeURL("/delete_formreturn.fl")%>'+'&FrnID='+idFrn+'&id='+formID; if (confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { str='<fl:link url="/delete_object_ajax.fl?type=FormReturn"/>&id='+idFrn; doAjax(str, deleteReturn); } } function deleteReturn(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { <%-- Impossible car nous devons recalculer les stats doAjax(myAjaxURL_listFrn+'&id=<%=id%>');--%> window.location = '<%= flRequest.computeURL("/stat_form.fl")+"&id="+id %>'; } } function doOnLoad(){ _grid__listFrn_js_.render() } </script> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L60FE\", false, true, \"Statistiques\")%>" ou="<%=\"/stat_form.fl\"+(frmID != null ? \"?id=\"+frmID : \"\")%>"> <table class="container" cellpadding="0"> <tr> <td colspan="3" class="titreFiche"><%= label != null ? label : "" %></td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" style="width:5%"> <fl:getMessage code="L613C" alt="Questionnaire"/> </td> <td class="dataValue" style="text-align: right; width:5%" > <a href="<fl:link url="/read_form.fl"/><%= "&id="+frmID %>"><%= df.format(seqNum) %></a> </td> </tr> <tr class="fieldline"> <td class="dataLabel" style="width:5%"><fl:getMessage code="L6159" alt="Reçus"/></td> <td class="dataValue" style="text-align: right; width:5%"><%= df2.format((long)nbReturned) %></td> <td style="width:90%" colspan="3"> </td> </tr> <tr class="fieldline"> <td class="dataLabel" style="width:5%"><fl:getMessage code="L615A" alt="Saisis"/></td> <td class="dataValue" style="text-align: right; width:5%"><%= df2.format((long)nbEntered) %></td> <td class="dataValue" style="width:5%"><fl:getMessage code="L3055" alt="soit"/></td> <td class="dataValue" style="text-align: right; width:5%"><%= nbReturned == 0 ? "0" : df3.format((double) (100*(((double) nbEntered) / ((double) nbReturned)))) %>%</td> <td style="width:90%"> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <% if (q0 != null) { %> <tr class="fieldline"> <td class="dataLabel" style="width:5%"><%= q0 %></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= df2.format((long) res[0]) %></td> <td class="dataValue" style="width:5%"><fl:getMessage code="L3055" alt="soit"/></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= nbEntered == 0 ? "0" : df3.format((double) (100*(((double) res[0]) / ((double) nbEntered)))) %>%</td> <td style="width:90%"> </td> </tr> <% } if (q1 != null) { %> <tr class="fieldline"> <td class="dataLabel" style="width:5%"><%= q1 %></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= df2.format((long) res[1]) %></td> <td class="dataValue" style="width:5%"><fl:getMessage code="L3055" alt="soit"/></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= nbEntered == 0 ? "0" : df3.format((double) (100*(((double) res[1]) / ((double) nbEntered)))) %>%</td> <td style="width:90%"> </td> </tr> <% } if (q2 != null) { %> <tr class="fieldline"> <td class="dataLabel" style="width:5%"><%= q2 %></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= df2.format((long) res[2]) %></td> <td class="dataValue" style="width:5%"><fl:getMessage code="L3055" alt="soit"/></td> <td class="dataValue" style="text-align: right; width:5%" align="right"><%= nbEntered == 0 ? "0" : df3.format((double) (100*(((double) res[2]) / ((double) nbEntered)))) %>%</td> <td style="width:90%"> </td> </tr> <% } %> </table> </td> </tr> </table> <table width="100%"> <tr class="ligne_separation"></tr> <tr class="filedline"> <td class="titrePartie"> <fl:getMessage code="L63F7" alt="Saisie des retours"/> </td> </tr> <tr class="fieldline"> <td class="ligne_separation_couleur"></td> </tr> <tr class="ligne_separation"></tr> </table> <fl:form action="/save_formreturn.fl" bean="FormReturn"> <input type="hidden" name="FrnID"/> <input type="hidden" name="FrnFormID" value="<%= frmID %>"> <table cellspacing="3" cellpadding="3" width="95%"> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F2019" alt="Date"/></td> <td class="dataValue"><fl:input name="FormReturn" property="FrnDate" type="date" size="10" mandatoryMsgCode="M604B"/></td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr> <td class="dataLabel" ><fl:getMessage code="L6158" alt="Nombre de retours"/></td> <td class="dataValue" style="width:10%"><fl:input name="FormReturn" property="FrnNbReturn" mandatoryMsgCode="M604C" size="4"/></td> </tr> </table> </td> </tr> <tr class="ligne_separation"></tr> </table> </fl:form> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="ListReturn"> <fl:sTab id="LIST" title="Liste des retours"> <fl:grid height="100" width="100%" name="listFrn" ajaxUrl="/list_custom_frn_ajax.fl"/> </fl:sTab> </fl:smallTabs> </fl:bigTabs> <%}%>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de