Example #1
0
    $format = strtolower(substr($sent_format, 0, 1));
    $GLOBALS['recipient_' . $format]++;
} else {
    $this->Stats_API->UpdateRecipient($this->statid, $sent_format, 'n');
}
#END_BLOCK_6A#
#START_BLOCK_6B#
if (isset($GLOBALS['addon_multithread_class'])) {
    $addon_multithread = $GLOBALS['addon_multithread_class'];
    if ($mail_result['success'] > 0) {
        $GLOBALS['multithread_sent']++;
    } else {
        $GLOBALS['multithread_failed']++;
    }
}
#END_BLOCK_6B#
#START_BLOCK_7A#
$addon_system = new Interspire_Addons();
$multithread_enabled = $addon_system->isEnabled("multithread");
if ($multithread_enabled && $jobtype == 'send') {
    return true;
}
#END_BLOCK_7A#
?>
#START_BLOCK_1A#
%%GLOBAL_THREAD_SEND_SELECT_THREAD%%
#END_BLOCK_1A#
#START_BLOCK_3A#
%%GLOBAL_THREAD_SEND_SELECT_THREAD_CONFIRM%%
#END_BLOCK_3A#
Example #2
0
if ($mta_enabled) {
    $addon_mta = $addon_system->Process("mta", "GetApi", "mta");
    $addon_mta->iem_log_send_pre($this, $send_results);
}
#END_BLOCK_5A#
#START_BLOCK_5B#
$addon_system = new Interspire_Addons();
$mta_enabled = $addon_system->isEnabled("mta");
if ($mta_enabled) {
    $addon_mta = $addon_system->Process("mta", "GetApi", "mta");
    $addon_mta->iem_log_send($this, $send_results);
}
#END_BLOCK_5B#
#START_BLOCK_6A#
$addon_system = new Interspire_Addons();
$mta_enabled = $addon_system->isEnabled("mta");
if ($mta_enabled) {
    $addon_mta = $addon_system->Process("mta", "GetApi", "mta");
    $addon_mta->iem_mta_schedule_details($details);
}
#END_BLOCK_6A#
?>
#START_BLOCK_1A#
%%GLOBAL_MTA_SEND_SELECT_MTA%%
#END_BLOCK_1A#
#START_BLOCK_4A#
%%GLOBAL_MTA_SEND_SELECT_MTA_CONFIRM%%
#END_BLOCK_4A#
#START_BLOCK_6B#
%%GLOBAL_MTA_SCHEDULE_INFO_TITLE%%
#END_BLOCK_6B#
Example #3
0
#END_BLOCK_A4_G#
#START_BLOCK_A5#
$addon_system = new Interspire_Addons();
$spins_enabled = $addon_system->isEnabled("spins");
if ($spins_enabled) {
    $this->_AssembledEmail['Body']['t'] = null;
    $this->_AssembledEmail['Body']['h'] = null;
}
#END_BLOCK_A5#
#START_BLOCK_A6#
$addon_system = new Interspire_Addons();
$spins_enabled = $addon_system->isEnabled("spins");
if ($spins_enabled) {
} else {
    $extra_headers[] = 'List-Unsubscribe: <%%HEADER_UNSUBSCRIBELINK%%>';
}
#END_BLOCK_A6#
#START_BLOCK_3A#
if (isset($GLOBALS['addon_spins_class'])) {
    $addon_spins = $GLOBALS['addon_spins_class'];
    $addon_system = new Interspire_Addons();
    $spins_enabled = $addon_system->isEnabled("spins");
    if ($spins_enabled) {
        $sp = $addon_system->Process("spins", "GetApi", "spins");
        $mid = $sp->rotate_url($this->message_id_server);
        $message_id = 'Message-ID: <' . $semi_rand . '@' . $mid . '>' . $this->_newline;
    } else {
        $message_id = 'Message-ID: <' . $semi_rand . '@' . $this->message_id_server . '>' . $this->_newline;
    }
}
#END_BLOCK_3A#
Example #4
0
	/**
	 * Process
	 * Process does the basic work to figure out:
	 * - which addon you're trying to access (and whether it exists & is active/enabled)
	 * - whether you have access to perform that action
	 * - whether to print a header/footer or not
	 *
	 * Then hands control over to the addon itself to do the rest.
	 *
	 * @uses HasAccess
	 * @uses Interspire_Addons
	 * @uses Interspire_Addons::GetAvailableAddons
	 * @uses Interspire_Addons::Process
	 *
	 * @return Void Doesn't return anything.
	 */
	function Process()
	{
		// if we're not viewing an addon, then show an "access denied" message
		// there's no way to view a list of addons to run
		// they all have to appear in a menu somewhere.
		if (!isset($_GET['Addon'])) {
			$this->DenyAccess();
			return;
		}

		/**
		 * print_header tells us whether to print the header/footer at all.
		 */
		$print_header = true;

		/**
		 * popup_header tells us whether it's a popup window or not.
		 * If it's a full window, that includes the nav menus etc.
		 * If it's a popup window, then none of that is shown.
		 */
		$popup_header = false;

		$get_keywords = array_map('strtolower', array_keys($_GET));

		/**
		 * See if the 'ajax' keyword is used in the get string anywhere as a key.
		 * If it is, don't show the header/footer.
		 */
		if (in_array('ajax', $get_keywords)) {
			$print_header = false;
		}

		/**
		 * See if the 'popup' keyword is used in the get string anywhere as a key.
		 * If it is, show the popup header/footer.
		 */
		if (in_array('popup', $get_keywords)) {
			$popup_header = true;
		}

		if ($print_header) {
			$this->PrintHeader($popup_header);
		}

		$addon = strtolower($_GET['Addon']);

		require_once(SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php');
		$addon_system = new Interspire_Addons();
		$addons = $addon_system->GetAvailableAddons();

		if (!isset($addons[$addon])) {  
			$this->DenyAccess();
			if ($print_header) {
				$this->PrintFooter($popup_header);
			}
			return;
		}

		$action = 'Default';
		if (isset($_GET['Action']) && $_GET['Action'] !== '') {
			$action = $_GET['Action'];
		}

		/**
		* Check the user has access to this addon and what you are trying to do.
		* The first argument is always the addon id (eg 'surveys').
		*
		* The second argument is the action you are trying to perform.
		* eg 'create', 'edit', 'delete', 'stats'
		* This must match up to the methods in the addon itself
		* eg if you're trying to get the addon to create something, the permission is 'create' and the addon method must be 'Admin_Create_Action'
		*
		*/
		$user = IEM::GetCurrentUser();
		$admin_action = $action;
		if ($admin_action == 'Default') {
			$admin_action = null;
		}
		
		if(!is_null($admin_action)){$admin_action = strtolower($admin_action);}
		// Survey permission addon... added in the group now
		foreach ($user->group->permissions as $perm_key => &$perm ) {
			if ($perm_key == 'surveys') {
				$perm[] = "submit";
				$perm[] = "tinymcesurveylist";

				foreach ($perm as $perm_action) {
					switch ($perm_action):
						case 'create':
							$perm[] = "build";
							$perm[] = "save";
							break;
						case 'viewresponsesdefault':
							$perm[] = "viewresponses";
							$perm[] = "downloadattach";
							break;
						case 'editresponse':
							$perm[] = "saveresponse";
							$perm[] = "downloadattach";
						case 'exportdefault':
							$perm[] = "export";
						case 'resultdefault':
							$perm[] = "result";
							$perm[] = "result_responseslist";
							break;
					endswitch;
				}
			}
		}
		
		// Check if addon is enabled or disabled
		if (!$addon_system->isEnabled($addon)) {
				$this->DenyAccess();
		}
               
		if (!is_null($admin_action)) {  
            $access = $user->HasAccess($addon, $admin_action);
			if(!$access){
		        $this->DenyAccess();
                if ($print_header) {$this->PrintFooter($popup_header);}
                return;
            }
			
		} else {  
            $access = $user->HasAccess($addon); 
			if(!$access){
		        $this->DenyAccess();
                if ($print_header) {$this->PrintFooter($popup_header);}
                return;	
            }
				  
		}
              
		try {
            if(is_null($action)){$action = "Default";}
			$result = Interspire_Addons::Process($addon, 'Admin_Action_'.$action);
			echo $result;
		} catch (Exception $e) {
			echo "Error!: " . $e->getMessage();
		}

		if ($print_header) {
			$this->PrintFooter($popup_header);
		}
	}
Example #5
0
if ($social_enabled) {
    $addon_social = $addon_system->Process("social", "GetApi", "social");
    $GLOBALS['NetworksPage'] = $addon_social->stats($statid, $summary);
}
#END_BLOCK_2#
#START_BLOCK_4A#
$addon_system = new Interspire_Addons();
$social_enabled = $addon_system->isEnabled("social");
if ($social_enabled) {
    $addon_social = $addon_system->Process("social", "GetApi", "social");
    $addon_social->replace_in_mail($text, $web_version_link, $this->SentBy, $this->Subject);
}
#END_BLOCK_4A#
#START_BLOCK_4B#
$addon_system = new Interspire_Addons();
$social_enabled = $addon_system->isEnabled("social");
if ($social_enabled) {
    $addon_social = $addon_system->Process("social", "GetApi", "social");
    if ($addon_social->ignore_patterns($url)) {
        continue;
    }
}
#END_BLOCK_4B#
#START_BLOCK_EMAIL2#
if (preg_match('/%%sendfriend_(.*)%%/i', $url)) {
    continue;
}
if (preg_match("/(%%SURVEY.*?%%)/isx", $url)) {
    continue;
}
#END_BLOCK_EMAIL2#