Your IP : 216.73.217.68


Current Path : /home/wuectly/www/03cbe/
Upload File :
Current File : /home/wuectly/www/03cbe/com_mailjet.tar

views/mailjet/view.json.php000060400000001474152455303760011775 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
error_reporting(E_ALL & ~E_NOTICE);
// no direct access
defined( '_JEXEC' ) or die ( 'Restricted access' );

jimport('joomla.application.component.view');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JViewLegacy')) {
  class_alias('JView','JViewLegacy');
}

class MailjetViewMailjet extends JViewLegacy {

    function display($tpl = null) {
        global $result;
        $document = JFactory::getDocument();
        $document->setMimeEncoding('application/json');

        echo json_encode($result);
    }

}
mailjet.php000060400000001547152455303760006717 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// no direct access
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 1);
defined('_JEXEC') or die('Restricted access');

if(!defined('DS')){
  define('DS',DIRECTORY_SEPARATOR);
}

// Require the base controller
require_once (JPATH_COMPONENT . DS . 'controller.php');

// Require specific controller if requested
if ($controller = JRequest::getVar('controller')) {
    require_once (JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php');
}

// Create the controller
$classname = 'MailjetController' . $controller;
$controller = new $classname();

// Perform the Request task
$controller->execute(JRequest::getVar('task'));

// Redirect if set by the controller
$controller->redirect();
models/mailjet.php000060400000005177152455303760010205 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die();

if (!defined('DS')) {
  define('DS',DIRECTORY_SEPARATOR);
}

jimport('joomla.application.component.model');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JModelLegacy')) {
  class_alias('JModel','JModelLegacy');
}

/* Require the Mailjet API library */
require_once (sPrintF ('%s/components/com_mailjet/lib/lib/mailjet-api-strategy.php', JPATH_ADMINISTRATOR));

class MailjetModelMailjet extends JModelLegacy {

    protected $api;
    protected $params;

    function __construct()
    {
        parent::__construct();
        $this->params = $this->getAsRecord();
        $this->api = new Mailjet_Api($this->params['username'], $this->params['password']);				
    }
	
    function store(){
    	// Get the data which we'll save
        $email = filter_var($_POST['mailjet-email'], FILTER_SANITIZE_EMAIL);
        $list_id = filter_var($_POST['mailjet-list_id'], FILTER_SANITIZE_NUMBER_INT);
        if (empty($email)) $email = filter_var($_GET['mailjet-email'], FILTER_SANITIZE_EMAIL);
        if (empty($list_id)) $list_id = filter_var($_GET['mailjet-list_id'], FILTER_SANITIZE_NUMBER_INT);
        if ((empty($email)) || (empty($list_id))) return false;
	
		// Add the contact to the contact list
        $response = $this->api->addContact(array(
            'Email' => $email,
            'ListID' => $list_id
        ));
		
        if(isset($response->Status) && $response->Status == 'OK')
            return true;
        return false;
    }

    public function getAsRecord ()
    {
        //Below are some comments containing error messages to improve usability
        $credentials = sPrintF ('%s/components/%s/lib/db/data', JPATH_ADMINISTRATOR, 'com_mailjet');

        if(file_exists($credentials)){
            
            $pre_data = null;
            $content = trim(file_get_contents($credentials));
            
            if ($content) {
                $pre_data = json_decode($content);
            }

            /*if(!$pre_data->apiKey || !$pre_data->apiSecret){
                JError::raiseWarning( 100, JText::_("COM_MAILJET_INCOMPLETE_INFO") );
            }*/

            $data ['username'] = $pre_data->apiKey;
            $data ['password'] = $pre_data->apiSecret;

            return $data;
		}
        /*else{
            JError::raiseWarning( 100, JText::_("COM_MAILJET_NO_DATAFILE") );
        }*/
    }
}
controller.php000060400000001615152455303760007451 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
error_reporting(E_ALL & ~E_NOTICE);
// no direct access
defined( '_JEXEC' ) or die ( 'Restricted access' );

jimport('joomla.application.component.controller');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JControllerLegacy')) {
  class_alias('JController','JControllerLegacy');
}

class MailjetController extends JControllerLegacy {

    function save() {
        global $result;

        $model = $this->getModel();

        $result = $model->store();
        if ($result != false) {
          $this->display();
        } else {
          header('HTTP/1.0 404 Not Found');
        }
    }
}
views/campaigns/view.html.php000060400000002420152455705060012274 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JViewLegacy')) {
  class_alias('JView','JViewLegacy');
}

if (!class_exists('JModelLegacy')) {
  class_alias('JModel','JModelLegacy');
}

$jversion = new JVersion;
$jshort = $jversion->getShortVersion();

$lang = JFactory::getLanguage();
$extension = 'com_mailjet';
$base_dir = JPATH_SITE;
$language_tag =  $lang->getTag();
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);

class MailjetViewCampaigns extends JViewLegacy
{
    /**
     * HelloWorlds view display method
     * @return void
     */
    function display($tpl = null)
    {
        JToolBarHelper::title (JText::_("COM_MAILJET_CAMPAIGNS"), 'logo.png' );
        //JToolBarHelper::save ();

        $this->sidebar = JHtmlSidebar::render();
        
        parent::display ($tpl);
    }
}views/campaigns/tmpl/default.php000060400000002023152455705070012757 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die('Restricted access'); 

$lib_dir = __DIR__.'/../../../lib/';

require_once ($lib_dir.'config.php');
require_once ($lib_dir.'lib/Auth.php');
require_once ($lib_dir.'lib/mailjet-api-strategy.php');

$auth = new Auth();

$nextStepUrl = $auth->haveToken() ? 'campaigns' : 'reseller/signup';

//$address = "{$mailjetUrl}/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";
$address = "https://".(($auth->getApiVersion == '0.1')?"www":(($auth->getApiVersion == 'REST')?"app":"www")).".mailjet.com/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";

if ($auth->haveToken()) {
    $address .= "&t=" . $auth->getToken();  
}
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
    <iframe width="1000" height="1300" src="<?php echo $address; ?>">
</div>views/statistics/view.html.php000060400000002415152455705070012531 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JViewLegacy')) {
  class_alias('JView','JViewLegacy');
}

if (!class_exists('JModelLegacy')) {
  class_alias('JModel','JModelLegacy');
}

$jversion = new JVersion;
$jshort = $jversion->getShortVersion();

$lang = JFactory::getLanguage();
$extension = 'com_mailjet';
$base_dir = JPATH_SITE;
$language_tag =  $lang->getTag();
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);

class MailjetViewStatistics extends JViewLegacy
{
    /**
     * HelloWorlds view display method
     * @return void
     */
    function display($tpl = null)
    {
        JToolBarHelper::title (JText::_("COM_MAILJET_STATS"), 'logo.png' );
        //JToolBarHelper::save ();
        
        $this->sidebar = JHtmlSidebar::render();

        parent::display ($tpl);
    }
}views/statistics/tmpl/default.php000060400000002017152455705070013212 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die('Restricted access'); 

$lib_dir = __DIR__.'/../../../lib/';

require_once ($lib_dir.'config.php');
require_once ($lib_dir.'lib/Auth.php');
require_once ($lib_dir.'lib/mailjet-api-strategy.php');

$auth = new Auth();

$nextStepUrl = $auth->haveToken() ? 'stats' : 'reseller/signup';

//$address = "{$mailjetUrl}/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";
$address = "https://".(($auth->getApiVersion == '0.1')?"www":(($auth->getApiVersion == 'REST')?"app":"www")).".mailjet.com/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";

if ($auth->haveToken()) {
    $address .= "&t=" . $auth->getToken();  
}
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
    <iframe width="1000" height="1300" src="<?php echo $address; ?>">
</div>views/mailjet/tmpl/default.php000060400000007143152455705070012452 0ustar00<?php 
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
 defined('_JEXEC') or die('Restricted access'); ?>

<div id="j-sidebar-container" class="span2">
    <?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10 iframe">
    <form action="<?php echo JRoute::_('index.php?option=com_mailjet&layout=edit') ?>" method="post" id="adminForm" name="adminForm">
        <div class="social" style="width:25%;float:right;border: 1px #CCC solid; border-radius: 6px; padding:8px">
            <h3><?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_SHARE'); ?></h3>
            <div style="margin-bottom:10px">
                <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_FACEBOOK_LINK'); ?>
            </div>
            <div>
                <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_TWITTER_LINK'); ?>
            </div>
        </div>
        <div id="editcell"style="width:70%">
            <fieldset class="adminform">
                <legend><?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_TITLE'); ?></legend>

                <ol>
                    <li>
                        <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_ACCOUNT'); ?>
                    </li>
                    <li>
                        <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_LIST'); ?>
                    </li>
                    <li>
                        <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_WIDGET'); ?>
                    </li>
                    <li>
                        <?php echo JText::_ ('COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_CAMPAIGN'); ?>
                    </li>
                </ol>

            </fieldset>
            <fieldset class="adminform">
                <legend><?php echo JText::_ ('COM_MAILJET_GENERAL_SETTINGS'); ?></legend>
                <p><?php echo JText::_ ('COM_MAILJET_MAILJET_SETTINGS_API_KEYS_HELP'); ?></p>

                <label for="enable"><?php echo JText::_ ('COM_MAILJET_GENERAL_SETTINGS_ENABLED'); ?></label> <input type="checkbox" name="enable" id="enable" <?php if ($this->params ['enable']) echo 'checked="checked"'; ?> />
                <label for="test"><?php echo JText::_ ('COM_MAILJET_GENERAL_SETTINGS_SEND_TEST'); ?></label> <input type="checkbox" name="test" id="test" <?php if ($this->params ['test']) echo 'checked="checked"'; ?> />
                <label for="test_address"><?php echo JText::_ ('COM_MAILJET_GENERAL_SETTINGS_TEST_RECIPIENT'); ?></label> <input type="text" name="test_address" id="test_address" value="<?php echo $this->params ['test_address']; ?>" style="width:220px;" />
            </fieldset>

            <fieldset class="adminform">
                <legend><?php echo JText::_ ('COM_MAILJET_MAILJET_SETTINGS'); ?></legend>

                <label for="username"><?php echo JText::_ ('COM_MAILJET_MAILJET_SETTINGS_API_KEY'); ?></label> <input type="text" name="username" id="username" value="<?php echo $this->params ['username']; ?>" style="width:220px;" />
                <label for="password"><?php echo JText::_ ('COM_MAILJET_MAILJET_SETTINGS_SECRET_KEY'); ?></label> <input type="text" name="password" id="password" value="<?php echo $this->params ['password']; ?>" style="width:220px;" />
            </fieldset>
        </div>
        <?php echo JHTML::_( 'form.token' ); ?>
        <input type="hidden" name="option" value="com_mailjet" />
        <input type="hidden" name="task" value="" />
        <input type="hidden" name="controller" value="mailjetedit" />
    </form>
</div>views/mailjet/view.html.php000060400000002521152455705070011762 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JViewLegacy')) {
  class_alias('JView','JViewLegacy');
}

/**
 * HelloWorlds View
 */
class MailjetViewMailjet extends JViewLegacy
{
    /**
     * HelloWorlds view display method
     * @return void
     */
    function display($tpl = null)
    {
        JToolBarHelper::title (JText::_( 'COM_MAILJET_MAILJET_SETTINGS' ), 'logo.png' );
        JToolBarHelper::save('save');

        $model = $this->getModel('mailjet');

        if (count (JRequest::get ('post')))
        {
            $params = $model->getAsPost ();
        }
        else
        {
            $params = $model->getAsRecord ();
        }
        $this->assignRef ('params', $params);
        JFactory::getDocument()->addStyleSheet(JURI::base(). "components/com_mailjet/styles.css");
        $this->sidebar = JHtmlSidebar::render();
        parent::display ($tpl);
    }
}
views/contacts/tmpl/default.php000060400000002030152455705070012631 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
defined('_JEXEC') or die('Restricted access'); 

$lib_dir = __DIR__.'/../../../lib/';

require_once ($lib_dir.'config.php');
require_once ($lib_dir.'lib/Auth.php');
require_once ($lib_dir.'lib/mailjet-api-strategy.php');

$auth = new Auth();

$nextStepUrl = $auth->haveToken() ? 'contacts/lists' : 'reseller/signup';

//$address = "{$mailjetUrl}/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";
$address = "https://".(($auth->getApiVersion == '0.1')?"www":(($auth->getApiVersion == 'REST')?"app":"www")).".mailjet.com/{$nextStepUrl}?r={$resellerName}&show_menu=none&u=Joomla-3.0&f=amc";

if ($auth->haveToken()) {
    $address .= "&t=" . $auth->getToken();  
}
?>

<div id="j-sidebar-container" class="span2">
	<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
    <iframe width="1000" height="1300" src="<?php echo $address; ?>">
</div>views/contacts/view.html.php000060400000002416152455705070012156 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

if (!function_exists('class_alias')) { // For php older then 5.3
  function class_alias($orig, $alias) {
    eval('abstract class ' . $alias . ' extends ' . $orig . ' {}');
  }
}

if (!class_exists('JViewLegacy')) {
  class_alias('JView','JViewLegacy');
}

if (!class_exists('JModelLegacy')) {
  class_alias('JModel','JModelLegacy');
}

$jversion = new JVersion;
$jshort = $jversion->getShortVersion();

$lang = JFactory::getLanguage();
$extension = 'com_mailjet';
$base_dir = JPATH_SITE;
$language_tag =  $lang->getTag();
$reload = true;
$lang->load($extension, $base_dir, $language_tag, $reload);

class MailjetViewContacts extends JViewLegacy
{
    /**
     * HelloWorlds view display method
     * @return void
     */
    function display($tpl = null)
    {
        JToolBarHelper::title (JText::_("COM_MAILJET_CONTACTS"), 'logo.png' );
        //JToolBarHelper::save ();
        
        $this->sidebar = JHtmlSidebar::render();

        parent::display ($tpl);
    }
}lib/lib/mailjet-api-strategy.php000060400000047635152455705070012652 0ustar00<?php

/*
 * LICENSE BLOCK
 * 
 * This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it
 * and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
 * http://sam.zoy.org/wtfpl/COPYING for more details.
 * 
 */
 
defined('_JEXEC') or die('Restricted access');

