Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\scriptpage\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.*,java.text.*,java.lang.reflect.*, com.edeal.frontline.navigation.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ScriptPageBean" id="ScriptPage" 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(); // get linkscriptelement ID parameter. Is null if this is the creation. //String id = Utils.getRequestParameter(context, request, "id"); String id = null; try{ ScriptPage.getID(); }catch(FieldNotInitializedException fnie){ id = flRequest.getRequestParameterOrAttribute("id"); } // get scriptID. It's a param if this is the creation, get it from the linkscriptelementbean if this is an edition String scriptID = null; try { scriptID = ScriptPage.getScpScriptID(); } catch (FieldNotInitializedException e) { scriptID = flRequest.getRequestParameterOrAttribute("ScpScriptID"); } if (scriptID == null) { logger.warn("linkscriptelement/edit_body.jsp : I really need a script ID to do this!!"); } int position = Integer.MIN_VALUE; try { position = ScriptPage.getScpPosition(); } catch (FieldNotInitializedException fnie) { // get max page position String[] fields = {"ScpID", "ScpPosition"}; String[][] query = {{"ScpScriptID = " + Utils.formatToSQL(context , scriptID)}}; String[] orderBy = {"ScpPosition DESC"}; Vector posList = ScriptPageBean.listSummary(session, fields, query, orderBy); if (posList != null && posList.size() > 0) { Number maxPosition = (Number)((Hashtable)posList.elementAt(0)).get("ScpPosition"); if (maxPosition != null) { position = maxPosition.intValue() + 10; } } } if (position == Integer.MIN_VALUE) { position = 10; } ScriptPage.setScpPosition(position); %> <html> <head> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp" type="text/css"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script language="javascript"> function beforeSubmit() { var mf = document.forms[0]; presentFieldsValue(); } function doSubmit() { var f = document.forms[0]; if (f.ScpPosition.value < 1){ window.alert('<fl:getMessage code="M60D7" alt="La position doit être supérieur à 1" js="true"/>'); f.ScpPosition.value = '<%=position%>'; f.ScpPosition.focus(); return false; } return true; } function doUpPosition() { var mf = document.forms[0]; mf.ScpPosition.value ++; } function doDownPosition() { var mf = document.forms[0]; if (mf.ScpPosition.value > 1) mf.ScpPosition.value = mf.ScpPosition.value - 1; } </script> <title><fl:getMessage code="L2025" alt="e-Deal"/> </title> </head> <body> <div class="main_body" style="border:none;height:100%" > <fl:form method="post" action="/save_scriptpage.fl?src=save" bean="ScriptPage"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"F608C\", false, true, \"Page\")%>"> <input type="hidden" name="id" value="<fl:getProperty name="ScriptPage" property="ScpID" alt="" edit="true"/>"> <input type="hidden" name="$$presentFields"> <input type="hidden" name="ScpScriptID" value="<%= scriptID %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="ScpTitre" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="ScpTitre" mandatoryMsgCode="L63DC"/> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr><td> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="ScpCode"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" ><fl:getMessage code="F300A" alt="Position"/></td> <td class="dataValue"> <% String flechAdd = ""; flechAdd = "<a href=\"javascript:doUpPosition()\"><img src=\""+request.getContextPath()+"/icons/ico/flecheH.gif\" border=\"0\"></a> <a href=\"javascript:doDownPosition()\"><img src=\""+request.getContextPath()+"/icons/ico/flecheB.gif\" border=\"0\"></a>"; %> <fl:input property="ScpPosition" mandatoryMsgCode="M60D8" postText="<%= flechAdd %>"/> </td> </tr> </table> </td> </tr> </table> </td></tr> <tr><td colspan="3" class="ligne_separation"/></tr> </table> </fl:bigTabs> </fl:form> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td width="40%"> </td> <td style="text-align : right"><a href="javascript:submit();"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a></td> <td> </td> <td style="text-align : left"><a href="javascript:window.top.close();"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a></td> <td width="40%"> </td> </tr> </table> </div> </body>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de