$lang ) { if (isset($_POST['activamail_subj_'.$lang]) && trim( $_POST['activamail_subj_'.$lang] ) != "" ) $activamail_subj[$lang] = stripslashes(trim($_POST['activamail_subj_'.$lang])); if (isset($_POST['activamail_mail_'.$lang]) && trim( $_POST['activamail_mail_'.$lang] ) != "" ) $activamail_mail[$lang] = stripslashes(trim($_POST['activamail_mail_'.$lang])); if (isset($_POST['optin_msg_'.$lang]) ) $optin_msg[$lang] = stripslashes(trim($_POST['optin_msg_'.$lang])); if (isset($_POST['optout_msg_'.$lang]) ) $optout_msg[$lang] = stripslashes(trim($_POST['optout_msg_'.$lang])); if (isset($_POST['lists_msg_'.$lang]) ) $lists_msg[$lang] = stripslashes(trim($_POST['lists_msg_'.$lang])); if (isset($_POST['disclaimer_msg_'.$lang]) ) $disclaimer_msg[$lang] = stripslashes(trim($_POST['disclaimer_msg_'.$lang])); if (isset($_POST['unsub_footer_'.$lang]) ) $unsub_footer[$lang] = stripslashes(trim($_POST['unsub_footer_'.$lang])); if (isset($_POST['preform_msg_'.$lang]) ) $preform_msg[$lang] = stripslashes(trim($_POST['preform_msg_'.$lang])); if (isset($_POST['viewonline_msg_'.$lang]) ) $viewonline_msg[$lang] = stripslashes(trim($_POST['viewonline_msg_'.$lang])); } if ( count ($activamail_subj) ) update_option('alo_em_txtpre_activationmail_subj', $activamail_subj ); if ( count ($activamail_mail) ) update_option('alo_em_txtpre_activationmail_mail', $activamail_mail ); if ( count ($optin_msg) ) update_option('alo_em_custom_optin_msg', $optin_msg ); if ( count ($optout_msg) ) update_option('alo_em_custom_optout_msg', $optout_msg ); if ( count ($lists_msg) ) update_option('alo_em_custom_lists_msg', $lists_msg ); if ( count ($disclaimer_msg) ) update_option('alo_em_custom_disclaimer_msg', $disclaimer_msg ); if ( count ($unsub_footer) ) update_option('alo_em_custom_unsub_footer', $unsub_footer ); if ( count ($preform_msg) ) update_option('alo_em_custom_preform_msg', $preform_msg ); if ( count ($viewonline_msg) ) update_option('alo_em_custom_viewonline_msg', $viewonline_msg ); } // -------- // -------- Options permitted ONLY to ADMIN ('manage_options') if ( current_user_can('manage_options') ) { // Tab GENERAL if ( isset($_REQUEST['task']) && $_REQUEST['task'] == "tab_general" ) { if(isset($_POST['subsc_page']) && (int)$_POST['subsc_page'] ) update_option('alo_em_subsc_page', trim($_POST['subsc_page'])); if ( isset($_POST['show_subscripage']) ) { update_option('alo_em_show_subscripage', "yes"); } else { update_option('alo_em_show_subscripage', "no") ; } if ( isset($_POST['embed_css']) ) { update_option('alo_em_embed_css', "yes"); } else { update_option('alo_em_embed_css', "no") ; } if ( isset($_POST['credit_banners']) ) { update_option('alo_em_show_credit_banners', "yes"); } else { update_option('alo_em_show_credit_banners', "no") ; } if ( isset($_POST['no_activation_mail']) ) { update_option('alo_em_no_activation_mail', "yes"); } else { update_option('alo_em_no_activation_mail', "no") ; } if ( isset($_POST['delete_on_uninstall']) && isset($_POST['delete_on_uninstall_2']) ) { update_option('alo_em_delete_on_uninstall', "yes"); } else { update_option('alo_em_delete_on_uninstall', "no") ; } if ( isset($_POST['publish_newsletters']) ) { update_option('alo_em_publish_newsletters', "yes"); } else { update_option('alo_em_publish_newsletters', "no") ; } } // end Tab GENERAL // Tab NEWSLETTER if ( isset($_REQUEST['task']) && $_REQUEST['task'] == "tab_newsletter" ) { if(isset($_POST['sender_email'])) update_option('alo_em_sender_email', trim($_POST['sender_email'])); if(isset($_POST['sender_name'])) update_option('alo_em_sender_name', stripslashes( trim($_POST['sender_name'])) ); if(isset($_POST['lastposts']) && (int)$_POST['lastposts'] > 0) update_option('alo_em_lastposts', trim($_POST['lastposts'])); if(isset($_POST['debug_newsletters']) && in_array( $_POST['debug_newsletters'], array("","to_author","to_file") ) ) update_option('alo_em_debug_newsletters', $_POST['debug_newsletters']); if ( isset($_POST['filter_the_content']) ) { update_option('alo_em_filter_the_content', "yes"); } else { update_option('alo_em_filter_the_content', "no") ; } if ( isset($_POST['js_rec_list']) ) { update_option('alo_em_js_rec_list', "yes"); } else { update_option('alo_em_js_rec_list', "no") ; } if(isset($_POST['js_rec_list']) && in_array( $_POST['js_rec_list'], array("ajax_normal","ajax_minimal","ajax_periodicalupdater","no_ajax_onsavepost") ) ) update_option('alo_em_js_rec_list', $_POST['js_rec_list']); if(isset($_POST['campaign_vars']) && in_array( $_POST['campaign_vars'], array("no","google") ) ) update_option('alo_em_campaign_vars', $_POST['campaign_vars']); $theme_options = array_merge ( array('yes'=>'1','no'=>'1'), alo_easymail_get_all_themes() ); if ( isset($_POST['use_themes']) && array_key_exists( $_POST['use_themes'], $theme_options ) ) update_option('alo_em_use_themes', $_POST['use_themes']); } // end Tab NEWSLETTER // Tab BATCH SENDING if ( isset($_REQUEST['task']) && $_REQUEST['task'] == "tab_batch" ) { if(isset($_POST['dayrate']) && (int)$_POST['dayrate'] >= 300 && (int)$_POST['dayrate'] <= 10000 ) update_option('alo_em_dayrate', trim((int)$_POST['dayrate'])); if(isset($_POST['batchrate']) && (int)$_POST['batchrate'] >= 10 && (int)$_POST['batchrate'] <= 300 ) update_option('alo_em_batchrate', trim((int)$_POST['batchrate'])); if(isset($_POST['sleepvalue']) && (int)$_POST['sleepvalue'] <= 5000 ) update_option('alo_em_sleepvalue', trim((int)$_POST['sleepvalue'])); } // end Tab BATCH SENDING // Tab PERMISSIONS if ( isset($_REQUEST['task']) && $_REQUEST['task'] == "tab_permissions" ) { // Get role objects: $role_administrator, $role_editor, ecc. $roles = array_keys( get_editable_roles() ); foreach ( $roles as $key ) { if ( $key == 'administrator' ) continue; // skip admin ${'role_'.$key} = get_role( $key ); } // Option => capabilities $map_caps = array( 'can_edit_own_newsletters' => array('edit_newsletters','delete_newsletters'), 'can_edit_other_newsletters' => array('edit_others_newsletters','delete_others_newsletters'), 'can_send_newsletters' => array('publish_newsletters'), 'can_manage_subscribers' => array('manage_newsletter_subscribers'), 'can_manage_options' => array('manage_newsletter_options') ); foreach ( $map_caps as $option => $caps ) { $role_options = ( isset($_POST[$option]) ) ? (array)$_POST[$option] : false; foreach ( $roles as $key ) { if ( $key == 'administrator' ) continue; // skip admin if ( $role_options && in_array( $key, $role_options ) ) { foreach ( $caps as $cap ) ${'role_'.$key}->add_cap( $cap ); } else { foreach ( $caps as $cap ) ${'role_'.$key}->remove_cap( $cap ); } } } } // end Tab PERMISSIONS } // end if Submit // -------- echo '