/* Require the mailjet API libraries */
require_once (__DIR__ . '/api/mailjet-api-v1.php');
require_once (__DIR__ . '/api/mailjet-api-v3.php');
 
 /**
 * This is Api Strategy Interface
 * @author		Pavel Tashev  
 * @author		Mailjet
 * @link		http://www.mailjet.com/
 */
 
 # ============================================== Interface ============================================== #
 interface Mailjet_Api_Interface 
 {
	public function getSenders($params);
 	public function getContactLists($params);
 	public function addContact($params);
	public function removeContact($params);
	public function unsubContact($params);
	public function subContact($params);	
	public function getAuthToken($params);	
	public function validateEmail($email);
 }
 
 
 
 
 
 # ============================================== Strategy ============================================== #
 # Strategy ApiV1
 class Mailjet_Api_Strategy_V1 extends Mailjet_Api_V1 implements Mailjet_Api_Interface
 {
	/**
	 * Get full list of senders
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
 	public function getSenders($params)
	{
		// Set input parameters
		$input = array();
		if(isset($params['limit'])) $input['limit'] = $params['limit'];

		// Get the list
		$response = $this->userSenderList()->senders;
					
		// Check if the list exists
		if(isset($response))
		{
			$senders = array();
			$senders['domain'] = array();
			$senders['email'] = array();
			
			foreach ($response as $sender)
			{
				if($sender->status == 'active')
				{
					if(substr($sender->email, 0, 2) == '*@') 
						$senders['domain'][] = substr($sender->email, 2, strlen($sender->email)); // This is domain
					else						
						$senders['email'][] = $sender->email; // This is email
				}
			}
			return $senders;
		}		
		
		return (object) array('Status' => 'ERROR');
	}
	
 	/**
	 * Get full list of contact lists
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
 	public function getContactLists($params)
	{
		// Set input parameters
		$input = array();
		if(isset($params['limit'])) $input['limit'] = $params['limit'];
		
		// Get the list
		$response = $this->listsAll($input);

		// Check if the list exists
		if(isset($response->status) && $response->status == 'OK')
		{
			$lists = array();
			foreach ($response->lists as $list)
			{
				$lists[] = array(
					'value' 		=> $list->id,
					'label' 		=> $list->label,
					'subscribers'	=> $list->subscribers,
				);
			}
			return $lists;
		}		
		
		return (object) array('Status' => 'ERROR');
	}
	
	/**
	 * Add a contact to a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
 	public function addContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Add the contact
		$response = $this->listsAddContact(array(
			'method'	=> 'POST',
			'contact'	=> $params['Email'],
			'id'		=> $params['ListID']
		));
				
		// Check if the contact is added 
		if($response)
			return (object) array('Status' => 'OK');
		
		return (object) array('Status' => 'ERROR');
	}
	
	/**
	 * Remove a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	public function removeContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Unsubscribe the contact
		$response = $this->listsRemoveContact(array(
			'method'	=> 'POST',
			'contact'	=> $params['Email'],
			'id'		=> $params['ListID']
		));
		
		// Check if the contact is added 
		if($response)
			return (object) array('Status' => 'OK');
		
		return (object) array('Status' => 'OK');
	}
	
	/**
	 * Unsubscribe a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	*/
	public function unsubContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
			
		// Unsubscribe the contact
		$response = $this->listsUnsubContact(array(
			'method'	=> 'POST',
			'contact'	=> $params['Email'],
			'id'		=> $params['ListID']
		));
		
		// Check if the contact is added 
		if($response)
			return (object) array('Status' => 'OK');
		
		return (object) array('Status' => 'OK');
	}
	
	/**
	 * Subscribe a contact to a contact list with ID = ListID
	 *
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	public function subContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Subscribe the user
		$response = $this->listsAddContact(array(
			'method'	=> 'POST',
			'id'		=> $params['ListID'],
			'contact'	=> $params['Email'],
			'force'		=> 1,
		));
		
		// Check if the contact is added 
		if($response)
			return (object) array('Status' => 'OK');
		
		return (object) array('Status' => 'OK');
	}
	
	/**
	 * Get the authentication token for the iframes
	 * 
	 * @param (array) $param = array('APIKey', 'SecretKey', ...) 
	 * @return (object)
	*/
	public function getAuthToken($params)
	{		
		// Check if the input data is OK
		if(strlen(trim($params['APIKey'])) == 0 || strlen(trim($params['SecretKey'])) == 0)
			return (object) array('Status' => 'ERROR');	
			
	 	if (isset($params['MailjetToken']))
		{
			$op = json_decode($params['MailjetToken']);
			if ($op->timestamp > time() - 3600)
				return $op->token;
		}

		// Get the culture
		if(isset($lang) && $lang != null)
		{
			$locale = substr($lang->getTag(), 0, 2);
			if (!in_array($locale, array('en', 'fr', 'es', 'de')))
				$locale = 'en';
		} else {
			$locale = 'en';
		}

		// Define some required data
		$url = $this->apiUrl.'/apiKeyauthenticate?output=json';
		$data = array(
			'allowed_access[0]' => 'stats',
			'allowed_access[1]' => 'contacts',
			'allowed_access[2]' => 'campaigns',
			'lang' 				=> $locale,
			'default_page'		=> 'campaigns',
			'type' 				=> 'page',
			'apikey' 			=> $params['APIKey']
		);
		
		// Execute POST request
		$curl = curl_init();
		curl_setopt_array($curl, array(
		    CURLOPT_RETURNTRANSFER => 1,
		    CURLOPT_URL => $url,
		    CURLOPT_USERAGENT => 'Codular Sample cURL Request',
		    CURLOPT_POST => 1,
		    CURLOPT_POSTFIELDS => $data
		));
		curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    		"Authorization: Basic ".base64_encode($params['APIKey'] . ':' . $params['SecretKey'])
    	));
		$result = curl_exec($curl);
		$resp = json_decode($result);
		
		if (is_object($resp))
			if ($resp->status == 'OK')
				return $resp->token;
		
		return (object) array('Status' => 'ERROR'); 
	}	

	/**
	 * Validate if $email is real email
	 * 
	 * @param (string) $email 
	 * @return (boolean) TRUE|FALSE 
	 */
	public function validateEmail($email) {
		return (preg_match("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/", $email) || !preg_match("/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/", $email)) ? FALSE : TRUE;
	}
 }


 # Strategy ApiV3
 class Mailjet_Api_Strategy_V3 extends Mailjet_Api_V3 implements Mailjet_Api_Interface
 {
	/**
	 * Get full list of senders
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
 	public function getSenders($params)
	{
		// Set input parameters
		$input = array();
		if(isset($params['limit'])) $input['limit'] = $params['limit'];

		// Get the list
		$response = $this->sender($input);

		// Check if the list exists
		if(isset($response->Data))
		{
			$senders = array();
			$senders['domain'] = array();
			$senders['email'] = array();
			
			foreach ($response->Data as $sender)
			{
				if($sender->Status == 'Active')
				{
					if(substr($sender->Email, 0, 2) == '*@') 
						$senders['domain'][] = substr($sender->Email, 2, strlen($sender->Email)); // This is domain
					else						
						$senders['email'][] = $sender->Email; // This is email
				}
			}
			return $senders;
		}		
		
		return (object) array('Status' => 'ERROR');
	}
	
 	/**
	 * Get full list of contact lists
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
 	public function getContactLists($params)
	{
		// Set input parameters
		$input = array(
			'akid'	=> $this->_akid
		);
		if(isset($params['limit'])) $input['limit'] = $params['limit'];
		
		// Get the list
		$response = $this->liststatistics($input);

		// Check if the list exists
		if(isset($response->Data))
		{
			$lists = array();
			foreach ($response->Data as $list)
			{
				$lists[] = array(
					'value' 		=> $list->ID,
					'label' 		=> $list->Name,
					'subscribers'	=> $list->SubscriberCount,
				);
			}
			return $lists;
		}		
		
		return (object) array('Status' => 'ERROR');
	}
	
	/**
	 * Add a contact to a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
 	public function addContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Add the contact
		$result = $this->manycontacts(array(
			'method'			=> 'POST',
			'Action'			=> 'Add',
			'Addresses'			=> array($params['Email']),
			'ListID'			=> $params['ListID'],
		));

		// Check if any error
		if(isset($result->Data['0']->Errors->Items)) {
			if( strpos($result->Data['0']->Errors->Items[0]->ErrorMessage, 'duplicate') !== FALSE )
				return (object) array('Status' => 'DUPLICATE');
			else
				return (object) array('Status' => 'ERROR');	
		}		
		
		$this->subContact($params);
		return (object) array('Status' => 'OK');
	}
	
	/**
	 * Remove a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	public function removeContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
			
		// Get the contact	
		$result = $this->listrecipient(array(
			'akid'          => $this->_akid,
			'method'        => 'GET',
			'ListID'		=> $params['ListID'],
			'ContactEmail'  => $params['Email']
        ));
        if($result->Count > 0) 
        {
            foreach($result->Data as $contact) 
			{
				// Remove the contact
				$response = $this->listrecipient(array(
					'akid'				=> $this->_akid,
					'method'			=> 'delete',
					'ID'				=> $contact->ID
				));
            }
			
			// Check if the unsubscribe is done correctly
			if(isset($response->Data[0]->ID))
				return (object) array('Status' => 'OK');
        }

		return (object) array('Status' => 'ERROR');
	}
	 
	/**
	 * Unsubscribe a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	*/
	public function unsubContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Get the contact	
		$result = $this->listrecipient(array(
			'akid'          => $this->_akid,
			'method'        => 'GET',
			'ListID'		=> $params['ListID'],
			'ContactEmail'  => $params['Email']
        ));
        if($result->Count > 0) 
        {
            foreach($result->Data as $contact) 
            {
                if($contact->IsUnsubscribed !== TRUE)
                {
                      $response = $this->listrecipient(array(
                            'akid'    			=> $this->_akid,
                            'method'   			=> 'PUT',
                            'ID'       			=> $contact->ID,
                            'IsUnsubscribed' 	=> 'true',
                            'UnsubscribedAt' 	=> date("Y-m-d\TH:i:s\Z", time()),
                      ));
                } 
            }
			
			// Check if the unsubscribe is done correctly
			if(isset($response->Data[0]->ID))
				return (object) array('Status' => 'OK');
        }
		
		return (object) array('Status' => 'ERROR');
	}
	
	/**
	 * Subscribe a contact to a contact list with ID = ListID
	 *
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	public function subContact($params)
	{
		// Check if the input data is OK
		if(!is_numeric($params['ListID']) || !$this->validateEmail($params['Email']))
			return (object) array('Status' => 'ERROR');	
		
		// Get the contact	
		$result = $this->listrecipient(array(
			'akid'          => $this->_akid,
			'method'        => 'GET',
			'ListID'		=> $params['ListID'],
			'ContactEmail'  => $params['Email']
        ));		
		
        if($result->Count > 0) 
        {
            foreach($result->Data as $contact) 
            {
                if($contact->IsUnsubscribed === TRUE)
                {
	                  $response = $this->listrecipient(array(
	                        'akid'    			=> $this->_akid,
	                        'method'   			=> 'PUT',
	                        'ID'       			=> $contact->ID,
	                        'IsUnsubscribed' 	=> 'false',	                        
	                  ));
                } 
            }
			
			// Check if the subscribe is done correctly
			if(isset($response->Data[0]->ID))
				return (object) array('Status' => 'OK');
        }
		
		return (object) array('Status' => 'ERROR');
	}
	
	/**
	 * Get the authentication token for the iframes
	 * 
	 * @param (array) $param = array('APIKey', 'SecretKey', ...) 
	 * @return (object)
	*/
	public function getAuthToken($params)
	{
		// Check if the input data is OK
		if(strlen(trim($params['APIKey'])) == 0 || strlen(trim($params['SecretKey'])) == 0)
			return (object) array('Status' => 'ERROR');	

		// Get the ID of the Api Key
	 	$api_key_response = $this->apikey(array(
			'method' => 'GET',
			'APIKey' => $params['APIKey']
		));

		// Check if the response contains data
		if(!isset($api_key_response->Data[0]->ID))
			return (object) array('Status' => 'ERROR');

		// Get token
		$response = $this->apitoken(array(
			'AllowedAccess' =>  'campaigns,contacts,reports,stats,preferences,pricing,account',
			'method' 		=> 'POST',			
			'APIKeyID' 		=> $api_key_response->Data[0]->ID,
			'TokenType' 	=> 'iframe',			
			'CatchedIp'  	=> $_SERVER['REMOTE_ADDR'],
			'log_once' 		=> TRUE,
			'IsActive'		=> TRUE
		));	

	 	// Get and return the token
		if(isset($response->Data) && count($response->Data) > 0)
			return $response->Data[0]->Token;
		
		return (object) array('Status' => 'ERROR');
	}	
	
	/**
	 * Validate if $email is real email
	 * 
	 * @param (string) $email 
	 * @return (boolean) TRUE|FALSE 
	 */
	public function validateEmail($email) {
		return (preg_match("/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/", $email) || !preg_match("/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/", $email)) ? FALSE : TRUE;
	}
 }
 
 
 
 
 
 # ============================================== Context ============================================== #
 class Mailjet_Api
 {
 	private $context;
	public $version; 
	public $apiUrl;
	
	public function __construct($mailjet_username, $mailjet_password)
  	{
  		# Check the type of the user and set the corresponding Context/Strategy
  		// Set API V3 context and get the user and check if it's V3   		
		$this->setContext(new Mailjet_Api_Strategy_V3($mailjet_username, $mailjet_password));
		//$response = $this->context->getContactLists(array('limit' => 1));
		$response = $this->context->getSenders(array('limit' => 1));
		if(isset($response->Status) && $response->Status == 'ERROR')
		{
			// Set API V1 context and get the contact lists of this user and check if it's V1
			$this->setContext(new Mailjet_Api_Strategy_V1($mailjet_username, $mailjet_password));	
			$response = $this->context->getSenders(array('limit' => 1));
			if(isset($response->Status) && $response->Status == 'ERROR')
			{				
				$this->clearContext();			
			} 
			else {			
				// Get the version and the apiUrl of the API
				$this->version = $this->context->version;
				$this->apiUrl = 'in.mailjet.com';
			}
		} else {
			// Get the version and the apiUrl of the API
			$this->version = $this->context->getVersion();
			$this->apiUrl = 'in-v3.mailjet.com';
		}		
	}
	
	/**
	 * Set the context of the Api - V1 or V3 
	 *
     * @param Mailjet_Api_Interface $context
     * @return void
     */
	private function setContext(Mailjet_Api_Interface $context)
    {
        $this->context = $context;
    }
	
	/**
	 * Clear the context
	 *
     * @param void
     * @return void
     */
	private function clearContext()
    {
        $this->context = FALSE;
    }
	
	
	/**
	 * Get full list of senders
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
	public function getSenders($params)
	{	
		// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
			
		return $this->context->getSenders($params);
	}	
	
	/**
	 * Get full list of contact lists
	 * 
	 * @param (array) $param = array('limit', ...) 
	 * @return (object)
	 */
	public function getContactLists($params)
	{	
		// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
			
		return $this->context->getContactLists($params);
	}
	
	/**
	 * Add a contact to a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	 public function addContact($params)
	 {
	 	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
	 	return $this->context->addContact($params);
	 }
	 
	 /**
	 * Remove a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	 public function removeContact($params)
	 {
	 	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
	 	return $this->context->removeContact($params);
	 }
	 
	 /**
	 * Unsubscribe a contact from a contact list with ID = ListID
	 * 
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	*/
	  public function unsubContact($params)
	  {
	  	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
	  	return $this->context->unsubContact($params);
	  }
	  
	 /**
	 * Subscribe a contact to a contact list with ID = ListID
	 *
	 * @param (array) $param = array('Email', 'ListID', ...) 
	 * @return (object)
	 */
	  public function subContact($params)
	  {
	  	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
	  	return $this->context->subContact($params);
	  }
	  
	  /**
		* Get the authentication token for the iframes
		* 
		* @param (array) $param = array('APIKey', 'SecretKey', ...) 
		* @return (object)
	  */
	  public function getAuthToken($params)
	  {
	  	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
	  	return $this->context->getAuthToken($params);
	  }	
	  
	  /**
	  * Validate if $email is real email
	  * 
	  * @param (string) $email 
	  * @return (boolean) TRUE|FALSE 
	  */
	  public function validateEmail($email) {
	  	// Check if we have context, if no, return error
        if($this->context === FALSE)
			return (object) array('Status' => 'ERROR');
		
		return $this->context->validateEmail($email);
	  }
 }
 lib/lib/api/mailjet-api-v3.php000060400000067407152455705070012110 0ustar00<?php

/**
 * Mailjet Public API / The real-time Cloud Emailing platform
 *
 * Connect your Apps and Make our product yours with our powerful API
 * http://www.mailjet.com/ Mailjet SAS Website
 *
 * @package		API v0.3
 * @author		David Coullet
 * @author		Mailjet Dev team
 * @copyright	Copyright (c) 2012-2013, Mailjet SAS, http://www.mailjet.com/Terms-of-use.htm
 * @file
 */

// ---------------------------------------------------------------------

/**
 * Mailjet Public API Main Class
 *
 * This class enables you to connect your Apps and use our powerful API.
 * You can use the 'metadata' call to retrieve a list of each object available
 * or implemented a live discovery.
 * http://www.mailjet.com/docs/api
 *
 * updated on 2013-09-03
 *
 * @class		MailjetApi
 * @author		David Coullet
 * @author		Mailjet Dev team
 * @version		0.1
 */
class Mailjet_Api_V3
{
    /**
     * Mailjet API Key to use.
     * You can edit directly and add here your Mailjet infos
     *
     * @access	private
     * @var		string $_apiKey
     */
    private $_apiKey = '';

    /**
     * Mailjet API Secret Key to use.
     * You can edit directly and add here your Mailjet infos
     *
     * @access	private
     * @var		string $_secretKey
     */
    private $_secretKey = '';

    /**
     * Seconds before updating the cache object
     * If set to 0, Object caching will be disabled
     *
     * @access	private
     * @var		integer $_cache
     */
    private $_cache = 0;//600;

// ---------------------------------------------------------------------

    /**
     * API URL
     *
     * @access	private
     * @var		string
     */
    private $_apiUrl = 'api.mailjet.com/v3/';

    /**
     * API version to use
     *
     * @access	private
     * @var		string
     */
    private $_version = 'REST';

    /**
     * Debug internal flag
     *
     * @access	private
     * @var		boolean
     */
    private $_debug = false;

    /**
     * Debug Label
     *
     * @access	private
     * @var		string
     */
    private $_debug_info = '';

    /**
     * Debug buffer copy
     *
     * @access	private
     * @var		string
     */
    private $_buffer = '';

    /**
     * Debug method copy
     *
     * @access	private
     * @var		string
     */
    private $_method = '';

    /**
     * Debug by cURL
     *
     * @access	private
     * @var		array
     */
    private $_info = NULL;

    /**
     * cURL handle resource
     *
     * @access	private
     * @var		resource
     */
    private $_curl_handle = NULL;

    /**
     * 
     * @var Boolean
     */
    protected $_log_allowed = false;
    
    /**
     * 
     * @var Boolean
     */
    protected $_log = false;
    
    /**
     * 
     * @var Boolean
     */
    protected $_log_once = false;
    
    /**
     *
     * @var Boolean
     */
    protected $_extra_err = false;
    
    /**
     * 
     * @var String
     */
    protected $_log_path = 'logs/api/current.log';
    
    /**
     * Singleton pattern : Current instance
     *
     * @access	private
     * @var		resource
     */
    private static $_instance = NULL;

    /**
     * Constructor
     *
     * Set $_apiKey and $_secretKey if provided & Update $_apiUrl with protocol
     *
     * @access	public
     * @uses	MailjetApi::$_apiKey
     * @uses	MailjetApi::$_secretKey
     * @param string  $_apiKey    Mailjet API Key
     * @param string  $_secretKey Mailjet API Secret Key
     * @param boolean $secure     TRUE to secure the transaction, FALSE otherwise
     */
    public function __construct($apiKey = NULL, $secretKey = NULL, $secure = FALSE)
    {
        if (isset($apiKey))
            $this->_apiKey = $apiKey;
        if (isset($secretKey))
            $this->_secretKey = $secretKey;
        $this->_apiUrl = 'http://'.$this->_apiUrl.$this->_version.'/';
        $this->secure($secure);
        
        $this->_log_allowed = get_cfg_var('MAILJET_ENVIRONMENT') == 'dev';
        
        $this->_fixLogPath();
    }

    /**
     * Singleton pattern :
     * Get the instance of the object if it already exists
     * or create a new one.
     *
     * @access	public
     * @uses	MailjetApi::$_instance
     */
    public static function getInstance()
    {
        if (!(self::$_instance instanceof self))
            self::$_instance = new self();

        return self::$_instance;
    }

    /**
     * Destructor
     *
     * Close the cURL handle resource
     *
     * @access	public
     * @uses	MailjetApi::$_curl_handle
     */
    public function __destruct()
    {
        if(!is_null($this->_curl_handle))
            curl_close($this->_curl_handle);
        $this->_curl_handle = NULL;
    }

    /**
     * Set new Api Key and Secret Key
     *
     * @access	public
     * @uses	MailjetApi::$_apiKey
     * @uses	MailjetApi::$_secretKey
     * @param string $apiKey    Mailjet API Key
     * @param string $secretKey Mailjet API Secret Key
     */
    public function setKeys($apiKey, $secretKey)
    {
        $this->_apiKey = $apiKey;
        $this->_secretKey = $secretKey;
    }

    /**
     * Set the seconds before updating the cache object
     * If set to 0, Object caching will be disabled
     *
     * @access	public
     * @uses	MailjetApi::$_cache
     * @param integer $cache Cache to set in seconds
     */
    public function setCache($cache)
    {
        $this->_cache = $cache;
    }

    /**
     * Get the seconds before updating the cache object
     * If set to 0, Object caching will be disabled
     *
     * @access	public
     * @uses	MailjetApi::$_cache
     *
     * @return integer Cache in seconds
     */
    public function getCache()
    {
        return ($this->_cache);
    }

    /**
     * 
     * @param Boolean $flag
     * @return mailjetapi
     */
    public function setLog($flag)
    {
    	$this->_log = (boolean) $flag;
    	return $this;
    }
    
    /**
     * 
     * @return boolean
     */
    public function getLog()
    {
    	return $this->_log;
    }
    
    /**
     * 
     * @param Boolean $flag
     * @return mailjetapi
     */
    public function setLogOnce($flag)
    {
    	$this->_log_once = (boolean) $flag;
    	return $this;
    }
    
    /**
     * 
     * @return boolean
     */
    public function getLogOnce()
    {
    	return $this->_log_once;
    }
    
	/**
     * 
     * @return string
     */
    public function getVersion()
    {
    	return $this->_version;
    }
	
    /**
     *
     * @param Boolean $flag
     * @return mailjetapi
     */
    public function setExtraError($flag)
    {
    	$this->_extra_err = (boolean) $flag;
    	return $this;
    }
    
    /**
     *
     * @return boolean
     */
    public function getExtraError()
    {
    	return $this->_extra_err;
    }

    /**
     * Enable log only if MAILJET_ENVIRONMENT == 'dev'
     * @return boolean
     */
    public function logAllowed()
    {
    	return $this->_log_allowed;
    }
    
    /**
     * 
     * @param String $path
     * @return mailjetapi
     */
    public function setLogPath($path)
    {
    	if ($real_path = realpath($path)) {
    		$this->_log_path = $real_path;
    	}
    	return $this;
    }
    
    /**
     * 
     * @return String
     */
    public function getLogPath()
    {
    	return $this->_log_path;
    }
    
    /**
     * 
     * @return mailjetapi
     */
    protected function _fixLogPath()
    {
    	//fix log path
		if(!defined('SYSTEMPATH')) define('SYSTEMPATH', dirname(__FILE__).'/../');
    	$this->_log_path = realpath(SYSTEMPATH.$this->_log_path);
    	$logFilename = 'daily-'.date('Ymd').'.log';
    	$this->_log_path = str_replace('current.log', $logFilename, $this->_log_path);
		return $this;
    }
    
    /**
     * Secure or not the transaction through https
     *
     * @access	public
     * @uses	MailjetApi::$_apiUrl
     * @param boolean $secure TRUE to secure the transaction, FALSE otherwise
     */
    public function secure($secure = TRUE)
    {
        $protocol = 'http';
        if ($secure)
            $protocol = 'https';
        $this->_apiUrl = preg_replace('/http(s)?:\/\//', $protocol.'://', $this->_apiUrl);
    }

    /**
     * Make the magic call ;)
     *
     * Check for some arguments and order them before sending the request.
     * If '_debug_info' is found, some data are stored and can be retrieved
     * with a call to MailjetApi::getDebugInfo().
     *
     * @access	public
     * @uses	MailjetApi::$_debug
     * @uses	MailjetApi::$_debug_info
     * @uses	MailjetApi::sendRequest() to send the request
     * @param string $object Method to call
     * @param array  $args   Array of parameters
     *
     * @return string JSON string by default (format can be change with the 'format' parameter)
     */
    public function __call($object, $args)
    {
        if (sizeof($args) > 0)
            $params = $args[0];
        else
            $params = array();

        if (isset($params['method'])) {
            $method = strtoupper($params['method']);
            unset($params['method']);
        }
        if (!isset($method) || !in_array($method, array('GET', 'POST', 'PUT', 'DELETE', 'JSON')))
            $method = 'GET';

        if (isset($params['debug_info'])) {
            $this->_debug = TRUE;
            $this->_debug_info = $params['debug_info'];
            unset($params['debug_info']);
        }
        
        /**
         * Logging
         */
        if (isset($params['log'])) {
        	$this->setLog($params['log']);
        	unset($params['log']);
        }
        
        if (isset($params['log_once'])) {
        	$this->setLogOnce($params['log_once']);
        	unset($params['log_once']);
        }
        
        if (isset($params['log_path'])) {
        	$this->setLogPath($params['log_path']);
        	unset($params['log_path']);
        }
        
        // Extra Error
        if (isset($params['extra_err'])) {
        	$this->setExtraError($params['extra_err']);
        	unset($params['extra_err']);
        }
        
        /**
         * Fallback logging when debug is true
         */
        if ($this->_debug) {
        	$this->setLogOnce(true);
        }

        return (json_decode($this->sendRequest($object, $params, $method)));
    }

