<%@ Page Language="C#" Buffer="true" CodeFile="eventReferToFriend000131d8.aspx.cs" Inherits="_eventReferToFriend000131d8" CodePage="65001" UICulture="fr" Culture="fr-FR" ValidateRequest="false" %> <%@ Import Namespace="ItlRuntime" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Linq" %> <% EC.linkableClassMap = (Map) EC.newMap(new Map() , "ocsNewsEvent:news", new ClassLink("./page00013329.aspx?card=object", "linkTable.aspx?GID=00013329&card=object", "Actualité")); %><% SqlObject card = (SqlObject) (new SqlObject("ocsNewsEvent:event", @"SELECT this.`_oid` AS this, this_z.title_fr AS this_z_p_title_fr FROM ocsNewsEvent_event AS this INNER JOIN (ocsNewsEvent_card AS this_z INNER JOIN ocs_card AS this_z_z On ((this_z.`_oid` = this_z_z.`_oid`) AND (this_z_z.iso_sid <> ''))) On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this.`_oid` = #V_0&;)", new Map("#V_0&;|integer", EC.itl.toInteger(EC.itl.getParameterValue("object:ocsNewsEvent:event", "card"))),true)); string cmd = (string) ((string)EC.itl.getParameterValue("string", "cmd")); bool? searchByTheme = (bool?) ((bool?)EC.itl.getParameterValue("boolean", "searchByTheme")); string searchThemes = (string) ((string)EC.itl.getParameterValue("string", "searchThemes")); bool? searchByPeriod = (bool?) ((bool?)EC.itl.getParameterValue("boolean", "searchByPeriod")); string searchPeriod = (string) ((string)EC.itl.getParameterValue("string", "searchPeriod")); int? searchXDaysPeriod = (int?) ((int?)EC.itl.getParameterValue("integer", "searchXDaysPeriod")); DateTime? searchStartPeriod = (DateTime?) ((DateTime?)EC.itl.getParameterValue("date", "searchStartPeriod")); DateTime? searchEndPeriod = (DateTime?) ((DateTime?)EC.itl.getParameterValue("date", "searchEndPeriod")); bool? searchByLocation = (bool?) ((bool?)EC.itl.getParameterValue("boolean", "searchByLocation")); string searchLocation = (string) ((string)EC.itl.getParameterValue("string", "searchLocation")); string cmd__1 = (string) ((string)EC.itl.getParameterValue("string", "cmd")); SqlObject event__1 = (SqlObject) (new SqlObject("ocsNewsEvent:event", @"SELECT this.`_oid` AS this FROM ocsNewsEvent_event AS this INNER JOIN (ocsNewsEvent_card AS this_z INNER JOIN ocs_card AS this_z_z On ((this_z.`_oid` = this_z_z.`_oid`) AND (this_z_z.iso_sid <> ''))) On ((this.`_oid` = this_z.`_oid`) AND (this_z.iso_sid <> '')) WHERE (this.iso_sid <> '') AND (this.`_oid` = #V_0&;)", new Map("#V_0&;|integer", EC.itl.toInteger(EC.itl.getParameterValue("object:ocsNewsEvent:event", "event"))),true)); string nameFrom = (string) ((string)EC.itl.getParameterValue("string", "nameFrom")); string emailFrom = (string) ((string)EC.itl.getParameterValue("string", "emailFrom")); string emailTo = (string) ((string)EC.itl.getParameterValue("string", "emailTo")); string msg = (string) ((string)EC.itl.getParameterValue("string", "msg")); %> " /> Agenda
<% if(cmd__1 == "sendMail") { referredSiteUrl = (string)(ITL.gv["referredSiteUrl"] = EC.destination["httpURL"]); if(EC.itl.stringSubstr(ITL.S((string)ITL.gv["referredSiteUrl"]),(ITL.S((string)ITL.gv["referredSiteUrl"]).Length - 1), 1) == "/") { referredSiteUrl = (string)(ITL.gv["referredSiteUrl"] = EC.itl.stringSubstr(ITL.S((string)ITL.gv["referredSiteUrl"]),0, (ITL.S((string)ITL.gv["referredSiteUrl"]).Length - 1))); } string referredEventUrl = (string) (((EC.destination["httpURL"] + "linkTable.aspx?GID=000131d8") + "&card=") + EC.itl.toString(card)); string emailSubject = (string) ((ITL.S(nameFrom) + " vous fait découvrir un événement sur ") + ITL.S((string)ITL.gv["referredSiteUrl"])); ItlMail mail4 = new ItlMail(); mail4.setProperty("to", emailTo); mail4.setProperty("from", emailFrom); mail4.setProperty("subject", emailSubject); mail4.addToBody( @"
Bonjour,

"); ITL.show(nameFrom, "string", "html", "string"); mail4.addToBody( @" a repéré sur "); ITL.show((string)ITL.gv["referredSiteUrl"], "string", "html", "string"); mail4.addToBody( @" un événement qui peut vous intéresser.

Pour visualiser cet événement, cliquez ici :
"); ITL.show((string)card.get("this_z_p_title_fr"), "string", "html", "string"); mail4.addToBody( @"

"); if(msg != "") { mail4.addToBody( @"

Son message :
"); ITL.show(msg, "string", "memo", "string"); mail4.addToBody( @"

"); } mail4.addToBody( @"

Nous vous souhaitons une bonne visite sur "); ITL.show((string)ITL.gv["referredSiteUrl"], "string", "html", "string"); mail4.addToBody( @" !

"); mail4.exec();; } %>

Recommander cet événement

<% if(cmd__1 == "sendMail") { %>
Merci,

Votre message a bien été envoyé à votre ami(e)!

<% } else {%>
<%ItlForm form6 = new ItlForm("form6", EC.itl.getId(), "./eventReferToFriend000131d8.aspx", "G000131d8_7"); form6.setProperty("name", "formReferToFriend"); form6.setProperty("method", "POST"); form6.setProperty("class", "eventReferToFriendForm"); form6.setProperty("hasProcessing", false); form6.addParameter("card", EC.itl.makeParameter(card, "object")); form6.addParameter("cmd", "sendMail"); form6.show(); %>
Le destinataire de votre message :

<%OdfControl input8 = OdfControlFactory.create("generic", "emailTo", "emailTo", null); input8.setForm(form6); input8.setProperty("kind", "required"); input8.setProperty("width", "245"); input8.show(); %>

<%OdfControl input9 = OdfControlFactory.create("textArea", "msg", "msg", null); input9.setForm(form6); input9.setProperty("width", "245"); input9.show(); %>

De la part de :

<%OdfControl input10 = OdfControlFactory.create("generic", "nameFrom", "nameFrom", null); input10.setForm(form6); input10.setProperty("kind", "required"); input10.setProperty("width", "245"); input10.show(); %>

<%OdfControl input11 = OdfControlFactory.create("generic", "emailFrom", "emailFrom", null); input11.setForm(form6); input11.setProperty("kind", "required"); input11.setProperty("width", "245"); input11.show(); %>

<% ItlLink link12 = new ItlLink("#"); link12.setProperty("onclick", "document.forms.formReferToFriend.submitButton.click(); return false;"); link12.setProperty("renderstyle.aClass", "bsButton"); link12.setProperty("renderstyle.spanClass", "bsButtonSpan"); link12.setProperty("renderstyle", "button"); link12.show(); %> Envoyer <% link12.close(); %>
<%form6.close();%>
<% } %>