'. __("Updated", "alo-easymail") .'

'; }?>

Alo EasyMail Newsletter Options

" . get_the_title (get_option('alo_em_subsc_page')) . ""; ?>
: -1, 'post_type' => 'page', 'order' => 'ASC', 'orderby' => 'title' ); $get_pages = get_posts($args); if ( count($get_pages) ) { echo "\n"; } ?>
.
: /> .
: /> . .
: /> .
: /> . .
: /> .
: . .
/>
/>

: />
: __("no", "alo-easymail"), "google" => __("Google Analytics", "alo-easymail") . ' ('. __("you need an account", "alo-easymail") .')' ); foreach( $campaign_vars_list as $key => $label ) : echo ''; echo '
'; endforeach; ?> .
'. '...&utm_source=AloEasyMail&utm_medium=email&utm_campaign={newsletter-id-and-title}&utm_content={requested-url}'; ?>
:
:
. . . : .
:
:
  • : .
  • : ():

'; echo ''; } ?>
'; echo '
'; echo '

'. __('No multilanguage plugin is enabled, so you will only see texts in the main language of the site', 'alo-easymail') .'.

'; echo '

'. __('Recommended plugins, fully compatible with EasyMail, for a complete multilingual functionality', 'alo-easymail') .': '; echo 'WPML, '; echo 'qTranslate'; echo '.