    /**
     * Send Request
     *
     * Send the request to the Mailjet API server and get back the result
     * Basically, setup and execute the curl process.
     * Cache management added
     *
     * @access	private
     * @uses	MailjetApi::$_info
     * @uses	MailjetApi::$_debug
     * @uses	MailjetApi::$_buffer
     * @uses	MailjetApi::$_method
     * @uses	MailjetApi::$_apiKey
     * @uses	MailjetApi::$_secretKey
     * @uses	MailjetApi::$_curl_handle
     * @uses	MailjetApi::buildURL() to build the full Url for the request and update the list of parameters accordingly
     * @param string $object Object or collection of resources you want to access
     * @param array  $params Additional parameters for the request
     * @param string $method POST:	Create a resource
     * 							GET:	Read one or multiple resources
     * 							PUT:	Update one or multiple resources
     * 							DELETE:	Delete one or multiple resources
     *
     * @return string the result of the request
     */
    private function sendRequest($object, $params, $method)
    {

    	// Log if this is a JSON call with an ID inside params
    	$is_json_put = (isset($params['ID']) && !empty($params['ID']));
    
        list($url, $params) = $this->buildURL($object, $params, $method);

        if ($this->_cache != 0 && $method == 'GET' && !$this->_akid) {
            $file = $method.'.'.$object.'.'.hash('md5', $this->_apiKey.http_build_query($params, '', '')).'.cache';
        }

        if(is_null($this->_curl_handle))
            $this->_curl_handle = curl_init();

        curl_setopt($this->_curl_handle, CURLOPT_URL, $url);
        curl_setopt($this->_curl_handle, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($this->_curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($this->_curl_handle, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($this->_curl_handle, CURLOPT_USERPWD, $this->_apiKey.':'.$this->_secretKey);
        curl_setopt($this->_curl_handle, CURLOPT_CUSTOMREQUEST, $method);
        curl_setopt($this->_curl_handle, CURLOPT_USERAGENT, 'joomla-3.0');
    	
        switch ($method) {
            case 'GET' :
                curl_setopt($this->_curl_handle, CURLOPT_HTTPGET, TRUE);
                curl_setopt($this->_curl_handle, CURLOPT_POSTFIELDS, NULL);
            break;

            case 'POST':
                if(isset($params['Action']) && $params['Action']=='Add'){
                    curl_setopt($this->_curl_handle, CURLOPT_POST, count($params));
                    curl_setopt($this->_curl_handle, CURLOPT_POSTFIELDS, json_encode($params));
                    curl_setopt($this->_curl_handle, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
                }
                else{
                    curl_setopt($this->_curl_handle, CURLOPT_POST, count($params));
                    curl_setopt($this->_curl_handle, CURLOPT_POSTFIELDS, $this->curl_build_query($params));
                }
            break;

            case 'PUT':
                curl_setopt($this->_curl_handle, CURLOPT_POSTFIELDS, $this->curl_build_query($params));
            break;
            
            case 'JSON':
            	if($is_json_put)
            		curl_setopt($this->_curl_handle, CURLOPT_CUSTOMREQUEST, "PUT");            		
            	else
            		curl_setopt($this->_curl_handle, CURLOPT_CUSTOMREQUEST, "POST");
            	
            	$params = json_encode($params);
				curl_setopt($this->_curl_handle, CURLOPT_POSTFIELDS, $params);
				curl_setopt($this->_curl_handle, CURLOPT_RETURNTRANSFER, TRUE);
				curl_setopt($this->_curl_handle, CURLOPT_HTTPHEADER, array(
				    'Content-Type: application/json',
				    'Content-Length: ' . strlen($params))
				);
            break;
            	
        }

        $buffer = curl_exec($this->_curl_handle);

        $this->_info = curl_getinfo($this->_curl_handle);
        $this->_response_code = $this->_info['http_code'];
        
		curl_close($this->_curl_handle);
		$this->_curl_handle = null;
        
        if ($this->_debug) {
            $this->_buffer = $buffer;
            $this->_method = $method;
            $this->_debug = FALSE;
        }

        if ($this->_cache != 0 && $method == 'GET' && !$this->_akid) {
            $data = array('timestamp' => time(), 'result' => $buffer, 'http_code' => $this->_info['http_code']);
        }
        
        if( $this->getExtraError() ){
        	$this->getExtraErr( $buffer );
        	$this->setExtraError( false );
        }
        
        if ($this->logAllowed() && ($this->getLog() || $this->getLogOnce())) {

        	if ($this->_info) {
	        	$moreInfo = print_r(array(
	       			'content_type'	=> $this->_info['content_type'],
	        		'http_code'		=> $this->_info['http_code'],
	        		'total_time'	=> $this->_info['total_time'],
	        	), true);
	        	$moreInfo = substr($moreInfo, 6);
        	} else {
        		$moreInfo = 'none';
        	}
        	
        	$date = DateTime::createFromFormat('U.u', microtime(true));
        	
            if (is_array($params)) {
        		$jsonParams = json_encode($params);
        	} else {
        		$jsonParams = $params;
        	}
        	        	
        	$logLines = array();
        	
			$logLines[] = '';
        	$logLines[] = $date->format('Y-m-d H:i:s.u')." > {$object} :: {$method}";
			$logLines[] = '';
			$logLines[] = $this->_info['url'];
			$logLines[] = '';
			$logLines[] = "Request";
			$logLines[] = $jsonParams;
			$logLines[] = '';
			$logLines[] = "Response";
			$logLines[] = $buffer;
			$logLines[] = '';
			$logLines[] = 'Info';
			$logLines[] = $moreInfo;
			$logLines[] = '';
			$logLines[] = str_repeat("=", 100);
			$logLines[] = '';
				
			$logText = implode(PHP_EOL, $logLines);

			file_put_contents($this->getLogPath(), $logText, FILE_APPEND);
        	
			$this->setLogOnce(false);
			
        }
        
        return $buffer;
    }

    /**
     * Build the full Url for the request and update the parameters if needed
     *
     * @access	private
     * @uses	MailjetApi::$_apiUrl
     * @param string $object Object or collection of resources you want to access
     * @param array  $params Additional parameters for the request
     * @param string $method POST:	Create a resource
     * 							GET:	Read one or multiple resources
     * 							PUT:	Update one or multiple resources
     * 							DELETE:	Delete one or multiple resources
     *
     * @return array Full built Url for the request and new params
     */
    private function buildURL($object, $params, $method = 'GET')
    {
        $url = $this->_apiUrl.$object;

        if (isset($params['ID'])) {
            $url .= '/'.$params['ID'];
            unset($params['ID']);
        }

        $this->_akid = array_key_exists('akid', $params);

        if ($method == 'GET')
            $url .= '?'.http_build_query($params, '', '&');
        elseif ($method == 'PUT' || $method == 'POST' || $method == 'DELETE' || $method == 'JSON') {
            $tocheck = array('format', 'style', 'countrecords', 'recurse', 'akid', 'DuplicateFrom');
            $query = array();
            foreach ($params as $key => $value)
                if (in_array($key, $tocheck)) {
                    $query[$key] = $value;
                    unset($params[$key]);
                }
            if(count($query))
            	$url .= '?'.http_build_query($query, '', '&');
            	
        } 

        return (array($url, $params));
    }

    /**
     * Build query for cURL
     * Beware of the Boolean !
     *
     * @access	private
     * @param array $params Post parameters for the request
     *
     * @return string URL-encoded query string from the associative array provided
     */
    private function curl_build_query($params)
    {
    	foreach($params as $key => $value) {
	    	if($value === TRUE)
	    		$value = 'true';
	    	elseif($value === FALSE)
	    		$value = 'false';
    	}
        /*array_walk($params, function(&$value, &$key) {
            if ($value === TRUE) {
                $value = 'true';
            } elseif ($value === FALSE) {
                $value = 'false';
            }
        });*/

        return (http_build_query($params, '', '&'));
    }

    /**
     * Get the last HTTP code retrieved by cURL
     *
     * Warning : Information returned by this function is kept.
     * So, if you call it again, the previous info is returned.
     *
     * @access	public
     * @uses	MailjetApi::$_info
     *
     * @return integer last HTTP code retrieved by cURL or 0 if not set
     */
    public function getLastHTTPCode()
    {
        if (isset($this->_info['http_code']))
            return ($this->_info['http_code']);

        return (0);
    }

    /**
     * Set some info if the object came from the cache
     *
     * @access	private
     * @uses	MailjetApi::$_info
     * @uses	MailjetApi::$_buffer
     * @uses	MailjetApi::$_method
     * @uses	MailjetApi::$_debug_info
     */
    private function setCacheDebugInfo($method, $url, $data)
    {
        $this->_debug_info .= ' /* LAST CACHED AT '.date('Y/m/d H:i:s', $data['timestamp']).' - UPDATING EVERY '.$this->_cache.'s */';
        $this->_buffer = $data['result'];
        $this->_method = $method;
        $this->_info = array();
        $this->_info['url'] = $url;
        $this->_info['http_code'] = $data['http_code'];
        $this->_info['total_time'] = $this->_info['pretransfer_time'] = 0;
        $this->_debug = FALSE;
    }

    /**
     * Get some info for debugging purpose
     *
     * Warning : Information returned by this function is kept.
     * So, if you call it again, the previous info is returned.
     * To update this array, you need to add the key 'debug_info'
     * to the list of parameters. You can specified a value to
     * identify the returned array.
     *
     * @access	public
     * @uses	MailjetApi::$_info
     * @uses	MailjetApi::$_method
     * @uses	MailjetApi::$_debug_info
     *
     * @return array with some debug info
     */
    public function getDebugInfo()
    {
        $status_code = array (
            200 => 'OK - Everything went fine.',
            201 => 'OK - Created : The POST request was successfully executed.',
            204 => 'OK - No Content : The Delete request was successful.',
            304 => 'OK - Not Modified : The PUT request didn’t affect any record.',
            400 => 'KO - Bad Request : Please check the parameters.',
            401 => 'KO - Unauthorized : A problem occurred with the apiKey/secretKey. You may be not authorized to access the API or your apiKey may have expired.',
            403 => 'KO - Forbidden : You are not authorized to call that function.',
            404 => 'KO - Not Found : The resource with the specified ID does not exist.',
            405 => 'KO - Method not allowed : Attempt to put/post multiple resources in 1 request.',
            500 => 'KO - Internal Server Error.',
            503 => 'KO - Service unavailable.'
        );

        if (array_key_exists($this->_info['http_code'], $status_code))
            $http_code_text = $status_code[$this->_info['http_code']];
        else
            $http_code_text = 'KO - Service unavailable.';

        $status_message = '';
        if ($this->_info['http_code'] >= 400) {
            $buffer = json_decode($this->_buffer);
            if (!is_null($buffer) && isset($buffer->StatusCode) && isset($buffer->ErrorMessage)) {
                $status_message = $buffer->StatusCode.' - '.$buffer->ErrorMessage;
                if (isset($buffer->ErrorInfo) && !empty($buffer->ErrorInfo))
                    $status_message .= ' ('.$buffer->ErrorInfo.')';
            }
        }

        $res = array(
            'debug_info'	=> $this->_debug_info,
            'method'		=> $this->_method,
            'url'			=> $this->_info['url'],
            'duration'		=> $this->_info['total_time'] - $this->_info['pretransfer_time'],
            'http_code'		=> $this->_info['http_code'],
            'http_code_text'=> $http_code_text,
            'status_message'=> $status_message,
            'curl_info'		=> $this->_info,
            'buffer'		=> $this->_buffer
        );

        return $res;
    }
    
    protected function getExtraErr( &$buffer )
    {   
    	$bufferCheck = json_decode($buffer);
    	
    	if( is_null( $bufferCheck ) )
    		return;
    	
    	$buffer = $bufferCheck;   	
    	
    	if( $this->_info['http_code'] < 400 )
    	{
    		$response = array( (object)array( "ExtraErrCode" => $this->_info['http_code'], "ExtraErrKey" => "", "ExtraErrMsg" => "" ) );
    		$buffer->ExtraError = $response ;
    		$buffer = json_encode( $buffer );
    		return;
    	}
    	
    	$internalErrors = array(  
    			'MJ01' => 'Could not determine APIKey', 								// SERRCouldNotDetermineAPIKey
    			'MJ02' => 'No persister object found for class: "%s"', 					// SErrNoPersister
    			'MJ03' => 'A non-empty value is required', 								// SErrValueRequired
    			'MJ04' => 'Value must have at least length %d',							// SErrMinLength
    			'MJ05' => 'Value may have at most length %d',							// SErrMaxLength
    			'MJ06' => 'Value must be larger than or equal to %s',					// SErrMinValue
    			'MJ07' => 'Value must be less than or equal to %s',						// SErrMaxValue
    			'MJ08' => 'Property %s is invalid: %s', 								// SErrInProperty
    			'MJ09' => 'Value is not in list of allowed values: (%s)',				// SErrValueNotInList
    			'MJ10' => 'Value must be positive',										// SErrPositiveValueRequired
    			'MJ11' => 'Unknown object type "%s".',									// SErrUnknownObject
    			'MJ12' => 'Cannot save object of type %s',								// SerrCannotSaveObjectType
    			'MJ13' => 'Invalid characters in MD5 hash: "%s"',						// SErrInvalidHashCharacters
    			'MJ14' => 'Invalid length for MD5 hash: %d',							// SErrInvalidHashLength
    			'MJ15' => 'Unknown relation name : "%s"',								// SErrUnkownRelation
    			'MJ16' => 'Class "%s" does not support a unique key.',					// SErrNoAlternateKey
    			'MJ17' => '(%s) Cannot search unique key: unique key value is empty.',	// SErrNoAlternateKeyValue
    			'MJ18' => 'A %s resource with value "%s" for %s already exists.',		// SErrDuplicateKey
    			'MJ19' => 'Setting a value for property "%s" is not allowed',			// SErrCannotWriteProperty
    			'MJ20' => 'Setting a value for properties is not allowed',				// SErrCannotWriteProperties   			
    			// ContactMetadata
    			'CM01' => 'Property "%s" already exists',								// sERRCMPropertyAlreadyExists
    			'CM02' => 'Unknown namespace : %s',										// SERRCMUnknownNamespace
    			'CM03' => '"%s" is not a valid integer value for key %s',				// SERRCMNotAValidIntegerValueForKey
    			'CM04' => '"%s" is not a valid bool value for key %s',					// SERRCMNotAValidBoolValueForKey
    			'CM05' => '"%s" is not a valid float value for key %s',					// SERRCMNotAValidFloatValue
    			'CM06' => 'Length of value (%d bytes) exceeds maximum data length (%d bytes) ',	// SERRCMLengthOfValueExceedsMaxDataLength
    			'CM07' => 'Internal error: invalid data type %d',						// SERRCMInternalErrorInvalidDataType
    			'CM08' => '"%s" is not a valid datatype'								// SERRCMNotAValidDataType
    	); 	
    	
    	$response = array();
    	
    		// We expect here $this->_info['http_code']  to be >= 400   	
    	if ( isset($buffer->StatusCode) ) {
    		if( ( isset($buffer->ErrorInfo) && !empty($buffer->ErrorInfo) ) || ( isset($buffer->ErrorMessage) && !empty($buffer->ErrorMessage) ) )
    		{	
    			$comeFromString = false;
    			if( !empty( $buffer->ErrorInfo ) )
    			{  	
    				$info = json_decode( $buffer->ErrorInfo );
    				if( empty( $info) ) // message is type=string
    				{   	
    					$comeFromString = true ;
    					$errInfos = array( (object)$buffer->ErrorInfo );
    				}else{   					
    					$errInfos =  $info;
    				}
    			}else{  // ( !empty( $buffer->ErrorMessage ) )
    				$info = json_decode( $buffer->ErrorMessage );
    				if( empty( $info ) ) // message is type=string
    				{
    					$comeFromString = true ;
    					$errInfos = array( (object)$buffer->ErrorMessage );
    				}else{   					
    					$errInfos = $info;
    				}
    			}	
    			/**
    			*  Default response. Most of the ErrorInfo/ErrorMessage will come as they are - without specific err code in front!
    			*  We keep the ExtraErrors = ErrorInfo/ErrorMessage. 
    			*  
    			*  In the feature all the responses will consist these special codes.
    			*  When this happen (!!! ToDo !!!) -> we have to override coming StatusCode and ErrorInfo with parsed error results. And remove this ExtraError from the buffer
    			*  $internalErrors array and preg_match -> should be removed. We should catch the first 4 symbols from the string (this will be StatusCode), 
    			*  all the remaining string will be ErrorInfo 
    			*/  			   			 			 			    			
    			$errCodes = array_keys( $internalErrors );   			
    			$regexp = '/^(' . implode( '|',array_values( $errCodes ) ).')/i';   
    			foreach( $errInfos as $errInfoObj )
    			{    
    				foreach( $errInfoObj as $key => $errInfo )	
    				{			
	    				$tempResp = array();
	    				$tempResp["ExtraErrCode"] = $buffer->StatusCode;
	    				$tempResp["ExtraErrKey"] = "";
	    				$tempResp["ExtraErrMsg"] = $errInfo;
	    				
	    				preg_match($regexp, $errInfo, $matches);   	
	    				if( !empty( $matches ))
	    				{
	    					$tempResp["ExtraErrCode"] = $matches[1];
	    					if( $comeFromString )
	    						$tempResp["ExtraErrKey"] = '';
	    					else 
	    						$tempResp["ExtraErrKey"] = $key;
	    					$tempResp["ExtraErrMsg"] = $internalErrors[$matches[1]];
	    				}
	    				$response[] = $tempResp ;
    				}
    			}   			 			   			
    		}
    	}
    		// Check if is $response empty !    
    	if( empty( $response ) )
    	{
    		$response = array( (object)array( "ExtraErrCode" => $this->_info['http_code'], "ExtraErrKey" => "", "ExtraErrMsg" => "" ) );
    	}	
    	
    	$buffer->ExtraError = $response ;
    	$buffer = json_encode( $buffer );
    }

}lib/lib/api/mailjet-api-v1.php000060400000014414152455705070012074 0ustar00<?php

/**
 * Mailjet Public API
 *
 * @package		API v0.1
 * @author		Mailjet
 * @link		http://api.mailjet.com/
 *
 */

class Mailjet_Api_V1
{
	var $version = '0.1';

	// Choose your weapon : php, json, xml, serialize, html, csv
	var $output = 'json';

	// Connect thru https protocol
	var $secure = false;

	// Mode debug ? 0 none / 1 errors only / 2 all
	var $debug = 0;
	
	// Edit with your Mailjet Infos
	var $apiKey = '';
	var $secretKey = '';

	// Constructor function
	public function __construct($apiKey = false, $secretKey = false)
	{
		if ($apiKey)
			$this->apiKey = $apiKey;
		if ($secretKey)
			$this->secretKey = $secretKey;

		$this->apiUrl = (($this->secure) ? 'https' : 'http') . '://api.mailjet.com/' . $this->version . '';
	}

	public function __call($method, $args)
	{
		// params
		$params = (sizeof($args) > 0) ? $args[0] : array();

		// request method
		$request = isset($params["method"]) ? strtoupper($params["method"]) : 'GET';

		// unset useless params
		if (isset($params["method"]))
			unset($params["method"]);

		// Make request
		$result = $this->sendRequest($method, $params, $request);

		// Return result
		$return = ($result === true) ? $this->_response : false;

		if ($this->debug == 2 || ( $this->debug == 1 && $return == false))
			$this->debug();

		return $return;
	}

	public function requestUrlBuilder($method,$params=array(),$request)
	{
		$query_string = array('output' => 'output=' . $this->output);

		foreach ($params as $key => $value)
		{
			if ($request == 'GET' || in_array($key, array('apikey', 'output')))
				$query_string[$key] = $key . '=' . urlencode($value);
			if ($key == 'output')
				$this->output = $value;
		}

		$this->call_url = $this->apiUrl . '/' . $method . '/?' . join('&', $query_string);

		return $this->call_url;
	}

	public function sendRequest($method = false, $params = array(), $request = 'GET')
	{
		// Method
		$this->_method = $method;
		$this->_request = $request;

		// Build request URL
		$url = $this->requestUrlBuilder($method, $params, $request);

		if (!in_array('curl', get_loaded_extensions()))
			die('Error: You must have cURL extension enabled !');

		// Set up and execute the curl process
		$curl_handle = curl_init();
		curl_setopt($curl_handle, CURLOPT_URL, $url);
		curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);
		curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST, 2);
		curl_setopt($curl_handle, CURLOPT_USERPWD, $this->apiKey . ':' . $this->secretKey);
		curl_setopt($curl_handle, CURLOPT_VERBOSE, true);
		curl_setopt($curl_handle, CURLINFO_HEADER_OUT, true);
        curl_setopt($curl_handle, CURLOPT_USERAGENT, 'joomla-1.0');
    	

		$this->_request_post = false;
		if ($request == 'POST')
		{
			curl_setopt($curl_handle, CURLOPT_POST, count($params));
			curl_setopt($curl_handle, CURLOPT_POSTFIELDS, http_build_query($params));
			$this->_request_post = $params;
		}

		$buffer = curl_exec($curl_handle);

		if ($this->debug > 2)
		{
			$this->debug();
			// var_dump($buffer);
			// var_dump(curl_getinfo($curl_handle));
		}

		// Response code
		$this->_response_code = curl_getinfo($curl_handle, CURLINFO_HTTP_CODE);

		// Close curl process
		curl_close($curl_handle);

		// RESPONSE
		$this->_response = ($this->output == 'json') ? json_decode($buffer) : $buffer;

		return ($this->_response_code == 200) ? true : false;
	}

	public function debug()
	{
		echo '<style type="text/css">';
		echo '
		#debugger {width: 100%; font-family: arial;}
		#debugger table {padding: 0; margin: 0 0 20px; width: 100%; font-size: 11px; text-align: left;border-collapse: collapse;}
		#debugger th, #debugger td {padding: 2px 4px;}
		#debugger tr.h {background: #999; color: #fff;}
		#debugger tr.Success {background:#90c306; color: #fff;}
		#debugger tr.Error {background:#c30029 ; color: #fff;}
		#debugger tr.Not-modified {background:orange ; color: #fff;}
		#debugger th {width: 20%; vertical-align:top; padding-bottom: 8px;}

		';
		echo '</style>';

		echo '<div id="debugger">';

		if (isset($this->_response_code))
		{
			if ($this->_response_code == 200)
			{
				echo '<table>';
				echo '<tr class="Success"><th>Success</th><td></td></tr>';
				echo '<tr><th>Status code</th><td>' . $this->_response_code . '</td></tr>';

				if (isset($this->_response))
					echo '<tr><th>Response</th><td><pre>' . utf8_decode(print_r($this->_response, 1)) . '</pre></td></tr>';

				echo '</table>';
			}
			elseif($this->_response_code == 304)
			{
				echo '<table>';
				echo '<tr class="Not-modified"><th>Error</th><td></td></tr>';
				echo '<tr><th>Error no</th><td>' . $this->_response_code . '</td></tr>';
				echo '<tr><th>Message</th><td>Not Modified</td></tr>';
				echo '</table>';
			}
			else
			{
				echo '<table>';
				echo '<tr class="Error"><th>Error</th><td></td></tr>';
				echo '<tr><th>Error no</th><td>' . $this->_response_code . '</td></tr>';

				if (isset($this->_response))
				{
					if (is_array($this->_response) || is_object($this->_response))
						echo '<tr><th>Status</th><td><pre>' . print_r($this->_response, true) . '</pre></td></tr>';
					else
						echo '<tr><th>Status</th><td><pre>' . $this->_response . '</pre></td></tr>';
				}
			}
			echo '</table>';
		}

		$call_url = parse_url($this->call_url);

		echo '<table>';
		echo '<tr class="h"><th>API config</th><td></td></tr>';
		echo '<tr><th>Protocole</th><td>' . $call_url['scheme'] . '</td></tr>';
		echo '<tr><th>Host</th><td>' . $call_url['host'] . '</td></tr>';
		echo '<tr><th>Version</th><td>' . $this->version . '</td></tr>';
		echo '</table>';

		echo '<table>';
		echo '<tr class="h"><th>Call infos</th><td></td></tr>';
		echo '<tr><th>Method</th><td>' . $this->_method . '</td></tr>';
		echo '<tr><th>Request type</th><td>' . $this->_request . '</td></tr>';
		echo '<tr><th>Get Arguments</th><td>';

		$args = explode("&", $call_url['query']);
		foreach ($args as $arg)
		{
			$arg = explode('=', $arg);
			echo ''.$arg[0].' = <span style="color:#ff6e56;">' . $arg[1] . '</span><br/>';
		}

		echo '</td></tr>';

		if ($this->_request_post)
		{
			echo '<tr><th>Post Arguments</th><td>';

			foreach ($this->_request_post as $k => $v)
				echo $k.' = <span style="color:#ff6e56;">' . $v . '</span><br/>';

			echo '</td></tr>';
		}

		echo '<tr><th>Call url</th><td>' . $this->call_url . '</td></tr>';
		echo '</table>';
		echo '</div>';
	}
}lib/lib/Auth.php000060400000016030152455705070007500 0ustar00<?php

defined('_JEXEC') or die('Restricted access');
 
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

class Auth
{

	/**
	 * 
	 * @var String
	 */
	private $_dbData;

	/**
	 * 
	 * @var String
	 */
	private $_apiKey;
	
	/**
	 * 
	 * @var String
	 */
	private $_apiSecret;
	
	/**
	 * 
	 * @var String
	 */
	private $_token;
	
	/**
	 * 
	 * @var String
	 */
	private $_apiUrl;
	
	/**
	 * 
	 * @var String
	 */
	private $_apiVersion;

    /**
     *
     * @var Boolean
     */
    private $_enable = false;

    /**
     *
     * @var String
     */
    private $_testAddress = 'test@emailaddress';
	
	/**
	 * 
	 */
	public function __construct()
	{
		$this->_initData();
	}
	
	/**
	 * 
	 * @return Auth
	 */
	protected function _initData()
	{
		$this->_dbData = realpath(__DIR__.'/../db/data');
		touch($this->_dbData);
		
		$data = null;
		$content = trim(file_get_contents($this->_dbData));
		
		if ($content) {
			$data = json_decode($content);
		}

		if (!$data) {
			$this->saveData();
		}

		if (isset($data->apiKey) && $data->apiKey) {
			$this->setApiKey($data->apiKey);
		}

		if (isset($data->apiSecret) && $data->apiSecret) {
			$this->setApiSecret($data->apiSecret);
		}

		if (isset($data->token) && $data->token) {
			$this->setToken($data->token);
		}
		
		if (isset($data->apiUrl) && $data->apiUrl) {
			$this->setApiUrl($data->apiUrl);
		}
		
		if (isset($data->apiVersion) && $data->apiVersion) {
			$this->setApiVersion($data->apiVersion);
		}

        if(!empty($data->enable)) {
            $this->setEnable($data->enable);
        }

        if(!empty($data->test_address)) {
            $this->setTestAddress($data->test_address);
        }
		
		return $this;
	}

	/**
	 * 
	 * @return Auth
	 */
	public function saveData()
	{
		$data = array(
			'apiKey'		=> $this->getApiKey(),
			'apiSecret'		=> $this->getApiSecret(),
			'token'			=> $this->getToken(),
			'apiUrl'		=> $this->getApiUrl(),
			'apiVersion'	=> $this->getApiVersion(),
            'enable'        => $this->getEnable(),
            'test_address'  => $this->getTestAddress()
		);
			
		file_put_contents($this->_dbData, json_encode($data));

		$mailjetConfig = realpath(__DIR__.'/../../config.php');
        $dataConf = '<?php
class JMailjetConfig {
	public $bak_mailer = "smtp";
	public $bak_smtpauth = "1";
	public $bak_smtpuser = "your API key";
	public $bak_smtppass = "your API secret";
	public $bak_smtphost = "'.(($this->getApiUrl())?$this->getApiUrl():"in-v3.mailjet.com").'";
	public $bak_smtpsecure = "tls";
	public $bak_smtpport = "587";
	public $test = "";
	public $test_address = "'.$this->getTestAddress().'";
	public $enable = "'.$this->getEnable().'";
	public $username = "'.(($this->getApiKey())?$this->getApiKey():"your API key").'";
	public $password = "'.(($this->getApiSecret())?$this->getApiSecret():"your API secret").'";
	public $host = "'.(($this->getApiUrl())?$this->getApiUrl():"in-v3.mailjet.com").'";
	public $secure = "tls";
	public $port = "587";
}';
        file_put_contents($mailjetConfig, $dataConf);
		
		return $this;
	}
	
	/**
	 * 
	 * @return Auth
	 */
	public function deleteData()
	{
		$content = trim(file_get_contents($this->_dbData));
		$data = array(
			'apiKey'		=> null,
			'apiSecret'		=> null,
			'token'			=> null,
			'apiUrl'		=> null,
			'apiVersion'	=> null,
            'enable'        => null,
            'test_address'  => null,
		);

		file_put_contents($this->_dbData, json_encode($data));

		$this->_apiKey = null;
		$this->_apiSecret = null;
		$this->_token = null;
		$this->_apiUrl = null;
		$this->_apiVersion = null;
        $this->_enable = null;
        $this->_testAddress = null;
		
		return $this;
	}
	
	/**
	 * 
	 * @param String $apiKey
	 * @return Auth
	 */
	public function setApiKey($apiKey)
	{
		$this->_apiKey = $apiKey;
		return $this;
	}
	
	/**
	 * 
	 * @return String
	 */
	public function getApiKey()
	{
		return $this->_apiKey;
	}
	
	/**
	 * 
	 * @param String $apiSecret
	 * @return Auth
	 */
	public function setApiSecret($apiSecret)
	{
		$this->_apiSecret = $apiSecret;
		return $this;
	}
	
	/**
	 * 
	 * @return String
	 */
	public function getApiSecret()
	{
		return $this->_apiSecret;
	}
	
	/**
	 * 
	 * @param String $token
	 * @return Auth
	 */
	public function setToken($token)
	{
		$this->_token = $token;
		return $this;
	}
	
	/**
	 * 
	 * @return String
	 */
	public function getToken()
	{
		if (($this->_token == NULL || strlen($this->_token) == 0) && $this->getApiKey() && $this->getApiSecret())
			$this->generateToken();
		return $this->_token;
	}

    /**
     *
     * @return Boolean
     */
    public function getEnable()
    {
        return $this->_enable;
    }

    /**
     *
     * @param Boolean
     * @return Boolean
     */
    public function setEnable($val)
    {
        return $this->_enable = $val;
    }

    /**
     *
     * @return String
     */
    public function getTestAddress()
    {
        return $this->_testAddress;
    }

    /**
     *
     * @param String
     * @return String
     */
    public function setTestAddress($val)
    {
        return $this->_testAddress = $val;
    }
	
	/**
	 * 
	 * @param String $apiUrl
	 * @return Auth
	 */
	public function setApiUrl($apiUrl)
	{
		$this->_apiUrl = $apiUrl;
		return $this;
	}
	
	/**
	 * 
	 * @return String
	 */
	public function getApiUrl()
	{
		return $this->_apiUrl;
	}
	
	/**
	 * 
	 * @param String $apiVersion
	 * @return Auth
	 */
	public function setApiVersion($apiVersion)
	{
		$this->_apiVersion = $apiVersion;
		return $this;
	}
	
	/**
	 * 
	 * @return String
	 */
	public function getApiVersion()
	{
		return $this->_apiVersion;
	}

	/**
	 * 
	 * @return boolean
	 */
	public function haveToken()
	{		
		return (boolean) $this->getToken();
	}
	
	/**
	 * 
	 * @return boolean
	 */
	public function canGenerateToken()
	{
		return $this->getApiKey() && $this->getApiSecret();
	}

	/**
	 * 
	 * @return boolean
	 */
	public function generateToken()
	{	
		if (!$this->canGenerateToken()) {
			return false;
		}
			
		$mj = new Mailjet_Api($this->getApiKey(), $this->getApiSecret());
		$this->setApiUrl($mj->apiUrl);
		$this->setApiVersion($mj->version);

		$response = $mj->getAuthToken(array(
			'APIKey'		=> $this->getApiKey(),
			'SecretKey'	 	=> $this->getApiSecret()
		));
		
		// Log the response
		$this->_log($mj);
		
		// Check if the response is correct
		if (!isset($response->Status) || (isset($response->Status) && $response->Status != 'ERROR')) {
			$this->setToken($response);
			$this->saveData();
		}
		
		return true;
	}

	public function __destruct()
	{
		$this->saveData();
	}
	
	private function _log($response)
	{
		$log = realpath(__DIR__.'/../tmp/log');
		
		touch($log);
		
		$delimiter = str_repeat('=', 100);
		
		$content = file_get_contents($log);
		
		$prepend = '';
		
		$prepend .= $delimiter;
		$prepend .= PHP_EOL;
		$prepend .= date('Y-m-d H:i:s');
		$prepend .= PHP_EOL;
		$prepend .= 'RESPONSE';
		$prepend .= PHP_EOL;
		$prepend .= print_r($response, true);
		$prepend .= PHP_EOL;

		
		$content = $prepend.$content;
		file_put_contents($log, $content);
	}
	
}

?>lib/hook.php000060400000003474152455705070007001 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

require_once realpath(__DIR__.'/lib/Auth.php');
require_once realpath(__DIR__.'/lib/mailjet-api-strategy.php');

$auth = new Auth();

$log = realpath(__DIR__.'/tmp/log');

touch($log);

$delimiter = str_repeat('=', 100);

$content = file_get_contents($log);

$prepend = '';

$prepend .= $delimiter;
$prepend .= PHP_EOL;
$prepend .= date('Y-m-d H:i:s');
$prepend .= PHP_EOL;
$prepend .= 'POST';
$prepend .= PHP_EOL;
$prepend .= print_r($_POST, true);
$prepend .= PHP_EOL;
$prepend .= 'GET';
$prepend .= PHP_EOL;
$prepend .= print_r($_GET, true);

if (isset($_POST['data'])) {
	$data = (object) $_POST['data'];
} else if (isset($_POST['mailjet'])) {
	$mailjet = json_decode($_POST['mailjet']);
	$data = $mailjet->data;
}

if (isset($data->next_step_url) && $data->next_step_url) {

	//we have api key and secret but no token so generate it
	if (
		isset($data->apikey) 
		&& $data->apikey 
		&& isset($data->secretkey) 
		&& $data->secretkey
		&& !$auth->haveToken()
	) {		
		$auth->setApiKey($data->apikey);
		$auth->setApiSecret($data->secretkey);
		$auth->generateToken();
		$auth->saveData();
	} 

	$response = array(
		"code"				=> 1,
		"continue"			=> true,
		"continue_address"	=> $data->next_step_url,
	);
	
} else {

	$response = array(		
		"code"		=> 0,		
		"continue"	=> false,		
		"exit_url"	=> 'http://prestashop.com/exit.php',
	);
	
}

$json = json_encode($response);

$prepend .= PHP_EOL;
$prepend .= 'RESPONSE';
$prepend .= PHP_EOL;
$prepend .= $json;
$prepend .= PHP_EOL;
$prepend .= $delimiter;
$prepend .= PHP_EOL;

$content = $prepend.$content;
file_put_contents($log, $content);

echo $json;lib/config.php000060400000000630152455705070007275 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

$myHookUrl      = JURI::base().'components/com_mailjet/lib/hook.php';
$myExitUrl      = JURI::base().'components/com_mailjet/lib/exit.php'; 
$resellerName   = 'test';lib/tmp/log000060400000102250152455705070006624 0ustar00====================================================================================================
2014-09-24 18:22:51
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 6363e9d3b0fbcc689c98e18a1a0ba9b5
            [secretKey] => ea3818da6ef29051a081297d4e4ea6cb
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 830045
                                    [name] => bugise2794a59
                                    [label] => Bug issue 562
                                    [created_at] => 1402918673
                                    [subscribers] => 201
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 400
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 1403006589
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 18:02:39
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 6363e9d3b0fbcc689c98e18a1a0ba9b5
            [secretKey] => ea3818da6ef29051a081297d4e4ea6cb
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 830045
                                    [name] => bugise2794a59
                                    [label] => Bug issue 562
                                    [created_at] => 1402918673
                                    [subscribers] => 201
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 400
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 1403006589
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 18:02:06
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V3 Object
        (
            [_apiKey:Mailjet_Api_V3:private] => 7ee8e423df320c5c3ecb314ad45c0b19
            [_secretKey:Mailjet_Api_V3:private] => 112f3d6bd2e3059db345a35cd2dfe5bb
            [_cache:Mailjet_Api_V3:private] => 0
            [_apiUrl:Mailjet_Api_V3:private] => http://api.mailjet.com/v3/REST/
            [_version:Mailjet_Api_V3:private] => REST
            [_debug:Mailjet_Api_V3:private] => 
            [_debug_info:Mailjet_Api_V3:private] => 
            [_buffer:Mailjet_Api_V3:private] => 
            [_method:Mailjet_Api_V3:private] => 
            [_info:Mailjet_Api_V3:private] => Array
                (
                    [url] => http://api.mailjet.com/v3/REST/apitoken
                    [content_type] => text/html; charset=utf-8
                    [http_code] => 201
                    [header_size] => 184
                    [request_size] => 405
                    [filetime] => -1
                    [ssl_verify_result] => 0
                    [redirect_count] => 0
                    [total_time] => 0.075868
                    [namelookup_time] => 3.1E-5
                    [connect_time] => 0.031974
                    [pretransfer_time] => 0.032039
                    [size_upload] => 153
                    [size_download] => 643
                    [speed_download] => 8475
                    [speed_upload] => 2016
                    [download_content_length] => 643
                    [upload_content_length] => 153
                    [starttransfer_time] => 0.075834
                    [redirect_time] => 0
                    [certinfo] => Array
                        (
                        )

                    [primary_ip] => 5.135.120.255
                    [primary_port] => 80
                    [local_ip] => 193.107.71.62
                    [local_port] => 47087
                    [redirect_url] => 
                )

            [_curl_handle:Mailjet_Api_V3:private] => 
            [_log_allowed:protected] => 
            [_log:protected] => 
            [_log_once:protected] => 1
            [_extra_err:protected] => 
            [_log_path:protected] => 
            [_akid] => 
            [_response_code] => 201
        )

    [version] => 
    [apiUrl] => in-v3.mailjet.com
)

====================================================================================================
2014-09-24 17:39:54
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 709aa262a03f2279127672eadd59dc50
            [secretKey] => bbd975cfe881a7cd349726049b2b022d
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 833189
                                    [name] => test9132f737
                                    [label] => Test
                                    [created_at] => 1403004329
                                    [subscribers] => 99
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 0
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 17:26:25
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 6363e9d3b0fbcc689c98e18a1a0ba9b5
            [secretKey] => ea3818da6ef29051a081297d4e4ea6cb
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 830045
                                    [name] => bugise2794a59
                                    [label] => Bug issue 562
                                    [created_at] => 1402918673
                                    [subscribers] => 201
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 400
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 1403006589
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 17:26:09
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 709aa262a03f2279127672eadd59dc50
            [secretKey] => bbd975cfe881a7cd349726049b2b022d
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 833189
                                    [name] => test9132f737
                                    [label] => Test
                                    [created_at] => 1403004329
                                    [subscribers] => 99
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 0
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 17:25:55
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V1 Object
        (
            [version] => 0.1
            [output] => json
            [secure] => 
            [debug] => 0
            [apiKey] => 709aa262a03f2279127672eadd59dc50
            [secretKey] => bbd975cfe881a7cd349726049b2b022d
            [apiUrl] => http://api.mailjet.com/0.1
            [_method] => listsAll
            [_request] => GET
            [call_url] => http://api.mailjet.com/0.1/listsAll/?output=json&limit=1
            [_request_post] => 
            [_response_code] => 200
            [_response] => stdClass Object
                (
                    [lists] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [id] => 833189
                                    [name] => test9132f737
                                    [label] => Test
                                    [created_at] => 1403004329
                                    [subscribers] => 99
                                    [sent] => 0
                                    [open] => 0
                                    [click] => 0
                                    [bounce] => 0
                                    [blocked] => 0
                                    [spam] => 0
                                    [unsub] => 0
                                    [last_activity] => 
                                    [handled] => 1
                                )

                        )

