Ejemplo n.º 1
0
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$newsletter_id = isset($_REQUEST['n']) ? (int) $_REQUEST['n'] : false;
$newsletter_member_id = isset($_REQUEST['nm']) ? (int) $_REQUEST['nm'] : 0;
$send_id = isset($_REQUEST['s']) ? (int) $_REQUEST['s'] : 0;
$hash = isset($_REQUEST['hash']) ? trim($_REQUEST['hash']) : false;
if ($newsletter_id && $newsletter_member_id && $hash) {
    if (isset($_REQUEST[_MEMBER_HASH_URL_REDIRECT_BITS])) {
        $correct_hash = module_newsletter::newsletter_redirect_hash($newsletter_member_id, $send_id);
    } else {
        $correct_hash = module_newsletter::unsubscribe_url($newsletter_id, $newsletter_member_id, $send_id, true);
    }
    if ($correct_hash == $hash) {
        $member = module_newsletter::get_newsletter_member($newsletter_member_id);
        if (isset($_REQUEST['email']) && $_REQUEST['email']) {
            if (strtolower($member['email']) == strtolower($_REQUEST['email'])) {
                module_newsletter::unsubscribe_member($newsletter_id, $newsletter_member_id, $send_id);
            } else {
                if (!module_newsletter::unsubscribe_member_via_email($_REQUEST['email'])) {
                    echo 'Unsubscribe failed... Please enter a valid email address.';
                }
            }
            // is the newsletter module giving us a subscription redirection?
            if (module_config::c('newsletter_unsubscribe_redirect', '')) {
                redirect_browser(module_config::c('newsletter_unsubscribe_redirect', ''));
            }
Ejemplo n.º 2
0
?>
</a> <?php 
_e('(this form can be edited from Settings > Templates)');
?>
</p>
    <?php 
print_heading('Un-Subscription Form');
?>
<p><?php 
_e('Here is a link to the newsletter un-subscription form. People can click this and enter their email to be manually removed from receiving emails:');
?>
 <a href="<?php 
echo module_newsletter::unsubscribe_url();
?>
" target="_blank"><?php 
echo module_newsletter::unsubscribe_url();
?>
</a> <?php 
_e('(this form can be edited from Settings > Templates)');
?>
</p>
<?php 
print_heading('Other Forms');
?>
<p><?php 
_e('Please see the other forms/messages under Settings > Templates. Look for the "newsletter" ones.');
?>
</p>

<?php 
print_heading('Bounce Checking');