Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\edealMobile\agenda\edit.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.*"%> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.TimeZone" %> <%@ page import="java.util.GregorianCalendar" %> <%@ page import="com.edeal.frontline.InteractionBean" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <jsp:useBean class="com.edeal.frontline.InteractionBean" id="Interaction" 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 fromDate = flRequest.getRequestParameterOrAttribute("fromDate"); Date baseDate = new Date(); if (fromDate != null) { baseDate = Utils.formatFromWeb(fromDate); Interaction.setIntDate(baseDate); } try { baseDate = Interaction.getIntDate(); }catch (FieldNotInitializedException e){ Interaction.setIntDate(new Date()); } String id = null; try { id = Interaction.getIntID(); }catch (FieldNotInitializedException e){} String actorID = (String)session.getAttribute("actorID"); try { Vector vectActor = Interaction.getIntActID(); }catch (FieldNotInitializedException e){ Vector vectActor = new Vector(); vectActor.addElement(actorID); Interaction.setIntActID(vectActor); } String perCorID = flRequest.getRequestParameterOrAttribute("perID"); Vector vectCorres = new Vector(); try { vectCorres = Interaction.getIntCorID(); }catch (FieldNotInitializedException e){} if (perCorID!=null && !"".equals(perCorID)) { String[] keys = {"CorPerID"}; String[] values = {perCorID}; String corID = CorrespondentBean.getCorrespondentIDBy(context, keys, values); if (!vectCorres.contains(corID)) { vectCorres.addElement(corID); } } String corIDForInput=Utils.implodeList(vectCorres, "|"); Date begTime = new Date(); try { begTime = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException e){} Date endTime = new Date(); try { endTime = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException e){} FlLocale userLocale = (FlLocale.getInstance(session)); String dateFormat = "dd/MM/yyyy"; try { dateFormat = userLocale.getDateFormat().toPattern(); } catch (Exception e) { dateFormat = "dd/MM/yyyy"; } %> <HTML> <HEAD> <title><fl:getMessage code="L309D" alt="Agenda"/></title> <LINK href="<fl:webapp/>/edealMobile/css/css.css" rel="stylesheet" type="text/css"> <script language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> <script type="text/javascript" language="javascript"> function addition_date(nbJour) { var fieldDate = new Date(); if (document.forms[0].IntDate && document.forms[0].IntDate.value) { var dateArray = parseDate('<%= dateFormat%>',document.forms[0].IntDate.value); var fieldDate = new Date(dateArray[0],dateArray[1]-1,dateArray[2]); } var nbMilSec= fieldDate.getTime(); var delayMilSec = nbJour*24*3600*1000; var resMilSec= nbMilSec + delayMilSec; var resDate = new Date(resMilSec); var resMonth = resDate.getMonth() + 1; var resStr = resDate.getDate() + "/" + resMonth + "/" + resDate.getFullYear(); var dateFormated = checkDate(resStr, 'dd/mm/yyyy', 'DD/MM/yyyy'); document.forms[0].IntDate.value = dateFormated; } function doSubmit() { var f = document.forms[0]; if (f.IntSubject && f.IntSubject.value == '') { f.IntSubject.style.backgroundColor = '#fdcbcc'; f.IntSubject.focus(); return false; } if (f.IntDate && f.IntDate.value == '') { f.IntDate.style.backgroundColor = '#fdcbcc'; f.IntDate.focus(); return false; } f.submit(); } </script> </HEAD> <BODY> <jsp:include page="/edealMobile/menu.jsp"> <jsp:param name="URLDISP" value="INTMOD1"/> </jsp:include> <!-- form method="post" action="<fl:webapp/>/savem_interaction.fl"--> <fl:form action="/savem_interaction.fl" bean="Interaction"> <input type="hidden" name="$$presentFields"> <% if (id != null) { %> <input type="hidden" name="id" value="<%= id %>"> <% } %> <input type="hidden" name="IntStiID" value="<%= dico.getRefIdByCode("IntStiID","TODO") %>"> <input type="hidden" name="IntCorID" value="<%=corIDForInput %>"> <DIV class="action-bar"> <input type="button" onclick="javascript:doSubmit()" value="<fl:getMessage code="L6146" alt="Suivant"/>"/> </DIV> <DIV class="result"> <table border="0" cellpadding="0" cellspacing="0"> <% if (id != null) { %> <TR> <td> <h1 class="title"><fl:getProperty name="Interaction" property="IntSubject" alt=""/></h1> </td> </TR> <% } %> <TR> <td> <span class="important"><input id="IntDate" name="IntDate" value="<fl:getProperty name="Interaction" property="IntDate" alt=""/>" maxlength="10" size="9" class="input date chpsTextObligatoire"> <a href="javascript:addition_date(-1)" class="button">-</a> <a href="javascript:addition_date(1)" class="button">+</a></span> </td> </TR> <TR> <td class=""> <% //decouper le begin time pour les afficher begTime int hourBeg = begTime.getHours(); int minBeg = begTime.getMinutes(); String pMinBeg = ""; if (minBeg < 15) pMinBeg = "00"; else if (minBeg < 30) pMinBeg = "15"; else if (minBeg < 45) pMinBeg = "30"; else pMinBeg = "45"; %> <select name="hourBeg"> <% for (int i = 0; i < 24; i++) { boolean selectHour = hourBeg == i; if (i < 10) { %> <option value="<%= i %>" <%= selectHour? " selected" : "" %> ><%= "0"+i %></option> <% } else { %> <option value="<%= i %>" <%= selectHour? " selected" : "" %> ><%= i %></option> <% } %> <% } %> </select> <select name="minBeg"> <option value="00" <%= (pMinBeg.equals("00"))? " selected" : "" %>>00</option> <option value="15" <%= (pMinBeg.equals("15"))? " selected" : "" %>>15</option> <option value="30" <%= (pMinBeg.equals("30"))? " selected" : "" %>>30</option> <option value="45" <%= (pMinBeg.equals("45"))? " selected" : "" %>>45</option> </select> - <% //decouper le begin time pour les afficher begTime int hourEnd = endTime.getHours(); int minEnd = endTime.getMinutes(); String pMinEnd = ""; if (minEnd < 15) pMinEnd = "00"; else if (minEnd < 30) pMinEnd = "15"; else if (minEnd < 45) pMinEnd = "30"; else pMinEnd = "45"; %> <select name="hourEnd"> <% for (int i = 0; i < 24; i++) { boolean selectHour = hourEnd == i; if (i < 10) { %> <option value="<%= "0"+i %>" <%= selectHour? " selected" : "" %> ><%= "0"+i %></option> <% } else { %> <option value="<%= i %>" <%= selectHour? " selected" : "" %> ><%= i %></option> <% } %> <% } %> </select> <select name="minEnd"> <option value="00" <%= (pMinEnd.equals("00"))? " selected" : "" %>>00</option> <option value="15" <%= (pMinEnd.equals("15"))? " selected" : "" %>>15</option> <option value="30" <%= (pMinEnd.equals("30"))? " selected" : "" %>>30</option> <option value="45" <%= (pMinEnd.equals("45"))? " selected" : "" %>>45</option> </select> </td> </TR> <TR> <td> <fl:input property="IntAtvID" htmlClass="select" style="width: 100%"/> </td> </TR> <TR> <td> <fl:input property="IntSubject" htmlClass="input" style="width: 100%"/> </td> </TR> <TR> <td> <% int nbLigne = 2; String nbMaxLigne = (String) session.getAttribute("ActNbLigneEditMax"); String nbMaxL = "2"; if (nbMaxLigne != null) { Integer nbMax = new Integer(nbMaxLigne); nbLigne = nbMax.intValue(); nbMaxL = new Integer(nbLigne).toString(); } %> <fl:input property="IntDetails" htmlClass="textarea" rows="<%= nbMaxL %>" cols="30"/> </td> </TR> </table> </DIV> <%-- <% Vector vectActor = new Vector(); try { vectActor = Interaction.getIntActID(); }catch (FieldNotInitializedException e){} String[] fieldAct = {"ActName","ActFstName","ActMobile","ActPhone","ActMail"}; String[][] queryAct = {{"ActID in ("+Utils.implodeList(vectActor,",","'")+")"}}; Vector vectAct = ActorBean.listSummary(session,fieldAct,queryAct); if (vectAct != null && vectAct.size() > 0) { %> <DIV class="resultset"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><h1 class="title"><fl:getMessage code="F1050" alt="Acteurs"/> </h1></td> </tr> <% for (int k = 0; k < vectAct.size(); k++) { Hashtable row = (Hashtable) vectAct.elementAt(k); String fstName = (String) row.get("ActFstName"); String name = (String) row.get("ActName"); String mobile = (String) row.get("ActMobile"); String phone = (String) row.get("ActPhone"); String mail = (String) row.get("ActMail"); %> <tr> <td> > <span class="important"><%= (fstName != null)? Utils.formatToWeb(fstName,false) +" " : "" %><%= Utils.formatToWeb(name,false) +" " %></span> (<fl:getMessage code="L657B" alt="Interne"/>) <%= (phone == null) ? "" : "<br/> "+ Utils.getMessage(session, "L70BD", "T.") + " " + Utils.formatPhoneToMobile(phone,session)%> <%= (mobile == null) ? "" : "<br/> "+ Utils.getMessage(session, "L70BE", "M.") + " " + Utils.formatPhoneToMobile(mobile,session)%> <%= (mail == null) ? "" : "<br/> "+ Utils.getMessage(session, "LFFFF", "E.") + " <a href=\"mailto:" + Utils.formatToWeb(mail,false) + "\">" + Utils.formatToWeb(mail,false) + "</a>"%> </td> </tr> <% } %> </table> </DIV> <% } %> <% Vector vectCorre = new Vector(); try { vectCorre = Interaction.getIntCorID(); }catch (FieldNotInitializedException e){} String[] fieldCor = {"CorPerID","CorPerID:PerName","CorPerID:PerFstName","CorPerID:PerMobile","CorPerID:PerMail","CorPerID:PerEntID:EntCorpName","CorPerID:PerEntID"}; String[][] queryCor = {{"CorID in ("+Utils.implodeList(vectCorre,",","'")+")"}}; Vector vectCor = CorrespondentBean.listSummary(session,fieldCor,queryCor); if (vectCor != null && vectCor.size() > 0) { %> <DIV class="resultset"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><h1 class="title"><fl:getMessage code="L3024" alt="Correspondant(s)"/> </h1></td> </tr> <% for (int k = 0; k < vectCor.size(); k++) { Hashtable row = (Hashtable) vectCor.elementAt(k); String perID = (String) row.get("CorPerID"); String fstName = (String) row.get("CorPerID:PerFstName"); String name = (String) row.get("CorPerID:PerName"); String phone = (String) row.get("CorPerID:PerPhone"); String mobile = (String) row.get("CorPerID:PerMobile"); String mail = (String) row.get("CorPerID:PerMail"); String raison = (String) row.get("CorPerID:PerEntID:EntCorpName"); String entID = (String) row.get("CorPerID:PerEntID"); if (perID != null) { %> <tr> <td> > <a href="<fl:webapp/>/readm_person.fl?id=<%= perID%>"> <%= (fstName != null)? Utils.formatToWeb(fstName,false) +" " : "" %><%= Utils.formatToWeb(name,false)%> </a> <% if (entID != null) { %> (<a href="<fl:webapp/>/readm_enterprise.fl?id=<%= entID%>"><%= Utils.formatToWeb(raison,false)%></a>) <% } %> <% if (phone != null) {%> <br/> <fl:getMessage code="L7015" alt="T."/> <%= Utils.formatPhoneToMobile(phone,session)%> <% } %> <% if (mobile != null) {%> <br/> <fl:getMessage code="L7016" alt="M."/> <%= Utils.formatPhoneToMobile(mobile,session)%> <% } %> <% if (mail != null) {%> <br/> <fl:getMessage code="LFFFF" alt="E."/> <a href="mailto:<%= Utils.formatToWeb(mail,false)%>"><%= Utils.formatToWeb(mail,false)%></a> <% } %> </td> </tr> <% }//if perid }//for %> </table> </div> <% } //if vectCor %> --%> </fl:form> <jsp:include page="/edealMobile/footer.jsp"/> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de