                    [status] => OK
                )

        )

    [version] => 0.1
    [apiUrl] => in.mailjet.com
)

====================================================================================================
2014-09-24 16:34:26
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V3 Object
        (
            [_apiKey:Mailjet_Api_V3:private] => 7ee8e423df320c5c3ecb314ad45c0b19
            [_secretKey:Mailjet_Api_V3:private] => 112f3d6bd2e3059db345a35cd2dfe5bb
            [_cache:Mailjet_Api_V3:private] => 0
            [_apiUrl:Mailjet_Api_V3:private] => http://api.mailjet.com/v3/REST/
            [_version:Mailjet_Api_V3:private] => REST
            [_debug:Mailjet_Api_V3:private] => 
            [_debug_info:Mailjet_Api_V3:private] => 
            [_buffer:Mailjet_Api_V3:private] => 
            [_method:Mailjet_Api_V3:private] => 
            [_info:Mailjet_Api_V3:private] => Array
                (
                    [url] => http://api.mailjet.com/v3/REST/apitoken
                    [content_type] => text/html; charset=utf-8
                    [http_code] => 201
                    [header_size] => 184
                    [request_size] => 405
                    [filetime] => -1
                    [ssl_verify_result] => 0
                    [redirect_count] => 0
                    [total_time] => 0.0752
                    [namelookup_time] => 3.5E-5
                    [connect_time] => 0.03224
                    [pretransfer_time] => 0.03231
                    [size_upload] => 153
                    [size_download] => 643
                    [speed_download] => 8550
                    [speed_upload] => 2034
                    [download_content_length] => 643
                    [upload_content_length] => 153
                    [starttransfer_time] => 0.075164
                    [redirect_time] => 0
                    [certinfo] => Array
                        (
                        )

                    [primary_ip] => 5.135.120.255
                    [primary_port] => 80
                    [local_ip] => 193.107.71.62
                    [local_port] => 41085
                    [redirect_url] => 
                )

            [_curl_handle:Mailjet_Api_V3:private] => 
            [_log_allowed:protected] => 
            [_log:protected] => 
            [_log_once:protected] => 1
            [_extra_err:protected] => 
            [_log_path:protected] => 
            [_akid] => 
            [_response_code] => 201
        )

    [version] => 
    [apiUrl] => in-v3.mailjet.com
)

