<?php
global $xajax;
$xajax -> register( XAJAX_FUNCTION, 'newsletterSign' );

function newsletterSign( $type, $email )
{
  \newsletter\FNewsletter::signEmail( $type, $email );
  
  $ajax = new xajaxResponse;
  $ajax -> script( 'document.location.href="./";' );
  return $ajax;
}