<?php /* Smarty version 2.6.26, created on 2020-06-26 20:58:57
         compiled from /home3/bargaip4/public_html/gevimmo/plugins/massmailer_newsletter/newsletter.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'replace', '/home3/bargaip4/public_html/gevimmo/plugins/massmailer_newsletter/newsletter.tpl', 18, false),)), $this); ?>
<?php if ($_GET['nvar_1'] == 'unsubscribe'): ?>
    <?php if ($this->_tpl_vars['subscribe_info'] && ! $this->_tpl_vars['unsubscribed']): ?>
        <div class="text-notice">
            <?php echo $this->_tpl_vars['lang']['massmailer_newsletter_title_for_unsubscribe']; ?>

        </div>

        <form method="post" id="unsubscribe">
            <input type="hidden" name="action" value="unsubscribe" />
            <input type="submit" value="<?php echo $this->_tpl_vars['lang']['massmailer_newsletter_unsubscribe']; ?>
" />
        </form>
    <?php elseif ($this->_tpl_vars['unsubscribed'] == true): ?>
        <?php if (! empty ( $this->_tpl_vars['lang']['email_site_name'] )): ?>
            <?php $this->assign('sitename_key', 'email_site_name'); ?>
        <?php else: ?>
            <?php $this->assign('sitename_key', 'pages+title+home'); ?>
        <?php endif; ?>
        <div class="text-notice">
            <?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['massmailer_newsletter_person_unsubscibed'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[sitename]', $this->_tpl_vars['lang'][$this->_tpl_vars['sitename_key']]) : smarty_modifier_replace($_tmp, '[sitename]', $this->_tpl_vars['lang'][$this->_tpl_vars['sitename_key']])); ?>

        </div>
    <?php else: ?>
        <div class="text-notice">
            <?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['massmailer_newsletter_title_for_unsubscribtion_doesnt_exist'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[site_main_email]', $this->_tpl_vars['config']['site_main_email']) : smarty_modifier_replace($_tmp, '[site_main_email]', $this->_tpl_vars['config']['site_main_email'])); ?>

        </div>
    <?php endif; ?>
<?php else: ?>
    <?php if ($this->_tpl_vars['subscriber']): ?>
        <?php if ($this->_tpl_vars['subscriber']['Status'] == 'active'): ?>
            <?php $this->assign('sitename_key', 'pages+title+home'); ?>
            <div class="text-notice"><?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['massmailer_newsletter_person_already_subscribed'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[sitename]', $this->_tpl_vars['lang'][$this->_tpl_vars['sitename_key']]) : smarty_modifier_replace($_tmp, '[sitename]', $this->_tpl_vars['lang'][$this->_tpl_vars['sitename_key']])); ?>
</div>
        <?php else: ?>
            <div class="text-notice"><?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['massmailer_newsletter_title_for_subscribtion_active'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[name]', $this->_tpl_vars['subscriber']['Name']) : smarty_modifier_replace($_tmp, '[name]', $this->_tpl_vars['subscriber']['Name'])); ?>
</div>
        <?php endif; ?>
    <?php else: ?>
        <div class="text-notice"><?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['massmailer_newsletter_title_for_subscribtion_doesnt_exist'])) ? $this->_run_mod_handler('replace', true, $_tmp, '[site_main_email]', $this->_tpl_vars['config']['site_main_email']) : smarty_modifier_replace($_tmp, '[site_main_email]', $this->_tpl_vars['config']['site_main_email'])); ?>
</div>        
    <?php endif; ?>
<?php endif; ?>

<script class="fl-js-dynamic">
    var massmailer_confirm_message = '<?php echo $this->_tpl_vars['lang']['massmailer_newsletter_are_you_sure_unsubscribe']; ?>
';
    <?php echo '
    $(document).ready(function() {
        $(\'form#unsubscribe input[type="button"].remove\').click(function(){
            form_submit();
        })
    })
    function form_submit() {
        if (confirm(massmailer_confirm_message)) {
            $(\'form#unsubscribe\').submit();
        }
    }'; ?>

</script>