====================================================================================================
2014-09-24 16:19:47
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V3 Object
        (
            [_apiKey:Mailjet_Api_V3:private] => 7ee8e423df320c5c3ecb314ad45c0b19
            [_secretKey:Mailjet_Api_V3:private] => 112f3d6bd2e3059db345a35cd2dfe5bb
            [_cache:Mailjet_Api_V3:private] => 0
            [_apiUrl:Mailjet_Api_V3:private] => http://api.mailjet.com/v3/REST/
            [_version:Mailjet_Api_V3:private] => REST
            [_debug:Mailjet_Api_V3:private] => 
            [_debug_info:Mailjet_Api_V3:private] => 
            [_buffer:Mailjet_Api_V3:private] => 
            [_method:Mailjet_Api_V3:private] => 
            [_info:Mailjet_Api_V3:private] => Array
                (
                    [url] => http://api.mailjet.com/v3/REST/apitoken
                    [content_type] => text/html; charset=utf-8
                    [http_code] => 201
                    [header_size] => 184
                    [request_size] => 405
                    [filetime] => -1
                    [ssl_verify_result] => 0
                    [redirect_count] => 0
                    [total_time] => 0.077033
                    [namelookup_time] => 3.0E-5
                    [connect_time] => 0.032484
                    [pretransfer_time] => 0.032563
                    [size_upload] => 153
                    [size_download] => 643
                    [speed_download] => 8347
                    [speed_upload] => 1986
                    [download_content_length] => 643
                    [upload_content_length] => 153
                    [starttransfer_time] => 0.076998
                    [redirect_time] => 0
                    [certinfo] => Array
                        (
                        )

                    [primary_ip] => 5.135.120.255
                    [primary_port] => 80
                    [local_ip] => 193.107.71.62
                    [local_port] => 39552
                    [redirect_url] => 
                )

            [_curl_handle:Mailjet_Api_V3:private] => 
            [_log_allowed:protected] => 
            [_log:protected] => 
            [_log_once:protected] => 1
            [_extra_err:protected] => 
            [_log_path:protected] => 
            [_akid] => 
            [_response_code] => 201
        )

    [version] => 
    [apiUrl] => http://api.mailjet.com/v3/REST/
)

====================================================================================================
2014-09-24 14:40:57
RESPONSE
Mailjet_Api Object
(
    [context:Mailjet_Api:private] => Mailjet_Api_Strategy_V3 Object
        (
            [_apiKey:Mailjet_Api_V3:private] => 7ee8e423df320c5c3ecb314ad45c0b19
            [_secretKey:Mailjet_Api_V3:private] => 112f3d6bd2e3059db345a35cd2dfe5bb
            [_cache:Mailjet_Api_V3:private] => 0
            [_apiUrl:Mailjet_Api_V3:private] => http://api.mailjet.com/v3/REST/
            [_version:Mailjet_Api_V3:private] => REST
            [_debug:Mailjet_Api_V3:private] => 
            [_debug_info:Mailjet_Api_V3:private] => 
            [_buffer:Mailjet_Api_V3:private] => 
            [_method:Mailjet_Api_V3:private] => 
            [_info:Mailjet_Api_V3:private] => Array
                (
                    [url] => http://api.mailjet.com/v3/REST/apitoken
                    [content_type] => text/html; charset=utf-8
                    [http_code] => 201
                    [header_size] => 184
                    [request_size] => 405
                    [filetime] => -1
                    [ssl_verify_result] => 0
                    [redirect_count] => 0
                    [total_time] => 0.383548
                    [namelookup_time] => 2.9E-5
                    [connect_time] => 0.031834
                    [pretransfer_time] => 0.031893
                    [size_upload] => 153
                    [size_download] => 643
                    [speed_download] => 1676
                    [speed_upload] => 398
                    [download_content_length] => 643
                    [upload_content_length] => 153
                    [starttransfer_time] => 0.383513
                    [redirect_time] => 0
                    [certinfo] => Array
                        (
                        )

                    [primary_ip] => 5.135.46.177
                    [primary_port] => 80
                    [local_ip] => 193.107.71.62
                    [local_port] => 53699
                    [redirect_url] => 
                )

            [_curl_handle:Mailjet_Api_V3:private] => 
            [_log_allowed:protected] => 
            [_log:protected] => 
            [_log_once:protected] => 1
            [_extra_err:protected] => 
            [_log_path:protected] => 
            [_akid] => 
            [_response_code] => 201
        )

    [version] => 
)

====================================================================================================
2014-09-24 13:55:44
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => 7ee8e423df320c5c3ecb314ad45c0b19
    [secretKey] => 112f3d6bd2e3059db345a35cd2dfe5bb
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => 7ee8e423df320c5c3ecb314ad45c0b19
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 176517
                            [CatchedIp] => 172.16.0.11
                            [CreatedAt] => 2014-09-24T10:55:44Z
                            [FirstUsedAt] => 
                            [ID] => 1531814
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => E2A2E8E4155971C09461056DB4A2E84A88641773F890CBA6D7E4940EFFE4E0CED009FF388848B7E68C89C340F0A39B7C22273723A53A2CF57E6CEFE34173D2B4970DE3C56F369116250864C4773A02E548A9583A393C896E58453FDEA6BA76E5E0B3DFDC4E6A165CBDE3D5EB1B7702F6559323ABE83B876F9AED3CB4C7BA087
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

====================================================================================================
2014-09-24 13:55:37
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => 7ee8e423df320c5c3ecb314ad45c0b19
    [secretKey] => 112f3d6bd2e3059db345a35cd2dfe5bb
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => 7ee8e423df320c5c3ecb314ad45c0b19
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 176517
                            [CatchedIp] => 172.16.0.11
                            [CreatedAt] => 2014-09-24T10:55:37Z
                            [FirstUsedAt] => 
                            [ID] => 1531813
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => FDBE4EAB1136F8B5CE0CC150D2711138180B16C46B51E6C99B873B063038E373C54686FAFABB85D3F6FED5A02B881C4649A017D30787A3D1BDCD2976CE681FAC75E67FDFE2D5D49740453999BC10FB5A92358730733F15ADF153C1CDEADCF5DC8A3A67BC8D8665921DBEBDAED395F1C56AD056332572BB5E6F48B9887D40999
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

====================================================================================================
2014-09-23 18:23:25
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => 7ee8e423df320c5c3ecb314ad45c0b19
    [secretKey] => 112f3d6bd2e3059db345a35cd2dfe5bb
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => 7ee8e423df320c5c3ecb314ad45c0b19
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 176517
                            [CatchedIp] => 172.16.0.11
                            [CreatedAt] => 2014-09-23T15:23:25Z
                            [FirstUsedAt] => 
                            [ID] => 1531747
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => 31780227E49D32BD990E9A4B129DF4E8A3CAAA0228336F28CF14D9EC57EB1FCED69A17D464F93374298496DCF7412B28FBFA1ADE1E4262C6DC6B1326B0EAD0ADC3517AC082CCF2F90B25E5006F38C9E50551E9385FA1430A1D2E423E67658245FF5AA97DBDFC3A5671DE309656D002EA6066A1F8A42134A689ADCCC1964165D
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

====================================================================================================
2014-09-23 12:38:08
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => ff504f5e4e6fb57e9747fc09d7a7c6ff
    [secretKey] => fa24b97126e6371d0e2c6c6266bc7f3b
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => ff504f5e4e6fb57e9747fc09d7a7c6ff
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 128127
                            [CatchedIp] => 172.16.0.11
                            [CreatedAt] => 2014-09-23T09:38:08Z
                            [FirstUsedAt] => 
                            [ID] => 1531715
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => C7470DD9910D1A4885F2E0669861165180EEE5C18ABBD23956E27E9FC14F356BB495B8D9F9E9636965404732A6675C986982832E4DCA6014B6600364286E0678B5392A1D5E30EDA650F75A8607D28257B023E2166EEACF1868337B1B218C952D997185A5128F5C80F01EA446EE63E6430C1AFFC0F2C4BBA9EA374B2A16ADDF4
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

====================================================================================================
2014-09-23 12:26:27
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => ff504f5e4e6fb57e9747fc09d7a7c6ff
    [secretKey] => fa24b97126e6371d0e2c6c6266bc7f3b
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => ff504f5e4e6fb57e9747fc09d7a7c6ff
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 128127
                            [CatchedIp] => 172.16.0.12
                            [CreatedAt] => 2014-09-23T09:26:27Z
                            [FirstUsedAt] => 
                            [ID] => 1531706
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => 255B5D469EF20EECB4C56EF1D5CEADE84E0DC6E4B05AD137B8D7AE91428DDC7547C9C14573B78830BDF1911C4567115EAB21D2E524BFC7E5702601FB9E16DFF7A272A9E5C71D7BDE0B584132FC3ED6AFA6133BFE475B39A157FD2A21B663BDE3EF9D9D3904D32299949CEB4971C68EE337638A4EFAADE99ACE71DCD4F286DE8
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

====================================================================================================
2014-09-19 17:23:02
RESPONSE
MailjetApi Object
(
    [version] => REST
    [output] => json
    [secure] => 1
    [debug] => 0
    [apiKey] => ff504f5e4e6fb57e9747fc09d7a7c6ff
    [secretKey] => fa24b97126e6371d0e2c6c6266bc7f3b
    [apiUrl] => https://api.mailjet.com/v3/REST
    [_method] => apitoken
    [_request] => POST
    [call_url] => https://api.mailjet.com/v3/REST/apitoken/?output=json
    [_request_post] => Array
        (
            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
            [APIKeyALT] => ff504f5e4e6fb57e9747fc09d7a7c6ff
            [TokenType] => iframe
            [IsActive] => 1
        )

    [_response_code] => 201
    [_response] => stdClass Object
        (
            [Count] => 1
            [Data] => Array
                (
                    [0] => stdClass Object
                        (
                            [AllowedAccess] => campaigns,contacts,stats,pricing,account,reports
                            [APIKeyID] => 128127
                            [CatchedIp] => 172.16.0.12
                            [CreatedAt] => 2014-09-19T14:23:02Z
                            [FirstUsedAt] => 
                            [ID] => 1531571
                            [IsActive] => 1
                            [Lang] => 
                            [LastUsedAt] => 
                            [SentData] => 
                            [Timezone] => 
                            [Token] => FACB508DBC7E98D9D08F66A59B0C560CFB78AD000B724981284A7612AA773B31E3EFFAFEB3308A37336D24F24FD8CD88CD06A2A8A3C9C04DCD2A5C4658626E91F4874F180DF513EC0B853988CFCC708F4F02283D7230E69A6097C8EE243A0B9D2BC0E31ACC373B57D0E2441A6684CA2129139DED2322FB9E417EFA1DF60588A
                            [TokenType] => iframe
                            [ValidFor] => 0
                        )

                )

            [Total] => 1
        )

)

lib/exit.php000060400000000370152455705070007002 0ustar00<?php
/**
 * @author Mailjet SAS
 *
 * @copyright  Copyright (C) 2014 Mailjet SAS.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
EXITlib/db/data000060400000000241152455705070006536 0ustar00{"apiKey":"6363e9d3b0fbcc689c98e18a1a0ba9b5","apiSecret":"ea3818da6ef29051a081297d4e4ea6cb","token":null,"test_address":"vincent.halle@eliosa.com","enable":true}com_mailjet.xml000060400000003631152455705070007562 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1">
    <name>Mailjet</name>
    <author>Mailjet SAS</author>
    <authorUrl>http://www.mailjet.com</authorUrl>
    <authorEmail>plugins@mailjet.com</authorEmail>
    <creationDate>June 2014</creationDate>
    <url>http://www.mailjet.com/</url>
    <version>3.1.6</version>
    <copyright>Copyright (C) 2014 Mailjet SAS.</copyright>
    <license>GNU General Public License version 2 or later; see LICENSE</license>
    <description>Mailjet Email component.</description>

    <scriptfile>installer.php</scriptfile>
    <files folder="front">
        <filename>mailjet.php</filename>
        <filename>controller.php</filename>
        <folder>models</folder>
        <folder>views</folder>
    </files>

    <administration>
        <menu img="../administrator/components/com_mailjet/images/logo-16x16.png">COM_MAILJET_MENU</menu>
        <submenu>
            <menu view="mailjet" img="../administrator/components/com_mailjet/images/logo-16x16.png">COM_MAILJET_SETTINGS</menu>
            <menu view="contacts" img="../administrator/components/com_mailjet/images/logo-16x16.png">COM_MAILJET_CONTACTS</menu>
            <menu view="campaigns" img="../administrator/components/com_mailjet/images/logo-16x16.png">COM_MAILJET_CAMPAIGNS</menu>
            <menu view="statistics" img="../administrator/components/com_mailjet/images/logo-16x16.png">COM_MAILJET_STATS</menu>
        </submenu>
        <files folder="admin">
            <filename>mailjet.php</filename>
            <filename>controller.php</filename>
            <filename>config.php</filename>
            <filename>styles.css</filename>
            <folder>views</folder>
            <folder>models</folder>
            <folder>language</folder>
            <folder>images</folder>
            <folder>lib</folder>
            <folder>helpers</folder>
        </files>
    </administration>
</extension>
helpers/index.html000060400000000037152455705070010211 0ustar00<!DOCTYPE html><title></title>
helpers/mailjet.php000060400000002167152455705070010360 0ustar00<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_messages
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @package     Joomla.Administrator
 * @subpackage  com_mailjet
 * @since       1.6
 */
class MailjetHelper
{
	/**
	 * Configure the Linkbar.
	 *
	 * @param   string	The name of the active view.
	 *
	 * @return  void
	 * @since   1.6
	 */
	public static function addSubmenu($vName)
	{
		JHtmlSidebar::addEntry(
			JText::_('COM_MAILJET_SETTINGS'),
			'index.php?option=com_mailjet&view=mailjet',
			$vName == 'mailjet'
		);

		JHtmlSidebar::addEntry(
			JText::_('COM_MAILJET_CONTACTS'),
			'index.php?option=com_mailjet&view=contacts',
			$vName == 'contacts'
		);

		JHtmlSidebar::addEntry(
			JText::_('COM_MAILJET_CAMPAIGNS'),
			'index.php?option=com_mailjet&view=campaigns',
			$vName == 'campaigns'
		);

		JHtmlSidebar::addEntry(
			JText::_('COM_MAILJET_STATS'),
			'index.php?option=com_mailjet&view=statistics',
			$vName == 'statistics'
		);
	}
}
config.php000060400000001030152455705070006522 0ustar00<?php
class JMailjetConfig {
	public $bak_mailer = 'mail';
	public $bak_smtpauth = '0';
	public $bak_smtpuser = '';
	public $bak_smtppass = '';
	public $bak_smtphost = 'localhost';
	public $bak_smtpsecure = 'none';
	public $bak_smtpport = '25';
	public $enable = '1';
	public $test = '1';
	public $test_address = 'vincent.halle@eliosa.com';
	public $username = '6363e9d3b0fbcc689c98e18a1a0ba9b5';
	public $password = 'ea3818da6ef29051a081297d4e4ea6cb';
	public $host = 'in.mailjet.com';
	public $secure = 'ssl';
	public $port = '465';
}language/en-GB/en-GB.com_mailjet.sys.ini000060400000000563152455705070013721 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Settings"
COM_MAILJET_STATS="Statistics"
COM_MAILJET_CONTACTS="Contacts"
COM_MAILJET_CAMPAIGNS="Campaigns"
COM_MAILJET_PRICING="Pricing"
COM_MAILJET_SETTINGS_SAVED="Your settings have been saved successfully"
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Please contact Mailjet support to sort this out.<br /><br />Error %d - %s"

language/en-GB/en-GB.com_mailjet.ini000060400000007517152455705070013112 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Settings"
COM_MAILJET_STATS="Statistics"
COM_MAILJET_CONTACTS="Contacts"
COM_MAILJET_CAMPAIGNS="Campaigns"
COM_MAILJET_PRICING="Pricing"
COM_MAILJET_SETTINGS_SAVED="Your settings have been saved successfully"

COM_MAILJET_SENDER_ERROR = "Please make sure that you are using the correct API key and secret key associated to your mailjet account (from email)."
COM_MAILJET_API_KEY_ERROR = "Please verify that you have entered your API and secret key correctly. If this is the case and you have still this error message, please go to Account API keys (<a href=\"https://www.mailjet.com/account/api_keys\" target=\"_blank\">https://www.mailjet.com/account/api_keys</a>) to regenerate a new Secret Key for the plug-in."
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Please contact Mailjet support to sort this out.<br /><br />Error %d - %s"
COM_MAILJET_CONFIG_FILE_UNWRITABLE="Unable to write configuration file for Mailjet's settings."
COM_MAILJET_RECIPIENT_INVALID="The recipient of the test mail is invalid."
COM_MAILJET_TEST_EMAIL_NOT_SENT="The test mail could not be sent."
COM_MAILJET_CONFIG_OK="Mailjet configuration saved successfully"
COM_MAILJET_SETTINGS_MANDATORY="Your Mailjet settings are mandatory."

COM_MAILJET_PLUGIN_INSTRUCTIONS_TITLE="Mailjet Module"

COM_MAILJET_MAILJET_SETTINGS_API_KEYS_HELP="You can get your API keys from <a href=\"https://www.mailjet.com/account/api_keys\">your mailjet account</a>. Please also make sure the sender address is active in <a href=\"https://www.mailjet.com/account/sender\">your account</a>"

COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_ACCOUNT="<a href=\"https://www.mailjet.com/signup?p=joomla-3.0\">Create your Mailjet account</a> or visit your <a href=\"https://fr.mailjet.com/account/api_keys\">account page</a> to get your API keys."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_LIST="<a href=\"index.php?option=com_mailjet&view=contacts\">Create a new list</a> if you don't have one or need a new one."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_WIDGET="<a href=\"index.php?option=com_modules\">Add</a> the email collection widget to your sidebar or footer."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_CAMPAIGN="<a href=\"index.php?option=com_mailjet&view=campaigns\">Create a campaign</a> on mailjet.com to send your newsletter."

