vars['_LICENCED_COMPANY'] =_LICENCED_COMPANY; $this->vars['systemTimeZone'] =$systemTimeZone; $visitActive = $this->vars['visitActive']; $forumActive = $this->vars['forumActive']; $personalized = $this->vars['personalized']; $this->vars['_tab'] = "     "; $mailBodyContent = ""; $mailBodyContent.= "Estimad@ [[contactName]]," . (date("G") > 12 ? "buenas tardes.

" : "buenos días.

" ); if($personalized == 1){ $mailBodyContent.= " [[personalizedMessage]]
"; } if($visitActive == 0 && $personalized != 1){ $mailBodyContent.= "
We are glad to inform your that you have been invited to participate in the bidding for the project [[projectName]] by [[_LICENCED_COMPANY]].

Attached In this email, you can find the project information such as catalogue and documents in the link

This catalogue is the one that you will be using in the time bidding. It is absolutely necessary that you work in this format, and that you prepare it with time by entering the unit prices with which your offer will start.

"; } if($visitActive == 1 && $personalized != 1){ $mailBodyContent.= "[[_LICENCED_COMPANY]] Appreciates the time that you invested in attending in the project site view. : [[projectName]].

After reviewing the bases and information and your attendance, we require the confirmation of the intention to continue participating in the process.

"; } if($visitActive==0){ $mailBodyContent.= "Within this link you will fint the necessary information for you to evaluate the project and decide whether or not you wish to participate in the electronic bidding.


[[URLBases]]

"; } $mailBodyContent.= " In order to continue participating, we ask for a prompt response by clicking on one of the following options.

[[URLAccept]]

[[URLReject]]

Once the confirmation is accepted, you will.

Anexo en este correo encontrará información de la subasta : [[auctionName]] , y de la(s) partida(s):

[[childList]]

"; if($forumActive == 1){ if($this->vars['recieverForumHour'] != $this->vars['senderForumHour']){ $mailBodyContent.= " Las fechas que usted deberá tomar en cuenta para participar en este proyecto son:

Foro de Aclaraciones

[[_tab]]Inicio:

[[_tab]][[recieverForumDate]] a las [[recieverForumHour]] hrs. (Tiempo de [[recieverLocation]]).
[[_tab]][[senderForumDate]] a las [[senderForumHour]] hrs. (Tiempo de [[systemTimeZone]]).

[[_tab]]Finalización:

[[_tab]][[recieverEndForumDate]] a las [[recieverEndForumHour]] hrs. (Tiempo de [[recieverLocation]]).
[[_tab]][[senderEndForumDate]] a las [[senderEndForumHour]] hrs. (Tiempo de [[systemTimeZone]]).

[[_tab]]Duración:[[forumLength]].

"; } else{ $mailBodyContent.= " Las fechas que usted deberá tomar en cuenta para participar en este proyecto son:

Foro de Aclaraciones

[[_tab]]Inicio: [[senderForumDate]] a las [[senderForumHour]] hrs.
[[_tab]]Finalización: [[senderEndForumDate]] a las [[senderEndForumHour]] hrs.
[[_tab]]Duración: [[forumLength]].

"; } } elseif($forumActive == 0){ $mailBodyContent.= " La fecha que usted deberá tomar en cuenta para participar en este proyecto es:

"; } if($this->vars['recieverAuctionHour'] != $this->vars['senderAuctionHour']){ $mailBodyContent.= " Licitación Electrónica

[[_tab]]Inicio:

[[_tab]][[recieverAuctionDate]] a las [[recieverAuctionHour]] hrs (Tiempo de [[recieverLocation]]).
[[_tab]][[senderAuctionDate]] a las [[senderAuctionHour]] hrs (Tiempo de [[systemTimeZone]]).

[[_tab]]Finalización:

[[_tab]][[recieverEndAuctionDate]] a las [[recieverEndAuctionHour]] hrs (Tiempo de [[recieverLocation]]).
[[_tab]][[senderEndAuctionDate]] a las [[senderEndAuctionHour]] hrs (Tiempo de [[systemTimeZone]]).

[[_tab]]Duración:[[auctionLength]].

"; } else{ $mailBodyContent.= " Licitación Electrónica

[[_tab]]Inicio: [[senderAuctionDate]] a las [[senderAuctionHour]] hrs.
[[_tab]]Finalización: [[senderEndAuctionDate]] a las [[senderEndAuctionHour]] hrs.
[[_tab]]Duración: [[auctionLength]].

"; } $mailBodyContent.= "Estas son las reglas a considerar:
    "; $i = 0; if($this->vars['desqualifyTime'] > 0){ $i++; $mailBodyContent.= "
  1. .Si usted NO realiza su primer oferta en las primeras [[desqualifyTime]] horas de la subasta, quedará descalificado de la misma.
  2. "; } $mailBodyContent.= "
  3. Usted deberá completar todos los datos solicitados en el formato de proveedor para poder participar en la subasta.
  4. Podrá apoyarse para realizar con éxito una subasta en el modulo de tutoriales o auto aprendizaje, ubicado en el Menú Principal del sistema
  5. Deberá aceptar el Acuerdo de Términos y Condiciones de La subasta para poder participar.
  6. Tendrá un límite de Reducción por Oferta y un límite de Reducción Diaria. Ambos montos se encuentran especificados en el archivo de Reglas adjunto a este correo.
  7. Los precios que usted ingrese al sistema tendrán que ser precios unitarios [[taxes]] incluido.


"; //URL variables are sent as arrays. They will be processed in this first foreach. foreach($this->vars as $var=>$value){ if(is_array($value)){ foreach ($value as $key => $val){ $this->varManager->addVar($key, $val); $this->varManager->codeURL(); } $this->vars[$var] = "" . $value['label'] . ""; } } //Variable searchPattern contains a regex that finds any string between the "[[ ]]" tags and system variables (e.g.:[[_SYSTEM_LOCATION]]) $searchPattern = "/\[\[(.*?)\]]/"; //preg_match_all create an array with all the variables found between the "[[ ]]" tags. $systemVar = preg_match_all($searchPattern, $mailBodyContent, $matches); //An array with all the replacements found in $this->vars will be created in this second foreach foreach($matches[1] as $key=>$value){ if($this->vars[$value] != ""){ $replaces[] = $this->vars[$value]; } else{ $replaces[] = "[[" . $value . "]]"; } } //Vars replacement. $functionResult = str_replace($matches[0], $replaces, $mailBodyContent); //echo $mailBodyContent; ?>