Source for file _ajax_send.php
Documentation is available at _ajax_send.php
* @package linea21.modules
* @author Simon Georget <simon@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once('../lib/functions_auth.php');
//////////// Check Droits utilisateur ////////////
include_once('../config/define.php');
include_once(themePath('../newsletter/'. SQL. '.inc.php'));
include_once('../class/class.newsletter.php');
include_once("../class/system/class.". SQL. ".php");
include_once('../languages/' . U_L . '/lang_newsletter.' . CHARSET . '.php');
////////////////////////////////////////
include_once('../class/system/class.'. SQL. '.php');
$GLOBALS['sql_object'] = new $sql_entity;
$GLOBALS['sql_object'] -> DBInitialise();
$GLOBALS['sql_object'] -> DBConnexion();
$emails_batch = array(0 => array('emailcol_id' => $user_id, 'emailcol_email' => $_REQUEST['user_email']));
$doNotPublish = true; // needed to keep the newsletter with open status
$newsletters[0]['newsletter_title'] .= ' (' . _t('newsletter', 'test_add') . ')';
if (count($newsletters) <= 1 && $newsletters[0] == false) {
$o = _t('newsletter', 'sent_failed');
$path = $newsletter_object->URI_TEMPLATE;
require (themePath("../mail/template_newsletter.php"));
$o = _t('newsletter', 'sent_successfully');
echo json_encode(array('status'=> $status,'msg'=> $o));
|