COM_MAILJET_PLUGIN_INSTRUCTIONS_FACEBOOK_LINK="<iframe src=\"//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FMailjet&amp;send=false&amp;layout=button_count&amp;width=150&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=352489811497917\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:150px; height:21px;\" allowTransparency=\"true\"></iframe>"
COM_MAILJET_PLUGIN_INSTRUCTIONS_TWITTER_LINK="<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"http://www.mailjet.com\" data-text=\"Improve your email deliverability and monitor action in real time.\" data-via=\"mailjet_fr\">Tweet</a>
<a href=\"https://twitter.com/mailjet\" class=\"twitter-follow-button\" data-show-count=\"false\">Follow @mailjet</a>
                                              <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>"
COM_MAILJET_PLUGIN_INSTRUCTIONS_SHARE="Share the love!"

COM_MAILJET_GENERAL_SETTINGS="General Settings"
COM_MAILJET_MAILJET_SETTINGS="Mailjet Settings"
COM_MAILJET_GENERAL_SETTINGS_ENABLED="Enabled:"
COM_MAILJET_GENERAL_SETTINGS_SEND_TEST="Send test mail now:"
COM_MAILJET_GENERAL_SETTINGS_TEST_RECIPIENT="Recipient of test mail:"
COM_MAILJET_MAILJET_SETTINGS_API_KEY="API key:"
COM_MAILJET_MAILJET_SETTINGS_SECRET_KEY="Secret key:"

COM_MAILJET_NO_LISTS="You have no lists."

language/fr-FR/fr-FR.com_mailjet.ini000060400000007732152455705070013161 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Préférences"
COM_MAILJET_STATS="Statistiques"
COM_MAILJET_CONTACTS="Contacts"
COM_MAILJET_CAMPAIGNS="Campagnes"
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Veuillez contacter le support Mailjet pour régler ce problème.<br /><br />Error %d - %s"
COM_MAILJET_SETTINGS_SAVED="Vos préférences ont été enregistrées avec succès"
COM_MAILJET_CONFIG_FILE_UNWRITABLE="Impossible d'écrire le fichier de préférences."
COM_MAILJET_RECIPIENT_INVALID="Le destinataire du message de test est invalide."
COM_MAILJET_TEST_EMAIL_NOT_SENT="Impossible d'envoyer l'email de test."
COM_MAILJET_SETTINGS_MANDATORY="Les préférences de Mailjet sont obligatoires"
COM_MAILJET_CONFIG_OK="Configuration Mailjet enregistrée avec succès"

COM_MAILJET_SENDER_ERROR = "Please make sure that you are using the correct API key and secret key associated to your mailjet account (from email)."
COM_MAILJET_API_KEY_ERROR = "Merci de vérifier que vous avez correctement saisi votre clé d'API et votre clé secrète. Si vous obtenez toujours ce message d'erreur après vérification, rendez-vous dans la section Account API keys (« Clés d'API de compte ») (<a href=\"https://www.mailjet.com/account/api_keys\" target=\"_blank\">https://www.mailjet.com/account/api_keys</a>) pour générer un nouvelle clé secrète pour le plug-in."
COM_MAILJET_PLUGIN_INSTRUCTIONS_TITLE="Module Mailjet"
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_ACCOUNT="<a href=\"https://fr.mailjet.com/signup?p=joomla-3.0\">Créer votre compte Mailjet</a> ou visitez votre <a href=\"https://fr.mailjet.com/account/api_keys\">page compte</a> pour obtenir vos clés API."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_LIST="<a href=\"index.php?option=com_mailjet&view=contacts\">Créez une nouvelle liste</a> si vous n'en avez pas ou que vous en voulez en ajouter une."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_WIDGET="<a href=\"index.php?option=com_modules\">Ajoutez</a> le widget de collecte d'adresses emails dans votre barre latérale, ou votre footer."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_CAMPAIGN="<a href=\"index.php?option=com_mailjet&view=campaigns\">Créer une campagne</a> sur mailjet.com ou envoyer une newsletter."

COM_MAILJET_PLUGIN_INSTRUCTIONS_FACEBOOK_LINK="<iframe src=\"//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FMailjetFrance&amp;send=false&amp;layout=button_count&amp;width=150&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=352489811497917\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:150px; height:21px;\" allowTransparency=\"true\"></iframe>"
COM_MAILJET_PLUGIN_INSTRUCTIONS_SHARE="Partagez !"
COM_MAILJET_PLUGIN_INSTRUCTIONS_TWITTER_LINK="<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"http://www.mailjet.com\" data-text=\"Améliorez votre délivrabilité et suivez vos emails en temps réel\" data-via=\"mailjet\">Tweet</a><a href=\"https://twitter.com/mailjet_fr\" class=\"twitter-follow-button\" data-show-count=\"false\">Suivre @mailjet_fr</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>"

COM_MAILJET_GENERAL_SETTINGS="Préférences Générales"
COM_MAILJET_MAILJET_SETTINGS_API_KEYS_HELP="Vous pouvez obtenir vos clés API depuis <a href=\"https://fr.mailjet.com/account/api_keys\">votre compte Mailjet</a>. Assurez-vous que l'adresse d'expéditeur  est bien activée dans <a href=\"https://fr.mailjet.com/account/sender\">votre compte</a>"
COM_MAILJET_MAILJET_SETTINGS="Préférences Mailjet"
COM_MAILJET_GENERAL_SETTINGS_ENABLED="Activé :"
COM_MAILJET_GENERAL_SETTINGS_SEND_TEST="Envoyer un email de test :"
COM_MAILJET_GENERAL_SETTINGS_TEST_RECIPIENT="Destinataire du test :"
COM_MAILJET_MAILJET_SETTINGS_API_KEY="Clé API:"
COM_MAILJET_MAILJET_SETTINGS_SECRET_KEY="Clé secrète:"
language/fr-FR/fr-FR.com_mailjet.sys.ini000060400000000444152455705070013767 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Préférences"
COM_MAILJET_STATS="Statistiques"
COM_MAILJET_CONTACTS="Contacts"
COM_MAILJET_CAMPAIGNS="Campagnes"
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Veuilliez contacter le support Mailjet pour régler ce problème.<br /><br />Error %d - %s"
language/es-ES/es-ES.com_mailjet.ini000060400000007641152455705070013160 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Parámetros"
COM_MAILJET_STATS="Estadísticas"
COM_MAILJET_CONTACTS="Contactos"
COM_MAILJET_CAMPAIGNS="Campañas"
COM_MAILJET_SETTINGS_SAVED="Su configuración ha sido guardada"

COM_MAILJET_SENDER_ERROR = "Please make sure that you are using the correct API key and secret key associated to your mailjet account (from email)."
COM_MAILJET_API_KEY_ERROR = "Por favor, compruebe que ha introducido correctamente su API y su clave secreta. Si es así y sigue apareciendo este mensaje de error, le rogamos que acceda a la sección Account API keys (<a href=\"https://www.mailjet.com/account/api_keys\" target=\"_blank\">https://www.mailjet.com/account/api_keys</a>) y vuelva a generar una clave secreta para el plugin."
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Por favor póngase en contacto con el Soporte de Mailjet para resolver este problema.<br /><br />Error %d - %s"
COM_MAILJET_CONFIG_FILE_UNWRITABLE="No ha sido posible escribir el fichero de configuración"
COM_MAILJET_RECIPIENT_INVALID="El destinatario del email de prueba es invalido"
COM_MAILJET_TEST_EMAIL_NOT_SENT="El correo de prueba no se ha podido enviar."
COM_MAILJET_CONFIG_OK="¡Su configuración de Mailjet está bien!"
COM_MAILJET_SETTINGS_MANDATORY="Les preferencias son obligatorias."

COM_MAILJET_PLUGIN_INSTRUCTIONS_TITLE="Modulo Mailjet"
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_ACCOUNT="<a href=\"https://es.mailjet.com/signup?p=joomla-3.0\">Cree su cuenta Mailjet</a> o visite su <a href=\"https://fr.mailjet.com/account/api_keys\">cuenta</a> para conseguir sus claves de API."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_LIST="<a href=\"index.php?option=com_mailjet&view=contacts\">Cree una nueva lista</a> si no tiene o necesita una nueva."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_WIDGET="<a href=\"index.php?option=com_modules\">Añada</a> el widget de suscripción de emails en su barra lateral o footer."
COM_MAILJET_PLUGIN_INSTRUCTIONS_CREATE_CAMPAIGN="<a href=\"index.php?option=com_mailjet&view=campaigns\">Cree una campaña</a> en mailjet.com para enviar su newsletter."

COM_MAILJET_PLUGIN_INSTRUCTIONS_FACEBOOK_LINK="<iframe src=\"//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FMailjet&amp;send=false&amp;layout=button_count&amp;width=150&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;appId=352489811497917\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:150px; height:21px;\" allowTransparency=\"true\"></iframe>"
COM_MAILJET_PLUGIN_INSTRUCTIONS_TWITTER_LINK="<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-url=\"http://www.mailjet.com\" data-text=\"Mejore su entregabilidad de emails y haga seguimiento de las acciones en tiempo real\" data-via=\"mailjet\">Tweet</a>
<a href=\"https://twitter.com/mailjet\" class=\"twitter-follow-button\" data-show-count=\"false\">Seguir @mailjet</a>
                                              <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>"
COM_MAILJET_PLUGIN_INSTRUCTIONS_SHARE="Comparte!"

COM_MAILJET_GENERAL_SETTINGS="Configuración general"
COM_MAILJET_MAILJET_SETTINGS="Parámetros de API"
COM_MAILJET_MAILJET_SETTINGS_API_KEYS_HELP="Puede conseguir sus claves de API desde <a href=\"https://es.mailjet.com/account/api_keys\">su cuenta mailjet</a>. Por favor, asegurese que la dirección de remitente esté activa en <a href=\"https://es.mailjet.com/account/sender\">su cuenta</a>"
COM_MAILJET_GENERAL_SETTINGS_ENABLED="Enabled:"
COM_MAILJET_GENERAL_SETTINGS_SEND_TEST="Enviar email de prueba ahora:"
COM_MAILJET_GENERAL_SETTINGS_TEST_RECIPIENT="Destinatario del email de prueba:"
COM_MAILJET_MAILJET_SETTINGS_API_KEY="Clave de API:"
COM_MAILJET_MAILJET_SETTINGS_SECRET_KEY="Contraseña de API:"
language/es-ES/es-ES.com_mailjet.sys.ini000060400000000523152455705070013765 0ustar00COM_MAILJET_MENU="Mailjet"
COM_MAILJET_SETTINGS="Settings"
COM_MAILJET_STATS="Statistics"
COM_MAILJET_CONTACTS="Contacts"
COM_MAILJET_CAMPAIGNS="Campaigns"
COM_MAILJET_SETTINGS_SAVED="Your settings have been saved successfully"
COM_MAILJET_CONTACT_SUPPORT_ERROR = "Please contact Mailjet support to sort this out.<br /><br />Error %d - %s"styles.css000060400000001155152455705070006611 0ustar00.iframe{
    border-bottom-color: rgb(238, 238, 238);
    border-bottom-style: inset;
    border-bottom-width: 2px;
    border-image-outset: 0px;
    border-image-repeat: stretch;
    border-image-slice: 100%;
    border-image-source: none;
    border-image-width: 1;
    border-left-color: rgb(238, 238, 238);
    border-left-style: inset;
    border-left-width: 2px;
    border-right-color: rgb(238, 238, 238);
    border-right-style: inset;
    border-right-width: 2px;
    border-top-color: rgb(238, 238, 238);
    border-top-style: inset;
    border-top-width: 2px;
    padding: 10px;
    width: 1000px !important;
}images/stats-48x48.png000060400000006027152455705070010465 0ustar00�PNG


