NCAT NCAT ATTRA ATTRA

DEVELOPMENT VERSION

Inicio  > Inscripción para el boletín de noticias electrónico

Inscripción para el boletín de noticias electrónico

Cosecha Mensual es un boletín de noticias dirigido a la comunidad Latina e hispanohablantes. Esta publicación trata diversos temas, recursos, actualidades y eventos de interés acerca de agricultura orgánica y sostenible. Nuestra meta en ATTRA es proporcionar información y enlaces de interés de calidad sobre agricultura orgánica y sostenible en español. Esperamos que Cosecha Mensual nos ayude a llevar esta información a una audiencia más amplia.

setValue("newsletter_page",$thisfile); /*****Newsletter Subscription Form Edited *****/ if($pageaction==""){ /*****Newsletter Subscription Form Edited *****/ echo ""; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Nombre: *
Apellido(s): *
Compañía:
Puesto:
Dirección de correo electrónico (email): *
Dirección física:
Ciudad:
Estado o Provincia:
Código postal:
País:
Tipo de boletín:"; echo " HTML ".$lang['newsletter']['newsltext']."
".$lang['newsletter'][''].""; echo "

"; echo "

* Estos compartimientos son requeridos.

"; echo "

Información Importante:
"; echo "• Ud. puede desinscribirse en cualquier momento.
"; echo "• Ud. tiene que responder por correo electrónico (email) al aviso de confirmación.

"; echo "

Condiciones de privacidad:
"; echo "No vendemos, no alquilamos, no damos ni prestamos a ningún publicista la información personal de nuestros visitantes y/o clientes del sitio. Lea nuestra condiciones de privacidad completa.

"; echo "
"; echo "Visual CAPTCHA"; echo ""; echo "Por favor ingrese
el texto de seguridad:
"; echo ""; echo "

"; echo "

"; echo " "; } /*****Subscribe Newsletter and Confirmation*****/ if($pageaction=="subscribe"){ $oNewsletter_Subscriber->data = array("email"); $oNewsletter_Subscriber->where = "email='$email'"; $result=$oNewsletter_Subscriber->getList(); if(mysql_num_rows($result)==0){ //Add To Subscriber List $oNewsletter_Subscriber->data = array("subscriber_id","firstname","lastname","company","position","email","lettertype","status"); $oNewsletter_Subscriber->value = array("",addslashes($firstname),addslashes($lastname),addslashes($company),addslashes($position),$email,$lettertype,"Verify"); $oNewsletter_Subscriber->add(); $lastID=$oNewsletter_Subscriber->getLastID(); /*****Subscribe To Newsletter Groups*****/ $lastID = $oNewsletter_Subscriber->getLastID(); for($i=0;$idata = array("group_id","subscriber_id"); $oNewsletter_Subscriber->value = array($group_id[$i],$lastID); $oNewsletter_Subscriber->subscribe(); $oNewsletter_Group->data = array("name"); $result=$oNewsletter_Group->getDetail($group_id[$i]); if($myrow=mysql_fetch_row($result)){ $groupname=stripslashes($myrow[0]); } mysql_free_result($result); $grouplist.="- $groupname\n"; } /*****Send Confirmation Email To Subscriber*****/ $activationurl=$thisfile."?pageaction=activate&subscriber_id=$lastID"; $emailfrom = ($oSystem->getValue("newsletter_popemail")==""?$oUser->getAdminEmail():$oSystem->getValue("newsletter_popemail")); $subject = stripslashes($lang['newsletter']['hsubscribeconf']); $message = stripslashes($oSystem->getValue("newsletter_msgconfirmemail")); $message = str_replace("[[firstname]]",$firstname,$message); $message = str_replace("[[grouplist]]",$grouplist,$message); $message = str_replace("[[activationurl]]",$activationurl,$message); $oSystem->mail($email,$subject,$message,$emailfrom); echo ""; echo "
".$lang['newsletter']['hsubscrnewsl']."

"; echo $lang['newsletter']['hthanksubscr']."
".$lang['newsletter']['hcheckemail']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; }else{ echo ""; echo "
".$lang['newsletter']['hsubscrnewsl']."

".$lang['newsletter']['hmsgsorry']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; } } /*****Activate Newsletter Subscription*****/ if($pageaction=="activate"){ $oNewsletter_Subscriber->data = array("status"); $oNewsletter_Subscriber->value = array("Active"); $oNewsletter_Subscriber->update($subscriber_id); echo "
"; echo "".$lang['newsletter']['hmsgactivate']."

".$lang['newsletter']['hmsgthankactive']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; } /*****Unsubscribe Newsletter*****/ if($pageaction=="unsubscribe"){ $oNewsletter_Subscriber->unsubscribehome($subscriber_id,$email); echo "
"; //echo "".$lang['newsletter']['hmsgunsubscribe']."

" echo "".$lang['newsletter']['hmsgregret']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; } /*****Change To Text-based Newsletter*****/ if($pageaction=="textnewsletter"){ $oNewsletter_Subscriber->textNewsletter($subscriber_id,$email); echo "
"; //echo "".$lang['newsletter']['hmsgreceivetxt']."

" echo "".$lang['newsletter']['hmsgtxtfuture']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; } /*****Change To HTML-based Newsletter*****/ if($pageaction=="htmlnewsletter"){ $oNewsletter_Subscriber->htmlNewsletter($subscriber_id,$email); echo "
"; echo "".$lang['newsletter']['hmsgreceivehtml']."

".$lang['newsletter']['hmsghtmlfuture']."


"; echo "".$lang['newsletter']['hreturnhome']."
"; } /*****Newsletter Listing*****/ if($pageaction=="browse" && $letter_id==""){ /*****Navigation Calculation*****/ $letter_seq = $oSystem->getValue("newsletter_seq"); $letter_pageno = $oSystem->getValue("newsletter_pageno"); $oNewsletter_Letter->data = array("letter_id","title","dateletter"); $oNewsletter_Letter->where="showletter='Yes'"; $result=$oNewsletter_Letter->getList(); if(mysql_num_rows($result)!=0){ $total=mysql_num_rows($result); }else{ $total=0; } mysql_free_result($result); if($start=="" || $start==0){ $start=0; } $prev=$start-$letter_pageno; $next=$start+$letter_pageno; $from=$start+1; $to=$letter_pageno+$from-1; if($to>=$total){ $to=$total; }if($to<$from){ $from=0; } /*****Previous and Next Navigation. Modify To Match Your Display*****/ if($prev>=0){$prevlink="".$lang['newsletter']['prev'].""; } if($next<$total){$nextlink="".$lang['newsletter']['next'].""; } if($prevlink!="" && $nextlink!=""){ $navline="  "; } echo "
".$lang['newsletter']['hsubscrnewsl']." ".$lang['newsletter']['showing']." ".$from." a ".$to." ".$lang['newsletter']['of']." ".$total." $prevlink $navline $nextlink
"; echo "
"; echo ""; $oNewsletter_Letter->order = "letter_id $letter_seq limit $start,$letter_pageno"; $result=$oNewsletter_Letter->getList(); $count=0; if(mysql_num_rows($result)!=0){ while($myrow=mysql_fetch_row($result)){ $count++; $title=""; $dateletter=""; /*****Newsletter Listing. Modify To Match Your Display*****/ if($myrow[1]!=""){$title=stripslashes($myrow[1]);} if($myrow[2]!=""){$dateletter=$myrow[2];}else{$dateletter="";} /*****Added for date conversion --> JJE 03/07/06*****/ //function dateconvert($dateletter,$func) { // if ($func == 1){ //insert conversion // list($day, $month, $year) = split('[/.-]', $dateletter); // $dateletter = "$year-$month-$day"; //return $dateletter; // } // if ($func == 2){ //output conversion // list($year, $month, $day) = split('[-.]', $dateletter); //$dateletter = "$day.$month.$year"; //return $dateletter; //} //} //$dateletter = $myrow[2]; //your mysql date //$realdate = dateconvert($dateletter,2); //echo " // // //"; /*****End Added for date conversion*****/ /*Switch the code below for teh block above when converting*/ echo ""; } mysql_free_result($result); } else{ echo ""; } echo "

".$lang['newsletter']['listno']."

".$lang['newsletter']['hnewsltitle']."

".$lang['newsletter']['hdate']."

$count.

$title

$realdate

$count.

$title

$dateletter


".$lang['newsletter']['hfound']."

"; } if($pageaction=="browse" && $letter_id!=""){ /*****Navigation Calculation*****/ $letter_seq = $oSystem->getValue("newsletter_seq"); $oNewsletter_Letter->data=array("letter_id"); $oNewsletter_Letter->where="showletter='Yes'"; $oNewsletter_Letter->order = "letter_id $letter_seq"; $result=$oNewsletter_Letter->getList(); $count=0; while($myrow=mysql_fetch_row($result)){ if($myrow[0]==$letter_id){ $curpos=$count; } $count++; } $prevpos=$curpos-1; $nextpos=$curpos+1; $curpos=$curpos+1; $total=mysql_num_rows($result); if($prevpos>=0){ mysql_data_seek($result,$prevpos); if($myrow=mysql_fetch_row($result)){ $previd=$myrow[0]; }} if($nextpos<$total){ mysql_data_seek($result,$nextpos); if($myrow=mysql_fetch_row($result)){ $nextid=$myrow[0]; }} mysql_free_result($result); if($previd!=""){ $prevlink="".$lang['newsletter']['prev'].""; } if($nextid!=""){ $nextlink="".$lang['newsletter']['next'].""; } if($prevlink!="" && $nextlink!=""){ $navline="  "; } if($lettertype=="Text"){ $oNewsletter_Letter->data = array("title","dateletter","bodytext"); }else{ $oNewsletter_Letter->data = array("title","dateletter","bodyhtml"); } $result=$oNewsletter_Letter->getDetail($letter_id); if($myrow=mysql_fetch_row($result)){ /*****Newsletter Details. Modify To Match Your Display*****/ //$title=""; $date=""; $letterbody=""; //if($myrow[0]!=""){$title=stripslashes(" $myrow[0]
"); } //if($myrow[1]!="0000-00-00"){$date="".$lang['newsletter']['hdate']." : $myrow[1]
"; } if($myrow[2]!="" && $lettertype=="Text"){$letterbody=nl2br(stripslashes("
$myrow[2]
")); }else{ $letterbody=stripslashes("
$myrow[2]
"); } echo ""; echo ""; echo ""; echo ""; echo "
".$lang['newsletter']['hback']."".$lang['newsletter']['listno']." ".$curpos." ".$lang['newsletter']['of']." ".$total."HTML | ".$lang['newsletter']['newsltext']."

$prevlink $navline $nextlink

"; echo "
"; echo "

$title


$date
$letterbody
"; } mysql_free_result($result); } ?>

Archivo de boletines

 

Regresar al comienzo

Última Actualización: 18.09.2015