$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']); $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 roles to update cap $role_author = get_role( 'author' ); $role_editor = get_role( 'editor' ); if ( isset($_POST['can_manage_newsletters']) ) { switch ( $_POST['can_manage_newsletters'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_newsletters' ); $role_editor->add_cap( 'send_easymail_newsletters' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_newsletters' ); } } if ( isset($_POST['can_send_newsletters']) ) { switch ( $_POST['can_send_newsletters'] ) { case "author": $role_author->add_cap( 'send_easymail_newsletters' ); $role_editor->add_cap( 'send_easymail_newsletters' ); break; case "editor": $role_editor->add_cap( 'send_easymail_newsletters' ); $role_author->remove_cap( 'send_easymail_newsletters' ); break; case "administrator": default: $role_author->remove_cap( 'send_easymail_newsletters' ); $role_editor->remove_cap( 'send_easymail_newsletters' ); $role_editor->remove_cap( 'manage_easymail_newsletters' ); } } if ( isset($_POST['can_manage_subscribers']) ) { switch ( $_POST['can_manage_subscribers'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_subscribers' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_subscribers' ); } } if ( isset($_POST['can_manage_options']) ) { switch ( $_POST['can_manage_options'] ) { case "editor": $role_editor->add_cap( 'manage_easymail_options' ); break; case "administrator": default: $role_editor->remove_cap( 'manage_easymail_options' ); } } //echo "
";print_r($wp_roles);echo "
"; } // 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"; } ?>
.
: /> .
: /> . .
: /> .
: /> . .
: /> .
: . .
/>
/>

: />
:
:
. . . : .
:
:
  • : .
  • : ():

'; 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%:
    : :

    :

    • %BLOGNAME%:
    • %UNSUBSCRIBELINK%:
    : :
    $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%:

    '; 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 '
    (300 - 10000)
    (10 - 300)
    (0 - 5000) : 0.
    . . .

    1. ">»

    get_names(); // get a list of values, containing pairs of: $role_name => $display_name // get roles to check cap $get_author = get_role( 'author' ); $get_editor = get_role( 'editor' ); ?>

    : has_cap ('send_easymail_newsletters') ) { $selected_editor = ""; $selected_author = "selected='selected'"; $selected_admin = ""; } else if ( $get_editor->has_cap ('send_easymail_newsletters') ) { $selected_editor = "selected='selected'"; $selected_author = ""; $selected_admin = ""; } else { // admin $selected_editor = ""; $selected_author = ""; $selected_admin = "selected='selected'"; } */ ?> edit_post" ); ?>.
    .
    : has_cap ('manage_easymail_newsletters') ) { $selected_editor = "selected='selected'"; $selected_admin = ""; } else { // admin $selected_editor = ""; $selected_admin = "selected='selected'"; } */ ?> edit_posts" ); ?>.
    . .
    : has_cap ('manage_easymail_subscribers') ) { $selected_editor = "selected='selected'"; $selected_admin = ""; } else { // admin $selected_editor = ""; $selected_admin = "selected='selected'"; } ?>
    .
    : has_cap ('manage_easymail_options') ) { $selected_editor = "selected='selected'"; $selected_admin = ""; } else { // admin $selected_editor = ""; $selected_admin = "selected='selected'"; } ?>
    : , .
    .

    "; 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; ?>
    "; echo "" . __("Edit list", "alo-easymail") .""; echo " "; echo ""; echo "" . __("Delete list", "alo-easymail") .""; ?>
    "; print_r( $tab_mailinglists ); echo ""; // DEBUG ?>