IHDR00W��bKGD�C�	pHYsHHF�k>	vpAg00��WIDATh��YipTU�ν���k���,l!$0H���q\FQ��e�����*.)u�(kj�*D\-g�B	�(.�U!��@����@����y�޻�Cd�4��Su��^�{���%$��-5�Q8f�k\VV���HR�mYz]{{�κ��ښ�#@&jS�bWr���)Sr�}�	^�'��@�F��axXo������4��P��E��d��6ڱ��jo�Νm�f3M]?�hZ~~����������3����������@�eR��@����OI���tD<��m�����ǯWT���.<�&�:���<�6GK����etuA�b}�(Χ")�Ln�CfY99
m���wt�륯���xb��������@@,�9�x��}rKK�UW�2zz~Vz�dY !�ddHs���:����_�MU�������J�N�� y�WW�ŎXg(����S���#]��e�wu�u�֭;�BX���K��eJ��.�kk[&�)�O&�!"H˂G08~�a��ʪ�����V������~�gQn\b��8�i&^���a���L��=%YU�Z9v��'jkO����|i)2��������i�QW�I���}z,���h��h���4O�~?]����vu�ԩw�wv>a56���Ck�v�����o�B�}VS�|Įg�^:�0�!��s�I�!)A.�y��kMoTU5/�o��L�k�s��������%',�!���83�_L�z�P,�X��m��n���_�6~쓪��%��N{~����{o{+������{��9¦)��0គ����ѡ�����i�fd��6.-��nX|��)W]��tɪi�#&F6��R���/�Ǥ$��w�w99#G�bX0�c8W�\.��_�)��nX4R���V$Ӂi0C H������ٿ�α��dž�U�د�ٮP���c��3��%~���u����}Ѥ�����vYA�!8C�E�&�&�EJZ�����\LLKKϲ�ky$�ϩ�>߇�t��{k﹥�p�E���"f� ��E?+����sF�w-���|�Y�m�ra�i.�Ѩ�\$-s:e��W�N�|{Ϟ�{n.�0�j�%dt�3��1̈�)�n�9�.]�g$�-X�Gr>M3�T�9�*3�t"��}���?�f���7O�e��}��K���(\��5c#���E���4�/�U��r�8�ϝN�ލ�oVV�_xSq�-��,ϴ7^.��P �8%+���4&Ι�T��+7Ĭ��t������r�I	��О���P�7*+��}c���2���
W�h�D��L���DO~@�\E�ۉ�1���zh���7���K_����7Lλ�j�߲�M��p�&��Me�ƹO!r��e}MC���EY8���;v�c��1w�d=��:x5b�ؾD@�#2��μ,Ɍ�	�T��GJP\��6��K^پ}���M}��G$��b��%ڮ�[<��򼤀ЈTN��1������%/n۶���nj���QόHi��b�;%�h���WmMtA��L�<�D�jm]�¾};��r��ްn��wȹ\J�7#��ý�΀ɒ B�u���RM$)�d�`Qܻ���K�x���M�R�H!Bܲo��1�Kq�s<9^�4�m�������w��EāX��།�@}&b�Ł���2�eY���@������
��7��U|^��y��O���w*B֠78��lC7A
�1�$��!�B�����B�f��P�2I 0�l��xS�'�K:�I)�Z��b�jOBg�AGH�$�!�b���I��JJ���mGP��<�����CCg;iA�S�zF>e���q#"�y��ѣ7Ӵx,���vt��A*�w?g�^�)���5kㆉ�&d}�q�ܹ�ed�O5��V#�q9@��(`*
A	A��������;� {�x4��.�5�d�m�F��m�z�T\�����:��:*�RF�+4��RF��1b�ϲ�
�P����x�4B��+! `�6�xm�֢�	���E(�ð���^�3�;����P�P�D�T��o��*P�3�h99uws��x�����Ǘv�?�ò�|I�u���^0�(;R�s�s�`WU�m*��٦"UM6�fǫ�Om�(�*�`ǘ侲2H){/;���L��=���:����#ްi*l�p
(P�5�>�\s�U)�NDž�	>�{��E������\�nb������fS�Ă�VwE�ƶe��6�Ir�A��퍒�{��Cy�-PB!m�C<��6� �Bkumm�X�Ŋ-��¥;�����~hl	{���nBJ�bW0蕱؀���
M9	�Zv�7;6���G?z���M�"z�+N[�K�?�}��n�ooJI��p�c�؀:*�rgqj�R��N����ܽ�/ �)�?���ի"����7Λ2e�-yy����nM�	Jo�ӌ�w��+Dc�7��;c�Q�N�Zy�w��6=�eScMs�� ���ܙ渵��{�6��m��>���ï�x�F�-I��(#��F��\Q�#1��X\��e���kO�{?���ӭ��BD��0L�Y���N����7��WM��];�� �W����"70F�,�bYniYB�z$�,{���
��Q7"���A�~��𮮊m��ٳGM'��3����"EъF�rO�zS�.�;E�Ԇ��ڕ-j
s�^>F!-��%�spw[�ފ���E�e���f�*���)%tEXtcreate-date2009-09-28T11:27:54-04:00J��=%tEXtmodify-date2009-05-18T16:10:00-04:00�ֽtEXtSoftwareAdobe ImageReadyq�e<IEND�B`�images/logo-16x16.png000060400000000777152455705070010263 0ustar00�PNG


IHDR�asRGB���bKGD�������	pHYs��tIME�95;��IDAT8��M+Da����w��|JL��8QF6MȂƊl,����?�,d�P�Q�?@VV&c�a2i� s�9��+�U����}?�����O�3���I��3D�'"����(�����6��^Q�ɥw�`����$��4!�1M�I����
�@wh�/غ�n�@��fdYY�l{b�s	��b�"��ĕ۝
���%�X��Ƃ�^VX�2S���F�D�W���r�J�qE�柱�H��%�;����jWz�M.EMݒCYe���;��rQݠ�8��p�7�)7_L�b����wd�t-�MCۅ��j�	�B^�Mp�o����ꯏ�=S��Q�8�S��'�S#)�\&ȝe��<|���wꂣCPERIEND�B`�images/logo.png000060400000034747152455705070007504 0ustar00�PNG


IHDR�Fx逻tEXtSoftwareAdobe ImageReadyq�e<
4iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.2-c063 53.352624, 2008/07/30-18:05:41        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
   xmpRights:WebStatement=""
   photoshop:AuthorsPosition="">
   <dc:rights>
    <rdf:Alt>
     <rdf:li xml:lang="x-default"/>
    </rdf:Alt>
   </dc:rights>
   <dc:creator>
    <rdf:Seq>
     <rdf:li/>
    </rdf:Seq>
   </dc:creator>
   <dc:title>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">Imprimer</rdf:li>
    </rdf:Alt>
   </dc:title>
   <xmpRights:UsageTerms>
    <rdf:Alt>
     <rdf:li xml:lang="x-default"/>
    </rdf:Alt>
   </xmpRights:UsageTerms>
   <Iptc4xmpCore:CreatorContactInfo
    Iptc4xmpCore:CiAdrExtadr=""
    Iptc4xmpCore:CiAdrCity=""
    Iptc4xmpCore:CiAdrRegion=""
    Iptc4xmpCore:CiAdrPcode=""
    Iptc4xmpCore:CiAdrCtry=""
    Iptc4xmpCore:CiTelWork=""
    Iptc4xmpCore:CiEmailWork=""
    Iptc4xmpCore:CiUrlWork=""/>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                           
<?xpacket end="w"?>PO��,IIDATx��}	xՕ��˒,Y2���{�`�!<$/d���$y�$���$!	I�$3IH�LYy� `���x��ɶlI�,��"k��9�N�K���,	��K���nU�:�=�?��[ҧ?�Y0M4M����M���^�� �F�~?O��Y��ұ��'{}�5y{�1�~Oц�?��6�;��c���:��߿��u���j.h���a0�\0
</6mR��	�Y��O����@T�%��6�SW�Ý�TzĀ����n��[w@ӱ a;@�}�}X�Uv׃�$VIV�a�6�����N��3�n��_�$2C��ڃ�O�������qy\��\��cm�z��s������u�X���DQcH`�d*��w^�:���f��*�(��w	��~0C���Xߝ�[��8��$�{,c��m�� yׂ:�5�54�����0�3g;-�3��>��C��Z��7S�ضƙ�8�qNc=�jgӭ��D���:ceT��h���B�,�;�{z�#B�46���`��"����Q<d�p\��mk�ɩ���:��v�+��u�\+#
��!@"\V>/,]4/��N�En���?�z�h4�3�&�C�d#����\�b�)̵�$i�f�~�� ������4�`��\9*t��+emL���1(Œ��R��,���X-m�}{������>s���H���o�}��6�k��AsʹyN���X,�x��h��r����}>ĸ�I��"�5�l�}+��{äm^x���ȅ�m�º$e(�69|
��z0����俕Ƅx���v���uXs�ƹR�+��:�F!QT'E�{{�z�4�r���?y�p�p��+�H�c��M$�9\�%����A*���	�
((ȃ��B(-)���b(*ȇ��<(,,������iFP���z�FÔߒL���*��ڲ ����q?*�:T�1�{A�r��G� �+�K���{E��9FFst0 � ߈�*㘅…���yB�d֌)�ºM��h��"��b�������P���A�����=��;I�������	�x<Zk(y�|W�	U����P(���YR_3�
�T�T�5L�L˰�D������/t]>���txzg��'*b��<6ʏ8�_�Ճu1�1P�C�MG�@�t�0��
�98}��^��z뒸f�v��1�1����:4��
�j;�*���9��p溉mPr�
��躄�A�fʾ+�(��w�|�ǰ~Os�bp.@����8<�-Ơ'd���0F�s�-���X�c}/X��:%�P8s�C�rxl�ص�G`Mr��/�:���yM�)�a=�a{\77�ؑ�c4M)���j�Y�&ԖP^`��\�h+P7.�#��˗�(`��:�I��i�$�-S��@�EMA�Ҧ��"[�35!A���قh.�r�ȅ�uۙx��C`�ƭh�ĭ��Tf�68�[&+�`���p.�hImA���o|F[u�aά���	:\�`�o�Uc�+c1iy<f�C�>5���+�>�x��[A)���;�%�?�4�gA�k#x�h�z��@����o��o7��}1��)�iԸ����B��D�W�]M\eܠ��\A[]�X�����W��e�c��(����7P�_UU8��[����jt���j�%�S�kN�*�rC`�C0Ԙ�Y"�4$�<h}'U�%I.:%�g<��L=!i�*A����$9fZY�=�2�Nn�}�i;��i���:�j�@�)li
�QcะR��*��z-$E�)N����V���l�(L�!�ÎM���&qs;�aoL�6�ln�j���|���B7gNB�0р�2J
�O5f�>��
=n.Dy���Ȧ�3-&<����AE��
�S���yAP�=���ǃ��`���my$��ډD��1~�)`�"(�o���[�V]l9����X�d�r��D�}H�?�񿇊�q�̚� ��G����0���f�qݐw _@[����Ǘ�]��:L��Cm
��€€����|����F$��0�L�4f�U@�#Q�Qĉ����)_
��O��z�<�.6�23�_��CC��y*(x�i�8�_8����T�X���uØt�u+�����jhii��ci���9BXB�)5���
5�I2w�<Ƒ�R=2eB���a
��q��$曦�5���ba�B��t-��@0�A��"��1�$�Z˛��+PQ�`3��i�VZ�ɡti����p�3A8�c@���������G�ga(�j���7|��^���W|6n
(hl��"�h6!y����[�W5��IQ��2
�K�/ġb���@�$�ϼ�)MG�9H|�%���X�2b(�Q�&�ňY�"�c�IG�w�&E�@+y�
aH&j�G�r)��P;�������B�a�9W��L�M��YB��8��(����t����x���W��B>Y���9Dikܐ����B04�ˏG'�E`���U�1(�7
4�Yg�|y�e:H�CQ�A I$u��k���0�6�%�?���ř��d�m��O�ՠ�ϰ��cHЌo��]�SVv4mk������
aaFyTx�C7�1bͬF=����;p�y���}�~Mo�*��5%Q�-���8�z���l�eq��#�^�H�B�l�#�c�*gz��%X$+%Eb	5l���?i�(HZx˖"�^���m�<��ᗸs81��\�٨x�W��_R$q:�د_	��¬E�M����q���	�RذdWokR�׺���S�)T.��c�h�
��0�7%���gt�]m�Ē0�Ƥ�Y.+0��teD��`�����k�w�L�%��40�H�&%qg2��WH~$�+@+Z��X ���x�As�۲aE�S5BH�_��<�e45�\�<\1�U���<͸͟�-z��	�$�X?� *+k��T�?���pӒ�5�X���)���ǐA�#�B
��s7��߀��e�2��|]�H�pL�
:�Y�Y6ȝʁ7ӹX��LE!S̄�٪&��YSࠨ���p(�	¤B^���=��g��8U���yؾ�	�{|�>x�ZM��LVf;��Y5���E0xr�#��y+�9)�}K�~�(TaB�j���,�ߏ��UCf�~�@k{
Զ�8�v�.��X8.?�#���@��H�ƺ�@��5�Ð�KD��´1ⴑMňY��"�����Al�[@	�A��=�æm���;aˮ8}�[��Gfե��&�Ѣ]���Cb��䲛��5���ʨ��q�h�8.�_�����ҵ<���ۀۼ`X,�	L5��*�gX�G%C�PAr��7�!Zh �B�U!(�F�Ne�
��w�^�c
�ߐi���;k^�
xf3j�F�;&����Ovi=�:��IS�d�˾�x��5��rjX���kx��M�休
�)��֧@9��J̓s�ˣ�$l�~�֣���Iv�a*�o�(��H�e�T���L���"(����<¬½V��FW��ȽL�d��3��>B?���`��-�Ua��V��s���C�����g��G��f��
��2&�Th�W�(��_��e���z���H���Ak]*C��AM��PJ
��9��!�EC8��	jb��J��-o���t�+����Y�Y��*	9����7��7�5BӉ�hJ�a���B�⑗a��c�)
��K�:�=N�J��j��~ǰ{N�$���5{��IX�m����F�Д����K��J�Z9���'Є:b�UJn��f�X�_��t�3�����yV����򖀒�I{��3nZ��X��!(���`�7a��]p��N��p�
R��B�r���b:�d��5�$k�=Y�_��w!��M�LZ�b9�o�G���;�7^��&��#��<�m���AfN*7�$%i
'�8Ҡ�P�/M�d��P󗃤����5�~��?�vh
٫A��s�,���_���[�<5C^����J��4�g�tw���a-���\�&���+f��Κ֊/oOv.&x��k=�GA=�
Ǧ�J�Ŕ	Xd�[N�B��%kZØd�
NO��2{�D��?kD�E�n#��E���@s�d�Y�ӳ��ѿ�-��An3����:�L��F�3q�n� ��o��X�̅�,�A~x���s�^�"b�l�� 
p�=�&h�k����l3[pN�}�z�
�����i>�8�� L%O_Z�rPsDӦN������◇���\7�\�*���p�y��/Yx�y,�͠IX_��P<3��]�$�G��M:
4�I�wXϰYI��ú�]��G�~��AvdEW=(�ςrv��S6���ф�TUB�u�I%9Va~�ĺ�|B���ɾ21�B+����p��0#�lB݋ǟ� G�<�O=�D`ll�@�u���k����*]�u}����^�Zͣ��b�N�,��F��l6Tr�$�~>w$V�<����fR:e���U�v�a/ϛ��f�Of��0�,σwM�Q�2��d=�3<y��k����)��S�����Z�����;�W�.�A�7�y�6ꧭ�xx�������}��.��8�SP|@�=
�u��z	/9diZ�fh*v>�B騕".��`/�� �9P�<y�)���$5_l3-Wן�R ��f#J��7���؃�<�AA�n��ȣI��uR[wc��c����V�%.�Ҩ�X�nseI��3���ko�+e7�������#�b�_�$��
�D�oZ���(���/ы~�B�{n+���*��~�ױ�KX���Iw�8��)~�������z?��5rU���'#O�v�rz(�ܹO�i���b�E؞��5������=P�#�V=�-Y��+�֠m
��5�M6�hj<	w=��Z��H;)�@�aw�7x4˦|�5�v#~)M� ���‚��[�h�&k=��*�s�e�K�dJ��Su�L*J�t���u�y�\��I�����A���"�L�{x�O�c��(�L�9lmK�� �k��8V�`pp���}'�An߈�-��)̪���P��K8���c�9&[Sfb�!�OJ�u�(��Ԃ��Z��.�n��u�i�;~��pFK������}���g�!�㵧�~����ʵ�X+�_hyO
pL��~�0��Y�-N��	Z~H,)4��S俲H��g�M.����.d�PV�f��cl�T;�}��,�m��Φ�m�?�3)K��Tk'W����$��Yoa�A�hg� HSD�!�؉�b+�g�����o>�����A�~hk�5����p�U��j��U,C�]'v4����M��f㵒�{r�p��|��M;B��y�>�Ġ	Jh�^tǦ���F`Pٗ%8����U��b~b�l�KU���ϩ��ʓ�(N��XK�)L�#��J��+�&��V|
���Ś�BJ	L��k"��Z�j��B8���!f�H=ͨ!6#��R�ՒR�94���P@�l���¸)�T�.k�Q�b1P�ƃ��P�g�.���!���Gy��7aF!V>��w���Շ&T�M�i�,��99|~{4�:�\&��'�fHE���/�S�v>�k8B�cF^�&r�JZ&�#��xy���O���Tcp@Sw��:
�s�ڻ�^ǵ�U�j��
 ���!�WD��醷H�!�_`��X���ޟYB���#���U^��K@��^(��U�~��@L7����y�����Y�Vd�(��j1��d��͞���R'��<VK��Щ�lDr���$�Y�)n��o�8M�֔
���b�_}�,�9�$��۳��p����8�>�es�IZ#��F��y���x/�`g�\�6�-6�(�w��uK�B�_�|�H���ٶxE'�{��5K3�K�z���՛� /Gl��s�Ug��l?�$��ʻ"ñ�&�
�UL0�BA��\�|3�ӕ���p�����w-k�T%[2~��8-4u���3�̳��:���n��8�]N��S���֢��$��~G4��CL���h\;h@<hXs7PS���S:
���!�nc3�ݕ�	5(�S��OOn�G�l�B�cM�t��-�RH�JIl�xA�K��V�8����ݓ�������8#��5�?���nm79
L(QmG��4�w.{�l�k���g�L�L��~�a��!�"�FK��-�$�)��|&xk���d�����i�/�?`���{�=G�ǿY-z`�B�7D�1�;�}�:.s�����
R�7ws-�eq��=Cg֥���uٯ�M0�����1�,_�g`�IsΙ��۟BC�*~��78xӓ.\u�Älqp?�HYn4e�U�CR��H�Ҋ�!gڵ�)����2���o�t��1�gt!�Ɲ����="'���b�>�'�L�DkryҿZ�4f�3Ana.��i���S5+
f��[s?Mp�T�����a`�!ٴ����Z����:�qғb�j�Q����_8JpH����	Ѯ��b�OF^1��v�"b�t$�?��u~iYS�{�<�돉�(3;3�
2/�03���9ñ�TK��
6
ApS�o��t��X��[_Q:�Q��h�uWy�X�5Ud���b���c��F���\L��HcC"a7��(ģ9�3�ݐS���b�)�	eZ��oP���U���Ͻy9)�U���gr���-ٌVn�uzu��n&�MϢ}�ܖe	@����N�0A��~Wj�C���h+��bE�d��$y�h��g�ߺ4p�#�9>���g���,�@�”=f�mB�H�IYh	�7�<��*�h�ۻ?�d9j^����X��68�:$�i<N���4�O����N�p��C(�<�d�Ox�TBL��4�����X��L
2�۟�
�]H��%p�X�sЎ�o�d�����Tk4r'@!F$���Β ����[��1���B�gIZS��!��1Q�%�m�:��nɁ{ӸE��%I�a��!g�C|��X����9U�Sp�*G_|&�&��JT\��@0�Hh�H�D�*]�f)kV��;�]_��|߿ �����n�[>�u���hp�=O#�vJH�R�ٵ�F2E������ޗ�fj�0�� ��j�h�H�}���⡴�@"m�.�9}IZj�%�C�gN�Ş�t*KMs��<��ߪ������G�ԗ[�[�Qƿ��.�Ù7�g�\�xr�H"LS�@�T��Y�Ve.�f��sN:P����|��#އ��r�+�ô�۔���še"0x7'p�T�2s���'Ab"�Q��Լe�:"
���L#�NR$�J����g>|n��Ӡ*r�w�!��!un�G$›��	d��S��1c2E|�C�
���vɅ�ݽ��L)w�k�����s0��.8��z���+u��z�r�Π$�Π�JCMq�/|�A8��
9����n�"Z!}�"�M(����M�HO��`��)h�K���&	�D�>���pL;�G�!-�j{���qd7'��e?
3�0���h��C`�PC֐��W
�v�*x��q��lG��6�⨞Ns8�;!����i(�4���KzN��g���s/�ꀎ�(�U�:�62+�*rh� �R=uo���|���HS.>ef���ƈg<��m�r��������3	xNs$ӱ$���8v��>��ۛ�c�V�8]���Tj��i#i���xU�
�i#�Ӏ��h�lJWq>�np�\5����"��z)t���l���S"oJs�g$�� ��PoS%$�2	`r�Y,k�pC���D�2���H�H&�֥1
��+"��#��Ya`�@}��W@�Tq9�\�
�=p��8�f��ᝠ�}�0|�G���d�䦛`tg�mJ7��h�j.�`R[n�c�~��[q�8�4�ݞ�T���a��ŴX�3��8���:��wY��A�$|�9�-.���-p���V�p�4����_=
�v�`Pq� �9��Fs6t��EK��=���/���R��`�)T����a�8Վ�:��M�_����`Douh�QV��Ki���r����Lp|����dz�|)�U�R�X�
zzS�<#�ѐ�����9���	d�O������'~��xw
��Pi�T�I8���B�g-�g�Ns�Mn����Z;XX�kq��A�ٔ����*�"��򌜓Ш�_���M�V�����t\R�Z���߽g�0��{�Q���d�S����B�����*)��=��.��D���f���h�^C�� �*���l����O2-AZ��<@�enK��:	Y��>2bSz���~�_H3�
�<_2�  в<?��p�|�P��<�u#i���c6�'�1��56�bIm>��y�!zՇ�U���6=�ǣ�����ME���	3�F
k.I���j�΁킢(<z��rk����E[X�%���h܄Y<�[e~���"$�B���^bgk1;0EN{�F���_CH�uk:����Z�
aEY#xB��	w�L�)���D��^6�(��~���B;�֒������������t7�9t|^
މ�aW����-(���0�n6h��m���j������&XР7���!�©�6Ԥ�qL��i1���%˖Csc#on���z]��`vMU�#��P�0@��ĻY{�5��{ţE`�)��.�k���瑝́�BaH�z�ր!!0��`����h
��@S$j>t�[09�޳j[y���i�es���cV�"���N��Sg̃���&�L��c���m���:�����ʸ��������p����K�_�f�@ظ�e8�?i@�+�CAQ!���’˗AݜyP;u��a��8FA-e� dI���B��HX��
'�z�|��<��k�m�L����S����L�[|���x7��·�HQ�����C�eY,r��+CL�a�)��E�!# 4���x��ƅ�'���>�2i�`�-]�ב�� x<��4���KGs�4��#_�vh~Gi2k�>
��5{���:�U�Q,���gN�Þݻ�L{;����8��]�ɵS���b�h�݃��_�Ǐ5ì9s`��YBcP;~������w��Zp���N��b��8�mĠ��T�@@���B� ����`=�D��0�Ee��L��n�ٸzL\7�#�G�U� %n�83�:>Ws�F�Oj�΁�����r��X���yg!G���g���{���@�
�b�d�Q�[�C3�M�˯���F��O����v�ouTACO)tF��y�����8�>
A&�C�(]9a���Z!��Fޝ��V�S&�¤"A
�C����x��9Ѧh���VH�YBۃ����{=^�݇���i7�����x������\��9���k ����&�߻T��[3k�bao6c^e[��=���	�o/�`\B�p�I�2)QH�7n�Rox�8�������i?�_a���L�?G\�8M�T��2�`[0_,�Iz��g�ûX�
c%�B�0��g��6�J��p�A�%⌷���M��D&X1�5��vб�h4R���9&���>�I��qC������:�b;?�i���t-x�;	쑘���m�[A�P|�����	W�.��3�ua�00����8��|o(��'�Ќ�#|�u����kf�-�,E=�N�J�ѽ�~@�H�0N�v�R���P��/|�+�v�o�;"9!nK��at���y���a��#w�Ñ�I��x�F{b�全7�=9
��i�3x&�~$_+W��@�,>e�žii�4
�����=��e��ɟ_a�����4�#���9�'P��j"��=X���Ez��#�[fCso��Sb�caUYÙ|ݝ|n$��~�tX�0nc����qL��A����Fv��������Ό\���3���>[­ÂE�!77Oh"�v5g6�;�
d��g��"T�DC�-fᡇN)w@b&b-�PD���΂p7�o�u���s��X[π�]��g�~��j�=u'Y�E��e0hT������l
���?�&�6�&2pW1Hf�����z�������B"�k!�f�!�v���M���۹�t����"���8�4�*�& �i�5���̪��C{�c4J.�J���f�̱�����C��g0���=߄L&{Vc��j�г8����*ۄ�ƂJ�nr�]KJ���r������q�~�+�����l�fc�5��E6�����;�T�Yn���\�6��;~'�1K'�s�o6CY�E��>v-op�ul����Y��Ì���EK�	o%C���y�~�Z��6�(��V9�N��e�C#��Z�r�q>�*p		�&��ؔ)��ݔ�ha�����zY7�;!1Q���~Zhل���Q?j����X{�i�������ͯ���}�3 4��b:$���������J�};4k;�4Ǩ�i��ϙU������m�ȣ��#��yT��_ʣ����ţ��`�#����a�؂��0Q�9qıO�CːF3ɜMn�7N�C�	�*�[(zM����&��/b1����������
��sU��i�χY�Mw�R����D��G[�s�o�b�Ǩ�H�gϛ/ܫYz�Δ�gY0=l^Q�ŏ�\2(侼��I�+.�`
�Un���y��۵ͭ.J+��4���AHo���]��U
�ѫ��!�����kDpP��l=<J��5Z9���7�$��$a�5�\��y�_���}��|��C��8��L�����c����*)7}�C��_��Kf۲�i�b��x9=�٩�D�LZCLA3jC�tx�m�mR
��/�8g�p;dnf3v�s�6� 
B|c���rۅ�1b�K�{
�1�T���;1��g��/F�J�<IEND�B`�images/mj_logo_med.png000060400000002407152455705070011003 0ustar00�PNG


IHDR$.&L�tEXtSoftwareAdobe ImageReadyq�e<�IDATHǽ�KlUU��}��{����}S(J)mi�R(�R�:��D&&&������8��(1!HIP$�bBA%�")р�H�ϔZBio�gv��W����ɟo��w~�Q^x�0�+!�n$�V"��Nb���=Dt���A�iF<zرcG��m��J)�uB! �83Q?3w1Q;�$����cǎޟr�;z����?
�A�m["3��@D f03s�z���ȶs�ȮH4��Skhޓ%���B##5�0B	_y��-((�B=��X`'�+b����]r�ܥ��/�8�a�4M��`b034�QA�֣��`0��m��+,��h�K�d���l���i�ު���2j޼�y]���N��q�0�:OX �qB�sZ��W�a(�
��AL ��B���� b��5�'5����1y�l�����Ҋ2�.���}u*�FX����!H����z:��JmB����m�]��g��ۍ�p�s�Pjd��q�ulj���[8��>�5#�eԥ��A-�a��˲ �,	h,���H)9e��|C��E,s]g�p�_w����8o�ڄ/[P_��ZA�/�_I�r��"X[�+d�*�
JW��P��H�aEjʬ9%��N�8�Uo�q�����sé+��\^��#��3��ʕ?g�����
e)!�b1^G�f��DRx�'pBC'|@�0��e��2���Lr���`�_6-/+��C�Y�j�N����l ����`S`�%ðgÊ�',�����]��s��~,����^��*�&�0,��&CA@f!�:�޼o��b�ű��
I##�$�X1( �_�ǤHf6��e0�U�
�y�-��4��I�)0rh��Ai�������V�g��=L�>�|�݉�?�f���NF�,}���Z
;s�4CYML�.�|Ӎ��OJ���"��( �f�`NV9��^�`��)�x�q�lrx�57�+V������N�s+��S^��Ɲ��u0�9��{F8ᒕp�%��r���ۭ��6mm�wn�Hg�fB�b'	�s��p�O�
�v+���2����7���Nq=�hN+�z�e�ɭܦ0Ō+�w`C(T�p�SP3R{X&����a�Sȿ�#L�u��nR���mW1͌)�21��h
/|~�'��py�tFRIEND�B`�images/campaigns-48x48.png000060400000005151152455705070011266 0ustar00�PNG


IHDR00W��sRGB���bKGD�������	pHYs��tIME�

0+�#��	�IDATh���o\�u�?��k�rHS)˪�ȭH%nPI
Ȣ�誫�Ȧp����lj�AvEѦ�$6ǿR'�۲D��3$�����.�p<�!Z��ʋ^����;�s�9��Ox���?5���A�V^���I�G=��?���Z�4�W����c���M��U��Ç����6ai}��ŋ׀��v*���UZ�<-"�V��j��m�aNz��/�*�O�O=������0pU$xA�ie� !�d��xI�fCգ�BPR�#�dH����K|1��X1�����
�G�@tU���"���748Z׿C����"r>~F�2(�ɛ���D1����:���z�MV_~Tn���c9�aUH�v3&��(�ȗ5�r��9�q�*�)��#O�эC6����/KE�X[�DU1�<qc�$I�h��4�)B��I�&D	��"�C@�&�U�$�ꬍ�.84�~���]���'���N�r^���'�Z��AĜ?��J^:��,���b�����q��5���<P^���Ss@T�I\Q�*6�>�%���Q��)r^	���*F��9�>�kQW ���:p:UY!qy^���/���V�lq���>Xk�@�ҕ,��q�n\��)���\
���UH�EL�
����/����3�=ʲd0̉"{.R��w���U��\'��F�\�#"�jX��2*�%
!rE����a�kߢ�����Fm�9���	���/�1�w� �
��U��t*���|Mp����X����F���4R�$#͒s���Q:G��caq������,1I��ٛ���~�'j��I��%��(�!!`M���"�W�E����,˒b<fee��k	AQ�*
@.EN�G� � ��?g.�r��
e�� �u:*�Kh����v�W�a�?��(HZ���;�J�W� ���Y��
.j��J�f�����Ƥ")�Ii�S�v�*.�d����$A�T�sT�L<�	���h4���c�I稔E��
�>� u%��@���Nz��\|�����M��Ld�5�x���cc��y�z-���9�4�5�(�����ՙ��hCs�W�UEL�p��y���@������91�FQ���@��SE�'8�S:2�UE�ul
�F�gb~ii��hD^{d�c���"P�%�~���k��T���jucs2Q6]UAL�P�(:d���2��6�Dn<I5:x�9G��aee���,�H�pU�(�t޸yPG7|YB�S@[sB���˗�t:�p
�lSU�󜭭-�\�rl}�D�AU^	e�Ƭ�`z���e�j@���0!5��38�y��evz;�����3���0�nw���s8��}�.'fh�W(7fm6+���ݷ~�j���u���tHG��i-.��G3�c#��‰�y���ѐ?���ܡ�fgP�D �.��
 ����W��ѴJ����o�y��X��iO0;���������Cz�qB�{h������>����o|���p�_;|PTl]	TkU����G�بlj�qN��QA�P�V�*� Ʋ��g�5��r��ﱻ�瓻w�Ҕ�ک7��di�ݭ-�{]�>�<!Z�����뫩)��5e�@�������+Q4sz�m�V1B6���&�_B�Sff�s��DC /J��.2y����ܠ�e�J��{ﳶ�ƅ�UU�&)��A����'oM�Ĥ��=�qֆ(F} nd����5cb���zH���OO,����.^F�6Ѥ;[Z\�5?ϭ[�XZZˆ��v�v�I�LK�uc����%�	��)������AA��cLl)!��]ʉ��B�2�����w���{ld���`ggUess�W((o��I���*=T���:��y�nd�P)&)�8��}J���Cd'"Sr:��"�r�U�7�rB1�,�d�W���,e����P��&b�7?fy�'-�c���T�[��z��G�RD�͋N<��_�A�$T�8�6[ċWX��cY����ڹ��hY������N��K�ܾף*ݧ֘g�$ʪ17��[�ۤ�\=����j��9����:�p`y�IooT�}�U,~�L�gϪ-�n�l�9�{��/#��޾bt�m��v��3lPկz{�c=����.���ٵ1��C�,���))�X
����Z���^�[��(�h���B��D��
<$o�N�o4���Ov�$�ݏ��$�۷��|��Z̈́O0Ɲ��Kx�F�wnmݙ�g���[����N$�����?Y��/�gk0`�p@�?��Q�;��m��c��{;�����hF�F�������i�W�x���^wl&; GC(�����p�2���W���v���L�Y�s�����$پ"�O|�;������2�Y��&��<�c���@	�&߉_�̞���x����y!��oIEND�B`�images/index.html000060400000000054152455705070010013 0ustar00<html><body bgcolor="#FFFFFF"></body></html>images/contacts-48x48.png000060400000011436152455705070011145 0ustar00�PNG


IHDR00W��	pHYs��~�
OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*!	J�!��Q�EEȠ�����Q,�
��!��������{�kּ�����>�����H3Q5��B������.@�
$p�d!s�#�~<<+"��x��M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH�����0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4�������x����6��_-��"bb��ϫp@�t~�,/��;�m��%�h^�u��f�@����W�p�~<<E���������J�B[a�W}�g�_�W�l�~<�����$�2]�G�����L�ϒ	�b��G�����"�Ib�X*�Qq�D���2�"�B�)�%�d��,�>�5�j>{�-�]c�K'Xt���o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A�,����`6�B$��BB
d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(��	A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=��C��7�F��dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8,	�c˱"����V����cϱw�E�	6wB aAHXLXN�H� $4�	7	�Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[
�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w
��Ljg(�gw��L�Ӌ�T071���oUX*�*|��
�J�&�*/T����ުU�U�T��^S}�FU3S�	Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k
��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN	�(���~���)�)�4L�1e\k����X�H�Q�G�6����E�Y��A�J'\'Gg����S�Sݧ
�M=:��.�k���Dw�n��^��Lo��y��}/�T�m���GX�$��<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��=
���Z~s�r:V:ޚΜ�?}���/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z�������ۯ�6�i�ܟ�4�)�Y3s���C�Q��?��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�����!h�쐭!��Α�i�P~���a�a��~'���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl�������{�/�]py�����.,:�@L�N8��A*��%�w%�
y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L
Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y-
�B��TZ(�*�geWf�͉�9���+��̳�ې7����ᒶ��KW-X潬j9�<qy�
�+�V�<���*m�O��W��~�&zMk�^�ʂ��k�U
�}����]OX/Yߵa���>������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n
�ڴ
�V��E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa�n��{��4���[���>ɾ�UUM�f�e�I���?�����m]�Nmq����#�׹���=TR��+�G�����w-
6
U����#pDy��	�
:�v�{���vg/jB��F�S��[b[�O�>����z�G��4<YyJ�T�i��ӓg�ό���}~.��`ۢ�{�c��jo�t��E���;�;�\�t���W�W��:_m�t�<���Oǻ�����\k��z��{f���7���y���՞9=ݽ�zo�����~r'��˻�w'O�_�@�A�C݇�?[�����j�w����G�������C���ˆ
��8>99�?r��C�d�&����ˮ/~�����јѡ�򗓿m|�����������x31^�V��w�w��O�| (�h���SЧ�������c3-� cHRMz%������u0�`:�o�_�FIIDATx�ԚIl��of��%h�%��Y
��u��n��p�.)j����z)�\���Kѫ�C/E�\�+�.(R�m��ؑۨc[q,K�6Z�,Q\潯�C��(!"�(��}���H������绺�|����u�>�l��۟}��w}�4~����}���F��CO<7rpt�VK�Ưn�*��y`ph胑���߾~�Tw7�U߿�����	9o����-y���;�رs�����9b�8/�9�éi^9��m��
F�B��7��R�y�n\��J�<IJl,��q�2(�{W��b�(`��:$����Or""
@L��"�14J��_C��,���/�~��"�ޔ?EO�v-������祩�D���"R޴Or1`<˥R��`�6}��k_�:g5W����ǾJ)����r�9�j�6�Ź�'��¨]����qM=��$�oi����4�\�F��>/�o39 �(�C(�PFۓ��---m0�E*@�RX�P�V�Xˮ�]�1ض�r�'b����ЩS�T�!$JU`4����RDXz��,�FS���#�-D2��iҙW'2\��h2��"롐�0�}���ťv5�y^~���ٍR0��g!S�B��d��}qƆ���7/Lsg~�Twg��\���p꣏Wu�`��F� C���2�G�~f�]�1.}��߮<bn٠�"	c��Xt�p�3�|㋻��_����F,[�R��y`�c�*����Y\�+���?Ư�1�o�Y$�X����H������]�9Ïޚ$�)�S��l4\!c<�����BZk�{l��&y�"��q,ë_�p���+�������܅^;=ı�$�‘p�2�i%�K@!D=�Ĺ�<�w�˻�=��B��綳�7���\x?C_g���Ѓ1���+�3��E��Ǹ8�L(�Bf����Aij�k���p�\mq`g��n�9~��E�Vwf
7'W�Z35�CY6�m�0��#�0���Fes����%�r$5| ��Q��
��O`�a|b�H<Ja�6ڔ25��	� ��Y�qv�F6��}��3�	(b��3n��f9��,Ew�Bk�l��v��sZӓ��Z3�.b�C�6���"�mU��mK˕X<k[���j`T�Ȼ��D�m),ZC�X�/�HFK��,�B����/y���mP�+9�J�^�P%6R�%����+.�g�J��N��C��r���bw�å�lex���b�\�OیlW�;Q`M�pB�������ѣ�P3�RU9Pޭ���̓G.c;��c��.�?ls|���!�	;���͓��S�O��`L�,5k�Z��A"Q���R
�mq}���ӊc{�ޅ?�kB$7���4�xJHD ��f�i�KB"\��؎�^4��N����S*s��vZ)n����u��`��r���"�@J)�����C�O��<�X�[tJ�[�h�?���J(S�xyXlq+:X\���Xk|b��S����+6+y��a[z;�]ERQ��c���QP�.ޗs�^x5U� `@YFfhTk�3���	�t��1ֻ�Xo��W67�L���-�
酈��F= eF�@�js4!�"0�.�Y����7������d���XZ����j�m��7��M뀈�H%������\��Y�X�"QhŢ���]�m�ԗѧ�kS!�-�b-��Pt7Ǣ�ge�N,�+Z�8ȉ�5W��
pb��7:`	���m�Y�&s�$��S�NRm�d�l��W�:�#
�ֆP��o�r �F�o=�X~�^��è�9���mO@DT՘�FV��:]�t�}�P
Q`d��}?U��Tͅ�6��n	@ʡ�*
Y��O��E�P2����m�彑���T��?|��|Ƕ���f�$J�8N5�ٲw�
	[��""ے����ss�w��.�"��I{���R�ToC�R�@�?��W?u���/��	��
��?�bz�^�;�k�h�{���5�I��U#�Ac��³���@��d �J�a��K�(��ۯ�,o���J������x�Zˮ�r�G"r�J�������
o8IEND�B`�images/contacts-16x16.png000060400000006440152455705070011132 0ustar00�PNG


IHDR�a
OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*!	J�!��Q�EEȠ�����Q,�
��!��������{�kּ�����>�����H3Q5��B������.@�
$p�d!s�#�~<<+"��x��M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH�����0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4�������x����6��_-��"bb��ϫp@�t~�,/��;�m��%�h^�u��f�@����W�p�~<<E���������J�B[a�W}�g�_�W�l�~<�����$�2]�G�����L�ϒ	�b��G�����"�Ib�X*�Qq�D���2�"�B�)�%�d��,�>�5�j>{�-�]c�K'Xt���o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A�,����`6�B$��BB
d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(��	A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=��C��7�F��dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8,	�c˱"����V����cϱw�E�	6wB aAHXLXN�H� $4�	7	�Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[
�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w
��Ljg(�gw��L�Ӌ�T071���oUX*�*|��
�J�&�*/T����ުU�U�T��^S}�FU3S�	Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k
��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN	�(���~���)�)�4L�1e\k����X�H�Q�G�6����E�Y��A�J'\'Gg����S�Sݧ
�M=:��.�k���Dw�n��^��Lo��y��}/�T�m���GX�$��<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��=
���Z~s�r:V:ޚΜ�?}���/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z�������ۯ�6�i�ܟ�4�)�Y3s���C�Q��?��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�����!h�쐭!��Α�i�P~���a�a��~'���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl�������{�/�]py�����.,:�@L�N8��A*��%�w%�
y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L
Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y-
�B��TZ(�*�geWf�͉�9���+��̳�ې7����ᒶ��KW-X潬j9�<qy�
�+�V�<���*m�O��W��~�&zMk�^�ʂ��k�U
�}����]OX/Yߵa���>������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n
�ڴ
�V��E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa�n��{��4���[���>ɾ�UUM�f�e�I���?�����m]�Nmq����#�׹���=TR��+�G�����w-
6
U����#pDy��	�
:�v�{���vg/jB��F�S��[b[�O�>����z�G��4<YyJ�T�i��ӓg�ό���}~.��`ۢ�{�c��jo�t��E���;�;�\�t���W�W��:_m�t�<���Oǻ�����\k��z��{f���7���y���՞9=ݽ�zo�����~r'��˻�w'O�_�@�A�C݇�?[�����j�w����G�������C���ˆ
��8>99�?r��C�d�&����ˮ/~�����јѡ�򗓿m|�����������x31^�V��w�w��O�| (�h���SЧ�������c3-�bKGD�������	pHYs��~�tIME�

33�]�RIDAT8�}�Mk�U��}�{?��mn
��X�BF��"ڀt��qg����?ЩtС#�[(�?Q�5%)�M�Dͽor޽����Iݰ9���g���:F��;w���×�f�>\X��U7�?��_�Ww�x��WG���G?J�j����w>~?����4�VL٧+�����vww��,Bx��͐��JKg�W����l``���sÛ���1����!���� <8�5B�.F�	�0���Nf7��ń�^x���T�f~*xs>Q'�k�S��>Au�u�Ʃ�O�GO�;^q�6/�!J#��aq��-�ܝP�$����}n�����1LNH�K��g<P���¨.�t��تy�db�6…<�f狷��&
o�I��&<�;�=���D6��DH�NM���?�t+A�D�;H��'v"sv�pf�Y�����p��mc�'�K���h��߭���¬��ɾ_�˟|�٣�����)x�GKW������ \�u��։�ꥈv

!��E��&NL�*>A�t;쌶�⹟)w{l��Är�������e��p�823����(<媓�~���w�����'”IEND�B`�images/stats-16x16.png000060400000001523152455705070010447 0ustar00�PNG


IHDR�asRGB���bKGD�������	pHYs��tIME�

38x����IDAT8�u�KHTa����νw|�4�8�C�$jDET�h
2]8�� d-���A�X=v�I�M.�B��Y��C��I����3k�if�f5b8���� ̊��Z�5:���u�m�KM���H2?hhlA$�:�����@pa�j��pxO֋g�H!���v�)YPp���b�Ֆ�/3@�)�KJN�Qڶ"����P�mR��耵h�&s������y��.�RB��i�i2��('�<�J�rUiM/b�7�.����b�8�
�A�&�t=1�/���Y���G�|U5�}�k�P�d���R�1�r����^q��iɏu�DJ��n=�Y̕�a̽3@�99�ɫ]s��^�TGp+dK,�X/�B,1��f�	 )^��
�bw.�o!X@R!k�]$�i&
�&Ǥ�O��w\���P��̮��׉a��7��9&��8�6.>o�k!�B���aD�)��d�A�m�� !}�I��2�I1���\��t�D�p�\����HO/���؝;?D";�&�w5�3�
��!$=��%E�h�D�'Y�>�m��oLs�4�3k�bM3#�c~���<U�"��C~<?�����s�m�J����k�������yB2C1��r�k��k��|<�i�p0ܾ)zs�0�����Ç���误/t�����iL-srV��a��޶�v�c�T�kj�B��IEND�B`�images/campaigns-16x16.png000060400000001354152455705070011255 0ustar00�PNG


IHDR�asRGB���bKGD�������	pHYs��tIME�

3�֤�lIDAT8˅�MkUg������s�����@�F�����-(R)�w�yqЎ��L����A+���Hɠ��	�N��xO��� *�ݰF{�
{�d��U&�/�y��MYzAxW�̌:�ח��^EO�_��N��\�o!���"�4��-B�$"h����lolຆC�}A/�wm�??\�[�ν��+@BX6uE:9�������x�;�f	aXQ{w�	߶9}�$��J���Y8u�u��0Uu�ZG��3o�ێ��8lS��-�E`f�X�{b	� �q�Q���"�j�LlU�$��0ˈ"!�'��
���H	�,C)��տ�HTW�ö�g���@�5�<�Z�s��Z�yN�5�P�����j�]�eޘ,��b��<�^�i��PU�t@W��M��c|[f�v�v���j�Ǭ� O��'��?��s 0�Q�}��QL�@���Ѻ�y��R9H�ʬn���Q�ㅽ��R>�	o����@Ƚ��^}�Wq��|!"��]�%�[�Z�b�����^,���?�
��k_��&�a��E^�����5�~�問5���ߓ��̆��ϔ��v��4���qa4�}�3�(�)�]�}C�#z�tu�IEND�B`�images/logo-48x48.png000060400000003303152455705070010261 0ustar00�PNG


IHDR00W��sRGB���bKGD�������	pHYs��tIME�

&#�`�mCIDATh��{�UW��uιs��%*S
��v��hC5���Va�BZ�m�M�G��4&���&���VQm��!�B���-��U��0�u���ǝ�L�����Nn�Ovr��Z{�}ԨQ�F�5�6�f�Ïf���&I�}��7��t���=[���EY%i�$�$�{7���(i��CH�ݽ���t]7_\��)�SR��IH��U�]�O�I��}�I�]�Tڰa}��
�q��v�e���O@��(�z�$�%��}�Yw�lwx���Խy�oq�:v�$af��̚�N�w	?��63��%Pƌ�D&I��$����K[v���P�4 2�}�O�j[�z�V͢$*�^��țG�n�8����Z�M���F�QO�Xܑ�nx�P�>z쭅��?���-v���`��{1[����K��q�ٳ��U�����A�P�UMCU��\��w��*����"�Ѻ��Vo۶���Y�6O���|�S\�g�UB'��6	l���+"3�8����~�������`p���zo0�%&U3VIy����W2�H7uJ3�z5�����Q�<e��%��$���|�����G��-[�%���<����_�]Oǃ���ԗ-u�l�\�;O�ow�a�tb���I>fA�Rj
e!���ST��̨���^R�|������8~�53��/Df��Ͼ]��S?�����(2��Z��HG�,�m����;�<Z���M���i�i��+J�E8H����Y��x8��v4�z���/���yÇ5}�{��m��CM��9�S���]��oټv���n�9����Q!�ǣh��@�PH��	��Cx�\�<˼of�����}�ӗ����~}��C;v��/�~�k��8���ԒGCD��rIe7/��]pA0<J�
u#�R7�ny�Y[?���zmjMJQ��ɗ�m6FVR�PP5JdX��b �0������T������Է.>y���P�)e�Z̆(�3).�,1�8�0�$0C��
%��8�\�1yږo]�g���D�DK_;��(6���z��.��p��27���(iF*}|e�uq���C" q�ɨt� �dȫ;ZP!��F,P��l�򯠼<߲���;�#�ڄz���I"��E2|��F~�
�	�%����W�0w!:�i3k�KF� �#�:=2�b���\�}FH�Qx<7��ɡ����@>|"*])f�"L�#i nlV�-�dJ/榵Ͽ������h wcR�l0�Q����i�����H���
f�-��P�\Vd�C��33��8�!�a7C&O��O[��+�%�z��+��i���Qᆩ���&䦴����2W�K*����)�D�BɓJw�&�M~�\Y�1��3{,7}щ��N�\�������'0��)�
7��q<,ͷ�o��/�-��S�~�LӇ[��q^.���-�+��W��8���qv̜7�畕�����s
��5P�˺X��{�&��h?�5f�={�f1��Y�3;v_/_�UB�?��#-V_?������g�Q�F�5j�z�
��T~ҼIEND�B`