'; //echo '

'. sprintf( __('Type the texts in all available languages (they are found in %s)', 'alo-easymail'), ''.WP_LANG_DIR.'' ) .".

"; echo '

'. __('If you like here you can list the languages available', 'alo-easymail') .':
'; $langs_list = ( get_option( 'alo_em_langs_list' ) != "" ) ? get_option( 'alo_em_langs_list' ) : ""; echo ''; echo ' '; echo ''. __('List of two-letter language codes separated by commas', 'alo-easymail'). ' ('. sprintf( '%s', __('iso 639-1 codes', 'alo-easymail') ) . '). '. __('Sample:', 'alo-easymail') .' en,de,it'; echo '

'; echo '

'. __("The plugin looks for the subscriber's language in the browser setting and sends the e-mail accordingly", 'alo-easymail') . '.

'; echo '

'. __('If you are not using a multilanguage site ignore this piece of information', 'alo-easymail') .'.

'; echo '
'; echo '

: : '. __("If filled in it will appear at the bottom of widget/page. Useful to show/link more info about privacy", "alo-easymail"). '.'; break; case "preform_msg": echo "(". __("empty", "alo-easymail"). ") "; echo '
'. __("If filled in it will appear at the top of widget/page. Useful to invite to subscribe", "alo-easymail"). '.'; break; } ?>
$lang ) { $lang_li[$lang] = '
  • ' . alo_em_get_lang_name( $lang ) .'
  • '; $lang_div[$lang] = '
    '; $lang_text = ( !empty( $custom_texts[$lang] ) ) ? esc_attr($custom_texts[$lang]) : ""; switch ( $text_field ) { case 'disclaimer_msg': // textarea: more space $lang_div[$lang] .= ''; break; default: // input $lang_div[$lang] .= ''; } $lang_div[$lang] .= '
    '; } } ?>

    : .
    $lang ) { $lang_li[$lang] = '
  • '. /*alo_em_get_lang_flag($lang, false) .*/ ' ' . alo_em_get_lang_name( $lang ) .''; $lang_li[$lang] .= '
  • '; $lang_div[$lang] = '
    '. __("Subject", "alo-easymail") .'
    '; $lang_subj = ( !empty($subjects[$lang]) ) ? esc_attr($subjects[$lang]) : ""; $lang_div[$lang] .= '
    '; $lang_mail = ( !empty($mails[$lang]) ) ? esc_html($mails[$lang]) : ""; $lang_div[$lang] .= ''.__("Main body", "alo-easymail").'
    '; $lang_div[$lang] .= '
    '; } } ?>

    :

    • %BLOGNAME%:
    • %NAME%:
    • %ACTIVATIONLINK%:
    :
    [USER-UNSUBSCRIBE]
    :

    :

    • %BLOGNAME%:
    • %UNSUBSCRIBELINK%:
    • %UNSUBSCRIBEURL%: . '. esc_html( "..." ) .'';?>
    :
    [READ-ONLINE]
    :
    $lang ) { $lang_li[$lang] = '
  • ' . alo_em_get_lang_name( $lang ) .'
  • '; $lang_div[$lang] = '
    '; $lang_text = ( !empty( $custom_texts[$lang] ) ) ? esc_html($custom_texts[$lang]) : ""; $lang_div[$lang] .= ''; $lang_div[$lang] .= '
    '; } } ?>

    :

    • %NEWSLETTERLINK%:
    • %NEWSLETTERURL%: . '. esc_html( "...") .'';?>

    '; echo ''; } // Try to trigger WP cron $response = wp_remote_get( site_url( 'wp-cron.php' ) ); if ( ! is_wp_error( $response ) && $response['response']['code'] != '200' ) { echo ''; echo ''; } // Next batch sending scheduled in WP cron $next_cron = wp_next_scheduled( 'alo_em_batch' ); if( !$next_cron ) { // we try to scheduled it now wp_schedule_event( time() +60, 'alo_em_interval', 'alo_em_batch' ); $next_cron = wp_next_scheduled( 'alo_em_batch' ); } echo ''; echo ''; ?>
    '; echo '
    '; echo '

    '. sprintf( __('Some parameters are already setted up in %s, so the values below could be ignored', 'alo-easymail'), 'wp-config.php') .'.

    '; echo '
    '; echo '
    '; echo '

    ' . __('WP-Cron is not working properly', 'alo-easymail') .': '; echo sprintf( __( '%s is returning a %s response which could mean cron jobs aren\'t getting fired properly', 'alo-easymail' ), 'wp-cron.php', '' . $response['response']['code'] .': ' . $response['response']['message'] . '' ). '.
    '; echo __('The file seems to be not accessible: is your blog behind some kind of authentication, maintenance plugin, .htpasswd protection?', 'alo-easymail'); echo ' '. __('For more info, visit the FAQ of the site.', 'alo-easymail').' '; echo '
    ('. __('If you are using an external cron job ignore this piece of information', 'alo-easymail').').'; echo '

    '; echo '
    '; if ( $next_cron ) { echo '
    ' . sprintf( __('The cron is scheduled to launch a batch every %s minutes', 'alo-easymail'), ALO_EM_INTERVAL_MIN ).'. '. __('Next possible sending', 'alo-easymail') .': '. date_i18n( __( 'j M Y @ G:i', 'alo-easymail' ), $next_cron + 3600 * get_option('gmt_offset', 0 ) ) . '
    '; } else { echo '

    ' . __('There is not any next scheduled sending in WP-Cron', 'alo-easymail') .': '; echo __('you can try to deactivate and activate the plugin', 'alo-easymail'). '. '; echo ' '. __('For more info, visit the FAQ of the site.', 'alo-easymail').' '; echo '
    ('. __('If you are using an external cron job ignore this piece of information', 'alo-easymail').').'; echo '

    '; } echo '
    (300 - 10000)
    (10 - 300) : ≤ 30.
    (0 - 5000) : 0.
    .
    .
    .

    '. esc_html( __("Let's speak clearly: the WP cron system is a pseudo-cron and it's not accurate by definition", "alo-easymail") ). '' ?>.

    .

    . .

    '. esc_html( __("If your blog gets a few visitors a day or you like to have an accurate batch sending, you have to set up an external cron job", "alo-easymail") ). '' ?>.

    :
    /dev/null' ?>

    :
    .
    .
    :
    .
    .
    :
    .
    :
    .
    :
    : , .
    .

    "; print_r( $_REQUEST ); echo ""; // DEBUG ?> escape ( $_REQUEST['list_id'] ) ); if ( !is_numeric ( $list_id ) ) $list_id = false; } else { $list_id = false; } // Updating Request... if ( isset( $_REQUEST['task'] ) ) { switch ( $_REQUEST['task'] ) { case "edit_list": // EDIT an existing Mailing list if ( $list_id ) { $mailinglists = alo_em_get_mailinglists ( 'hidden,admin,public' ); $list_name = $mailinglists [$list_id]["name"]; $list_available = $mailinglists [$list_id]["available"]; $list_order = $mailinglists [$list_id]["order"]; } else { echo '

    '. __("Error during operation.", "alo-easymail") .'

    '; } break; case "save_list": // SAVE a mailing list (add or update) if ( isset($_REQUEST['submit_list']) ) { //$list_name = stripslashes( trim( $_POST['elp_list_name'] ) ); // List name $list_name = array(); foreach ( $languages as $key => $lang ) { if (isset($_POST['listname_'.$lang]) ) $list_name[$lang] = stripslashes(trim($_POST['listname_'.$lang])); } $list_available = stripslashes( trim( $_POST['elp_list_available'] ) ); $list_order = stripslashes( trim( $_POST['elp_list_order'] ) ); if ( $list_name && $list_available && is_numeric($list_order) ) { $mailinglists = alo_em_get_mailinglists ( 'hidden,admin,public' ); if ( $list_id ) { // update $mailinglists [$list_id] = array ( "name" => $list_name, "available" => $list_available, "order" => $list_order ); } else { // or add a new if ( empty($mailinglists) ) { // if 1st list, skip index 0 $mailinglists [] = array ( "name" => "not-used", "available" => "deleted", "order" => ""); } $mailinglists [] = array ( "name" => $list_name, "available" => $list_available, "order" => $list_order); } if ( alo_em_save_mailinglists ( $mailinglists ) ) { unset ( $list_id ); unset ( $list_name ); unset ( $list_available ); unset ( $list_order ); echo '

    '. __("Updated", "alo-easymail") .'

    '; } else { echo '

    '. __("Error during operation.", "alo-easymail") .'

    '; } } else { echo '

    '. __("Inputs are incompled or wrong. Please check and try again.", "alo-easymail") .'

    '; } } break; case "del_list": // DELETE a Mailing list if ( $list_id ) { $mailinglists = alo_em_get_mailinglists ( 'hidden,admin,public' ); //$mailinglists [$list_id]["available"] = "deleted"; unset ( $mailinglists [$list_id] ); if ( alo_em_save_mailinglists ( $mailinglists ) && alo_em_delete_all_subscribers_from_lists ($list_id) ) { unset ( $list_id ); unset ( $list_name ); unset ( $list_available ); unset ( $list_order ); echo '

    '. __("Updated", "alo-easymail") .'

    '; } else { echo '

    '. __("Error during operation.", "alo-easymail") .'

    '; } } else { echo '

    '. __("Error during operation.", "alo-easymail") .'

    '; } break; } } ?>
    :
    • :
    • :
    • :

    >
    $lang ) { $lang_li[$lang] = '
  • '. alo_em_get_lang_flag($lang, 'code') . ''; $lang_li[$lang] .= ( isset( $_REQUEST['task'] ) && $_REQUEST['task'] == 'edit_list' && $list_id && !alo_em_translate_multilangs_array ( $lang, $list_name, false ) ) ? '' : ''; $lang_li[$lang] .= '
  • '; $lang_div[$lang] = '
    '; $name_value = ( isset( $_REQUEST['task'] ) && $_REQUEST['task'] == 'edit_list' && $list_id ) ? esc_attr( alo_em_translate_multilangs_array ( $lang, $list_name, false ) ) : ""; $lang_div[$lang] .= ''; $lang_div[$lang] .= '
    '; } } ?>

    $val) { if ($val['available'] == "deleted") continue; ?>
    '. __('View') .''; ?> "; echo "" . __("Edit list", "alo-easymail") .""; echo " "; echo ""; echo "" . __("Delete list", "alo-easymail") .""; ?>
    "; print_r( $tab_mailinglists ); echo ""; // DEBUG ?>