Edit C:\galaxie\Back\galaxie\edealMobile\agenda\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.*"%> <%@ 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(); Date fromDate = new Date(); try { fromDate = Interaction.getIntDate(); }catch (FieldNotInitializedException e){} String id = null; try { id = Interaction.getIntID(); }catch (FieldNotInitializedException e){} String beginTime = null; String endTimeValue = null; String activite = null; Date begTime = null; try { begTime = Interaction.getIntTimeBeg(); beginTime = Utils.formatToWebTime(session,begTime,false); }catch (FieldNotInitializedException e){ begTime = new Date(); beginTime = ""; } Date endTime = null; try { endTime = Interaction.getIntTimeEnd(); endTimeValue = Utils.formatToWebTime(session,endTime,false); }catch (FieldNotInitializedException e){ endTimeValue=""; } try { String atvID = Interaction.getIntAtvID(); String etvDisp = (String) dico.getRefDisp("IntAtvID",atvID); activite = Utils.formatToWeb(etvDisp,false); }catch (FieldNotInitializedException e){ } String subject = null; try { subject = Interaction.getIntSubject(); }catch (FieldNotInitializedException e){ } String place = null; try { place = Interaction.getIntPlace(); } catch (FieldNotInitializedException e) { } String actorID = (String)session.getAttribute("actorID"); String todo = dico.getRefIdByCode("IntStiID","TODO"); //faire la liste des interactions pour savoir s'il y a un preview ou pas? String[] fieldPrev = {"IntID"}; String[][] queryPrev = {{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")","IntTimeBeg <="+Utils.formatToSQL(context,begTime),"IntDate <="+Utils.formatToSQL(context,fromDate),"IntID <> "+Utils.formatToSQL(context,id)},{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")","IntDate <"+Utils.formatToSQL(context,fromDate),"IntID <> "+Utils.formatToSQL(context,id)}}; String[] orderBy = {"IntDate DESC","IntTimeBeg DESC"}; Vector listPrev = InteractionBean.listSummary(context,fieldPrev,queryPrev,orderBy); String intPrevID = null; if (listPrev != null && listPrev.size() > 0) { Hashtable hash = (Hashtable) listPrev.elementAt(0); intPrevID = (String) hash.get("IntID"); } String[][] queryNext = {{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")","IntTimeBeg >="+Utils.formatToSQL(context,begTime),"IntDate >="+Utils.formatToSQL(context,fromDate),"IntID <> "+Utils.formatToSQL(context,id)},{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")","IntDate >"+Utils.formatToSQL(context,fromDate),"IntID <> "+Utils.formatToSQL(context,id)}}; String[] orderByNext = {"IntDate ASC","IntTimeBeg ASC"}; Vector listNext = InteractionBean.listSummary(context,fieldPrev,queryNext,orderByNext); String intNextID = null; if (listNext != null && listNext.size() > 0) { Hashtable hash = (Hashtable) listNext.elementAt(0); intNextID = (String) hash.get("IntID"); } %> <HTML> <HEAD> <title><fl:getMessage code="L309D" alt="Agenda"/></title> <LINK href="<fl:webapp/>/edealMobile/css/css.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> </HEAD> <BODY> <jsp:include page="/edealMobile/menu.jsp"> <jsp:param name="URLDISP" value="INTDISP"/> </jsp:include> <DIV class="action-bar"> <% if (intPrevID != null) { %> <a href="<fl:webapp/>/readm_interaction.fl?id=<%= intPrevID %>"><</a> <% } %> <a href="<fl:webapp/>/editm_interaction.fl?id=<%= id %>"><fl:getMessage code="A0008" alt="Modifier"/></a> <% if (intNextID != null) { %> <a href="<fl:webapp/>/readm_interaction.fl?id=<%= intNextID %>"> ></a> <% } %> </DIV> <DIV class="result"> <table border="0" cellpadding="0" cellspacing="0"> <TR> <td colspan="2"> <h1 class="title"><%= ((subject!= null) ? Utils.formatToWeb(subject,false) : "")%> </h1> </td> </TR> <TR valign="top"> <td width="100%" colspan="2"> <span class="important"><%= Utils.formatToWebDate(session,fromDate,false) %> <%= Utils.formatToWebTime(session,begTime,false,false)%> - <%= Utils.formatToWebTime(session,endTime,false,false)%></span> <% if (activite != null) {%> <br/><%= activite %> <% } %> <% if (place != null) {%> <br/><%= Utils.formatToWeb(place,false) %> <% } %> <% String notes = null; try { notes = Interaction.getIntDetails(); String notesStr = Utils.replace(notes,"\n"," "); int nbLigne = 2; int nbChar = 20; String nbMaxLigne = (String) session.getAttribute("ActNbLigneReadMax"); String nbCharMax = (String) session.getAttribute("ActNbCharMax"); if (nbCharMax != null) { Integer nbMax = new Integer(nbCharMax); nbChar = nbMax.intValue(); } if (nbMaxLigne != null) { Integer nbMaxLig = new Integer(nbMaxLigne); nbLigne = nbMaxLig.intValue(); } //je tronque selon la regle : int toDisplay = nbChar * nbLigne; if (notesStr.length() > toDisplay ) notesStr = notesStr.substring(0,toDisplay)+"."; %> <br/><%= Utils.formatToWeb(notesStr,false) %> <% } catch (FieldNotInitializedException e){} %> </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" class="embeded"> <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/> "+ " <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","CorEntID:EntCorpName","CorEntID"}; 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" class="embeded"> <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("CorEntID:EntCorpName"); String entID = (String) row.get("CorEntID"); if (perID != null || entID != null) { %> <tr> <td> > <% if (perID != null) { %> <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="L70BD" alt="T."/> <%= Utils.formatPhoneToMobile(phone,session)%> <% } %> <% if (mobile != null) {%> <br/> <fl:getMessage code="L70BE" alt="M."/> <%= Utils.formatPhoneToMobile(mobile,session)%> <% } %> <% if (mail != null) {%> <br/> <a href="mailto:<%= Utils.formatToWeb(mail,false)%>"><%= Utils.formatToWeb(mail,false)%></a> <% } %> </td> </tr> <% }//if perid }//for %> </table> </div> <% } //if vectCor %> <jsp:include page="/edealMobile/footer.jsp"/> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de