function cntctfrm_settings_page() { global $cntctfrm_options, $wpdb, $cntctfrm_option_defaults, $wp_version, $cntctfrm_plugin_info; $error = $message = $notice = ''; $plugin_basename = plugin_basename(__FILE__); if (!function_exists('get_plugins') || !function_exists('is_plugin_active_for_network')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } if (!isset($_GET['action']) || 'appearance' != $_GET['action']) { $all_plugins = get_plugins(); } /* Check contact-form-multi plugin */ if (is_plugin_active('contact-form-multi/contact-form-multi.php')) { $contact_form_multi_active = true; } if (is_plugin_active('contact-form-multi-pro/contact-form-multi-pro.php')) { $contact_form_multi_pro_active = true; } /* Get Captcha options */ if (get_option('cptch_options')) { $cptch_options = get_option('cptch_options'); } if (get_option('cptchpls_options')) { $cptchpls_options = get_option('cptchpls_options'); } if (get_option('cptchpr_options')) { $cptchpr_options = get_option('cptchpr_options'); } /* Get Contact Form to DB options */ if (get_option('cntctfrmtdb_options')) { $cntctfrmtdb_options = get_option('cntctfrmtdb_options'); } if (get_option('cntctfrmtdbpr_options')) { $cntctfrmtdbpr_options = get_option('cntctfrmtdbpr_options'); } $userslogin = get_users('blog_id=' . $GLOBALS['blog_id'] . '&role=administrator'); /* Save data for settings page */ if (isset($_POST['cntctfrm_form_submit']) && check_admin_referer($plugin_basename, 'cntctfrm_nonce_name')) { $cntctfrm_options_submit['cntctfrm_user_email'] = $_POST['cntctfrm_user_email']; $cntctfrm_options_submit['cntctfrm_custom_email'] = trim(stripslashes(esc_html($_POST['cntctfrm_custom_email'])), " ,"); $cntctfrm_options_submit['cntctfrm_select_email'] = $_POST['cntctfrm_select_email']; $cntctfrm_options_submit['cntctfrm_from_email'] = $_POST['cntctfrm_from_email']; $cntctfrm_options_submit['cntctfrm_custom_from_email'] = stripslashes(esc_html($_POST['cntctfrm_custom_from_email'])); $cntctfrm_options_submit['cntctfrm_mail_method'] = $_POST['cntctfrm_mail_method']; $cntctfrm_options_submit['cntctfrm_from_field'] = stripslashes(esc_html($_POST['cntctfrm_from_field'])); $cntctfrm_options_submit['cntctfrm_select_from_field'] = $_POST['cntctfrm_select_from_field']; $cntctfrm_options_submit['cntctfrm_display_name_field'] = isset($_POST['cntctfrm_display_name_field']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_address_field'] = isset($_POST['cntctfrm_display_address_field']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_phone_field'] = isset($_POST['cntctfrm_display_phone_field']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_attachment'] = isset($_POST['cntctfrm_attachment']) ? $_POST['cntctfrm_attachment'] : 0; $cntctfrm_options_submit['cntctfrm_attachment_explanations'] = isset($_POST['cntctfrm_attachment_explanations']) ? $_POST['cntctfrm_attachment_explanations'] : 0; $cntctfrm_options_submit['cntctfrm_send_copy'] = isset($_POST['cntctfrm_send_copy']) ? $_POST['cntctfrm_send_copy'] : 0; $cntctfrm_options_submit['cntctfrm_delete_attached_file'] = isset($_POST['cntctfrm_delete_attached_file']) ? $_POST['cntctfrm_delete_attached_file'] : 0; if (isset($_POST['cntctfrm_display_captcha'])) { if (get_option('cptch_options')) { $cptch_options['cptch_contact_form'] = 1; update_option('cptch_options', $cptch_options); } if (get_option('cptchpls_options')) { $cptchpls_options['cptchpls_contact_form'] = 1; update_option('cptchpls_options', $cptchpls_options); } if (get_option('cptchpr_options')) { $cptchpr_options['cptchpr_contact_form'] = 1; update_option('cptchpr_options', $cptchpr_options); } } else { if (get_option('cptch_options')) { $cptch_options['cptch_contact_form'] = 0; update_option('cptch_options', $cptch_options); } if (get_option('cptchpls_options')) { $cptchpls_options['cptchpls_contact_form'] = 0; update_option('cptchpls_options', $cptchpls_options); } if (get_option('cptchpr_options')) { $cptchpr_options['cptchpr_contact_form'] = 0; update_option('cptchpr_options', $cptchpr_options); } } if (isset($_POST['cntctfrm_save_email_to_db'])) { if (get_option('cntctfrmtdb_options')) { $cntctfrmtdb_options['cntctfrmtdb_save_messages_to_db'] = 1; update_option('cntctfrmtdb_options', $cntctfrmtdb_options); } if (get_option('cntctfrmtdbpr_options')) { $cntctfrmtdbpr_options['save_messages_to_db'] = 1; update_option('cntctfrmtdbpr_options', $cntctfrmtdbpr_options); } } else { if (get_option('cntctfrmtdb_options')) { $cntctfrmtdb_options['cntctfrmtdb_save_messages_to_db'] = 0; update_option('cntctfrmtdb_options', $cntctfrmtdb_options); } if (get_option('cntctfrmtdbpr_options')) { $cntctfrmtdbpr_options['save_messages_to_db'] = 0; update_option('cntctfrmtdbpr_options', $cntctfrmtdbpr_options); } } if (0 == $cntctfrm_options_submit['cntctfrm_display_name_field']) { $cntctfrm_options_submit['cntctfrm_required_name_field'] = 0; } else { $cntctfrm_options_submit['cntctfrm_required_name_field'] = isset($_POST['cntctfrm_required_name_field']) ? 1 : 0; } if (0 == $cntctfrm_options_submit['cntctfrm_display_address_field']) { $cntctfrm_options_submit['cntctfrm_required_address_field'] = 0; } else { $cntctfrm_options_submit['cntctfrm_required_address_field'] = isset($_POST['cntctfrm_required_address_field']) ? 1 : 0; } $cntctfrm_options_submit['cntctfrm_required_email_field'] = isset($_POST['cntctfrm_required_email_field']) ? 1 : 0; if (0 == $cntctfrm_options_submit['cntctfrm_display_phone_field']) { $cntctfrm_options_submit['cntctfrm_required_phone_field'] = 0; } else { $cntctfrm_options_submit['cntctfrm_required_phone_field'] = isset($_POST['cntctfrm_required_phone_field']) ? 1 : 0; } $cntctfrm_options_submit['cntctfrm_required_subject_field'] = isset($_POST['cntctfrm_required_subject_field']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_required_message_field'] = isset($_POST['cntctfrm_required_message_field']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_required_symbol'] = isset($_POST['cntctfrm_required_symbol']) ? stripslashes(esc_html($_POST['cntctfrm_required_symbol'])) : '*'; $cntctfrm_options_submit['cntctfrm_html_email'] = isset($_POST['cntctfrm_html_email']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_site_name_parameter'] = $_POST['cntctfrm_site_name_parameter']; $cntctfrm_options_submit['cntctfrm_display_add_info'] = isset($_POST['cntctfrm_display_add_info']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_sent_from'] = isset($_POST['cntctfrm_display_sent_from']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_date_time'] = isset($_POST['cntctfrm_display_date_time']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_coming_from'] = isset($_POST['cntctfrm_display_coming_from']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_display_user_agent'] = isset($_POST['cntctfrm_display_user_agent']) ? 1 : 0; if (0 == $cntctfrm_options_submit['cntctfrm_display_sent_from'] && 0 == $cntctfrm_options_submit['cntctfrm_display_date_time'] && 0 == $cntctfrm_options_submit['cntctfrm_display_coming_from'] && 0 == $cntctfrm_options_submit['cntctfrm_display_user_agent']) { $cntctfrm_options_submit['cntctfrm_display_add_info'] = 0; } if (0 == $cntctfrm_options_submit['cntctfrm_display_add_info']) { $cntctfrm_options_submit['cntctfrm_display_sent_from'] = 1; $cntctfrm_options_submit['cntctfrm_display_date_time'] = 1; $cntctfrm_options_submit['cntctfrm_display_coming_from'] = 1; $cntctfrm_options_submit['cntctfrm_display_user_agent'] = 1; } $cntctfrm_options_submit['cntctfrm_change_label'] = isset($_POST['cntctfrm_change_label']) ? 1 : 0; $cntctfrm_options_submit['cntctfrm_change_label_in_email'] = isset($_POST['cntctfrm_change_label_in_email']) ? 1 : 0; if (1 == $cntctfrm_options_submit['cntctfrm_change_label']) { foreach ($_POST['cntctfrm_name_label'] as $key => $val) { $cntctfrm_options_submit['cntctfrm_name_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_name_label'][$key])); $cntctfrm_options_submit['cntctfrm_address_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_address_label'][$key])); $cntctfrm_options_submit['cntctfrm_email_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_email_label'][$key])); $cntctfrm_options_submit['cntctfrm_phone_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_phone_label'][$key])); $cntctfrm_options_submit['cntctfrm_subject_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_subject_label'][$key])); $cntctfrm_options_submit['cntctfrm_message_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_message_label'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_label'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_tooltip'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_tooltip'][$key])); $cntctfrm_options_submit['cntctfrm_send_copy_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_send_copy_label'][$key])); $cntctfrm_options_submit['cntctfrm_thank_text'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_thank_text'][$key])); $cntctfrm_options_submit['cntctfrm_submit_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_submit_label'][$key])); $cntctfrm_options_submit['cntctfrm_name_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_name_error'][$key])); $cntctfrm_options_submit['cntctfrm_address_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_address_error'][$key])); $cntctfrm_options_submit['cntctfrm_email_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_email_error'][$key])); $cntctfrm_options_submit['cntctfrm_phone_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_phone_error'][$key])); $cntctfrm_options_submit['cntctfrm_subject_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_subject_error'][$key])); $cntctfrm_options_submit['cntctfrm_message_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_message_error'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_error'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_upload_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_upload_error'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_move_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_move_error'][$key])); $cntctfrm_options_submit['cntctfrm_attachment_size_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_size_error'][$key])); $cntctfrm_options_submit['cntctfrm_captcha_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_captcha_error'][$key])); $cntctfrm_options_submit['cntctfrm_form_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_form_error'][$key])); } } else { if (empty($cntctfrm_options['cntctfrm_language'])) { $cntctfrm_options_submit['cntctfrm_name_label'] = $cntctfrm_option_defaults['cntctfrm_name_label']; $cntctfrm_options_submit['cntctfrm_address_label'] = $cntctfrm_option_defaults['cntctfrm_address_label']; $cntctfrm_options_submit['cntctfrm_email_label'] = $cntctfrm_option_defaults['cntctfrm_email_label']; $cntctfrm_options_submit['cntctfrm_phone_label'] = $cntctfrm_option_defaults['cntctfrm_phone_label']; $cntctfrm_options_submit['cntctfrm_subject_label'] = $cntctfrm_option_defaults['cntctfrm_subject_label']; $cntctfrm_options_submit['cntctfrm_message_label'] = $cntctfrm_option_defaults['cntctfrm_message_label']; $cntctfrm_options_submit['cntctfrm_attachment_label'] = $cntctfrm_option_defaults['cntctfrm_attachment_label']; $cntctfrm_options_submit['cntctfrm_attachment_tooltip'] = $cntctfrm_option_defaults['cntctfrm_attachment_tooltip']; $cntctfrm_options_submit['cntctfrm_send_copy_label'] = $cntctfrm_option_defaults['cntctfrm_send_copy_label']; $cntctfrm_options_submit['cntctfrm_thank_text'] = $_POST['cntctfrm_thank_text']; $cntctfrm_options_submit['cntctfrm_submit_label'] = $cntctfrm_option_defaults['cntctfrm_submit_label']; $cntctfrm_options_submit['cntctfrm_name_error'] = $cntctfrm_option_defaults['cntctfrm_name_error']; $cntctfrm_options_submit['cntctfrm_address_error'] = $cntctfrm_option_defaults['cntctfrm_address_error']; $cntctfrm_options_submit['cntctfrm_email_error'] = $cntctfrm_option_defaults['cntctfrm_email_error']; $cntctfrm_options_submit['cntctfrm_phone_error'] = $cntctfrm_option_defaults['cntctfrm_phone_error']; $cntctfrm_options_submit['cntctfrm_subject_error'] = $cntctfrm_option_defaults['cntctfrm_subject_error']; $cntctfrm_options_submit['cntctfrm_message_error'] = $cntctfrm_option_defaults['cntctfrm_message_error']; $cntctfrm_options_submit['cntctfrm_attachment_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_error']; $cntctfrm_options_submit['cntctfrm_attachment_upload_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_upload_error']; $cntctfrm_options_submit['cntctfrm_attachment_move_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_move_error']; $cntctfrm_options_submit['cntctfrm_attachment_size_error'] = $cntctfrm_option_defaults['cntctfrm_attachment_size_error']; $cntctfrm_options_submit['cntctfrm_captcha_error'] = $cntctfrm_option_defaults['cntctfrm_captcha_error']; $cntctfrm_options_submit['cntctfrm_form_error'] = $cntctfrm_option_defaults['cntctfrm_form_error']; foreach ($cntctfrm_options_submit['cntctfrm_thank_text'] as $key => $val) { $cntctfrm_options_submit['cntctfrm_thank_text'][$key] = stripcslashes(htmlspecialchars($val)); } } else { $cntctfrm_options_submit['cntctfrm_name_label']['en'] = $cntctfrm_option_defaults['cntctfrm_name_label']['en']; $cntctfrm_options_submit['cntctfrm_address_label']['en'] = $cntctfrm_option_defaults['cntctfrm_address_label']['en']; $cntctfrm_options_submit['cntctfrm_email_label']['en'] = $cntctfrm_option_defaults['cntctfrm_email_label']['en']; $cntctfrm_options_submit['cntctfrm_phone_label']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_label']['en']; $cntctfrm_options_submit['cntctfrm_subject_label']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_label']['en']; $cntctfrm_options_submit['cntctfrm_message_label']['en'] = $cntctfrm_option_defaults['cntctfrm_message_label']['en']; $cntctfrm_options_submit['cntctfrm_attachment_label']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_label']['en']; $cntctfrm_options_submit['cntctfrm_attachment_tooltip']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_tooltip']['en']; $cntctfrm_options_submit['cntctfrm_send_copy_label']['en'] = $cntctfrm_option_defaults['cntctfrm_send_copy_label']['en']; $cntctfrm_options_submit['cntctfrm_submit_label']['en'] = $cntctfrm_option_defaults['cntctfrm_submit_label']['en']; $cntctfrm_options_submit['cntctfrm_name_error']['en'] = $cntctfrm_option_defaults['cntctfrm_name_error']['en']; $cntctfrm_options_submit['cntctfrm_address_error']['en'] = $cntctfrm_option_defaults['cntctfrm_address_error']['en']; $cntctfrm_options_submit['cntctfrm_email_error']['en'] = $cntctfrm_option_defaults['cntctfrm_email_error']['en']; $cntctfrm_options_submit['cntctfrm_phone_error']['en'] = $cntctfrm_option_defaults['cntctfrm_phone_error']['en']; $cntctfrm_options_submit['cntctfrm_subject_error']['en'] = $cntctfrm_option_defaults['cntctfrm_subject_error']['en']; $cntctfrm_options_submit['cntctfrm_message_error']['en'] = $cntctfrm_option_defaults['cntctfrm_message_error']['en']; $cntctfrm_options_submit['cntctfrm_attachment_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_error']['en']; $cntctfrm_options_submit['cntctfrm_attachment_upload_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_upload_error']['en']; $cntctfrm_options_submit['cntctfrm_attachment_move_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_move_error']['en']; $cntctfrm_options_submit['cntctfrm_attachment_size_error']['en'] = $cntctfrm_option_defaults['cntctfrm_attachment_size_error']['en']; $cntctfrm_options_submit['cntctfrm_captcha_error']['en'] = $cntctfrm_option_defaults['cntctfrm_captcha_error']['en']; $cntctfrm_options_submit['cntctfrm_form_error']['en'] = $cntctfrm_option_defaults['cntctfrm_form_error']['en']; foreach ($_POST['cntctfrm_thank_text'] as $key => $val) { $cntctfrm_options_submit['cntctfrm_thank_text'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_thank_text'][$key])); } } } /* if 'FROM' field was changed */ if ('custom' == $cntctfrm_options['cntctfrm_from_email'] && 'custom' != $cntctfrm_options_submit['cntctfrm_from_email'] || 'custom' == $cntctfrm_options_submit['cntctfrm_from_email'] && $cntctfrm_options['cntctfrm_custom_from_email'] != $cntctfrm_options_submit['cntctfrm_custom_from_email']) { $notice = __("Email 'FROM' field option was changed, which may cause email messages being moved to the spam folder or email delivery failures.", 'contact_form'); } $cntctfrm_options_submit['cntctfrm_action_after_send'] = $_POST['cntctfrm_action_after_send']; $cntctfrm_options_submit['cntctfrm_redirect_url'] = esc_url($_POST['cntctfrm_redirect_url']); $cntctfrm_options = array_merge($cntctfrm_options, $cntctfrm_options_submit); if (0 == $cntctfrm_options_submit['cntctfrm_action_after_send'] && ("" == trim($cntctfrm_options_submit['cntctfrm_redirect_url']) || !filter_var($cntctfrm_options_submit['cntctfrm_redirect_url'], FILTER_VALIDATE_URL))) { $error .= __("If the 'Redirect to page' option is selected then the URL field should be in the following format", 'contact_form') . " <code>http://your_site/your_page</code>"; $cntctfrm_options['cntctfrm_action_after_send'] = 1; } if ('user' == $cntctfrm_options_submit['cntctfrm_select_email']) { if ('3.3' > $wp_version && function_exists('get_userdatabylogin') && false !== get_userdatabylogin($cntctfrm_options_submit['cntctfrm_user_email'])) { // } else { if (false !== get_user_by('login', $cntctfrm_options_submit['cntctfrm_user_email'])) { // } else { $error .= __("Such user does not exist.", 'contact_form'); } } } else { if (preg_match('|,|', $cntctfrm_options_submit['cntctfrm_custom_email'])) { $cntctfrm_custom_emails = explode(',', $cntctfrm_options_submit['cntctfrm_custom_email']); } else { $cntctfrm_custom_emails[0] = $cntctfrm_options_submit['cntctfrm_custom_email']; } foreach ($cntctfrm_custom_emails as $cntctfrm_custom_email) { if ($cntctfrm_custom_email == "" || !is_email(trim($cntctfrm_custom_email))) { $error .= __("Please enter a valid email address in the 'Use this email address' field.", 'contact_form'); break; } } } if ('custom' == $cntctfrm_options_submit['cntctfrm_from_email']) { if ("" == $cntctfrm_options_submit['cntctfrm_custom_from_email'] || !is_email(trim($cntctfrm_options_submit['cntctfrm_custom_from_email']))) { $error .= __("Please enter a valid email address in the 'FROM' field.", 'contact_form'); } } if ('' == $error) { if (isset($contact_form_multi_active)) { $cntctfrmmlt_options_main = get_option('cntctfrmmlt_options_main'); if ($cntctfrmmlt_options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'], $cntctfrm_options); } else { if ($cntctfrmmlt_options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $cntctfrmmlt_options_main['id_form'], $cntctfrm_options); } } } elseif (isset($contact_form_multi_pro_active)) { $cntctfrmmltpr_options_main = get_option('cntctfrmmltpr_options_main'); if ($cntctfrmmltpr_options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $cntctfrmmltpr_options_main['id_form'], $cntctfrm_options); } else { if ($cntctfrmmltpr_options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $cntctfrmmltpr_options_main['id_form'], $cntctfrm_options); } } } else { update_option('cntctfrm_options', $cntctfrm_options); } $message = __("Settings saved.", 'contact_form'); } else { $error .= ' ' . __("Settings are not saved.", 'contact_form'); } } /* Display form on the setting page */ $lang_codes = array('ab' => 'Abkhazian', 'aa' => 'Afar', 'af' => 'Afrikaans', 'ak' => 'Akan', 'sq' => 'Albanian', 'am' => 'Amharic', 'ar' => 'Arabic', 'an' => 'Aragonese', 'hy' => 'Armenian', 'as' => 'Assamese', 'av' => 'Avaric', 'ae' => 'Avestan', 'ay' => 'Aymara', 'az' => 'Azerbaijani', 'bm' => 'Bambara', 'ba' => 'Bashkir', 'eu' => 'Basque', 'be' => 'Belarusian', 'bn' => 'Bengali', 'bh' => 'Bihari', 'bi' => 'Bislama', 'bs' => 'Bosnian', 'br' => 'Breton', 'bg' => 'Bulgarian', 'my' => 'Burmese', 'ca' => 'Catalan; Valencian', 'ch' => 'Chamorro', 'ce' => 'Chechen', 'ny' => 'Chichewa; Chewa; Nyanja', 'zh' => 'Chinese', 'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic', 'cv' => 'Chuvash', 'km' => 'Central Khmer', 'kw' => 'Cornish', 'co' => 'Corsican', 'cr' => 'Cree', 'hr' => 'Croatian', 'cs' => 'Czech', 'da' => 'Danish', 'dv' => 'Divehi; Dhivehi; Maldivian', 'nl' => 'Dutch; Flemish', 'dz' => 'Dzongkha', 'eo' => 'Esperanto', 'et' => 'Estonian', 'ee' => 'Ewe', 'fo' => 'Faroese', 'fj' => 'Fijjian', 'fi' => 'Finnish', 'fr' => 'French', 'ff' => 'Fulah', 'gd' => 'Gaelic; Scottish Gaelic', 'gl' => 'Galician', 'lg' => 'Ganda', 'ka' => 'Georgian', 'de' => 'German', 'el' => 'Greek, Modern', 'gn' => 'Guarani', 'gu' => 'Gujarati', 'ht' => 'Haitian; Haitian Creole', 'ha' => 'Hausa', 'he' => 'Hebrew', 'hz' => 'Herero', 'hi' => 'Hindi', 'ho' => 'Hiri Motu', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'io' => 'Ido', 'ig' => 'Igbo', 'id' => 'Indonesian', 'ie' => 'Interlingue', 'ia' => 'Interlingua (International Auxiliary Language Association)', 'iu' => 'Inuktitut', 'ik' => 'Inupiaq', 'ga' => 'Irish', 'it' => 'Italian', 'ja' => 'Japanese', 'jv' => 'Javanese', 'kl' => 'Kalaallisut; Greenlandic', 'kn' => 'Kannada', 'kr' => 'Kanuri', 'ks' => 'Kashmiri', 'kk' => 'Kazakh', 'ki' => 'Kikuyu; Gikuyu', 'rw' => 'Kinyarwanda', 'ky' => 'Kirghiz; Kyrgyz', 'kv' => 'Komi', 'kg' => 'Kongo', 'ko' => 'Korean', 'kj' => 'Kuanyama; Kwanyama', 'ku' => 'Kurdish', 'lo' => 'Lao', 'la' => 'Latin', 'lv' => 'Latvian', 'li' => 'Limburgan; Limburger; Limburgish', 'ln' => 'Lingala', 'lt' => 'Lithuanian', 'lu' => 'Luba-Katanga', 'lb' => 'Luxembourgish; Letzeburgesch', 'mk' => 'Macedonian', 'mg' => 'Malagasy', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'gv' => 'Manx', 'mi' => 'Maori', 'mr' => 'Marathi', 'mh' => 'Marshallese', 'mo' => 'Moldavian', 'mn' => 'Mongolian', 'na' => 'Nauru', 'nv' => 'Navajo; Navaho', 'nr' => 'Ndebele, South; South Ndebele', 'nd' => 'Ndebele, North; North Ndebele', 'ng' => 'Ndonga', 'ne' => 'Nepali', 'se' => 'Northern Sami', 'no' => 'Norwegian', 'nn' => 'Norwegian Nynorsk; Nynorsk, Norwegian', 'nb' => 'Norwegian Bokmål; Bokmål, Norwegian', 'oc' => 'Occitan, Provençal', 'oj' => 'Ojibwa', 'or' => 'Oriya', 'om' => 'Oromo', 'os' => 'Ossetian; Ossetic', 'pi' => 'Pali', 'pa' => 'Panjabi; Punjabi', 'fa' => 'Persian', 'pl' => 'Polish', 'pt' => 'Portuguese', 'ps' => 'Pushto', 'qu' => 'Quechua', 'ro' => 'Romanian', 'rm' => 'Romansh', 'rn' => 'Rundi', 'ru' => 'Russian', 'sm' => 'Samoan', 'sg' => 'Sango', 'sa' => 'Sanskrit', 'sc' => 'Sardinian', 'sr' => 'Serbian', 'sn' => 'Shona', 'ii' => 'Sichuan Yi', 'sd' => 'Sindhi', 'si' => 'Sinhala; Sinhalese', 'sk' => 'Slovak', 'sl' => 'Slovenian', 'so' => 'Somali', 'st' => 'Sotho, Southern', 'es' => 'Spanish; Castilian', 'su' => 'Sundanese', 'sw' => 'Swahili', 'ss' => 'Swati', 'sv' => 'Swedish', 'tl' => 'Tagalog', 'ty' => 'Tahitian', 'tg' => 'Tajik', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'bo' => 'Tibetan', 'ti' => 'Tigrinya', 'to' => 'Tonga (Tonga Islands)', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'tk' => 'Turkmen', 'tw' => 'Twi', 'ug' => 'Uighur; Uyghur', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 've' => 'Venda', 'vi' => 'Vietnamese', 'vo' => 'Volapük', 'wa' => 'Walloon', 'cy' => 'Welsh', 'fy' => 'Western Frisian', 'wo' => 'Wolof', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'yo' => 'Yoruba', 'za' => 'Zhuang; Chuang', 'zu' => 'Zulu'); /* Add restore function */ if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $cntctfrm_options = $cntctfrm_option_defaults; update_option('cntctfrm_options', $cntctfrm_options); $message = __('All plugin settings were restored.', 'contact_form'); } /* end */ /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e("Contact Form Settings", 'contact_form'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=contact_form.php"><?php _e('Settings', 'contact_form'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'additional' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=contact_form.php&action=additional"><?php _e('Additional settings', 'contact_form'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'appearance' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=contact_form.php&action=appearance"><?php _e('Appearance', 'contact_form'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/contact-form/faq" target="_blank"><?php _e('FAQ', 'contact_form'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=contact_form.php&action=go_pro"><?php _e('Go PRO', 'contact_form'); ?> </a> </h2> <div class="updated fade" <?php if ($message == "" || "" != $error) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div id="cntctfrm_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e("Notice:", 'contact_form'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'contact_form'); ?> </p></div> <?php if (!empty($notice)) { ?> <div class="error"><p><strong><?php _e('Notice:', 'contact_form'); ?> </strong> <?php echo $notice; ?> </p></div> <?php } ?> <div class="error" <?php if ("" == $error) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <?php if (!isset($_GET['action']) || 'additional' == $_GET['action']) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { /* main 'settings' or 'additional' settings page */ if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <h2 class="nav-tab-wrapper"> <li class="nav-tab nav-tab-active">NEW_FORM</li> <a id="cntctfrm_show_multi_notice" class="nav-tab" target="_new" href="http://bestwebsoft.com/products/contact-form-multi/?k=747ca825fb44711e2d24e40697747bc6&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " title="<?php _e("If you want to create multiple contact forms, please install the Contact Form Multi plugin.", 'contact_form'); ?> ">+</a> </h2> <?php } $form_action = !isset($_GET['action']) ? 'admin.php?page=contact_form.php' : 'admin.php?page=contact_form.php&action=' . $_GET['action']; ?> <form id="cntctfrm_settings_form" method="post" action="<?php echo $form_action; ?> "> <span style="margin-bottom:15px;"> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <p><?php _e("If you would like to add Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form'); ?> <span class="cntctfrm_shortcode">[contact_form]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[contact_form lang=en]</span><br /> <?php _e("If you have any problems with the standard shortcode [contact_form], you should use the shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bws_contact_form]</span> (<?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bws_contact_form lang=en]</span>) <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> (<?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en]</span>). <?php _e("They work the same way.", 'contact_form'); ?> </p> <?php } else { ?> <p><?php _e("If you would like to add the Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form'); ?> <span class="cntctfrm_shortcode">[contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span><br /> <?php _e("If have any problems with the standard shortcode [contact_form], you should use the shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bws_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> (<?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bws_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span>) <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> (<?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span>). <?php _e("They work the same way.", 'contact_form'); ?> </p> <?php } ?> </span> <div <?php if (isset($_GET['action'])) { echo 'style="display: none;"'; } ?> > <p><?php _e("If you leave the fields empty, the messages will be sent to the email address specified during registration.", 'contact_form'); ?> </p> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("The user's email address:", 'contact_form'); ?> </th> <td colspan="2"> <input type="radio" id="cntctfrm_select_email_user" name="cntctfrm_select_email" value="user" <?php if ($cntctfrm_options['cntctfrm_select_email'] == 'user') { echo 'checked="checked" '; } ?> /> <select name="cntctfrm_user_email"> <option disabled><?php _e("Select a username", 'contact_form'); ?> </option> <?php foreach ($userslogin as $key => $value) { if (isset($value->data)) { if ($value->data->user_email != '') { ?> <option value="<?php echo $value->data->user_login; ?> " <?php if ($cntctfrm_options['cntctfrm_user_email'] == $value->data->user_login) { echo 'selected="selected" '; } ?> ><?php echo $value->data->user_login; ?> </option> <?php } } else { if ($value->user_email != '') { ?> <option value="<?php echo $value->user_login; ?> " <?php if ($cntctfrm_options['cntctfrm_user_email'] == $value->user_login) { echo 'selected="selected" '; } ?> ><?php echo $value->user_login; ?> </option> <?php } } } ?> </select> <span class="cntctfrm_info"><?php _e("Enter a username of the person who should get the messages from the contact form.", 'contact_form'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Use this email address:", 'contact_form'); ?> </th> <td colspan="2"> <input type="radio" id="cntctfrm_select_email_custom" name="cntctfrm_select_email" value="custom" <?php if ('custom' == $cntctfrm_options['cntctfrm_select_email']) { echo 'checked="checked" '; } ?> /> <input type="text" name="cntctfrm_custom_email" value="<?php echo $cntctfrm_options['cntctfrm_custom_email']; ?> " onfocus="document.getElementById('cntctfrm_select_email_custom').checked = true;" maxlength="500" /> <span class="cntctfrm_info"><?php _e("Enter the email address you want the messages forwarded to.", 'contact_form'); ?> </span> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e("Add department selectbox to the contact form:", 'contact_form'); ?> </th> <td colspan="2"> <input type="radio" id="cntctfrmpr_select_email_department" name="cntctfrmpr_select_email" value="departments" disabled="disabled" /> <div class="cntctfrmpr_department_table"><img style="width:100%;" src="<?php echo plugins_url('images/pro_screen_1.png', __FILE__); ?> " alt="" /></div> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'contact_form'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'contact_form'); ?> <a href="http://bestwebsoft.com/products/contact-form/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"><?php _e('Learn More', 'contact_form'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/contact-form/buy/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"> <?php _e('Go', 'contact_form'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("Save emails to the database", 'contact_form'); ?> </th> <td colspan="2"> <?php if (array_key_exists('contact-form-to-db/contact_form_to_db.php', $all_plugins) || array_key_exists('contact-form-to-db-pro/contact_form_to_db_pro.php', $all_plugins)) { if (is_plugin_active('contact-form-to-db/contact_form_to_db.php') || is_plugin_active('contact-form-to-db-pro/contact_form_to_db_pro.php')) { ?> <input type="checkbox" name="cntctfrm_save_email_to_db" value="1" <?php if (isset($cntctfrmtdb_options) && 1 == $cntctfrmtdb_options["cntctfrmtdb_save_messages_to_db"] || isset($cntctfrmtdbpr_options) && 1 == $cntctfrmtdbpr_options["save_messages_to_db"]) { echo 'checked="checked"'; } ?> /> <span class="bws_info"> (<?php _e('Using', 'contact_form'); ?> <a href="admin.php?page=cntctfrmtdb_manager">Contact Form to DB by BestWebSoft</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="cntctfrm_save_email_to_db" value="1" <?php if (isset($cntctfrmtdb_options) && 1 == $cntctfrmtdb_options["cntctfrmtdb_save_messages_to_db"] || isset($cntctfrmtdbpr_options) && 1 == $cntctfrmtdbpr_options["save_messages_to_db"]) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using Contact Form to DB by BestWebSoft', 'contact_form'); ?> ) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate', 'contact_form'); ?> Contact Form to DB</a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="cntctfrm_save_email_to_db" value="1" /> <span class="bws_info">(<?php _e('Using Contact Form to DB by BestWebSoft', 'contact_form'); ?> ) <a href="http://bestwebsoft.com/products/contact-form-to-db/?k=19d806f45d866e70545de83169b274f2&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> "><?php _e('Download', 'contact_form'); ?> Contact Form to DB</a></span> <?php } ?> </td> </tr> </table> </div> <!-- end of main 'settings' div --> <div <?php if (!isset($_GET['action'])) { echo 'style="display: none;"'; } ?> > <table class="form-table" style="width:auto;"> <tr> <th scope="row"><?php _e('What to use?', 'contact_form'); ?> </th> <td colspan="2"> <fieldset> <label> <input type='radio' name='cntctfrm_mail_method' value='wp-mail' <?php if ('wp-mail' == $cntctfrm_options['cntctfrm_mail_method']) { echo 'checked="checked" '; } ?> /> <?php _e('Wp-mail', 'contact_form'); ?> </label> <label><span class="cntctfrm_info">(<?php _e('You can use the wp_mail function for mailing', 'contact_form'); ?> )</span></label><br /> <label> <input type='radio' name='cntctfrm_mail_method' value='mail' <?php if ('mail' == $cntctfrm_options['cntctfrm_mail_method']) { echo 'checked="checked" '; } ?> /> <?php _e('Mail', 'contact_form'); ?> </label> <label><span class="cntctfrm_info">(<?php _e('To send mail you can use the php mail function', 'contact_form'); ?> )</span></label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("'FROM' field", 'contact_form'); ?> </th> <td style="vertical-align: top;width: 210px;"> <div><?php _e("Name", 'contact_form'); ?> </div> <div> <label> <input type="radio" id="cntctfrm_select_from_custom_field" name="cntctfrm_select_from_field" value="custom" <?php if ('custom' == $cntctfrm_options['cntctfrm_select_from_field']) { echo 'checked="checked" '; } ?> /> <input type="text" name="cntctfrm_from_field" value="<?php echo stripslashes($cntctfrm_options['cntctfrm_from_field']); ?> " onfocus="document.getElementById('cntctfrm_select_from_custom_field').checked = true;" size="18" maxlength="100" /> </label><br/> <div> <label><input type="radio" id="cntctfrm_select_from_field" name="cntctfrm_select_from_field" value="user_name" <?php if ('user_name' == $cntctfrm_options['cntctfrm_select_from_field']) { echo 'checked="checked" '; } ?> /> <?php _e("User name", 'contact_form'); ?> </label> <div class="cntctfrm_help_box"> <div class="cntctfrm_hidden_help_text"><?php echo __("The name of the user who fills the form will be used in the field 'From'.", 'contact_form'); ?> </div> </div> </div> </div> </td> <td> <div><?php _e("Email", 'contact_form'); ?> </div> <div> <div> <input type="radio" id="cntctfrm_from_custom_email" name="cntctfrm_from_email" value="custom" <?php if ('custom' == $cntctfrm_options['cntctfrm_from_email']) { echo 'checked="checked" '; } ?> /> <input type="text" name="cntctfrm_custom_from_email" value="<?php echo $cntctfrm_options['cntctfrm_custom_from_email']; ?> " onfocus="document.getElementById('cntctfrm_from_custom_email').checked = true;" maxlength="100" /> </div> <div> <label><input type="radio" id="cntctfrm_from_email" name="cntctfrm_from_email" value="user" <?php if ('user' == $cntctfrm_options['cntctfrm_from_email']) { echo 'checked="checked" '; } ?> /> <?php _e("User email", 'contact_form'); ?> </label> <div class="cntctfrm_help_box"> <div class="cntctfrm_hidden_help_text"><?php echo __("The email address of the user who fills the form will be used in the field 'From'.", 'contact_form'); ?> </div> </div> </div> <div> <span class="cntctfrm_info">(<?php _e("If this option is changed, email messages may be moved to the spam folder or email delivery failures may occur.", 'contact_form'); ?> )</span> </div> </div> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Required symbol", 'contact_form'); ?> </th> <td colspan="2"> <input type="text" id="cntctfrm_required_symbol" name="cntctfrm_required_symbol" value="<?php echo $cntctfrm_options['cntctfrm_required_symbol']; ?> " maxlength="100" /> </td> </tr> </table> <br /> <table class="cntctfrm_settings_table" style="width:auto;"> <thead> <tr valign="top"> <th scope="row" style="width: 210px;"><?php _e("Fields", 'contact_form'); ?> </th> <th><?php _e("Used", 'contact_form'); ?> </th> <th><?php _e("Required", 'contact_form'); ?> </th> <th><?php _e("Visible", 'contact_form'); ?> </th> <th><?php _e("Disabled for editing", 'contact_form'); ?> </th> <th scope="row" ><?php _e("Field's default value", 'contact_form'); ?> </th> </tr> </thead> <tbody> <tr valign="top" > <td><?php _e("Department selectbox", 'contact_form'); ?> </td> <td class="bws_pro_version"></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrm_required_department_field" value="1"/></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> </tr> <tr valign="top"> <td><?php _e("Name", 'contact_form'); ?> </td> <td><input type="checkbox" name="cntctfrm_display_name_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_name_field']) { echo 'checked="checked" '; } ?> /></td> <td><input type="checkbox" id="cntctfrm_required_name_field" name="cntctfrm_required_name_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_name_field']) { echo 'checked="checked" '; } ?> /></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_visible_name" value="1" checked="checked" /></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_name" value="1" /></td> <td class="bws_pro_version"> <input disabled="disabled" type="checkbox" name="cntctfrmpr_default_name" value="1" /> <?php _e("Use User's name as a default value if the user is logged in.", 'contact_form'); ?> <br /> <span class="cntctfrm_info">(<?php _e("'Visible' and 'Disabled for editing' options will be applied only to logged-in users.", 'contact_form'); ?> )</span> </td> </tr> <tr valign="top"> <td><?php _e("Location selectbox", 'contact_form'); ?> </td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_display_selectbox" value="1" /></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_required_selectbox" value="1" /></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"><input disabled="disabled" type="file" name="cntctfrmpr_default_location"></td> </tr> <tr valign="top"> <td><?php _e("Address", 'contact_form'); ?> </td> <td><input type="checkbox" id="cntctfrm_display_address_field" name="cntctfrm_display_address_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_address_field']) { echo 'checked="checked" '; } ?> /></td> <td><input type="checkbox" id="cntctfrm_required_address_field" name="cntctfrm_required_address_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_address_field']) { echo 'checked="checked" '; } ?> /></td> <td></td> <td></td> <td></td> </tr> <tr valign="top"> <td><?php _e("Email Address", 'contact_form'); ?> </td> <td></td> <td><input type="checkbox" id="cntctfrm_required_email_field" name="cntctfrm_required_email_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_email_field']) { echo 'checked="checked" '; } ?> /></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_visible_email" value="1" checked="checked" /></td> <td class="bws_pro_version"><input disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_email" value="1" /></td> <td class="bws_pro_version"> <input disabled="disabled" type="checkbox" name="cntctfrmpr_default_email" value="1" /> <?php _e("Use User's email as a default value if the user is logged in.", 'contact_form'); ?> <br /> <span class="cntctfrm_info">(<?php _e("'Visible' and 'Disabled for editing' options will be applied only to logged-in users.", 'contact_form'); ?> )</span> </td> </tr> <tr valign="top"> <td><?php _e("Phone number", 'contact_form'); ?> </td> <td><input type="checkbox" id="cntctfrm_display_phone_field" name="cntctfrm_display_phone_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_phone_field']) { echo 'checked="checked" '; } ?> /></td> <td><input type="checkbox" id="cntctfrm_required_phone_field" name="cntctfrm_required_phone_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_phone_field']) { echo 'checked="checked" '; } ?> /></td> <td></td> <td></td> <td></td> </tr> <tr valign="top"> <td><?php _e("Subject", 'contact_form'); ?> </td> <td></td> <td><input type="checkbox" id="cntctfrm_required_subject_field" name="cntctfrm_required_subject_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_subject_field']) { echo 'checked="checked" '; } ?> /></td> <td class="bws_pro_version"><input class="subject" disabled="disabled" type="checkbox" name="cntctfrmpr_visible_subject" value="1" checked="checked" /></td> <td class="bws_pro_version"><input class="subject" disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_subject" value="1" /></td> <td class="bws_pro_version"><input class="subject" disabled="disabled" type="text" name="cntctfrmpr_default_subject" value="" /></td> </tr> <tr valign="top"> <td><?php _e("Message", 'contact_form'); ?> </td> <td></td> <td><input type="checkbox" id="cntctfrm_required_message_field" name="cntctfrm_required_message_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_required_message_field']) { echo 'checked="checked" '; } ?> /></td> <td class="bws_pro_version"><input class="message" disabled="disabled" type="checkbox" name="cntctfrmpr_visible_message" value="1" checked="checked" /></td> <td class="bws_pro_version"><input class="message" disabled="disabled" disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_message" value="1" /></td> <td class="bws_pro_version"><input class="message" disabled="disabled" type="text" name="cntctfrmpr_default_message" value="" /></td> </tr> <tr valign="top"> <td></td> <td></td> <td></td> <td colspan="3" class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'contact_form'); ?> <a href="http://bestwebsoft.com/products/contact-form/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"><?php _e('Learn More', 'contact_form'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/contact-form/buy/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"> <?php _e('Go', 'contact_form'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </td> </tr> <tr valign="top"> <td> <?php _e("Attachment block", 'contact_form'); ?> <div class="cntctfrm_help_box"> <div class="cntctfrm_hidden_help_text"><?php echo __("Users can attach the following file formats", 'contact_form') . ": html, txt, css, gif, png, jpeg, jpg, tiff, bmp, ai, eps, ps, rtf, pdf, doc, docx, xls, xlsx, zip, rar, wav, mp3, ppt, aar, sce"; ?> </div> </div> </td> <td><input type="checkbox" id="cntctfrm_attachment" name="cntctfrm_attachment" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_attachment']) { echo 'checked="checked" '; } ?> /></td> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("Add to the form", 'contact_form'); ?> </th> <td style="width:750px;" colspan="3"> <div> <label> <input type="checkbox" id="cntctfrm_attachment_explanations" name="cntctfrm_attachment_explanations" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_attachment_explanations'] && '1' == $cntctfrm_options['cntctfrm_attachment']) { echo 'checked="checked" '; } ?> /> <?php _e("Tips below the Attachment", 'contact_form'); ?> </label> <div class="cntctfrm_help_box"> <div class="cntctfrm_hidden_help_text"><img title="" src="<?php echo plugins_url('images/tooltip_attachment_tips.png', __FILE__); ?> " alt=""/></div> </div> </div> <div> <label> <input type="checkbox" id="cntctfrm_send_copy" name="cntctfrm_send_copy" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_send_copy']) { echo 'checked="checked" '; } ?> /> <?php _e("'Send me a copy' block", 'contact_form'); ?> </label> <div class="cntctfrm_help_box"> <div class="cntctfrm_hidden_help_text"><img title="" src="<?php echo plugins_url('images/tooltip_sendme_block.png', __FILE__); ?> " alt=""/></div> </div> </div> <div style="clear: both;"> <?php if (array_key_exists('captcha/captcha.php', $all_plugins) || array_key_exists('captcha-plus/captcha-plus.php', $all_plugins) || array_key_exists('captcha-pro/captcha_pro.php', $all_plugins)) { if (is_plugin_active('captcha/captcha.php') || is_plugin_active('captcha-plus/captcha-plus.php') || is_plugin_active('captcha-pro/captcha_pro.php')) { ?> <label><input type="checkbox" name="cntctfrm_display_captcha" value="1" <?php if (isset($cptch_options) && 1 == $cptch_options["cptch_contact_form"] || isset($cptchpls_options) && 1 == $cptchpls_options["cptchpls_contact_form"] || isset($cptchpr_options) && 1 == $cptchpr_options["cptchpr_contact_form"]) { echo 'checked="checked"'; } ?> /> Captcha by BestWebSoft</label> <?php } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_captcha" value="1" <?php if (isset($cptch_options) && 1 == $cptch_options["cptch_contact_form"] || isset($cptchpls_options) && 1 == $cptchpls_options["cptchpls_contact_form"] || isset($cptchpr_options) && 1 == $cptchpr_options["cptchpr_contact_form"]) { echo 'checked="checked"'; } ?> /> Captcha by BestWebSoft</label> <span class="bws_info"><a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate captcha', 'contact_form'); ?> </a></span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_captcha" value="1" /> Captcha by BestWebSoft</label> <span class="bws_info"><a href="http://bestwebsoft.com/products/captcha/?k=19ac1e9b23bea947cfc4a9b8e3326c03&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> "><?php _e('Download captcha', 'contact_form'); ?> </a></span> <?php } ?> </div> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <div class="bws_pro_version"> <fieldset> <label><input disabled="disabled" type="checkbox" value="1" name="cntctfrmpr_display_privacy_check"> <?php _e('Agreement checkbox', 'contact_form'); ?> <span class="bws_info">(<?php _e('Required checkbox for submitting the form', 'contact_form'); ?> )</span></label><br /> <label><input disabled="disabled" type="checkbox" value="1" name="cntctfrmpr_display_optional_check"> <?php _e('Optional checkbox', 'contact_form'); ?> <span class="bws_info">(<?php _e('Optional checkbox, the results of which will be displayed in email', 'contact_form'); ?> )</span></label> </fieldset> </div> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'contact_form'); ?> <a href="http://bestwebsoft.com/products/contact-form/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"><?php _e('Learn More', 'contact_form'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/contact-form/buy/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"> <?php _e('Go', 'contact_form'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Delete an attachment file from the server after the email is sent", 'contact_form'); ?> </th> <td colspan="3"> <input type="checkbox" id="cntctfrm_delete_attached_file" name="cntctfrm_delete_attached_file" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_delete_attached_file']) { echo 'checked="checked" '; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Email in HTML format sending", 'contact_form'); ?> </th> <td colspan="2"><input type="checkbox" name="cntctfrm_html_email" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_html_email']) { echo 'checked="checked" '; } ?> /></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Display additional info in the email", 'contact_form'); ?> </th> <td style="width:15px;" class="cntctfrm_td_top_align"> <input type="checkbox" id="cntctfrm_display_add_info" name="cntctfrm_display_add_info" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_add_info']) { echo 'checked="checked" '; } ?> /> </td> <td class="cntctfrm_display_add_info_block" <?php if ('0' == $cntctfrm_options['cntctfrm_display_add_info']) { echo 'style="display:none"'; } ?> > <fieldset> <label><input type="checkbox" id="cntctfrm_display_sent_from" name="cntctfrm_display_sent_from" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_sent_from']) { echo 'checked="checked" '; } ?> /> <?php _e("Sent from (ip address)", 'contact_form'); ?> </label> <label class="bws_info"><?php _e("Example: Sent from (IP address):\t127.0.0.1", 'contact_form'); ?> </label><br /> <label><input type="checkbox" id="cntctfrm_display_date_time" name="cntctfrm_display_date_time" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_date_time']) { echo 'checked="checked" '; } ?> /> <?php _e("Date/Time", 'contact_form'); ?> </label> <label class="bws_info"><?php _e("Example: Date/Time:\tAugust 19, 2013 8:50 pm", 'contact_form'); ?> </label><br /> <label><input type="checkbox" id="cntctfrm_display_coming_from" name="cntctfrm_display_coming_from" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_coming_from']) { echo 'checked="checked" '; } ?> /> <?php _e("Sent from (referer)", 'contact_form'); ?> </label> <label class="bws_info"><?php _e("Example: Sent from (referer):\thttp://bestwebsoft.com/contacts/contact-us/", 'contact_form'); ?> </label><br /> <label><input type="checkbox" id="cntctfrm_display_user_agent" name="cntctfrm_display_user_agent" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_user_agent']) { echo 'checked="checked" '; } ?> /> <?php _e("Using (user agent)", 'contact_form'); ?> </label> <label class="bws_info"><?php _e("Example: Using (user agent):\tMozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36", 'contact_form'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Language settings for the field names in the form", 'contact_form'); ?> </th> <td colspan="2"> <select name="cntctfrm_languages" id="cntctfrm_languages" style="width:300px;"> <?php foreach ($lang_codes as $key => $val) { if (in_array($key, $cntctfrm_options['cntctfrm_language'])) { continue; } echo '<option value="' . esc_attr($key) . '"> ' . esc_html($val) . '</option>'; } ?> </select> <input type="button" class="button-primary" id="cntctfrm_add_language_button" value="<?php _e('Add a language', 'contact_form'); ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Change the names of the contact form fields and error messages", 'contact_form'); ?> </th> <td style="width:15px;" class="cntctfrm_td_top_align"> <input type="checkbox" id="cntctfrm_change_label" name="cntctfrm_change_label" value="1" <?php if ($cntctfrm_options['cntctfrm_change_label'] == '1') { echo 'checked="checked" '; } ?> /> </td> <td class="cntctfrm_change_label_block" <?php if ('0' == $cntctfrm_options['cntctfrm_change_label']) { echo 'style="display:none"'; } ?> > <div class="cntctfrm_label_language_tab cntctfrm_active" id="cntctfrm_label_en"><?php _e('English', 'contact_form'); ?> </div> <?php if (!empty($cntctfrm_options['cntctfrm_language'])) { foreach ($cntctfrm_options['cntctfrm_language'] as $val) { echo '<div class="cntctfrm_label_language_tab" id="cntctfrm_label_' . $val . '">' . $lang_codes[$val] . ' <span class="cntctfrm_delete" rel="' . $val . '">X</span></div>'; } } ?> <div class="clear"></div> <div class="cntctfrm_language_tab cntctfrm_tab_en"> <div class="cntctfrm_language_tab_block_mini" style="display:none;"><?php _e("click to expand/hide the list", 'contact_form'); ?> </div> <div class="cntctfrm_language_tab_block"> <input type="text" maxlength="250" name="cntctfrm_name_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_name_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Name:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_address_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Address:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Email Address:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Phone number:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Subject:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Message:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Attachment:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_tooltip']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Tips below the Attachment block", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_send_copy_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_send_copy_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Send me a copy", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_submit_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_submit_label']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Submit", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_name_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_name_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Name field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_address_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Address field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Email field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Phone field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Subject field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Message field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message about the file type for the Attachment field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_upload_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_upload_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message while uploading a file for the Attachment field to the server", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_move_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_move_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message while moving the file for the Attachment field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_size_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_size_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message when file size limit for the Attachment field is exceeded", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_captcha_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_captcha_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Captcha field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_form_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the whole form", 'contact_form'); ?> </span><br /> </div> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } else { ?> <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } ?> </div> <?php if (!empty($cntctfrm_options['cntctfrm_language'])) { foreach ($cntctfrm_options['cntctfrm_language'] as $val) { ?> <div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?> "> <div class="cntctfrm_language_tab_block_mini" style="display:none;"><?php _e("click to expand/hide the list", 'contact_form'); ?> </div> <div class="cntctfrm_language_tab_block"> <input type="text" maxlength="250" name="cntctfrm_name_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_name_label'][$val])) { echo $cntctfrm_options['cntctfrm_name_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Name:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_address_label'][$val])) { echo $cntctfrm_options['cntctfrm_address_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Address:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_email_label'][$val])) { echo $cntctfrm_options['cntctfrm_email_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Email Address:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_phone_label'][$val])) { echo $cntctfrm_options['cntctfrm_phone_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Phone number:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_subject_label'][$val])) { echo $cntctfrm_options['cntctfrm_subject_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Subject:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_message_label'][$val])) { echo $cntctfrm_options['cntctfrm_message_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Message:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_label'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Attachment:", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_tooltip'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_tooltip'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Tips below the Attachment block", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_send_copy_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_send_copy_label'][$val])) { echo $cntctfrm_options['cntctfrm_send_copy_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Send me a copy", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_submit_label[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_submit_label'][$val])) { echo $cntctfrm_options['cntctfrm_submit_label'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Submit", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_name_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_name_error'][$val])) { echo $cntctfrm_options['cntctfrm_name_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Name field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_address_error'][$val])) { echo $cntctfrm_options['cntctfrm_address_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Address field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_email_error'][$val])) { echo $cntctfrm_options['cntctfrm_email_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Email field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_phone_error'][$val])) { echo $cntctfrm_options['cntctfrm_phone_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Phone field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_subject_error'][$val])) { echo $cntctfrm_options['cntctfrm_subject_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Subject field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_message_error'][$val])) { echo $cntctfrm_options['cntctfrm_message_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Message field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_error'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message about the file type for the Attachment field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_upload_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_upload_error'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_upload_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message while uploading a file for the Attachment field to the server", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_move_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_move_error'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_move_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message while moving the file for the Attachment field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_size_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_attachment_size_error'][$val])) { echo $cntctfrm_options['cntctfrm_attachment_size_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message when file size limit for the Attachment field is exceeded", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_captcha_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_captcha_error'][$val])) { echo $cntctfrm_options['cntctfrm_captcha_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the Captcha field", 'contact_form'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_form_error[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_form_error'][$val])) { echo $cntctfrm_options['cntctfrm_form_error'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Error message for the whole form", 'contact_form'); ?> </span><br /> </div> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } else { ?> <span class="cntctfrm_info" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php $val . ' id=' . $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } ?> </div> <?php } } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Use the changed names of the contact form fields in the email', 'contact_form'); ?> </th> <td colspan="2"> <input type="checkbox" name="cntctfrm_change_label_in_email" value="1" <?php if ($cntctfrm_options['cntctfrm_change_label_in_email'] == '1') { echo 'checked="checked" '; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Action after email is sent", 'contact_form'); ?> </th> <td colspan="2" class="cntctfrm_action_after_send_block"> <label><input type="radio" id="cntctfrm_action_after_send" name="cntctfrm_action_after_send" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_action_after_send']) { echo 'checked="checked" '; } ?> /> <?php _e("Display text", 'contact_form'); ?> </label><br /> <div class="cntctfrm_label_language_tab cntctfrm_active" id="cntctfrm_text_en"><?php _e('English', 'contact_form'); ?> </div> <?php if (!empty($cntctfrm_options['cntctfrm_language'])) { foreach ($cntctfrm_options['cntctfrm_language'] as $val) { echo '<div class="cntctfrm_label_language_tab" id="cntctfrm_text_' . $val . '">' . $lang_codes[$val] . ' <span class="cntctfrm_delete" rel="' . $val . '">X</span></div>'; } } ?> <div class="clear"></div> <div class="cntctfrm_language_tab cntctfrm_tab_en" style=" padding: 5px 10px 5px 5px;"> <input type="text" maxlength="250" name="cntctfrm_thank_text[en]" value="<?php echo $cntctfrm_options['cntctfrm_thank_text']['en']; ?> " /> <span class="cntctfrm_info"><?php _e("Text", 'contact_form'); ?> </span><br /> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="cntctfrm_info"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } else { ?> <span class="cntctfrm_info"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("or", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } ?> </div> <?php if (!empty($cntctfrm_options['cntctfrm_language'])) { foreach ($cntctfrm_options['cntctfrm_language'] as $val) { ?> <div class="cntctfrm_language_tab hidden cntctfrm_tab_<?php echo $val; ?> " style=" padding: 5px 10px 5px 5px;"> <label><input type="text" maxlength="250" name="cntctfrm_thank_text[<?php echo $val; ?> ]" value="<?php if (isset($cntctfrm_options['cntctfrm_thank_text'][$val])) { echo $cntctfrm_options['cntctfrm_thank_text'][$val]; } ?> " /> <span class="cntctfrm_info"><?php _e("Text", 'contact_form'); ?> </span></label><br /> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="cntctfrm_info"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } else { ?> <span class="cntctfrm_info"><?php _e("Use shortcode", 'contact_form'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val . ' id=' . $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact_form'); ?> </span> <?php } ?> </div> <?php } } ?> <div id="cntctfrm_before"></div> <br /> <input type="radio" id="cntctfrm_action_after_send_url" name="cntctfrm_action_after_send" value="0" <?php if ('0' == $cntctfrm_options['cntctfrm_action_after_send']) { echo 'checked="checked" '; } ?> /> <?php _e("Redirect to the page", 'contact_form'); ?> <br /> <label><input type="text" maxlength="250" name="cntctfrm_redirect_url" value="<?php echo $cntctfrm_options['cntctfrm_redirect_url']; ?> " onfocus="document.getElementById('cntctfrm_action_after_send_url').checked = true;" /> <span class="cntctfrm_info"><?php _e("Url", 'contact_form'); ?> </span></label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The $_SERVER variable that is used to build a URL of the form', 'contact_form'); ?> </th> <td colspan="2"> <fieldset> <label><input type="radio" name="cntctfrm_site_name_parameter" value="SERVER_NAME" <?php if ('SERVER_NAME' == $cntctfrm_options['cntctfrm_site_name_parameter']) { echo 'checked="checked" '; } ?> /> SERVER_NAME</label><br /> <label><input type="radio" name="cntctfrm_site_name_parameter" value="HTTP_HOST" <?php if ('HTTP_HOST' == $cntctfrm_options['cntctfrm_site_name_parameter']) { echo 'checked="checked" '; } ?> /> HTTP_HOST</label><br /> <span class="cntctfrm_info"><?php _e("If you are not sure whether to change this setting or not, please do not do that.", 'contact_form'); ?> </span> </fieldset> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e('Auto Response', 'contact_form'); ?> </th> <td colspan="2"> <input disabled="disabled" type="checkbox" value="1" name="cntctfrm_auto_response" checked="checked"/> <textarea name="cntctfrm_auto_response_message" style="position: relative; margin-left: 20px; z-index: -1;">Dear %%NAME%%, Thank you for contacting us. We have received your message and will reply to it shortly. Regards, %%SITENAME%% Team.</textarea><br/> <span class="cntctfrm_info" style="margin-left: 45px"><?php _e("You can use %%NAME%% to display data from the email field and %%MESSAGE%% to display data from the Message field, as well as %%SITENAME%% to display blog name.", 'contact_form'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'contact_form'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'contact_form'); ?> <a href="http://bestwebsoft.com/products/contact-form/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"><?php _e('Learn More', 'contact_form'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/contact-form/buy/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"> <?php _e('Go', 'contact_form'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> </div> <!-- end of 'Additional' settings --> <input type="hidden" name="cntctfrm_form_submit" value="submit" /> <p class="submit"> <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'contact_form'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'cntctfrm_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('appearance' == $_GET['action']) { ?> <div id="<?php echo is_rtl() ? 'cntctfrmpr_right_table' : 'cntctfrmpr_left_table'; ?> "> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e("Errors output", 'contact_form'); ?> </th> <td colspan="2"> <select name="cntctfrmpr_error_displaying"> <option value="labels"><?php _e("Display error messages", 'contact_form'); ?> </option> <option value="input_colors"><?php _e("Color of the input field errors.", 'contact_form'); ?> </option> <option value="both" selected="selected"><?php _e("Display error messages & color of the input field errors", 'contact_form'); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Add placeholder to the input blocks", 'contact_form'); ?> </th> <td colspan="2"> <input disabled='disabled' type="checkbox" name="cntctfrmpr_placeholder" value="1" checked="checked"/> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Add tooltips", 'contact_form'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_name" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_name"><?php _e("Name", 'contact_form'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_display_address_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_address" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_address"><?php _e("Address", 'contact_form'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_email" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_email"><?php _e("Email address", 'contact_form'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_display_phone_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_phone" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_phone"><?php _e("Phone Number", 'contact_form'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_subject" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_subject"><?php _e("Subject", 'contact_form'); ?> </label> </div> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_message" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_message"><?php _e("Message", 'contact_form'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_attachment_explanations']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_attachment" value="1" checked="checked"/> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_attachment"><?php _e("Attachment", 'contact_form'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_captcha" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_captcha">Captcha by BestWebSoft</label> </div> </td> </tr> <tr valign="top"> <th colspan="3" scope="row"><input disabled='disabled' type="checkbox" id="cntctfrmpr_style_options" name="cntctfrmpr_style_options" value="1" checked="checked" /> <?php _e("Style options", 'contact_form'); ?> </th> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Text color", 'contact_form'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_label_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Label text color', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_input_placeholder_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e("Placeholder color", 'contact_form'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Errors color", 'contact_form'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_error_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Error text color', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_error_input_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Background color of the input field errors', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_error_input_border_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Border color of the input field errors', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" id="" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_input_placeholder_error_color" value="" class="cntctfrmpr_colorPicker " /> <div class="cntctfrm_label_block"><?php _e("Placeholder color of the input field errors", 'contact_form'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Input fields", 'contact_form'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" id="" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_input_background" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e("Input fields background color", 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_input_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e("Text fields color", 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' size="8" type="text" value="" name="cntctfrmpr_border_input_width" /> <div class="cntctfrm_label_block"><?php _e('Border width in px, numbers only', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_border_input_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Border color', 'contact_form'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Submit button", 'contact_form'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' size="8" type="text" value="" name="cntctfrmpr_button_width" /> <div class="cntctfrm_label_block"><?php _e('Width in px, numbers only', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_button_backgroud" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Button color', 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_button_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e("Button text color", 'contact_form'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact_form'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrmpr_border_button_color" value="" class="cntctfrmpr_colorPicker" /> <div class="cntctfrm_label_block"><?php _e('Border color', 'contact_form'); ?> </div> </div> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'contact_form'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'contact_form'); ?> <a href="http://bestwebsoft.com/products/contact-form/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"><?php _e('Learn More', 'contact_form'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/contact-form/buy/?k=697c5e74f39779ce77850e11dbe21962&pn=77&v=<?php echo $cntctfrm_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Contact Form Pro"> <?php _e('Go', 'contact_form'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <input type="hidden" name="cntctfrmpr_form_submit" value="submit" /> <p class="submit"> <input disabled='disabled' type="button" class="button-primary" value="<?php _e('Save Changes', 'contact_form'); ?> " /> </p> </div> <div id="<?php echo is_rtl() ? 'cntctfrmpr_left_table' : 'cntctfrmpr_right_table'; ?> "> <h3><?php _e("Contact Form Pro | Preview", 'contact_form'); ?> </h3> <div id="cntctfrmpr_show_errors_block"> <input disabled="" type="checkbox" id="cntctfrmpr_show_errors" name="cntctfrmpr_show_errors" /> <?php _e("Show with errors", 'contact_form'); ?> </div> <div id="cntctfrmpr_contact_form" class="cntctfrm_contact_form"> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?> </div> <div class="cntctfrm_label cntctfrm_label_name"> <label for="cntctfrmpr_contact_name"><?php echo $cntctfrm_options['cntctfrm_name_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_name_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_name_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_name"> <input placeholder="<?php _e("Please enter your full name...", 'contact_form'); ?> " class="text" type="text" size="40" value="" name="cntctfrmpr_contact_name" id="cntctfrmpr_contact_name"/> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter your full name...", 'contact_form'); ?> </div> </div> </div> <?php if (1 == $cntctfrm_options['cntctfrm_display_address_field']) { ?> <div class="cntctfrm_label cntctfrm_label_address"> <label for="cntctfrmpr_contact_address"><?php echo $cntctfrm_options['cntctfrm_address_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_address_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <?php if (1 == $cntctfrm_options['cntctfrm_required_address_field']) { ?> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_address_error']['en']; ?> </div> <?php } ?> <div class="cntctfrm_input cntctfrm_input_address"> <input placeholder="<?php _e("Please enter your address...", 'contact_form'); ?> " class="text" type="text" size="40" value="" name="cntctfrmpr_contact_address" id="cntctfrmpr_contact_address" /> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter your address...", 'contact_form'); ?> </div> </div> </div> <?php } ?> <div class="cntctfrm_label cntctfrm_label_email"> <label for="cntctfrmpr_contact_email"><?php echo $cntctfrm_options['cntctfrm_email_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_email_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_email_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_email"> <input placeholder="<?php _e("Please enter your email address...", 'contact_form'); ?> " class="text" type="text" size="40" value="" name="cntctfrmpr_contact_email" id="cntctfrmpr_contact_email" /> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter your email address...", 'contact_form'); ?> </div> </div> </div> <?php if (1 == $cntctfrm_options['cntctfrm_display_phone_field']) { ?> <div class="cntctfrm_label cntctfrm_label_phone"> <label for="cntctfrmpr_contact_phone"><?php echo $cntctfrm_options['cntctfrm_phone_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_phone_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['phone_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_phone"> <input placeholder="<?php _e("Please enter your phone number...", 'contact_form'); ?> " class="text" type="text" size="40" value="" name="cntctfrmpr_contact_phone" id="cntctfrmpr_contact_phone" /> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter your phone number...", 'contact_form'); ?> </div> </div> </div> <?php } ?> <div class="cntctfrm_label cntctfrm_label_subject"> <label for="cntctfrmpr_contact_subject"><?php echo $cntctfrm_options['cntctfrm_subject_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_subject_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_subject_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_subject"> <input placeholder="<?php _e("Please enter subject...", 'contact_form'); ?> " class="text" type="text" size="40" value="" name="cntctfrmpr_contact_subject" id="cntctfrmpr_contact_subject" /> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter subject...", 'contact_form'); ?> </div> </div> </div> <div class="cntctfrm_label cntctfrm_label_message"> <label for="cntctfrmpr_contact_message"><?php echo $cntctfrm_options['cntctfrm_message_label']['en']; if (1 == $cntctfrm_options['cntctfrm_required_message_field']) { echo '<span class="required"> *</span>'; } ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_message_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_message"> <textarea placeholder="<?php _e("Please enter your message...", 'contact_form'); ?> " rows="5" cols="30" name="cntctfrmpr_contact_message" id="cntctfrmpr_contact_message"></textarea> <div class="cntctfrmpr_help_box"> <div class="cntctfrmpr_hidden_help_text"><?php _e("Please enter your message...", 'contact_form'); ?> </div> </div> </div> <?php if (1 == $cntctfrm_options['cntctfrm_attachment']) { ?> <div class="cntctfrm_label cntctfrm_label_attachment"> <label for="cntctfrmpr_contact_attachment"><?php echo $cntctfrm_options['cntctfrm_attachment_label']['en']; ?> </label> </div> <div class="cntctfrmpr_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_attachment_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_attachment"> <input type="file" name="cntctfrmpr_contact_attachment" id="cntctfrmpr_contact_attachment" style="float:left;" /> <?php if (1 == $cntctfrm_options['cntctfrm_attachment_explanations']) { ?> <div class="cntctfrmpr_help_box cntctfrmpr_hidden_help_text_attach"><div class="cntctfrmpr_hidden_help_text"><?php echo $cntctfrm_options['cntctfrm_attachment_tooltip']['en']; ?> </div></div> <?php } ?> </div> <?php } ?> <?php if (1 == $cntctfrm_options['cntctfrm_send_copy']) { ?> <div class="cntctfrm_checkbox cntctfrm_checkbox_send_copy"> <input type="checkbox" value="1" name="cntctfrmpr_contact_send_copy" id="cntctfrmpr_contact_send_copy" style="margin: 0;" /> <label for="cntctfrmpr_contact_send_copy"><?php echo $cntctfrm_options['cntctfrm_send_copy_label']['en']; ?> </label> </div> <?php } ?> <div class="cntctfrm_input cntctfrm_input_submit"> <input type="submit" value="<?php echo $cntctfrm_options['cntctfrm_submit_label']['en']; ?> " style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;" /> </div> </div> <div id="cntctfrmpr_shortcode"> <?php _e("If you would like to add the Contact Form to your website, just copy and paste this shortcode to your post or page or widget:", 'contact_form'); ?> <br/> <div> <div id="cntctfrmpr_shortcode_code"> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> </div> </div> </div> </div> <div class="clear"></div> <?php } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($cntctfrm_plugin_info, $plugin_basename, 'contact_form.php', 'contact_form_pro.php', 'contact-form-pro/contact_form_pro.php', 'contact-form', '697c5e74f39779ce77850e11dbe21962', '77', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($cntctfrm_plugin_info['Name'], 'contact-form-plugin'); ?> </div> <?php }
function gglstmp_settings_page() { global $gglstmppr_url_home, $gglstmp_settings, $gglstmp_option_defaults, $gglstmppr_url, $wp_version, $gglstmp_plugin_info; $message = $error = ""; $gglstmp_robots = get_option('gglstmp_robots'); $gglstmppr_url_robot = ABSPATH . "robots.txt"; $plugin_basename = plugin_basename(__FILE__); if (is_multisite()) { $home_url = preg_replace("/[^a-zA-ZА-Яа-я0-9\\s]/", "_", str_replace('http://', '', str_replace('https://', '', home_url()))); $gglstmppr_url_sitemap = ABSPATH . "sitemap_" . $home_url . ".xml"; } else { $gglstmppr_url_sitemap = ABSPATH . "sitemap.xml"; } if (isset($_REQUEST['gglstmp_submit']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { $gglstmp_settings['post_type'] = isset($_REQUEST['gglstmp_post_types']) ? $_REQUEST['gglstmp_post_types'] : array(); $gglstmp_settings['taxonomy'] = isset($_REQUEST['gglstmp_taxonomies']) ? $_REQUEST['gglstmp_taxonomies'] : array(); /*============================ Adding location of sitemap file to the robots.txt =============*/ $gglstmp_robots_flag = isset($_POST['gglstmp_checkbox']) ? 1 : 0; if (file_exists($gglstmppr_url_robot) && !is_multisite()) { if (!is_writable($gglstmppr_url_robot)) { @chmod($gglstmppr_url_robot, 0755); } if (is_writable($gglstmppr_url_robot)) { $file_content = file_get_contents($gglstmppr_url_robot); if (isset($_POST['gglstmp_checkbox']) && !preg_match('|Sitemap: ' . $gglstmppr_url_home . 'sitemap.xml|', $file_content)) { file_put_contents($gglstmppr_url_robot, $file_content . "\nSitemap: " . $gglstmppr_url_home . "sitemap.xml"); } elseif (preg_match("|Sitemap: " . $gglstmppr_url_home . "sitemap.xml|", $file_content) && !isset($_POST['gglstmp_checkbox'])) { $file_content = preg_replace("|\nSitemap: " . $gglstmppr_url_home . "sitemap.xml|", '', $file_content); file_put_contents($gglstmppr_url_robot, $file_content); } } else { $error = __('Cannot edit "robots.txt". Check your permissions.', 'sitemap'); $gglstmp_robots_flag = 0; } } if (false === get_option('gglstmp_robots')) { add_option('gglstmp_robots', $gglstmp_robots_flag); } else { update_option('gglstmp_robots', $gglstmp_robots_flag); } $gglstmp_robots = get_option('gglstmp_robots'); update_option('gglstmp_settings', $gglstmp_settings); if (!isset($_POST['gglstmp_authorize']) && !isset($_POST['gglstmp_logout']) && !isset($_POST['gglstmp_menu'])) { $message .= " " . __("Settings saved.", 'sitemap'); } } if (isset($_POST['gglstmp_new']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { $message = __("Your Sitemap file is created in the site root directory.", 'sitemap'); gglstmp_sitemapcreate(); } $gglstmp_result = get_post_types('', 'names'); unset($gglstmp_result['revision']); unset($gglstmp_result['attachment']); unset($gglstmp_result['nav_menu_item']); $gglstmp_result_taxonomies = array('category' => 'Post category', 'post_tag' => 'Post tag'); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $gglstmp_settings = $gglstmp_option_defaults; @unlink($gglstmppr_url_sitemap); /* remove sitemap.xml */ /* clear robots.txt */ if (file_exists($gglstmppr_url_robot) && !is_multisite()) { if (!is_writable($gglstmppr_url_robot)) { @chmod($gglstmppr_url_robot, 0755); } if (is_writable($gglstmppr_url_robot)) { $file_content = file_get_contents($gglstmppr_url_robot); if (preg_match("|Sitemap: " . $gglstmppr_url_home . "sitemap.xml|", $file_content)) { $file_content = preg_replace("|\nSitemap: " . $gglstmppr_url_home . "sitemap.xml|", '', $file_content); file_put_contents($gglstmppr_url_robot, $file_content); } } else { $error = __('Cannot edit "robot.txt". Check your permissions.', 'sitemap'); } } if (false === get_option('gglstmp_robots')) { add_option('gglstmp_robots', 0); } else { update_option('gglstmp_robots', 0); } $gglstmp_robots = get_option('gglstmp_robots'); update_option('gglstmp_settings', $gglstmp_settings); $message = __('All plugin settings were restored.', 'sitemap'); } ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e("Google Sitemap Settings", 'sitemap'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-sitemap-plugin.php"><?php _e('Settings', 'sitemap'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'extra' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-sitemap-plugin.php&action=extra"><?php _e('Extra settings', 'sitemap'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/google-sitemap/faq/" target="_blank"><?php _e('FAQ', 'sitemap'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-sitemap-plugin.php&action=go_pro"><?php _e('Go PRO', 'sitemap'); ?> </a> </h2> <?php if (!isset($_GET['action']) && is_multisite() && !is_subdomain_install()) { ?> <div id="gglstmp_check_sitemap_block" class="error"> <p> <?php printf('<strong>%s</strong> %s', __('Warning:', 'sitemap'), sprintf(__('To have an access to subsites XML files, please add the following rule %s to your %s file in %s after line %s.', 'sitemap'), '<code>RewriteRule ([^/]+\\.xml)$ $1 [L]</code>', '<strong>.htaccess</strong>', sprintf('<strong>"%s"</strong>', ABSPATH), '<strong>"RewriteBase"</strong>')); ?> </p> <div style="margin: .5em 0; padding: 2px;"> <form action="admin.php?page=google-sitemap-plugin.php" method='post' id="gglstmp_check_sitemap"> <input type="submit" class="button-secondary" name="gglstmp_check_sitemap" value="<?php _e('Сheck Access', 'sitemap'); ?> " /> <?php wp_nonce_field($plugin_basename, 'gglstmp_nonce_sitemap'); ?> </form> <?php if (isset($_POST['gglstmp_check_sitemap']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_sitemap')) { $gglstmp_background = array('200' => '#f8fdf5', '404' => '#fdf6f6'); if ($gglstmp_settings['sitemap'] && file_exists($gglstmp_settings['sitemap']['path'])) { $gglstmp_status = gglstmp_check_sitemap($gglstmp_settings['sitemap']['loc']); printf('<div style="margin: 10px 0 0; padding: 2px 5px; background-color: %s;"><a href="%s">%s</a> - %s</div>', $gglstmp_background[$gglstmp_status['code']], $gglstmp_settings['sitemap']['loc'], $gglstmp_settings['sitemap']['file'], $gglstmp_status['message']); } } ?> </div> </div> <?php } ?> <div id="gglstmp_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e("Notice:", 'sitemap'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'sitemap'); ?> </p></div> <div class="updated fade" <?php if ("" != $error || $message == "") { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if ("" == $error) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <?php if (!isset($_GET['action'])) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { ?> <form action="admin.php?page=google-sitemap-plugin.php" method='post' id="gglstmp_auth" name="gglstmp_auth"> <?php /*=============================== Creating sitemap file ====================================*/ if (file_exists($gglstmppr_url_sitemap)) { if (is_multisite()) { echo '<p><a href="' . $gglstmppr_url_home . "sitemap_" . $home_url . '.xml" target="_new">' . __("The Sitemap file", 'sitemap') . "</a> " . __("already exists. If you would like to replace it with a new one, please choose the necessary box below.", 'sitemap') . "</p>"; } else { echo '<p><a href="' . $gglstmppr_url_home . 'sitemap.xml" target="_new">' . __("The Sitemap file", 'sitemap') . "</a> " . __("already exists. If you would like to replace it with a new one, please choose the necessary box below.", 'sitemap') . "</p>"; } } else { gglstmp_sitemapcreate(); if (is_multisite()) { echo '<p><a href="' . $gglstmppr_url_home . "sitemap_" . $home_url . '.xml" target="_new">' . __("Your Sitemap file", 'sitemap') . "</a> " . __("is created in the site root directory.", 'sitemap') . "</p>"; } else { echo '<p><a href="' . $gglstmppr_url_home . 'sitemap.xml" target="_new">' . __("Your Sitemap file", 'sitemap') . "</a> " . __("is created in the site root directory.", 'sitemap') . "</p>"; } } /*========================================== Recreating sitemap file ====================================*/ if (is_multisite()) { echo '<p>' . __("If you do not want a sitemap file to be added to Google Webmaster Tools automatically, you can do it using", 'sitemap') . " <a href=\"https://www.google.com/webmasters/tools/home?hl=en\">" . __("this", 'sitemap') . "</a> " . __("link - sign in, choose the necessary site, go to 'Sitemaps' and fill out the mandatory field", 'sitemap') . " - '" . $gglstmppr_url_home . "sitemap_" . $home_url . ".xml'.</p>"; } else { echo '<p>' . __("If you do not want a sitemap file to be added to Google Webmaster Tools automatically, you can do it using", 'sitemap') . " <a href=\"https://www.google.com/webmasters/tools/home?hl=en\">" . __("this", 'sitemap') . "</a> " . __("link - sign in, choose the necessary site, go to 'Sitemaps' and fill out the mandatory field", 'sitemap') . " - '" . $gglstmppr_url_home . "sitemap.xml'.</p>"; } ?> <table class="form-table"> <tr valign="top"> <td colspan="2"> <label><input type='checkbox' name='gglstmp_new' value="1" /> <?php _e("I want to create a new sitemap file or update the existing one", 'sitemap'); ?> </label> </td> </tr> <?php if (is_multisite()) { ?> <tr valign="top"> <td colspan="2"> <label><input type='checkbox' disabled="disabled" name='gglstmp_checkbox' value="1" <?php if (1 == $gglstmp_robots) { echo 'checked="checked"'; } ?> /> <?php _e("I want to add sitemap file path in robots.txt", 'sitemap'); ?> </label> <p style="color:red"><?php _e("Since you are using multisiting, the plugin does not allow to add a sitemap to robots.txt", 'sitemap'); ?> </div> </td> </tr> <?php } else { ?> <tr valign="top"> <td colspan="2"> <label><input type='checkbox' name='gglstmp_checkbox' value="1" <?php if (1 == $gglstmp_robots) { echo 'checked="checked"'; } ?> /> <?php _e("I want to add sitemap file path in", 'sitemap'); ?> <a href="<?php echo $gglstmppr_url_home; ?> robots.txt" target="_new">robots.txt</a></label> </td> </tr> <?php } ?> <tr valign="top"> <th scope="row" colspan="2"><?php _e('Please choose the necessary post types and taxonomies the links to which are to be added to the sitemap:', 'sitemap'); ?> </th> </tr> <tr valign="top"> <td colspan="2"> <fieldset> <?php foreach ($gglstmp_result as $key => $value) { ?> <label><input type="checkbox" <?php if (in_array($value, $gglstmp_settings['post_type'])) { echo 'checked="checked"'; } ?> name="gglstmp_post_types[]" value="<?php echo $value; ?> "/><span style="text-transform: capitalize; padding-left: 5px;"><?php echo $value; ?> </span></label><br /> <?php } ?> </fieldset> </td> </tr> <tr valign="top"> <td colspan="2"> <fieldset> <?php foreach ($gglstmp_result_taxonomies as $key => $value) { ?> <label><input type="checkbox" <?php if (in_array($key, $gglstmp_settings['taxonomy'])) { echo 'checked="checked"'; } ?> name="gglstmp_taxonomies[]" value="<?php echo $key; ?> "/><span style="padding-left: 5px;"><?php echo $value; ?> </span></label><br /> <?php } ?> </fieldset> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th><?php _e('XML Sitemap "Change Frequency" parameter', 'sitemap'); ?> </th> <td> <select name="gglstmp_sitemap_change_frequency"> <option value="always"><?php _e('Always', 'sitemap'); ?> </option> <option value="hourly"><?php _e('Hourly', 'sitemap'); ?> </option> <option value="daily"><?php _e('Daily', 'sitemap'); ?> </option> <option value="weekly"><?php _e('Weekly', 'sitemap'); ?> </option> <option selected value="monthly"><?php _e('Monthly', 'sitemap'); ?> </option> <option value="yearly"><?php _e('Yearly', 'sitemap'); ?> </option> <option value="never"><?php _e('Never', 'sitemap'); ?> </option> </select><br /> <span style="color: #888888;font-size: 10px;"><?php _e('This value is used in the sitemap file and provides general information to search engines. The sitemap itself is generated once and will be re-generated when you create or update any post or page.', 'sitemap'); ?> </span> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'sitemap'); ?> <a href="http://bestwebsoft.com/products/google-sitemap/?k=28d4cf0b4ab6f56e703f46f60d34d039&pn=83&v=<?php echo $gglstmp_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Sitemap Pro"><?php _e('Learn More', 'sitemap'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-sitemap/buy/?k=28d4cf0b4ab6f56e703f46f60d34d039&pn=83&v=<?php echo $gglstmp_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Sitemap Pro"> <?php _e('Go', 'sitemap'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <table class="form-table"> <?php if (!function_exists('curl_init')) { ?> <tr valign="top"> <td colspan="2" class="gglstmp_error"> <?php _e("This hosting does not support сURL, so you cannot add a sitemap file automatically.", 'sitemap'); ?> </td> </tr> <?php } else { ?> <tr id="gglstmp_google_webmaster" valign="top"> <th scope="row"><?php _e('Remote work with Google Webmaster Tools', 'sitemap'); ?> </th> <td> <?php $gglstmp_client = gglstmp_client(); $gglstmp_blog_prefix = '_' . get_current_blog_id(); if (isset($_POST['gglstmp_logout']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { unset($_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix]); unset($gglstmp_settings['authorization_code']); update_option('gglstmp_settings', $gglstmp_settings); } if (isset($_POST['gglstmp_authorization_code']) && !empty($_POST['gglstmp_authorization_code']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { try { $gglstmp_client->authenticate($_POST['gglstmp_authorization_code']); $gglstmp_settings['authorization_code'] = $_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix] = $gglstmp_client->getAccessToken(); update_option('gglstmp_settings', $gglstmp_settings); } catch (Exception $e) { } } if (!isset($_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix]) && isset($gglstmp_settings['authorization_code'])) { $_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix] = $gglstmp_settings['authorization_code']; } if (isset($_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix])) { $gglstmp_client->setAccessToken($_SESSION['gglstmp_authorization_code' . $gglstmp_blog_prefix]); } if ($gglstmp_client->getAccessToken()) { ?> <div id="gglstmp_logout_button"> <input class="button-secondary" name="gglstmp_logout" type="submit" value="<?php _e('Log out from Google Webmaster Tools', 'sitemap'); ?> " /> </div> <?php $gglstmp_menu_ad = __("I want to add this site to Google Webmaster Tools", 'sitemap'); $gglstmp_menu_del = __("I want to delete this site from Google Webmaster Tools", 'sitemap'); $gglstmp_menu_inf = __("I want to get info about this site in Google Webmaster Tools", 'sitemap'); ?> <fieldset> <label><input type='radio' name='gglstmp_menu' value="ad" /> <?php echo $gglstmp_menu_ad; ?> </label><br /> <label><input type='radio' name='gglstmp_menu' value="del" /> <?php echo $gglstmp_menu_del; ?> </label><br /> <label><input type='radio' name='gglstmp_menu' value="inf" /> <?php echo $gglstmp_menu_inf; ?> </label><br /> <span class="gglstmp_span"> <?php _e('In case you failed to add a sitemap to Google automatically using this plugin, it is possible to do it manually', 'sitemap'); ?> : <a target="_blank" href="https://docs.google.com/document/d/1VOJx_OaasVskCqi9fsAbUmxfsckoagPU5Py97yjha9w/edit"><?php _e('View the Instruction', 'sitemap'); ?> </a> </span> </fieldset> <?php if (isset($_POST['gglstmp_menu']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { $gglstmp_wmt = new Google_Service_Webmasters($gglstmp_client); $gglstmp_sv = new Google_Service_SiteVerification($gglstmp_client); switch ($_POST['gglstmp_menu']) { case 'inf': gglstmp_info_site($gglstmp_wmt, $gglstmp_sv); break; case 'ad': gglstmp_add_site($gglstmp_wmt, $gglstmp_sv); break; case 'del': gglstmp_del_site($gglstmp_wmt, $gglstmp_sv); break; default: break; } } } else { $gglstmp_state = mt_rand(); $gglstmp_client->setState($gglstmp_state); $_SESSION['gglstmp_state' . $gglstmp_blog_prefix] = $gglstmp_client; $gglstmp_auth_url = $gglstmp_client->createAuthUrl(); ?> <p><?php _e("Please authorize via your Google Account in order to add or delete a site and a sitemap file automatically or get information about this site in Google Webmaster Tools.", 'sitemap'); ?> </p> <a id="gglstmp_authorization_button" class="button-primary" href="<?php echo $gglstmp_auth_url; ?> " target="_blank" onclick="window.open(this.href,'','top='+(screen.height/2-560/2)+',left='+(screen.width/2-640/2)+',width=640,height=560,resizable=0,scrollbars=0,menubar=0,toolbar=0,status=1,location=0').focus(); return false;"><?php _e('Get Authorization Code', 'sitemap'); ?> </a> <div id="gglstmp_authorization_form"> <input id="gglstmp_authorization_code" name="gglstmp_authorization_code" type="text" autocomplete="off" maxlength="100" /> <input id="gglstmp_authorize" class="button-primary" name="gglstmp_authorize" type="submit" value="<?php _e('Authorize', 'sitemap'); ?> "> </div> <?php if (isset($_POST['gglstmp_authorization_code']) && isset($_POST['gglstmp_authorize']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { ?> <div id="gglstmp_authorize_error"><?php _e('Invalid authorization code. Please, try again.', 'sitemap'); ?> </div> <?php } } ?> </td> </tr> <?php } ?> </table> <input type="hidden" name="gglstmp_submit" value="submit" /> <p class="submit"> <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'sitemap'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'gglstmp_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); ?> <div class="clear"></div> <?php } } elseif ('extra' == $_GET['action']) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <td colspan="2"> <?php _e('Please choose the necessary post types and taxonomies the links to which are to be added to the sitemap:', 'sitemap'); ?> </td> </tr> <tr valign="top"> <td colspan="2"> <label> <input disabled="disabled" checked="checked" id="gglstmp_jstree_url" type="checkbox" name="gglstmp_jstree_url" value="1" /> <?php _e("Show URL for pages", 'sitemap'); ?> </label> </td> </tr> <tr valign="top"> <td colspan="2"> <img src="<?php echo plugins_url('images/pro_screen_1.png', __FILE__); ?> " alt="<?php _e("Example of site pages' tree", 'sitemap'); ?> " title="<?php _e("Example of site pages' tree", 'sitemap'); ?> " /> </td> </tr> <tr valign="top"> <td colspan="2"> <input disabled="disabled" type="submit" class="button-primary" value="<?php _e('Save Changes', 'sitemap'); ?> " /> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'sitemap'); ?> <a href="http://bestwebsoft.com/products/google-sitemap/?k=28d4cf0b4ab6f56e703f46f60d34d039&pn=83&v=<?php echo $gglstmp_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Sitemap Pro"><?php _e('Learn More', 'sitemap'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-sitemap/buy/?k=28d4cf0b4ab6f56e703f46f60d34d039&pn=83&v=<?php echo $gglstmp_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Sitemap Pro"> <?php _e('Go', 'sitemap'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <?php } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($gglstmp_plugin_info, $plugin_basename, 'google-sitemap-plugin.php', 'google-sitemap-pro.php', 'google-sitemap-pro/google-sitemap-pro.php', 'google-sitemap', '28d4cf0b4ab6f56e703f46f60d34d039', '83', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($gglstmp_plugin_info['Name'], 'google-sitemap-plugin'); ?> </div> <?php }
function gllr_settings_page() { global $gllr_options, $wp_version, $gllr_plugin_info, $gllr_option_defaults; $error = $message = ""; $plugin_basename = plugin_basename(__FILE__); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); $cstmsrch_options = get_option('cstmsrch_options'); if ($cstmsrch_options) { $option_name = 'cstmsrch_options'; } else { $cstmsrch_options = get_option('cstmsrchpr_options'); if ($cstmsrch_options) { $option_name = 'cstmsrchpr_options'; } else { $cstmsrch_options = get_option('bws_custom_search'); if ($cstmsrch_options) { $option_name = 'bws_custom_search'; } else { $cstmsrch_options = $option_name = ''; } } } /* Save data for settings page */ if (isset($_REQUEST['gllr_form_submit']) && check_admin_referer($plugin_basename, 'gllr_nonce_name')) { $gllr_request_options = array(); $gllr_request_options["gllr_custom_size_name"] = $gllr_options["gllr_custom_size_name"]; $gllr_request_options["gllr_custom_size_px"] = array(array(intval(trim($_REQUEST['gllr_custom_image_size_w_album'])), intval(trim($_REQUEST['gllr_custom_image_size_h_album']))), array(intval(trim($_REQUEST['gllr_custom_image_size_w_photo'])), intval(trim($_REQUEST['gllr_custom_image_size_h_photo'])))); $gllr_request_options["border_images"] = isset($_REQUEST['gllr_border_images']) ? 1 : 0; $gllr_request_options["border_images_width"] = intval(trim($_REQUEST['gllr_border_images_width'])); $gllr_request_options["border_images_color"] = trim($_REQUEST['gllr_border_images_color']); $gllr_request_options["custom_image_row_count"] = intval(trim($_REQUEST['gllr_custom_image_row_count'])); if ("" == $gllr_request_options["custom_image_row_count"] || 1 > $gllr_request_options["custom_image_row_count"]) { $gllr_request_options["custom_image_row_count"] = 1; } $gllr_request_options["start_slideshow"] = isset($_REQUEST['gllr_start_slideshow']) ? 1 : 0; $gllr_request_options["slideshow_interval"] = !isset($_REQUEST['gllr_slideshow_interval']) || empty($_REQUEST['gllr_slideshow_interval']) ? 2000 : intval($_REQUEST['gllr_slideshow_interval']); $gllr_request_options["single_lightbox_for_multiple_galleries"] = isset($_REQUEST['gllr_single_lightbox_for_multiple_galleries']) ? 1 : 0; $gllr_request_options["order_by"] = $_REQUEST['gllr_order_by']; $gllr_request_options["order"] = $_REQUEST['gllr_order']; $gllr_request_options["image_text"] = isset($_REQUEST['gllr_image_text']) ? 1 : 0; $gllr_request_options["return_link"] = isset($_REQUEST['gllr_return_link']) ? 1 : 0; $gllr_request_options["return_link_page"] = $_REQUEST['gllr_return_link_page']; $gllr_request_options["return_link_url"] = esc_url($_REQUEST['gllr_return_link_url']); $gllr_request_options["return_link_shortcode"] = isset($_REQUEST['gllr_return_link_shortcode']) ? 1 : 0; $gllr_request_options["return_link_text"] = stripslashes(esc_html($_REQUEST['gllr_return_link_text'])); $gllr_request_options["read_more_link_text"] = stripslashes(esc_html($_REQUEST['gllr_read_more_link_text'])); $gllr_request_options["rewrite_template"] = isset($_REQUEST['gllr_rewrite_template']) ? 1 : 0; if ($cstmsrch_options && !empty($cstmsrch_options)) { if (isset($_REQUEST['gllr_add_to_search'])) { if (!in_array('gallery', $cstmsrch_options['post_types'])) { array_push($cstmsrch_options['post_types'], 'gallery'); } } else { if (in_array('gallery', $cstmsrch_options['post_types'])) { unset($cstmsrch_options['post_types'][array_search('gallery', $cstmsrch_options['post_types'])]); } } update_option($option_name, $cstmsrch_options); } /* Array merge incase this version has added new options */ $gllr_options = array_merge($gllr_options, $gllr_request_options); /* Check select one point in the blocks Arithmetic actions and Difficulty on settings page */ update_option('gllr_options', $gllr_options); $message = __("Settings are saved", 'gallery-plugin'); } /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } /* Display form on the setting page */ if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $gllr_options = $gllr_option_defaults; update_option('gllr_options', $gllr_options); $message = __('All plugin settings were restored.', 'gallery-plugin'); } $result = apply_filters('bws_handle_demo_data', 'gllr_plugin_upgrade', 'gllr_settings'); if (!empty($result) && is_array($result)) { $error = $result['error']; $message = $result['done']; if (!empty($result['done'])) { $gllr_options = $result['options']; } } ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e('Gallery Settings', 'gallery-plugin'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=gallery-plugin.php"><?php _e('Settings', 'gallery-plugin'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/gallery/faq/" target="_blank"><?php _e('FAQ', 'gallery-plugin'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=gallery-plugin.php&action=go_pro"><?php _e('Go PRO', 'gallery-plugin'); ?> </a> </h2> <div id="gllr_settings_message" class="updated fade" <?php if ("" == $message) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if ("" == $error) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <?php if (!isset($_GET['action'])) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } elseif (isset($_POST['bws_handle_demo']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_demo_confirm(); } else { ?> <noscript><div class="error"><p><?php _e('Please enable JavaScript to use the option to renew images.', 'gallery-plugin'); ?> </p></div></noscript> <?php bws_show_settings_notice(); ?> <p><?php _e("If you would like to add a Single Gallery to your page or post, just copy and paste this shortcode into your post or page:", 'gallery-plugin'); ?> <span class="bws_code">[print_gllr id=Your_gallery_post_id]</span> </p> <table class="form-table hide-if-no-js"> <tr valign="top"> <th scope="row"><?php _e('Update images for gallery', 'gallery-plugin'); ?> </th> <td style="position:relative"> <input type="button" value="<?php _e('Update images', 'gallery-plugin'); ?> " id="gllr_ajax_update_images" name="ajax_update_images" class="button" /> <div id="gllr_img_loader"><img src="<?php echo plugins_url('images/ajax-loader.gif', __FILE__); ?> " alt="loader" /></div> </td> </tr> </table> <br/> <form class="bws_form" method="post" action="admin.php?page=gallery-plugin.php"> <table class="form-table"> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Image size for the album cover', 'gallery-plugin'); ?> </th> <td> <label><?php _e('Image size', 'gallery-plugin'); ?> <?php echo $gllr_options["gllr_custom_size_name"][0]; ?> </label><br /> <label> <input type="number" name="gllr_custom_image_size_w_album" min="1" max="10000" value="<?php echo $gllr_options["gllr_custom_size_px"][0][0]; ?> " /> <?php _e('Width (in px)', 'gallery-plugin'); ?> </label><br /> <label> <input type="number" name="gllr_custom_image_size_h_album" min="1" max="10000" value="<?php echo $gllr_options["gllr_custom_size_px"][0][1]; ?> " /> <?php _e('Height (in px)', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Image size for thumbnails', 'gallery-plugin'); ?> </th> <td> <label><?php _e('Image size', 'gallery-plugin'); ?> <?php echo $gllr_options["gllr_custom_size_name"][1]; ?> </label><br /> <label> <input type="number" name="gllr_custom_image_size_w_photo" min="1" max="10000" value="<?php echo $gllr_options["gllr_custom_size_px"][1][0]; ?> " /> <?php _e('Width (in px)', 'gallery-plugin'); ?> </label><br /> <label> <input type="number" name="gllr_custom_image_size_h_photo" min="1" max="10000" value="<?php echo $gllr_options["gllr_custom_size_px"][1][1]; ?> " /> <?php _e('Height (in px)', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <td colspan="2"><span class="bws_info"><?php _e('WordPress will create a new thumbnail with the specified dimensions when you upload a new photo.', 'gallery-plugin'); ?> </span></td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Image size in the lightbox', 'gallery-plugin'); ?> </th> <td> <label><?php _e('Image size', 'gallery-plugin'); ?> full-photo</label><br /> <label><input disabled class="gllrprfssnl_size_photo_full" type="number" name="gllrprfssnl_custom_image_size_w_full" value="1024" /> <?php _e('Max width (in px)', 'gallery-plugin'); ?> </label><br /> <label><input disabled class="gllrprfssnl_size_photo_full" type="number" name="gllrprfssnl_custom_image_size_h_full" value="1024" /> <?php _e('Max height (in px)', 'gallery-plugin'); ?> </label><br /> <input disabled type="checkbox" name="gllrprfssnl_size_photo_full" value="1" /> <?php _e('Display a full size image in the lightbox', 'gallery-plugin'); ?> </td> </tr> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Crop position', 'gallery-plugin'); ?> </th> <td> <label> <select disabled> <option value="center"><?php _e('center', 'gallery-plugin'); ?> </option> </select> <?php _e('Horizontal', 'gallery-plugin'); ?> </label><br /> <label> <select disabled> <option value="center"><?php _e('center', 'gallery-plugin'); ?> </option> </select> <?php _e('Vertical', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Lightbox background', 'gallery-plugin'); ?> </th> <td> <input disabled class="button button-small gllrprfssnl_lightbox_default" type="button" value="<?php _e('Default', 'gallery-plugin'); ?> "> <br /> <input disabled type="text" size="8" value="0.7" name="gllrprfssnl_background_lightbox_opacity" /> <?php _e('Background transparency (from 0 to 1)', 'gallery-plugin'); ?> <br /> <label><input disabled id="gllrprfssnl_background_lightbox_color" type="minicolors" name="gllrprfssnl_background_lightbox_color" value="#777777" id="gllrprfssnl_background_lightbox_color" /> <?php _e('Select a background color', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings and galleries will be saved.', 'gallery-plugin'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'gallery-plugin'); ?> </div> <div class="bws_pro_links"> <span class="bws_trial_info"> <a href="http://bestwebsoft.com/products/gallery/trial/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=<?php echo $gllr_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Gallery Pro Plugin"><?php _e('Start Your Trial', 'gallery-plugin'); ?> </a> <?php _e('or', 'gallery-plugin'); ?> </span> <a class="bws_button" href="http://bestwebsoft.com/products/gallery/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=<?php echo $gllr_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Gallery Pro Plugin"><?php _e('Learn More', 'gallery-plugin'); ?> </a> </div> <div class="gllr_clear"></div> </div> </div> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Images with border', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_border_images" value="1" <?php if (1 == $gllr_options["border_images"]) { echo 'checked="checked"'; } ?> /><br /> <input type="number" min="0" max="10000" value="<?php echo $gllr_options["border_images_width"]; ?> " name="gllr_border_images_width" /> <?php _e('Border width in px, just numbers', 'gallery-plugin'); ?> <br /> <label><input type="minicolors" name="gllr_border_images_color" maxlength="7" value="<?php echo $gllr_options["border_images_color"]; ?> " id="gllr_border_images_color" /> <?php _e('Select a border color', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Number of images in the row', 'gallery-plugin'); ?> </th> <td> <input type="number" name="gllr_custom_image_row_count" min="1" max="10000" value="<?php echo $gllr_options["custom_image_row_count"]; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Start slideshow', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_start_slideshow" value="1" <?php if (1 == $gllr_options["start_slideshow"]) { echo 'checked="checked"'; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Slideshow interval', 'gallery-plugin'); ?> </th> <td> <input type="number" name="gllr_slideshow_interval" min="1" max="1000000" value="<?php echo $gllr_options["slideshow_interval"]; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Use single lightbox for multiple galleries on one page', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_single_lightbox_for_multiple_galleries" value="1" <?php if (1 == $gllr_options["single_lightbox_for_multiple_galleries"]) { echo 'checked="checked"'; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Sort images by', 'gallery-plugin'); ?> </th> <td> <label class="label_radio"><input type="radio" name="gllr_order_by" value="ID" <?php if ('ID' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Attachment ID', 'gallery-plugin'); ?> </label><br /> <label class="label_radio"><input type="radio" name="gllr_order_by" value="title" <?php if ('title' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Image Name', 'gallery-plugin'); ?> </label><br /> <label class="label_radio"><input type="radio" name="gllr_order_by" value="date" <?php if ('date' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Date', 'gallery-plugin'); ?> </label><br /> <label class="label_radio"><input type="radio" name="gllr_order_by" value="meta_value_num" <?php if ('meta_value_num' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Sorting order in the Gallery', 'gallery-plugin'); ?> </label><br /> <label class="label_radio"><input type="radio" name="gllr_order_by" value="rand" <?php if ('rand' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Random', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Sort images', 'gallery-plugin'); ?> </th> <td> <label class="label_radio"><input type="radio" name="gllr_order" value="ASC" <?php if ('ASC' == $gllr_options["order"]) { echo 'checked="checked"'; } ?> /> <?php _e('ASC (ascending order from lowest to highest values - 1, 2, 3; a, b, c)', 'gallery-plugin'); ?> </label><br /> <label class="label_radio"><input type="radio" name="gllr_order" value="DESC" <?php if ('DESC' == $gllr_options["order"]) { echo 'checked="checked"'; } ?> /> <?php _e('DESC (descending order from highest to lowest values - 3, 2, 1; c, b, a)', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Display text under the image', 'gallery-plugin'); ?> </th> <td> <label><input type="checkbox" name="gllr_image_text" value="1" <?php if (1 == $gllr_options["image_text"]) { echo 'checked="checked"'; } ?> /> <?php _e('Turn off the checkbox, if you want to display text just in a lightbox', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Display the Back link', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_return_link" value="1" <?php if (1 == $gllr_options["return_link"]) { echo 'checked="checked"'; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Display the Back link in the shortcode', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_return_link_shortcode" value="1" <?php if (1 == $gllr_options["return_link_shortcode"]) { echo 'checked="checked"'; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The Back link text', 'gallery-plugin'); ?> </th> <td> <input type="text" name="gllr_return_link_text" maxlength="250" value="<?php echo $gllr_options["return_link_text"]; ?> " style="width:200px;" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The Back link URL', 'gallery-plugin'); ?> </th> <td> <label><input type="radio" value="gallery_template_url" name="gllr_return_link_page" <?php if ('gallery_template_url' == $gllr_options["return_link_page"]) { echo 'checked="checked"'; } ?> /><?php _e('Gallery page (Page with Gallery Template)', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" maxlength="250" value="custom_url" name="gllr_return_link_page" id="gllr_return_link_url" <?php if ('custom_url' == $gllr_options["return_link_page"]) { echo 'checked="checked"'; } ?> /> <input type="text" onfocus="document.getElementById('gllr_return_link_url').checked = true;" value="<?php echo $gllr_options["return_link_url"]; ?> " name="gllr_return_link_url" /> <?php _e('(Full URL to custom page)', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The Read More link text', 'gallery-plugin'); ?> </th> <td> <input type="text" name="gllr_read_more_link_text" maxlength="250" value="<?php echo $gllr_options["read_more_link_text"]; ?> " style="width:200px;" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Add gallery to the search', 'gallery-plugin'); ?> </th> <td> <?php if (array_key_exists('custom-search-plugin/custom-search-plugin.php', $all_plugins) || array_key_exists('custom-search-pro/custom-search-pro.php', $all_plugins)) { if (is_plugin_active('custom-search-plugin/custom-search-plugin.php') || is_plugin_active('custom-search-pro/custom-search-pro.php')) { ?> <input type="checkbox" name="gllr_add_to_search" value="1" <?php if (in_array('gallery', $cstmsrch_options['post_types'])) { echo 'checked="checked"'; } ?> /> <span class="bws_info"> (<?php _e('Using', 'gallery-plugin'); ?> Custom Search <?php _e('powered by', 'gallery-plugin'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="gllr_add_to_search" value="1" <?php if (in_array('gallery', $cstmsrch_options['post_types'])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using', 'gallery-plugin'); ?> Custom Search <?php _e('powered by', 'gallery-plugin'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate', 'gallery-plugin'); ?> Custom Search</a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="gllr_add_to_search" value="1" /> <span class="bws_info">(<?php _e('Using', 'gallery-plugin'); ?> Custom Search <?php _e('powered by', 'gallery-plugin'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="http://bestwebsoft.com/products/custom-search/"><?php _e('Download', 'gallery-plugin'); ?> Custom Search</a></span> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Rewrite templates after update', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllr_rewrite_template" value="1" <?php if (1 == $gllr_options['rewrite_template']) { echo 'checked="checked"'; } ?> /> <span class="bws_info"><?php printf(__("Turn off the checkbox, if You edited the file '%s' or '%s' file in your theme folder and You don't want to rewrite them", 'gallery-plugin'), 'gallery-template.php', 'gallery-single-template.php'); ?> </span> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Use pagination for images', 'gallery-plugin'); ?> </th> <td> <input disabled type="checkbox" name="gllrprfssnl_images_pagination" value="1" /><br /> <label><input disabled type="number" name="gllrprfssnl_images_per_page" value="" /> <?php _e('per page', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('The lightbox helper', 'gallery-plugin'); ?> </th> <td> <label><input disabled type="radio" name="gllrprfssnl_fancybox_helper" value="none" /> <?php _e('Do not use', 'gallery-plugin'); ?> </label><br /> <label><input disabled type="radio" name="gllrprfssnl_fancybox_helper" value="button" /> <?php _e('Button helper', 'gallery-plugin'); ?> </label><br /> <label><input disabled type="radio" name="gllrprfssnl_fancybox_helper" value="thumbnail" /> <?php _e('Thumbnail helper', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Display Like buttons in the lightbox', 'gallery-plugin'); ?> </th> <td> <label><input disabled type="checkbox" name="gllrprfssnl_like_button_fb" value="1" /> <?php _e('FaceBook', 'gallery-plugin'); ?> </label><br /> <label><input disabled type="checkbox" name="gllrprfssnl_like_button_twit" value="1" /> <?php _e('Twitter', 'gallery-plugin'); ?> </label><br /> <label><input disabled type="checkbox" name="gllrprfssnl_like_button_pint" value="1" /> <?php _e('Pinterest', 'gallery-plugin'); ?> </label><br /> <label><input disabled type="checkbox" name="gllrprfssnl_like_button_g_plusone" value="1" /> <?php _e('Google +1', 'gallery-plugin'); ?> </label> </td> </tr> <tr valign="top" class="gllr_width_labels"> <th scope="row"><?php _e('Slug for gallery item', 'gallery-plugin'); ?> </th> <td> <input type="text" name="gllrprfssnl_slug" value="gallery" disabled /> <span class="bws_info"><?php _e('for any structure of permalinks except the default structure', 'gallery-plugin'); ?> </span> </td </tr> <tr valign="top"> <th scope="row"><?php _e('Title for lightbox button', 'gallery-plugin'); ?> </th> <td> <input type="text" name="gllrprfssnl_lightbox_button_text" disabled value="" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Display all images in the lightbox instead of going into a single gallery', 'gallery-plugin'); ?> </th> <td> <input type="checkbox" name="gllrpr_hide_single_gallery" value="1" disabled /> <span class="bws_info">(<?php printf(__('When using the gallery template or a shortcode with `%s` parameter', 'gallery-plugin'), 'display=short'); ?> )</span> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings and galleries will be saved.', 'gallery-plugin'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'gallery-plugin'); ?> </div> <div class="bws_pro_links"> <span class="bws_trial_info"> <a href="http://bestwebsoft.com/products/gallery/trial/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=<?php echo $gllr_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Gallery Pro Plugin"><?php _e('Start Your Trial', 'gallery-plugin'); ?> </a> <?php _e('or', 'gallery-plugin'); ?> </span> <a class="bws_button" href="http://bestwebsoft.com/products/gallery/?k=63a36f6bf5de0726ad6a43a165f38fe5&pn=79&v=<?php echo $gllr_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Gallery Pro Plugin"><?php _e('Learn More', 'gallery-plugin'); ?> </a> </div> <div class="gllr_clear"></div> </div> </div> <input type="hidden" name="gllr_form_submit" value="submit" /> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'gallery-plugin'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'gllr_nonce_name'); ?> </form> <?php do_action('bws_show_demo_button'); bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($gllr_plugin_info, $plugin_basename, 'gallery-plugin.php', 'gallery-plugin-pro.php', 'gallery-plugin-pro/gallery-plugin-pro.php', 'gallery', '63a36f6bf5de0726ad6a43a165f38fe5', '79', isset($go_pro_result['pro_plugin_is_activated']), '7'); } bws_plugin_reviews_block($gllr_plugin_info['Name'], 'gallery-plugin'); ?> </div> <?php }
function cstmsrch_settings_page() { global $wpdb, $cstmsrch_options, $cstmsrch_plugin_info, $wp_version, $cstmsrch_options_default; $message = $error = ''; $plugin_basename = plugin_basename(__FILE__); $args = array('_builtin' => false); $cstmsrch_result = get_post_types($args); if (isset($_REQUEST['cstmsrch_submit']) && check_admin_referer($plugin_basename, 'cstmsrch_nonce_name')) { $cstmsrch_options['post_types'] = isset($_REQUEST['cstmsrch_options']) ? $_REQUEST['cstmsrch_options'] : array(); update_option('cstmsrch_options', $cstmsrch_options); $message = __("Settings saved", 'custom-search'); } else { $args = array('_builtin' => false); $cstmsrch_result = get_post_types($args); if (empty($cstmsrch_result)) { $cstmsrch_options['post_types'] = array(); update_option('cstmsrch_options', $cstmsrch_options); } } if (isset($_POST['bws_restore_confirm']) && check_admin_referer(plugin_basename(__FILE__), 'bws_settings_nonce_name')) { $cstmsrch_options = $cstmsrch_options_default; update_option('cstmsrch_options', $cstmsrch_options); $message = __('All plugin settings were restored.', 'custom-search'); } /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e('Custom Search Settings', 'custom-search'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php echo !isset($_GET['action']) ? ' nav-tab-active' : ''; ?> " href="admin.php?page=custom_search.php"><?php _e('Settings', 'custom-search'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/custom-search/faq" target="_blank"><?php _e('FAQ', 'custom-search'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=custom_search.php&action=go_pro"><?php _e('Go PRO', 'custom-search'); ?> </a> </h2> <div class="updated fade" <?php if (!isset($_REQUEST['cstmsrch_submit'])) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if ("" == $error) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <div id="cstmsrch_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e("Notice:", 'custom-search'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'custom-search'); ?> </p></div> <?php if (isset($_POST['bws_restore_default']) && check_admin_referer(plugin_basename(__FILE__), 'bws_settings_nonce_name')) { bws_form_restore_default_confirm(plugin_basename(__FILE__)); } else { if (!(isset($_GET['action']) && 'go_pro' == $_GET['action'])) { if (0 < count($cstmsrch_result)) { ?> <form method="post" action="" style="margin-top: 10px;" id="cstmsrch_settings_form"> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Enable Custom search for:', 'custom-search'); ?> </th> <td> <?php $cstmsrch_new_result = array_values($cstmsrch_result); $cstmsrch_select_all = ''; if (!array_diff($cstmsrch_new_result, $cstmsrch_options['post_types'])) { $cstmsrch_select_all = 'checked="checked"'; } ?> <div id="cstmsrch_div_select_all" style="display:none;"><label ><input id="cstmsrch_select_all" type="checkbox" <?php echo $cstmsrch_select_all; ?> /><span style="text-transform: capitalize; padding-left: 5px;"><strong><?php _e('All', 'custom-search'); ?> </strong></span></label></div> <?php foreach ($cstmsrch_result as $value) { ?> <label><input type="checkbox" <?php echo in_array($value, $cstmsrch_options['post_types']) ? 'checked="checked"' : ""; ?> name="cstmsrch_options[]" value="<?php echo $value; ?> "/><span style="text-transform: capitalize; padding-left: 5px;"><?php echo $value; ?> </span></label><br /> <?php } ?> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th style="width: 190px !important;" scope="row"><?php _e('Enable Custom search for:', 'custom-search'); ?> </th> <td width="350"> <img title="" src="<?php echo plugins_url('images/dragging-arrow.png', __FILE__); ?> " alt="" /> <label><input type="checkbox" checked="checked" name="cstmsrchpr_options[]" value="post" disabled="disabled" /> <span>Post</span></label><br /> <img title="" src="<?php echo plugins_url('images/dragging-arrow.png', __FILE__); ?> " alt="" /> <label><input type="checkbox" checked="checked" name="cstmsrchpr_options[]" value="page" disabled="disabled" /> <span>Page</span></label><br /> <span class="bws_info"><?php _e('When you drag post types, you affect the order of their display in the frontend on the search page.', 'custom-search'); ?> </span> </td> </tr> <tr valign="top"> <th style="width: 190px !important;" scope="row"><?php _e('Search only by type of the current post', 'custom-search'); ?> </th> <td width="350"> <input type="checkbox" value="1" name="by_current_post_type" disabled="disabled" /><br /> <span class="bws_info"><?php _e('This option is used when you search on a single page/post/post type.', 'custom-search'); ?> </span> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to a PRO version.', 'custom-search'); ?> <a href="http://bestwebsoft.com/products/custom-search/?k=f9558d294313c75b964f5f6fa1e5fd3c&pn=214&v=<?php echo $cstmsrch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="custom-search Pro"><?php _e('Learn More', 'custom-search'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/custom-search/buy/?k=f9558d294313c75b964f5f6fa1e5fd3c&pn=214&v=<?php echo $cstmsrch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Custom Search Pro"> <?php _e('Go', 'custom-search'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <p class="submit"> <input type="hidden" name="cstmsrch_submit" value="submit" /> <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'custom-search'); ?> " /> <?php wp_nonce_field($plugin_basename, 'cstmsrch_nonce_name'); ?> </p> </form> <?php } else { ?> <p><?php _e('No custom post type found.', 'custom-search'); ?> </p> <?php } bws_form_restore_default_settings(plugin_basename(__FILE__)); bws_plugin_reviews_block($cstmsrch_plugin_info['Name'], 'custom-search-plugin'); } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($cstmsrch_plugin_info, $plugin_basename, 'custom_search.php', 'custom_search_pro.php', 'custom-search-pro/custom-search-pro.php', 'custom-search', 'f9558d294313c75b964f5f6fa1e5fd3c', '214', isset($go_pro_result['pro_plugin_is_activated'])); } } ?> </div> <?php }
function lmtttmpts_settings_page() { global $lmtttmpts_options, $wpdb, $lmtttmpts_plugin_info, $wp_version, $lmtttmpts_option_defaults; $prefix = $wpdb->prefix . 'lmtttmpts_'; $error = $message = ''; $plugin_basename = plugin_basename(__FILE__); $action_message = array('error' => '', 'done' => ''); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); if (is_multisite()) { $active_plugins = (array) array_keys(get_site_option('active_sitewide_plugins', array())); $active_plugins = array_merge($active_plugins, get_option('active_plugins')); } else { $active_plugins = get_option('active_plugins'); } /* get admins for emails */ $userslogin = get_users('blog_id=' . $GLOBALS['blog_id'] . '&role=administrator'); /* Start updating and verification options from Settings form */ /* If form was submited - whether "Save changes" button was pressed or not - check for inputed values and firstly update var $lmtttmpts_options only */ if (isset($_POST['lmtttmpts_form_submit']) && check_admin_referer($plugin_basename, 'lmtttmpts_nonce_name')) { /*Verification and updating option with allowed retries, after which address will be blocked automatically*/ if (isset($_POST['lmtttmpts_allowed_retries']) && $_POST['lmtttmpts_allowed_retries'] >= 1 && is_numeric($_POST['lmtttmpts_allowed_retries'])) { $lmtttmpts_options['allowed_retries'] = floor($_POST['lmtttmpts_allowed_retries']); } /*Verification and updating option with days of lock*/ if (isset($_POST['lmtttmpts_days_of_lock']) && $_POST['lmtttmpts_days_of_lock'] >= 0 && is_numeric($_POST['lmtttmpts_days_of_lock'])) { $lmtttmpts_options['days_of_lock'] = floor($_POST['lmtttmpts_days_of_lock']); } /*Verification and updating option with hours of lock*/ if (isset($_POST['lmtttmpts_hours_of_lock']) && $_POST['lmtttmpts_hours_of_lock'] >= 0 && $_POST['lmtttmpts_hours_of_lock'] <= 23 && is_numeric($_POST['lmtttmpts_hours_of_lock'])) { $lmtttmpts_options['hours_of_lock'] = floor($_POST['lmtttmpts_hours_of_lock']); } elseif ($_POST['lmtttmpts_hours_of_lock'] > 23) { $lmtttmpts_options['hours_of_lock'] = 23; } /*Verification and updating option with minutes of lock*/ if (isset($_POST['lmtttmpts_minutes_of_lock']) && $_POST['lmtttmpts_minutes_of_lock'] >= 0 && $_POST['lmtttmpts_minutes_of_lock'] <= 59 && is_numeric($_POST['lmtttmpts_minutes_of_lock'])) { $lmtttmpts_options['minutes_of_lock'] = floor($_POST['lmtttmpts_minutes_of_lock']); } elseif ($_POST['lmtttmpts_minutes_of_lock'] > 59) { $lmtttmpts_options['minutes_of_lock'] = 59; } /*Verification and updating option with days to reset failed attempts quantity*/ if (isset($_POST['lmtttmpts_days_to_reset']) && $_POST['lmtttmpts_days_to_reset'] >= 0 && is_numeric($_POST['lmtttmpts_days_to_reset'])) { $lmtttmpts_options['days_to_reset'] = floor($_POST['lmtttmpts_days_to_reset']); } /*Verification and updating option with minutes to reset failed attempts quantity*/ if (isset($_POST['lmtttmpts_hours_to_reset']) && $_POST['lmtttmpts_hours_to_reset'] >= 0 && $_POST['lmtttmpts_hours_to_reset'] <= 23 && is_numeric($_POST['lmtttmpts_hours_to_reset'])) { $lmtttmpts_options['hours_to_reset'] = floor($_POST['lmtttmpts_hours_to_reset']); } elseif ($_POST['lmtttmpts_hours_to_reset'] > 23) { $lmtttmpts_options['hours_to_reset'] = 23; } /*Verification and updating option with minutes to reset failed attempts quantity*/ if (isset($_POST['lmtttmpts_minutes_to_reset']) && $_POST['lmtttmpts_minutes_to_reset'] >= 0 && $_POST['lmtttmpts_minutes_to_reset'] <= 59 && is_numeric($_POST['lmtttmpts_minutes_to_reset'])) { $lmtttmpts_options['minutes_to_reset'] = floor($_POST['lmtttmpts_minutes_to_reset']); } elseif ($_POST['lmtttmpts_minutes_to_reset'] > 59) { $lmtttmpts_options['minutes_to_reset'] = 59; } /*Verification and updating option with allowed locks, after which address will be blacklisted automatically*/ if (isset($_POST['lmtttmpts_allowed_locks']) && $_POST['lmtttmpts_allowed_locks'] >= 1 && is_numeric($_POST['lmtttmpts_allowed_locks'])) { $lmtttmpts_options['allowed_locks'] = floor($_POST['lmtttmpts_allowed_locks']); } /*Verification and updating option with days to reset blocks quantity*/ if (isset($_POST['lmtttmpts_days_to_reset_block']) && $_POST['lmtttmpts_days_to_reset_block'] >= 0 && is_numeric($_POST['lmtttmpts_days_to_reset_block'])) { $lmtttmpts_options['days_to_reset_block'] = floor($_POST['lmtttmpts_days_to_reset_block']); } /*Verification and updating option with hours to reset blocks quantity*/ if (isset($_POST['lmtttmpts_hours_to_reset_block']) && $_POST['lmtttmpts_hours_to_reset_block'] >= 0 && $_POST['lmtttmpts_hours_to_reset_block'] <= 23 && is_numeric($_POST['lmtttmpts_hours_to_reset_block'])) { $lmtttmpts_options['hours_to_reset_block'] = floor($_POST['lmtttmpts_hours_to_reset_block']); } elseif ($_POST['lmtttmpts_hours_to_reset_block'] > 23) { $lmtttmpts_options['hours_to_reset_block'] = 23; } /*Verification and updating option with minutes to reset blocks quantity*/ if (isset($_POST['lmtttmpts_minutes_to_reset_block']) && $_POST['lmtttmpts_minutes_to_reset_block'] >= 0 && $_POST['lmtttmpts_minutes_to_reset_block'] <= 59 && is_numeric($_POST['lmtttmpts_minutes_to_reset_block'])) { $lmtttmpts_options['minutes_to_reset_block'] = floor($_POST['lmtttmpts_minutes_to_reset_block']); } elseif ($_POST['lmtttmpts_minutes_to_reset_block'] > 59) { $lmtttmpts_options['minutes_to_reset_block'] = 59; } /* Veification and updating option with days to clear statistics */ if (isset($_POST['lmtttmpts_days_to_clear_statistics']) && $_POST['lmtttmpts_days_to_clear_statistics'] >= 0 && is_numeric($_POST['lmtttmpts_days_to_clear_statistics'])) { if ($lmtttmpts_options['days_to_clear_statistics'] != floor($_POST['lmtttmpts_days_to_clear_statistics']) && isset($_POST['lmtttmpts_form_submit_button'])) { if ($lmtttmpts_options['days_to_clear_statistics'] == 0) { $time = time() - fmod(time(), 86400) + 86400; wp_schedule_event($time, 'daily', 'lmtttmpts_daily_statistics_clear'); } elseif ($_POST['lmtttmpts_days_to_clear_statistics'] == 0) { wp_clear_scheduled_hook('lmtttmpts_daily_statistics_clear'); } } $lmtttmpts_options['days_to_clear_statistics'] = floor($_POST['lmtttmpts_days_to_clear_statistics']); } /*Updating options with notify by email options*/ $lmtttmpts_options['notify_email'] = isset($_POST['lmtttmpts_notify_email']) ? true : false; if (isset($_POST['lmtttmpts_mailto'])) { $lmtttmpts_options['mailto'] = $_POST['lmtttmpts_mailto']; if ('admin' == $_POST['lmtttmpts_mailto']) { $lmtttmpts_options['email_address'] = $_POST['lmtttmpts_user_email_address']; } elseif ('custom' == $_POST['lmtttmpts_mailto'] && isset($_POST['lmtttmpts_email_address']) && is_email($_POST['lmtttmpts_email_address'])) { $lmtttmpts_options['email_address'] = $_POST['lmtttmpts_email_address']; } } /*Updating options of interaction with Htaccess plugin*/ if (isset($_POST['lmtttmpts_block_by_htaccess'])) { if ((0 < count(preg_grep('/htaccess\\/htaccess.php/', $active_plugins)) || 0 < count(preg_grep('/htaccess-pro\\/htaccess-pro.php/', $active_plugins))) && !isset($lmtttmpts_options['block_by_htaccess'])) { do_action('lmtttmpts_htaccess_hook_for_copy_all'); } $lmtttmpts_options['block_by_htaccess'] = $_POST['lmtttmpts_block_by_htaccess']; } else { if ((0 < count(preg_grep('/htaccess\\/htaccess.php/', $active_plugins)) || 0 < count(preg_grep('/htaccess-pro\\/htaccess-pro.php/', $active_plugins))) && isset($lmtttmpts_options['block_by_htaccess'])) { do_action('lmtttmpts_htaccess_hook_for_delete_all'); } unset($lmtttmpts_options['block_by_htaccess']); } /*Updating options of interaction with Captcha plugin in login form*/ if (isset($_POST['lmtttmpts_login_form_captcha_check'])) { $lmtttmpts_options['login_form_captcha_check'] = $_POST['lmtttmpts_login_form_captcha_check']; } else { unset($lmtttmpts_options['login_form_captcha_check']); } /* array for saving and restoring default messages */ $lmtttmpts_messages = array('failed_message', 'blocked_message', 'blacklisted_message', 'email_subject', 'email_subject_blacklisted', 'email_blocked', 'email_blacklisted'); /* Update messages when login failed, address blocked or blacklisted, email subject and text when address blocked or blacklisted */ foreach ($lmtttmpts_messages as $lmtttmpts_single_message) { if (isset($_POST['lmtttmpts_' . $lmtttmpts_single_message])) { $lmtttmpts_options[$lmtttmpts_single_message] = stripslashes($_POST['lmtttmpts_' . $lmtttmpts_single_message]); } } /* Restore default messages */ if (isset($_POST['lmtttmpts_return_default']) && in_array($_POST['lmtttmpts_return_default'], $lmtttmpts_messages)) { $lmtttmpts_messages_defaults = lmtttmpts_get_default_messages(); $lmtttmpts_options[$_POST['lmtttmpts_return_default']] = $lmtttmpts_messages_defaults[$_POST['lmtttmpts_return_default'] . '_default']; } /* save show/hide status of message-textarea blocks on setting page */ if (isset($_POST['lmtttmpts_options_for_block_message'])) { $lmtttmpts_options['options_for_block_message'] = $_POST['lmtttmpts_options_for_block_message']; } if (isset($_POST['lmtttmpts_options_for_email_message'])) { $lmtttmpts_options['options_for_email_message'] = $_POST['lmtttmpts_options_for_email_message']; } /*Verification and updating option with time of block if they are zero total*/ if ($lmtttmpts_options['days_of_lock'] == 0 && $lmtttmpts_options['hours_of_lock'] == 0 && $lmtttmpts_options['minutes_of_lock'] == 0) { $lmtttmpts_options['minutes_of_lock'] = 1; } /*Verification and updating option with time of reset failed attempts quantity if they are zero total*/ if ($lmtttmpts_options['days_to_reset'] == 0 && $lmtttmpts_options['hours_to_reset'] == 0 && $lmtttmpts_options['minutes_to_reset'] == 0) { $lmtttmpts_options['minutes_to_reset'] = 1; } /*Verification and updating option with time of reset blocks quantity if they are zero total*/ if ($lmtttmpts_options['days_to_reset_block'] == 0 && $lmtttmpts_options['hours_to_reset_block'] == 0 && $lmtttmpts_options['minutes_to_reset_block'] == 0) { $lmtttmpts_options['minutes_to_reset_block'] = 1; } /* Updating options in wp_options table if button "Save changes" is pressed */ if (isset($_POST['lmtttmpts_form_submit_button'])) { update_option('lmtttmpts_options', $lmtttmpts_options); } /* Finish updating and verification options from Settings form */ } /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } /* allowed symbol to enter in black- and whitelist */ if (isset($_GET['action']) && in_array($_GET['action'], array('blacklist', 'whitelist'))) { $allowed_symbols = '<span class="lmtttmpts_little lmtttmpts_grey">' . __("Allowed formats:", 'lmtttmpts') . ' <code>192.168.0.1</code></span> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr> <td valign="top">' . __('Reason', 'lmtttmpts') . ' <input/><br /><span class="lmtttmpts_little lmtttmpts_grey">' . __("Allowed formats:", 'lmtttmpts') . ' <code>192.168.0.1</code>, <code>192.168.0.</code>, <code>192.168.</code>, <code>192.</code>, <code>192.168.0.1/8</code>, <code>192.168.0.1-192.168.2.255</code><br />' . __("Allowed separators:", 'lmtttmpts') . ' ' . __('a comma', 'lmtttmpts') . ' (<code>,</code>), ' . __('semicolon', 'lmtttmpts') . ' (<code>;</code>), ' . __('ordinary space, tab, new line or carriage return', 'lmtttmpts') . '</span></td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info">' . __('Unlock premium options by upgrading to a PRO version.', 'lmtttmpts') . ' <a href="http://bestwebsoft.com/products/limit-attempts/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=' . $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="Limit Attempts Pro">' . __("Learn More", 'lmtttmpts') . '</a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/limit-attempts/buy/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=' . $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank" title="Limit Attempts Pro">' . __('Go', 'lmtttmpts') . ' <strong>PRO</strong> </a> <div class="clear"></div> </div> </div>'; } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $lmtttmpts_options = $lmtttmpts_option_defaults; update_option('lmtttmpts_options', $lmtttmpts_options); $action_message['done'] .= __('All plugin settings were restored.', 'lmtttmpts'); } ?> <div class="wrap"> <h2><?php _e('Limit Attempts Settings', 'lmtttmpts'); ?> </h2> <div id="lmtttmpts_settings_notice" class="updated fade" style="display:none"> <p><strong><?php _e("Notice:", 'lmtttmpts'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'lmtttmpts'); ?> </p> </div> <?php /* action message when working with blocked/black/white lists or statistics */ if (isset($_GET['action']) && 'log' != $_GET['action']) { $action_message = lmtttmpts_list_actions(); } if (!empty($error)) { $action_message['error'] = $error; } ?> <div class="error" <?php if (empty($action_message['error'])) { echo 'style="display:none"'; } ?> ><p><strong><?php if (!empty($action_message['error'])) { echo $action_message['error']; } ?> </strong></div> <div class="updated" <?php if (empty($action_message['done'])) { echo 'style="display: none;"'; } ?> ><p><?php if (!empty($action_message['done'])) { echo $action_message['done']; } ?> </p></div> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php"><?php _e('Settings', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'blocked' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=blocked"><?php _e('Blocked IP', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'blacklist' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=blacklist"><?php _e('Blacklist', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'whitelist' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=whitelist"><?php _e('Whitelist', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'log' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=log"><?php _e('Log', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'statistics' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=statistics"><?php _e('Statistics', 'lmtttmpts'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/limit-attempts/faq/" target="_blank"><?php _e('FAQ', 'lmtttmpts'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&action=go_pro"><?php _e('Go PRO', 'lmtttmpts'); ?> </a> </h2> <?php if (!isset($_GET['action'])) { /* Showing settings tab */ if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { /* display hidden error/email messages blocks - for disabled JS primarily */ $hide_login_message_block = isset($_GET['login_error_tab']) || isset($_POST['lmtttmpts_options_for_block_message']) && 'show' == $_POST['lmtttmpts_options_for_block_message'] ? false : true; $hide_email_message_block = isset($_GET['email_error_tab']) || isset($_POST['lmtttmpts_options_for_email_message']) && 'show' == $_POST['lmtttmpts_options_for_email_message'] ? false : true; ?> <div id="lmtttmpts_settings"> <form method="post" action="admin.php?page=limit-attempts.php"> <table id="lmtttmpts_lock_options" class="form-table lmtttmpts_options_table"> <tr> <th><?php _e('Block address', 'lmtttmpts'); ?> </th> <td class="lmtttmpts-lock-options"> <p> <?php _e('for', 'lmtttmpts'); ?> <span id="lmtttmpts-time-of-lock-display" class="lmtttmpts_hidden lmtttmpts-display"> <span <?php if (0 == $lmtttmpts_options['days_of_lock']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['days_of_lock']; ?> </span> <?php echo _n('day', 'days', $lmtttmpts_options['days_of_lock'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['hours_of_lock']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['hours_of_lock']; ?> </span> <?php echo _n('hour', 'hours', $lmtttmpts_options['hours_of_lock'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['minutes_of_lock']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['minutes_of_lock']; ?> </span> <?php echo _n('minute', 'minutes', $lmtttmpts_options['minutes_of_lock'], 'lmtttmpts'); ?> </span> <span id="lmtttmpts-time-of-lock-edit" class="lmtttmpts-edit"><?php _e('Edit', 'lmtttmpts'); ?> </span> </span> <span id="lmtttmpts-time-of-lock" class="lmtttmpts-hidden-input"> <input id="lmtttmpts-days-of-lock-display" type="number" max="999" min="0" step="1" maxlength="3" value="<?php echo $lmtttmpts_options['days_of_lock']; ?> " name="lmtttmpts_days_of_lock" /> <?php _e('days', 'lmtttmpts'); ?> <input id="lmtttmpts-hours-of-lock-display" type="number" max="23" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['hours_of_lock']; ?> " name="lmtttmpts_hours_of_lock" /> <?php _e('hours', 'lmtttmpts'); ?> <input id="lmtttmpts-minutes-of-lock-display" type="number" max="59" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['minutes_of_lock']; ?> " name="lmtttmpts_minutes_of_lock" /> <?php _e('minutes', 'lmtttmpts'); ?> </span> </p> <p> <?php _e('after', 'lmtttmpts'); ?> <span id="lmtttmpts-allowed-retries-display" class="lmtttmpts_hidden lmtttmpts-display"> <span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['allowed_retries']; ?> </span> <?php echo _n('failed attempt', 'failed attempts', $lmtttmpts_options['allowed_retries'], 'lmtttmpts'); ?> <span id="lmtttmpts-allowed-retries-edit" class="lmtttmpts-edit"><?php _e('Edit', 'lmtttmpts'); ?> </span> </span> <span id="lmtttmpts-allowed-retries" class="lmtttmpts-hidden-input"> <input id="lmtttmpts-allowed-retries-number-display" type="number" min="1" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['allowed_retries']; ?> " name="lmtttmpts_allowed_retries" /> <?php _e('failed attempts', 'lmtttmpts'); ?> </span> </p> <p> <?php _e('per', 'lmtttmpts'); ?> <span id="lmtttmpts-time-to-reset-display" class="lmtttmpts_hidden lmtttmpts-display"> <span <?php if (0 == $lmtttmpts_options['days_to_reset']) { echo 'class="lmtttmpts-zero-value"'; } ?> > <span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['days_to_reset']; ?> </span> <?php echo _n('day', 'days', $lmtttmpts_options['days_to_reset'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['hours_to_reset']) { echo 'class="lmtttmpts-zero-value"'; } ?> > <span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['hours_to_reset']; ?> </span> <?php echo _n('hour', 'hours', $lmtttmpts_options['hours_to_reset'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['minutes_to_reset']) { echo 'class="lmtttmpts-zero-value"'; } ?> > <span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['minutes_to_reset']; ?> </span> <?php echo _n('minute', 'minutes', $lmtttmpts_options['minutes_to_reset'], 'lmtttmpts'); ?> </span> <span id="lmtttmpts-time-to-reset-edit" class="lmtttmpts-edit"><?php _e('Edit', 'lmtttmpts'); ?> </span> </span> <span id="lmtttmpts-time-to-reset" class="lmtttmpts-hidden-input"> <input id="lmtttmpts-days-to-reset-display" type="number" max="999" min="0" step="1" maxlength="3" value="<?php echo $lmtttmpts_options['days_to_reset']; ?> " name="lmtttmpts_days_to_reset" /> <?php _e('days', 'lmtttmpts'); ?> <input id="lmtttmpts-hours-to-reset-display" type="number" max="23" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['hours_to_reset']; ?> " name="lmtttmpts_hours_to_reset" /> <?php _e('hours', 'lmtttmpts'); ?> <input id="lmtttmpts-minutes-to-reset-display" type="number" max="59" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['minutes_to_reset']; ?> " name="lmtttmpts_minutes_to_reset" /> <?php _e('minutes', 'lmtttmpts'); ?> </span> </p> </td> </tr> <tr> <th><?php _e('Add to the blacklist', 'lmtttmpts'); ?> </th> <td> <p> <?php _e('after', 'lmtttmpts'); ?> <span id="lmtttmpts-allowed-locks-display" class="lmtttmpts_hidden lmtttmpts-display"> <span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['allowed_locks']; ?> </span> <?php echo _n('block', 'blocks', $lmtttmpts_options['allowed_locks'], 'lmtttmpts'); ?> <span id="lmtttmpts-allowed-locks-edit" class="lmtttmpts-edit"><?php _e('Edit', 'lmtttmpts'); ?> </span> </span> <span id="lmtttmpts-allowed-locks" class="lmtttmpts-hidden-input"> <input id="lmtttmpts-allowed-locks-number-display" type="number" min="1" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['allowed_locks']; ?> " name="lmtttmpts_allowed_locks" /> <?php _e('blocks', 'lmtttmpts'); ?> </span> </p> <p> <?php _e('per', 'lmtttmpts'); ?> <span id="lmtttmpts-time-to-reset-block-display" class="lmtttmpts_hidden lmtttmpts-display"> <span <?php if (0 == $lmtttmpts_options['days_to_reset_block']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['days_to_reset_block']; ?> </span> <?php echo _n('day', 'days', $lmtttmpts_options['days_to_reset_block'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['hours_to_reset_block']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['hours_to_reset_block']; ?> </span> <?php echo _n('hour', 'hours', $lmtttmpts_options['hours_to_reset_block'], 'lmtttmpts'); ?> </span> <span <?php if (0 == $lmtttmpts_options['minutes_to_reset_block']) { echo 'class="lmtttmpts-zero-value"'; } ?> ><span class="lmtttmpts-unit-measure" ><?php echo $lmtttmpts_options['minutes_to_reset_block']; ?> </span> <?php echo _n('minute', 'minutes', $lmtttmpts_options['minutes_to_reset_block'], 'lmtttmpts'); ?> </span> <span id="lmtttmpts-time-to-reset-block-edit" class="lmtttmpts-edit"><?php _e('Edit', 'lmtttmpts'); ?> </span> </span> <span id="lmtttmpts-time-to-reset-block" class="lmtttmpts-hidden-input"> <input id="lmtttmpts-days-to-reset-block-display" type="number" max="999" min="0" step="1" maxlength="3" value="<?php echo $lmtttmpts_options['days_to_reset_block']; ?> " name="lmtttmpts_days_to_reset_block" /> <?php _e('days', 'lmtttmpts'); ?> <input id="lmtttmpts-hours-to-reset-block-display" type="number" max="23" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['hours_to_reset_block']; ?> " name="lmtttmpts_hours_to_reset_block" /> <?php _e('hours', 'lmtttmpts'); ?> <input id="lmtttmpts-minutes-to-reset-block-display" type="number" max="59" min="0" step="1" maxlength="2" value="<?php echo $lmtttmpts_options['minutes_to_reset_block']; ?> " name="lmtttmpts_minutes_to_reset_block" /> <?php _e('minutes', 'lmtttmpts'); ?> </span> </p> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version lmtttmpts_options_table_demo"> <tr> <th><?php _e('If user tried to log in with a non-existent username', 'lmtttmpts'); ?> </th> <td> <input type="radio" disabled="disabled" /><label><?php _e('according to "Block address" and "Add to the blacklist" options', 'lmtttmpts'); ?> </label><br> <input type="radio" disabled="disabled" /><label><?php _e('block address immediately', 'lmtttmpts'); ?> </label><br> <input type="radio" disabled="disabled" /><label><?php _e('add to the blacklist immediately', 'lmtttmpts'); ?> </label><br> </td> </tr> <tr> <th><?php _e('Remove log entries that are over', 'lmtttmpts'); ?> </th> <td style="min-width: 210px;"> <input disabled="disabled" type="number" min="0" step="1" maxlength="3" value="30"/> <?php _e('days', 'lmtttmpts'); ?> <br/> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('Set "0" if you do not want to clear the log.', 'lmtttmpts'); ?> <br /> <?php echo __('Current size of DB table', 'lmtttmpts') . '≈ <strong>' . '1.234' . '</strong> ' . __('Mb', 'lmtttmpts'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row" colspan="3"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'lmtttmpts'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to a PRO version.', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/limit-attempts/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"><?php _e("Learn More", 'lmtttmpts'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/limit-attempts/buy/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"> <?php _e('Go', 'lmtttmpts'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <table class="form-table lmtttmpts_options_table"> <tr> <th><?php _e('Remove statistics entry in case no failed attempts occurred for', 'lmtttmpts'); ?> </th> <td> <input type="number" min="0" step="1" maxlength="3" value="<?php echo $lmtttmpts_options['days_to_clear_statistics']; ?> " name="lmtttmpts_days_to_clear_statistics" /> <?php _e('days', 'lmtttmpts'); ?> <br/> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('Set "0" if you do not want to clear the statistics.', 'lmtttmpts'); ?> </span> </td> </tr> <th><?php _e('Error messages', 'lmtttmpts'); ?> </th> <td> <button id="lmtttmpts_hide_options_for_block_message_button" class="button-secondary" <?php if ($hide_login_message_block) { echo 'style="display: none;"'; } ?> name="lmtttmpts_options_for_block_message" value="hide"><?php _e('Hide', 'lmtttmpts'); ?> </button> <button id="lmtttmpts_show_options_for_block_message_button" class="button-secondary" <?php if (!$hide_login_message_block) { echo 'style="display: none;"'; } ?> name="lmtttmpts_options_for_block_message" value="show"><?php _e('Show', 'lmtttmpts'); ?> </button> </td> </table> <h3 id="lmtttmpts_nav_tab_message_no_js" class="nav-tab-wrapper lmtttmpts_block_message_block <?php if ($hide_login_message_block) { echo "lmtttmpts_hidden"; } ?> "> <a class="nav-tab<?php if (!isset($_GET['login_error_tab']) || 'failed' == $_GET['login_error_tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&login_error_tab=failed"><?php _e('For invalid attempt', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['login_error_tab']) && 'blocked' == $_GET['login_error_tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&login_error_tab=blocked"><?php _e('For blocked user', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['login_error_tab']) && 'blacklisted' == $_GET['login_error_tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&login_error_tab=blacklisted"><?php _e('For blacklisted user', 'lmtttmpts'); ?> </a> </h3> <h3 id="lmtttmpts_nav_tab_message_js" style="display:none" class="nav-tab-wrapper lmtttmpts_block_message_block <?php if (isset($lmtttmpts_options['options_for_block_message']) && 'hide' == $lmtttmpts_options['options_for_block_message']) { echo "lmtttmpts_hidden"; } ?> "> <p id="lmtttmpts_message_invalid_attempt" style="cursor:pointer" class="nav-tab<?php if (!isset($_GET['login_error_tab'])) { echo ' nav-tab-active'; } ?> " ><?php _e('For invalid attempt', 'lmtttmpts'); ?> </p> <p id="lmtttmpts_message_blocked" style="cursor:pointer" class="nav-tab<?php if (isset($_GET['login_error_tab']) && 'blocked' == $_GET['login_error_tab']) { echo ' nav-tab-active'; } ?> " ><?php _e('For blocked user', 'lmtttmpts'); ?> </p> <p id="lmtttmpts_message_blacklisted" style="cursor:pointer" class="nav-tab<?php if (isset($_GET['login_error_tab']) && 'blacklisted' == $_GET['login_error_tab']) { echo ' nav-tab-active'; } ?> " ><?php _e('For blacklisted user', 'lmtttmpts'); ?> </p> </h3> <table class="form-table lmtttmpts_block_message_block <?php if ($hide_login_message_block) { echo "lmtttmpts_hidden"; } ?> "> <tr id="lmtttmpts_message_invalid_attempt_area" <?php if (isset($_GET['login_error_tab']) && 'failed' != $_GET['login_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%ATTEMPTS%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display quantity of allowed attempts', 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="failed_message"><?php _e('Restore default message', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="5" cols="100" name="lmtttmpts_failed_message"><?php echo $lmtttmpts_options['failed_message']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> <tr id="lmtttmpts_message_blocked_area" <?php if (!isset($_GET['login_error_tab']) || isset($_GET['login_error_tab']) && 'blocked' != $_GET['login_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%DATE%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display date when block is removed', 'lmtttmpts'); ?> )</span></li> <li>'%MAIL%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display administrator’s e-mail for feedback', 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="blocked_message"><?php _e('Restore default message', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="5" cols="100" name="lmtttmpts_blocked_message"><?php echo $lmtttmpts_options['blocked_message']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> <tr id="lmtttmpts_message_blacklisted_area" <?php if (!isset($_GET['login_error_tab']) || isset($_GET['login_error_tab']) && 'blacklisted' != $_GET['login_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%MAIL%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display administrators e-mail for feedback', 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="blacklisted_message"><?php _e('Restore default message', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="5" cols="100" name="lmtttmpts_blacklisted_message"><?php echo $lmtttmpts_options['blacklisted_message']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> </table> <table id="lmtttmpts_notify_options" class="form-table"> <tr> <th><?php _e('Send email with notification', 'lmtttmpts'); ?> </th> <td style="width:15px" class="lmtttmpts_align_top"> <input id="lmtttmpts_notify_email_options" type="checkbox" name="lmtttmpts_notify_email" value="1" <?php if ($lmtttmpts_options['notify_email']) { echo 'checked="checked" '; } ?> /><br /> </td> <td class="lmtttmpts_align_top lmtttmpts_notify_email_block <?php if (isset($lmtttmpts_options['notify_email']) && false === $lmtttmpts_options['notify_email']) { echo "lmtttmpts_hidden"; } ?> " style="max-width:150px;"> <input type="radio" id="lmtttmpts_user_mailto" name="lmtttmpts_mailto" value="admin" <?php if (isset($lmtttmpts_options['mailto']) && $lmtttmpts_options['mailto'] == 'admin') { echo 'checked="checked" '; } ?> /><label for="lmtttmpts_user_mailto"><?php _e("Email to user's address", 'lmtttmpts'); ?> </label> <select name="lmtttmpts_user_email_address" onfocus="document.getElementById('lmtttmpts_user_mailto').checked = true;"> <option disabled><?php _e("Choose a username", 'lmtttmpts'); ?> </option> <?php foreach ($userslogin as $key => $value) { if ($value->data->user_email != '') { ?> <option value="<?php echo $value->data->user_email; ?> " <?php if ($value->data->user_email == $lmtttmpts_options['email_address']) { echo 'selected="selected" '; } ?> ><?php echo $value->data->user_login; ?> </option> <?php } } ?> </select></br> <input type="radio" id="lmtttmpts_custom_mailto" name="lmtttmpts_mailto" value="custom" <?php if (isset($lmtttmpts_options['mailto']) && $lmtttmpts_options['mailto'] == 'custom') { echo 'checked="checked" '; } ?> /><label for="lmtttmpts_custom_mailto"><?php _e('Email to another address', 'lmtttmpts'); ?> </label> <input type="email" maxlength="100" name="lmtttmpts_email_address" value="<?php if ($lmtttmpts_options['mailto'] == 'custom') { echo $lmtttmpts_options['email_address']; } ?> " onfocus="document.getElementById('lmtttmpts_custom_mailto').checked = true;"/> </td> </tr> <tr> <th><?php _e('Additional options for email with notification', 'lmtttmpts'); ?> </th> <td> <button id="lmtttmpts_hide_options_for_email_message_button" class="button-secondary" <?php if ($hide_email_message_block) { echo 'style="display: none;"'; } ?> name="lmtttmpts_options_for_email_message" value="hide"><?php _e('Hide', 'lmtttmpts'); ?> </button> <button id="lmtttmpts_show_options_for_email_message_button" class="button-secondary" <?php if (!$hide_email_message_block) { echo 'style="display: none;"'; } ?> name="lmtttmpts_options_for_email_message" value="show"><?php _e('Show', 'lmtttmpts'); ?> </button> </td> <td></td> </tr> </table> <h3 id="lmtttmpts_nav_tab_email_no_js_a" class="nav-tab-wrapper lmtttmpts_email_message_block <?php if ($hide_email_message_block) { echo "lmtttmpts_hidden"; } ?> "> <a class="nav-tab<?php if (!isset($_GET['email_error_tab']) || 'blocked' == $_GET['email_error_tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&email_error_tab=blocked"><?php _e('Email to admistrator when user is blocked', 'lmtttmpts'); ?> </a> <a class="nav-tab<?php if (isset($_GET['email_error_tab']) && 'blacklisted' == $_GET['email_error_tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=limit-attempts.php&email_error_tab=blacklisted"><?php _e('Email to admistrator when user is blacklisted', 'lmtttmpts'); ?> </a> </h3> <h3 id="lmtttmpts_nav_tab_email_js_a" style="display:none" class="nav-tab-wrapper lmtttmpts_email_message_block <?php if (isset($lmtttmpts_options['options_for_email_message']) && 'hide' == $lmtttmpts_options['options_for_email_message']) { echo "lmtttmpts_hidden"; } ?> "> <p id="lmtttmpts_email_blocked" class="nav-tab<?php if (!isset($_GET['email_error_tab'])) { echo ' nav-tab-active'; } ?> " ><?php _e('Email to admistrator when user is blocked', 'lmtttmpts'); ?> </p> <p id="lmtttmpts_email_blacklisted" class="nav-tab<?php if (isset($_GET['email_error_tab']) && 'blacklisted' == $_GET['email_error_tab']) { echo ' nav-tab-active'; } ?> " ><?php _e('Email to admistrator when user is blacklisted', 'lmtttmpts'); ?> </p> </h3> <table class="form-table lmtttmpts_email_message_block <?php if ($hide_email_message_block) { echo "lmtttmpts_hidden"; } ?> "> <tr> <th><?php _e('Subject', 'lmtttmpts'); ?> </th> </tr> <tr id="lmtttmpts_email_subject_area" <?php if (isset($_GET['email_error_tab']) && 'blocked' != $_GET['email_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%IP%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display blocked IP address', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_NAME%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display name of your site', 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="email_subject"><?php _e('Restore default subject', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="1" cols="100" name="lmtttmpts_email_subject"><?php echo $lmtttmpts_options['email_subject']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> <tr id="lmtttmpts_email_subject_blacklisted_area" <?php if (!isset($_GET['email_error_tab']) || isset($_GET['email_error_tab']) && 'blacklisted' != $_GET['email_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%IP%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display blacklisted IP address', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_NAME%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display name of your site', 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="email_subject_blacklisted"><?php _e('Restore default subject', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="1" cols="100" name="lmtttmpts_email_subject_blacklisted"><?php echo $lmtttmpts_options['email_subject_blacklisted']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> <tr> <th><?php _e('Message', 'lmtttmpts'); ?> </th> </tr> <tr id="lmtttmpts_email_blocked_area" <?php if (isset($_GET['email_error_tab']) && 'blocked' != $_GET['email_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%IP%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display IP address that is blocked', 'lmtttmpts'); ?> )</span></li> <li>'%PLUGIN_LINK%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display link for Limit Attempts plugin on your site', 'lmtttmpts'); ?> )</span></li> <li>'%WHEN%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display date and time when IP address was blocked', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_NAME%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display name of your site', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_URL%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e("display your site's URL", 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="email_blocked"><?php _e('Restore default message', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="5" cols="100" name="lmtttmpts_email_blocked"><?php echo $lmtttmpts_options['email_blocked']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> <tr id="lmtttmpts_email_blacklisted_area" <?php if (!isset($_GET['email_error_tab']) || isset($_GET['email_error_tab']) && 'blacklisted' != $_GET['email_error_tab']) { echo 'class="lmtttmpts_hidden"'; } ?> > <td> <p><?php _e('Allowed Variables:', 'lmtttmpts'); ?> </p> <ul> <li>'%IP%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display IP address that is added to the blacklist', 'lmtttmpts'); ?> )</span></li> <li>'%PLUGIN_LINK%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display link for Limit Attempts plugin on your site', 'lmtttmpts'); ?> )</span></li> <li>'%WHEN%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display date and time when IP address was blacklisted', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_NAME%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e('display name of your site', 'lmtttmpts'); ?> )</span></li> <li>'%SITE_URL%' <span class="lmtttmpts_little lmtttmpts_grey">(<?php _e("display your site's URL", 'lmtttmpts'); ?> )</span></li> </ul> <button class="button-secondary" name="lmtttmpts_return_default" value="email_blacklisted"><?php _e('Restore default message', 'lmtttmpts'); ?> </button> </td> <td> <textarea rows="5" cols="100" name="lmtttmpts_email_blacklisted"><?php echo $lmtttmpts_options['email_blacklisted']; ?> </textarea><br /> <span class="lmtttmpts_little lmtttmpts_grey"><?php _e('You can use standart HTML tags and attributes.', 'lmtttmpts'); ?> </span> </td> </tr> </table> <table id="lmtttmpts_interaction_settings" class="form-table"> <tr> <th><?php _e("Htaccess plugin", 'lmtttmpts'); ?> </th> <td> <?php if (array_key_exists('htaccess/htaccess.php', $all_plugins) || array_key_exists('htaccess-pro/htaccess-pro.php', $all_plugins)) { $htaccess_free_active = 0 < count(preg_grep('/htaccess\\/htaccess.php/', $active_plugins)) ? true : false; $htaccess_pro_active = 0 < count(preg_grep('/htaccess-pro\\/htaccess-pro.php/', $active_plugins)) ? true : false; if ($htaccess_free_active || $htaccess_pro_active) { if ($htaccess_pro_active && !$htaccess_free_active) { ?> <input type="checkbox" name="lmtttmpts_block_by_htaccess" value="1" <?php if (isset($lmtttmpts_options["block_by_htaccess"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info"> (<?php _e('Using', 'lmtttmpts'); ?> <a href="admin.php?page=htaccess-pro.php">Htaccess Pro</a> <?php _e('powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } elseif ($htaccess_free_active && isset($all_plugins['htaccess/htaccess.php']['Version']) && $all_plugins['htaccess/htaccess.php']['Version'] >= '1.6.2') { ?> <input type="checkbox" name="lmtttmpts_block_by_htaccess" value="1" <?php if (isset($lmtttmpts_options["block_by_htaccess"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info"> (<?php _e('Using', 'lmtttmpts'); ?> <a href="admin.php?page=htaccess.php">Htaccess</a> <?php _e('powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_block_by_htaccess" value="1" <?php if (isset($lmtttmpts_options["block_by_htaccess"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using Htaccess powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Update Htaccess at least to v.1.6.2', 'lmtttmpts'); ?> </a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_block_by_htaccess" value="1" <?php if (isset($lmtttmpts_options["block_by_htaccess"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using Htaccess powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate Htaccess', 'lmtttmpts'); ?> </a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_block_by_htaccess" value="1" /> <span class="bws_info">(<?php _e('Using Htaccess powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="http://bestwebsoft.com/products/htaccess/"><?php _e('Download Htaccess', 'lmtttmpts'); ?> </a></span> <?php } ?> <br /><span class="lmtttmpts_little lmtttmpts_grey"><?php _e('Allow Htaccess plugin block IP to reduce the database workload.', 'lmtttmpts'); ?> </span> </td> </tr> <tr> <th><?php _e('Captcha plugin', 'lmtttmpts'); ?> </th> <td> <?php if (array_key_exists('captcha/captcha.php', $all_plugins) || array_key_exists('captcha-plus/captcha-plus.php', $all_plugins) || array_key_exists('captcha-pro/captcha_pro.php', $all_plugins)) { /* if captcha is installed */ if (0 < count(preg_grep('/captcha\\/captcha.php/', $active_plugins)) || 0 < count(preg_grep('/captcha-pro\\/captcha_pro.php/', $active_plugins)) || 0 < count(preg_grep('/captcha-plus\\/captcha-plus.php/', $active_plugins))) { /* if captcha plugin is active */ if (0 < count(preg_grep('/captcha-pro\\/captcha_pro.php/', $active_plugins))) { /* if Captcha PRO is active */ if (isset($all_plugins['captcha-pro/captcha_pro.php']['Version']) && $all_plugins['captcha-pro/captcha_pro.php']['Version'] >= '1.4.4') { ?> <!-- Checkbox for Login form captcha checking --> <label> <input type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options['login_form_captcha_check'])) { echo 'checked="checked"'; } ?> /> <span><?php _e('Login form', 'lmtttmpts'); ?> </span> </label> <span class="bws_info"> (<?php _e('Using', 'lmtttmpts'); ?> <a href="admin.php?page=captcha_pro.php">Captcha Pro</a> <?php _e('powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options["login_form_captcha_check"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using Captcha Pro powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Update Captcha Pro at least to v.1.4.4', 'lmtttmpts'); ?> </a></span> <?php } } elseif (0 < count(preg_grep('/captcha-plus\\/captcha-plus.php/', $active_plugins))) { /* if Captcha Plus is active */ ?> <label> <input type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options['login_form_captcha_check'])) { echo 'checked="checked"'; } ?> /> <span><?php _e('Login form', 'lmtttmpts'); ?> </span> </label> <span class="bws_info"> (<?php _e('Using', 'lmtttmpts'); ?> <a href="admin.php?page=captcha-plus.php">Captcha Plus</a> <?php _e('powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { /* Captcha free is active */ if (isset($all_plugins['captcha/captcha.php']['Version']) && $all_plugins['captcha/captcha.php']['Version'] >= '4.0.2') { ?> <label> <input type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options['login_form_captcha_check'])) { echo 'checked="checked"'; } ?> /> <span><?php _e('Login form', 'lmtttmpts'); ?> </span> </label> <span class="bws_info"> (<?php _e('Using', 'lmtttmpts'); ?> <a href="admin.php?page=captcha.php">Captcha</a> <?php _e('powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options["login_form_captcha_check"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using Captcha powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Update Captcha at least to v.4.0.2', 'lmtttmpts'); ?> </a></span> <?php } } } else { /* if no plugin is active */ if (array_key_exists('captcha-pro/captcha_pro.php', $all_plugins)) { $using_plugin_name = 'Captcha Pro'; } elseif (array_key_exists('captcha-plus/captcha-plus.php', $all_plugins)) { $using_plugin_name = 'Captcha Plus'; } else { $using_plugin_name = 'Captcha'; } ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" <?php if (isset($lmtttmpts_options["login_form_captcha_check"])) { echo 'checked="checked"'; } ?> /><span class="bws_info"> (<?php printf(__('Using %s powered by', 'lmtttmpts'), $using_plugin_name); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php printf(__('Activate %s', 'lmtttmpts'), $using_plugin_name); ?> </a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="lmtttmpts_login_form_captcha_check" value="1" /> <span class="bws_info">(<?php _e('Using Captcha powered by', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="http://bestwebsoft.com/products/captcha/"><?php _e('Download Captcha', 'lmtttmpts'); ?> </a></span> <?php } ?> <br /><span class="lmtttmpts_little lmtttmpts_grey"><?php _e('Consider the incorrect captcha input as an invalid attempt.', 'lmtttmpts'); ?> </span> <?php $captcha_span = '<span class="bws_info"> (' . __('Using', 'lmtttmpts') . ' <a href="">Captcha Pro</a> ' . __('powered by', 'lmtttmpts') . ' <a href="">bestwebsoft.com</a>)</span>'; ?> <div class="bws_pro_version_bloc" style="max-width: 590px;"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version lmtttmpts_options_table_demo"> <tr> <td style="min-width: 430px;"> <label><input disabled="disabled" type="checkbox" checked="checked"/><span> <?php _e('Registration form', 'lmtttmpts'); ?> </span></label><?php echo $captcha_span; ?> <br /> <label><input disabled="disabled" type="checkbox"/><span> <?php _e('Reset Password form', 'lmtttmpts'); ?> </span></label><?php echo $captcha_span; ?> <br /> <label><input disabled="disabled" type="checkbox"/><span> <?php _e('Comments form', 'lmtttmpts'); ?> </span></label><?php echo $captcha_span; ?> <br /> <label><input disabled="disabled" type="checkbox" checked="checked"/><span> <?php _e('Contact form', 'lmtttmpts'); ?> </span></label><span class="bws_info"> (<?php _e('powered by', 'lmtttmpts'); ?> <a href="">bestwebsoft.com</a>)</span><br /> <label><input disabled="disabled" type="checkbox"/><span> <?php _e('Buddypress registration form', 'lmtttmpts'); ?> </span></label><br /> <label><input disabled="disabled" type="checkbox"/><span> <?php _e('Buddypress comments form', 'lmtttmpts'); ?> </span></label><br /> <label><input disabled="disabled" type="checkbox"/><span> <?php _e('Buddypress "Create a Group" form', 'lmtttmpts'); ?> </span></label><br /> <label><input disabled="disabled" type="checkbox" checked="checked"/><span> <?php _e('Contact Form 7', 'lmtttmpts'); ?> </span></label> </td> </tr> <tr valign="top"> <th scope="row" colspan="3"> <p>* <?php _e('If you upgrade to Pro version all your settings will be saved.', 'lmtttmpts'); ?> </p> <p>* <?php _e('You also need Captcha PRO to use these options.', 'lmtttmpts'); ?> </p> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to a PRO version.', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/limit-attempts/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"><?php _e("Learn More", 'lmtttmpts'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/limit-attempts/buy/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"> <?php _e('Go', 'lmtttmpts'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> </td> </tr> </table> <input type="hidden" name="lmtttmpts_form_submit" value="submit" /> <p class="submit"> <input type="submit" name="lmtttmpts_form_submit_button" class="button-primary" value="<?php _e('Save Changes', 'lmtttmpts'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); ?> </div> <?php } } elseif ('blocked' == $_GET['action']) { /* Showing blocked list table using wp_list_table class */ ?> <div id="lmtttmpts_blocked"> <?php $lmtttmpts_blocked_list = new Lmtttmpts_Blocked_list(); $lmtttmpts_blocked_list->prepare_items(); ?> <form method="get" action="admin.php"> <?php $lmtttmpts_blocked_list->search_box(__('Search IP', 'lmtttmpts'), 'search_blocked_ip'); ?> <input type="hidden" name="page" value="limit-attempts.php" /> <input type="hidden" name="action" value="blocked" /> </form> <form method="post" action="admin.php?page=limit-attempts.php&action=blocked"> <?php $lmtttmpts_blocked_list->display(); wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> </div> <?php } elseif ('blacklist' == $_GET['action']) { /* Showing blacklist table using wp_list_table class */ ?> <div id="lmtttmpts_blacklist"> <form method="post" action="admin.php?page=limit-attempts.php&action=blacklist"> <td><input type="text" maxlength="31" name="lmtttmpts_add_to_blacklist" /></td> <td><input type="submit" class="button-secondary" value="<?php _e('Add IP to blacklist', 'lmtttmpts'); ?> " /></td> <?php wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> <?php echo $allowed_symbols; $lmtttmpts_blacklist_table = new Lmtttmpts_Blacklist(); $lmtttmpts_blacklist_table->prepare_items(); ?> <form method="get" action="admin.php"> <?php $lmtttmpts_blacklist_table->search_box(__('Search IP', 'lmtttmpts'), 'search_blacklisted_ip'); ?> <input type="hidden" name="page" value="limit-attempts.php" /> <input type="hidden" name="action" value="blacklist" /> </form> <form method="post" action="admin.php?page=limit-attempts.php&action=blacklist"> <?php $lmtttmpts_blacklist_table->display(); wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> </div> <?php } elseif ('whitelist' == $_GET['action']) { /* Showing whitelist table using wp_list_table class */ ?> <div id="lmtttmpts_whitelist"> <form method="post" action="admin.php?page=limit-attempts.php&action=whitelist"> <td><input type="text" maxlength="31" name="lmtttmpts_add_to_whitelist" /></td> <td><input type="submit" class="button-secondary" value="<?php _e('Add IP to whitelist', 'lmtttmpts'); ?> " /></td> <?php wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> <?php echo $allowed_symbols; $lmtttmpts_whitelist_table = new Lmtttmpts_Whitelist(); $lmtttmpts_whitelist_table->prepare_items(); ?> <form method="get" action="admin.php"> <?php $lmtttmpts_whitelist_table->search_box(__('Search IP', 'lmtttmpts'), 'search_whitelisted_ip'); ?> <input type="hidden" name="page" value="limit-attempts.php" /> <input type="hidden" name="action" value="whitelist" /> </form> <form method="post" action="admin.php?page=limit-attempts.php&action=whitelist"> <?php $lmtttmpts_whitelist_table->display(); wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> </div> <?php } elseif ('log' == $_GET['action']) { /* PRO-teaser of 'Log' tab */ ?> <div id="lmtttmpts_log"> <div style="max-width: 100%" class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <div style="padding: 5px;"> <form><p class="search-box"><input disabled="disabled" type="search" name="s"><input disabled="disabled" type="submit" value="<?php _e('Search IP', 'lmtttmpts'); ?> " class="button"></p></form> <form><input disabled="disabled" type="submit" value="<?php _e('Clear Log', 'lmtttmpts'); ?> " class="button"></form> <form> <div class="tablenav top"><div class="alignleft actions bulkactions"><select disabled="disabled"><option><?php _e('Delete log entry', 'lmtttmpts'); ?> </option></select><input disabled="disabled" type="submit" value="Apply" class="button action"></div><div class="tablenav-pages one-page"><span class="displaying-num">1 item</span></div><br class="clear"></div> <table class="wp-list-table widefat fixed bws-plugins_page_limit-attempts-pro"> <thead><tr><th class="manage-column check-column" scope="col"><input disabled="disabled" type="checkbox"></th><th class="manage-column" scope="col"><a href=""><span><?php _e('IP address', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Internet Hostname', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Event', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Form', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Event time', 'lmtttmpts'); ?> </a></th></tr></thead> <tfoot><tr><th class="manage-column check-column" scope="col"><input disabled="disabled" type="checkbox"></th><th class="manage-column" scope="col"><a href=""><span><?php _e('IP address', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Internet Hostname', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Event', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Form', 'lmtttmpts'); ?> </span></a></th><th class="manage-column" scope="col"><a href=""><span><?php _e('Event time', 'lmtttmpts'); ?> </a></th></tr></tfoot> <tbody><tr class="alternate"><th class="check-column" scope="row"><input disabled="disabled" type="checkbox"></th><td>127.0.0.1</td><td>localhost</td><td><?php _e('Failed attempt', 'lmtttmpts'); ?> </td><td><?php _e('Login form', 'lmtttmpts'); ?> </td><td>November 25, 2014 11:55 am</td></tr> </tbody> </table> <div class="tablenav bottom"><div class="alignleft actions bulkactions"><select disabled="disabled"><option><?php _e('Delete log entry', 'lmtttmpts'); ?> </option></select><input disabled="disabled" type="submit" value="Apply" class="button action"></div><div class="tablenav-pages one-page"><span class="displaying-num">1 item</span></div><br class="clear"></div> </form> </div> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to a PRO version.', 'lmtttmpts'); ?> <a href="http://bestwebsoft.com/products/limit-attempts/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"> <?php _e("Learn More", 'lmtttmpts'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/limit-attempts/buy/?k=33bc89079511cdfe28aeba317abfaf37&pn=140&v=<?php echo $lmtttmpts_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Limit Attempts Pro"> <?php _e('Go', 'lmtttmpts'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> </div> <?php } elseif ('statistics' == $_GET['action']) { /* Showing statistics table using wp_list_table class */ if (isset($_POST['lmtttmpts_clear_statistics_complete']) && check_admin_referer($plugin_basename, 'lmtttmpts_nonce_name')) { ?> <div id="lmtttmpts_clear_statistics_confirm"> <p><?php _e('Are you sure you want to delete all statistics entries?', 'lmtttmpts'); ?> </p> <form method="post" action="admin.php?page=limit-attempts.php&action=statistics"> <button class="button" name="lmtttmpts_clear_statistics_complete_confirm"><?php _e('Yes, delete these entries', 'lmtttmpts'); ?> </button> <button class="button" name="lmtttmpts_clear_statistics_complete_deny"><?php _e('No, go back to the Statistics page', 'lmtttmpts'); ?> </button> <?php wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> </div> <?php } else { ?> <div id="lmtttmpts_statistics"> <?php $lmtttmpts_statistics_list = new Lmtttmpts_Statistics(); $lmtttmpts_statistics_list->prepare_items(); ?> <form method="get" action="admin.php"> <?php $lmtttmpts_statistics_list->search_box(__('Search IP', 'lmtttmpts'), 'search_statistics_ip'); ?> <input type="hidden" name="page" value="limit-attempts.php" /> <input type="hidden" name="action" value="statistics" /> </form> <form method="post" action="admin.php?page=limit-attempts.php&action=statistics"> <input type="hidden" name="lmtttmpts_clear_statistics_complete" /> <input type="submit" class="button" value="<?php _e('Clear Statistics', 'lmtttmpts'); ?> " /> <?php wp_nonce_field(plugin_basename(__FILE__), 'lmtttmpts_nonce_name'); ?> </form> <form method="post" action="admin.php?page=limit-attempts.php&action=statistics"> <?php $lmtttmpts_statistics_list->display(); wp_nonce_field($plugin_basename, 'lmtttmpts_nonce_name'); ?> </form> </div> <?php } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($lmtttmpts_plugin_info, $plugin_basename, 'limit-attempts.php', 'limit-attempts-pro.php', 'limit-attempts-pro/limit-attempts-pro.php', 'limit-attempts', 'fdac994c203b41e499a2818c409ff2bc', '140', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($lmtttmpts_plugin_info['Name'], 'limit-attempts'); ?> </div> <?php }
function sbscrbr_settings_page() { global $wp_version, $wpdb, $sbscrbr_options, $cptchpr_options, $sbscrbr_plugin_info, $sbscrbr_options_default; $prefix = is_multisite() ? $wpdb->base_prefix : $wpdb->prefix; /* get list of administrators */ $admin_list = $wpdb->get_results("SELECT DISTINCT `user_login` , `display_name` FROM `" . $prefix . "users` \n\t\t\t\tLEFT JOIN `" . $prefix . "usermeta` ON `" . $prefix . "usermeta`.`user_id` = `" . $prefix . "users`.`ID` \n\t\t\tWHERE `meta_value` LIKE '%administrator%'", ARRAY_A); $error = $message = $notice = ''; $plugin_basename = plugin_basename(__FILE__); if (empty($cptchpr_options)) { $cptchpr_options = get_option('cptchpr_options'); } $all_plugins = get_plugins(); if (isset($_POST['sbscrbr_form_submit']) && check_admin_referer($plugin_basename, 'sbscrbr_nonce_name')) { /* form labels */ $sbscrbr_options_submit['form_label'] = isset($_POST['sbscrbr_form_label']) ? stripslashes(esc_html($_POST['sbscrbr_form_label'])) : $sbscrbr_options['form_label']; $sbscrbr_options_submit['form_placeholder'] = isset($_POST['sbscrbr_form_placeholder']) ? stripslashes(esc_html($_POST['sbscrbr_form_placeholder'])) : $sbscrbr_options['form_placeholder']; $sbscrbr_options_submit['form_checkbox_label'] = isset($_POST['sbscrbr_form_checkbox_label']) ? stripslashes(esc_html($_POST['sbscrbr_form_checkbox_label'])) : $sbscrbr_options['form_checkbox_label']; $sbscrbr_options_submit['form_button_label'] = isset($_POST['sbscrbr_form_button_label']) ? stripslashes(esc_html($_POST['sbscrbr_form_button_label'])) : $sbscrbr_options['form_button_label']; /* service messages */ $sbscrbr_options_submit['bad_request'] = isset($_POST['sbscrbr_bad_request']) ? stripslashes(esc_html($_POST['sbscrbr_bad_request'])) : $sbscrbr_options['bad_request']; $sbscrbr_options_submit['empty_email'] = isset($_POST['sbscrbr_empty_email']) ? stripslashes(esc_html($_POST['sbscrbr_empty_email'])) : $sbscrbr_options['empty_email']; $sbscrbr_options_submit['invalid_email'] = isset($_POST['sbscrbr_invalid_email']) ? stripslashes(esc_html($_POST['sbscrbr_invalid_email'])) : $sbscrbr_options['invalid_email']; $sbscrbr_options_submit['not_exists_email'] = isset($_POST['sbscrbr_not_exists_email']) ? stripslashes(esc_html($_POST['sbscrbr_not_exists_email'])) : $sbscrbr_options['not_exists_email']; $sbscrbr_options_submit['cannot_get_email'] = isset($_POST['sbscrbr_cannot_get_email']) ? stripslashes(esc_html($_POST['sbscrbr_cannot_get_email'])) : $sbscrbr_options['cannot_get_email']; $sbscrbr_options_submit['cannot_send_email'] = isset($_POST['sbscrbr_cannot_send_email']) ? stripslashes(esc_html($_POST['sbscrbr_cannot_send_email'])) : $sbscrbr_options['cannot_send_email']; $sbscrbr_options_submit['error_subscribe'] = isset($_POST['sbscrbr_error_subscribe']) ? stripslashes(esc_html($_POST['sbscrbr_error_subscribe'])) : $sbscrbr_options['error_subscribe']; $sbscrbr_options_submit['done_subscribe'] = isset($_POST['sbscrbr_done_subscribe']) ? stripslashes(esc_html($_POST['sbscrbr_done_subscribe'])) : $sbscrbr_options['done_subscribe']; $sbscrbr_options_submit['already_subscribe'] = isset($_POST['sbscrbr_already_subscribe']) ? stripslashes(esc_html($_POST['sbscrbr_already_subscribe'])) : $sbscrbr_options['already_subscribe']; $sbscrbr_options_submit['denied_subscribe'] = isset($_POST['sbscrbr_denied_subscribe']) ? stripslashes(esc_html($_POST['sbscrbr_denied_subscribe'])) : $sbscrbr_options['denied_subscribe']; $sbscrbr_options_submit['already_unsubscribe'] = isset($_POST['sbscrbr_already_unsubscribe']) ? stripslashes(esc_html($_POST['sbscrbr_already_unsubscribe'])) : $sbscrbr_options['already_unsubscribe']; $sbscrbr_options_submit['check_email_unsubscribe'] = isset($_POST['sbscrbr_check_email_unsubscribe']) ? stripslashes(esc_html($_POST['sbscrbr_check_email_unsubscribe'])) : $sbscrbr_options['check_email_unsubscribe']; $sbscrbr_options_submit['done_unsubscribe'] = isset($_POST['sbscrbr_done_unsubscribe']) ? stripslashes(esc_html($_POST['sbscrbr_done_unsubscribe'])) : $sbscrbr_options['done_unsubscribe']; $sbscrbr_options_submit['not_exists_unsubscribe'] = isset($_POST['sbscrbr_not_exists_unsubscribe']) ? stripslashes(esc_html($_POST['sbscrbr_not_exists_unsubscribe'])) : $sbscrbr_options['not_exists_unsubscribe']; /* "From" settings */ if (isset($_POST['sbscrbr_from_email']) && is_email(trim($_POST['sbscrbr_from_email']))) { if ($sbscrbr_options['from_email'] != trim($_POST['sbscrbr_from_email'])) { $notice = __("Email 'FROM' field option was changed, which may cause email messages being moved to the spam folder or email delivery failures.", 'subscriber'); } $sbscrbr_options_submit['from_email'] = trim($_POST['sbscrbr_from_email']); } else { $sbscrbr_options_submit['from_email'] = $sbscrbr_options_default['from_email']; } $sbscrbr_options_submit['from_custom_name'] = isset($_POST['sbscrbr_from_custom_name']) ? $_POST['sbscrbr_from_custom_name'] : $sbscrbr_options['from_custom_name']; if ('' == $sbscrbr_options_submit['from_custom_name']) { $sbscrbr_options_submit['from_custom_name'] = $sbscrbr_options_default['from_custom_name']; } /* subject settings */ $sbscrbr_options_submit['admin_message_subject'] = isset($_POST['sbscrbr_admin_message_subject']) ? stripslashes($_POST['sbscrbr_admin_message_subject']) : $sbscrbr_options['admin_message_subject']; $sbscrbr_options_submit['subscribe_message_subject'] = isset($_POST['sbscrbr_subscribe_message_subject']) ? stripslashes($_POST['sbscrbr_subscribe_message_subject']) : $sbscrbr_options['subscribe_message_subject']; $sbscrbr_options_submit['unsubscribe_message_subject'] = isset($_POST['sbscrbr_unsubscribe_message_subject']) ? stripslashes($_POST['sbscrbr_unsubscribe_message_subject']) : $sbscrbr_options['unsubscribe_message_subject']; /* message body settings */ $sbscrbr_options_submit['admin_message_text'] = isset($_POST['sbscrbr_admin_message_text']) ? stripslashes($_POST['sbscrbr_admin_message_text']) : $sbscrbr_options['admin_message_text']; $sbscrbr_options_submit['subscribe_message_text'] = isset($_POST['sbscrbr_subscribe_message_text']) ? stripslashes($_POST['sbscrbr_subscribe_message_text']) : $sbscrbr_options['subscribe_message_text']; $sbscrbr_options_submit['unsubscribe_message_text'] = isset($_POST['sbscrbr_unsubscribe_message_text']) ? stripslashes($_POST['sbscrbr_unsubscribe_message_text']) : $sbscrbr_options['unsubscribe_message_text']; /* another settings */ $sbscrbr_options_submit['unsubscribe_link_text'] = isset($_POST['sbscrbr_unsubscribe_link_text']) ? $_POST['sbscrbr_unsubscribe_link_text'] : $sbscrbr_options['unsubscribe_link_text']; $sbscrbr_options_submit['delete_users'] = isset($_POST['sbscrbr_delete_users']) && '1' == $_POST['sbscrbr_delete_users'] ? '1' : '0'; if (!empty($cptchpr_options)) { $cptchpr_options['cptchpr_subscriber'] = isset($_POST['sbscrbr_display_captcha']) ? 1 : 0; update_option('cptchpr_options', $cptchpr_options); } /* update options of plugin in database */ if (empty($error)) { $sbscrbr_options = array_merge($sbscrbr_options, $sbscrbr_options_submit); update_option('sbscrbr_options', $sbscrbr_options); $message = __('Settings Saved', 'subscriber'); } } /* add restore function */ if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $sbscrbr_options = $sbscrbr_options_default; update_option('sbscrbr_options', $sbscrbr_options); $message = __('All plugin settings were restored.', 'subscriber'); } /* end */ /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } ?> <div class="wrap" id="sbscrbr-settings-page"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e("Subscriber Settings", 'subscriber'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab <?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=sbscrbr_settings_page"><?php _e('Settings', 'subscriber'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/subscriber/faq/" target="_blank"><?php _e('FAQ', 'subscriber'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=sbscrbr_settings_page&action=go_pro"><?php _e('Go PRO', 'subscriber'); ?> </a> </h2> <?php if (!empty($notice)) { ?> <div class="error"><p><strong><?php _e('Notice:', 'subscriber'); ?> </strong> <?php echo $notice; ?> </p></div> <?php } ?> <div id="sbscrbr-settings-notice" class="updated fade" style="display:none"><p><strong><?php _e("Notice:", 'subscriber'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'subscriber'); ?> </p></div> <div class="updated fade" <?php if (empty($message)) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if (empty($error)) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $error; ?> </strong></p></div><?php if (!isset($_GET['action'])) { /* Showing settings tab */ if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { ?> <div><p><?php _e("If you would like to add the Subscribe Form to your website, just copy and paste this shortcode to your post, page or widget:", 'subscriber'); ?> <span class="sbscrbr_code">[sbscrbr_form]</span> <?php _e("or you can use Subscriber Form Registation Widget.", 'subscriber'); ?> </p></div> <form id="sbscrbr_settings_form" method="post" action="admin.php?page=sbscrbr_settings_page"> <table id="sbscrbr-settings-table" class="form-table"> <tr valign="top"> <th><?php _e('Subscribe form labels', 'subscriber'); ?> </th> <td colspan="2"> <input type="text" class="sbscrbr-input-text" id="sbscrbr-form-label" name="sbscrbr_form_label" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['form_label']); ?> "/> <span class="sbscrbr_info"><?php _e('Text above the subscribe form', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-form-placeholder" name="sbscrbr_form_placeholder" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['form_placeholder']); ?> "/> <span class="sbscrbr_info"><?php _e('Placeholder for text field', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-form-checkbox-label" name="sbscrbr_form_checkbox_label" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['form_checkbox_label']); ?> "/> <span class="sbscrbr_info"><?php _e('Label for "unsubscribe" checkbox', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-form-button-label" name="sbscrbr_form_button_label" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['form_button_label']); ?> "/> <span class="sbscrbr_info"><?php _e('Label for "submit" button', 'subscriber'); ?> </span> </td> </tr> <tr valign="top"> <th><?php _e('Service messages', 'subscriber'); ?> </th> <td colspan="2"> <input id="sbscrbr-show-service-messages" type="button" class="button-small button" value="<?php _e("Show", 'subscriber'); ?> "/> <input id="sbscrbr-hide-service-messages" type="button" class="button-small button" value="<?php _e("Hide", 'subscriber'); ?> "/> <div class="sbscrbr-help-box"> <div class="sbscrbr-hidden-help-text"> <p><?php _e('These messages will be displayed in the frontend of your site.', 'subscriber'); ?> </p> </div><!-- .sbscrbr-hidden-help-text --> </div> </td> </tr> <tr valign="top" class="sbscrbr-service-messages"> <th></th> <td colspan="2"> <input type="text" class="sbscrbr-input-text" id="sbscrbr-bad-request" name="sbscrbr_bad_request" maxlength="250" value="<?php echo $sbscrbr_options['bad_request']; ?> "/> <span class="sbscrbr_info"><?php _e('Unknown error', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-empty-email" name="sbscrbr_empty_email" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['empty_email']); ?> "/> <span class="sbscrbr_info"><?php _e('If user has not entered e-mail', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-invalid-email" name="sbscrbr_invalid_email" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['invalid_email']); ?> "/> <span class="sbscrbr_info"><?php _e('If user has entered invalid e-mail', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-not-exists-email" name="sbscrbr_not_exists_email" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['not_exists_email']); ?> "/> <span class="sbscrbr_info"><?php _e('If the user has entered a non-existent e-mail', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-not-exists-email" name="sbscrbr_cannot_get_email" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['cannot_get_email']); ?> "/> <span class="sbscrbr_info"><?php _e('If it is impossible to get the data about the entered e-mail', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-cannot-send-email" name="sbscrbr_cannot_send_email" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['cannot_send_email']); ?> "/> <span class="sbscrbr_info"><?php _e('If it is impossible to send a letter', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-error-subscribe" name="sbscrbr_error_subscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['error_subscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If some errors occurred while user registration', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-done-subscribe" name="sbscrbr_done_subscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['done_subscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If user registration was succesfully finished', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-already-subscribe" name="sbscrbr_already_subscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['already_subscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If the user has already subscribed', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-denied-subscribe" name="sbscrbr_denied_subscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['denied_subscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If subscription has been denied', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-already-unsubscribe" name="sbscrbr_already_unsubscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['already_unsubscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If the user has already unsubscribed', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-check-email-unsubscribe" name="sbscrbr_check_email_unsubscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['check_email_unsubscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If the user has been sent a letter with a link to unsubscribe', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-done-unsubscribe" name="sbscrbr_done_unsubscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['done_unsubscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If user was unsubscribed', 'subscriber'); ?> </span> <br/> <input type="text" class="sbscrbr-input-text" id="sbscrbr-not-exists-unsubscribe" name="sbscrbr_not_exists_unsubscribe" maxlength="250" value="<?php echo esc_attr($sbscrbr_options['not_exists_unsubscribe']); ?> "/> <span class="sbscrbr_info"><?php _e('If the user clicked on a non-existent "unsubscribe"-link', 'subscriber'); ?> </span> </td><!-- .sbscrbr-service-messages --> </tr> <tr valign="top"> <th scope="row" style="width:200px;"><?php _e("'FROM' field", 'subscriber'); ?> </th> <td style="width: 200px; vertical-align: top;"> <div><?php _e("Name", 'subscriber'); ?> </div> <div> <input type="text" name="sbscrbr_from_custom_name" maxlength="250" value="<?php echo $sbscrbr_options['from_custom_name']; ?> "/> </div> </td> <td> <div><?php _e("Email", 'subscriber'); ?> </div> <div> <input type="text" name="sbscrbr_from_email" maxlength="250" value="<?php echo $sbscrbr_options['from_email']; ?> "/> </div> <span class="sbscrbr_info">(<?php _e("If this option is changed, email messages may be moved to the spam folder or email delivery failures may occur.", 'subscriber'); ?> )</span> </td> </tr> <tr valign="top"> <th><?php _e('Letters content', 'subscriber'); ?> </th> <td colspan="2"> <input id="sbscrbr-show-messages-settings" type="button" class="button-small button" value="<?php _e("Show", 'subscriber'); ?> "/> <input id="sbscrbr-hide-messages-settings" type="button" class="button-small button" value="<?php _e("Hide", 'subscriber'); ?> "/> <div class="sbscrbr-help-box"> <div class="sbscrbr-hidden-help-text"> <p><?php _e('You can edit the content of service letters, which will be sent to users. In the text of the message you can use the following shortcodes:', 'subscriber'); ?> </p> <ul> <li>{user_email} - <?php _e('this shortcode will be replaced with the e-mail of a current user;', 'subscriber'); ?> </li> <li>{profile_page} - <?php _e('this shortcode will be replaced with the link to profile page of current user;', 'subscriber'); ?> </li> <li>{unsubscribe_link} - <?php _e('this shortcode will be replaced with the link to unsubscribe.', 'subscriber'); ?> </li> <ul> </div><!-- .sbscrbr-hidden-help-text --> </div> </td> </tr> <tr valign="top" class="sbscrbr-messages-settings"> <th><?php _e('Message to admin about new subscribed users', 'subscriber'); ?> </th> <td colspan="2"> <input type="text" class="sbscrbr-input-text" id="sbscrbr-admin-message-subject" name="sbscrbr_admin_message_subject" maxlength="250" value="<?php echo stripslashes(esc_attr($sbscrbr_options['admin_message_subject'])); ?> "/> <span class="sbscrbr_info"><?php _e("Subject:", 'subscriber'); ?> </span> <br/> <textarea class="sbscrbr-input-text" id="sbscrbr-admin-message-text" name="sbscrbr_admin_message_text"><?php echo stripslashes(esc_textarea($sbscrbr_options['admin_message_text'])); ?> </textarea> <span class="sbscrbr_info sbscrbr_info_textarea"><?php _e("Text:", 'subscriber'); ?> </span> </td> </tr> <tr valign="top" class="sbscrbr-messages-settings"> <th><?php _e('Message to subscribed users', 'subscriber'); ?> </th> <td colspan="2"> <input type="text" class="sbscrbr-input-text" id="sbscrbr-subscribe-message-subject" name="sbscrbr_subscribe_message_subject" maxlength="250" value="<?php echo stripslashes(esc_attr($sbscrbr_options['subscribe_message_subject'])); ?> "/> <span class="sbscrbr_info"><?php _e("Subject:", 'subscriber'); ?> </span> <br/> <textarea class="sbscrbr-input-text" id="sbscrbr-subscribe-message-text" name="sbscrbr_subscribe_message_text"><?php echo stripslashes(esc_textarea($sbscrbr_options['subscribe_message_text'])); ?> </textarea> <span class="sbscrbr_info sbscrbr_info_textarea"><?php _e("Text:", 'subscriber'); ?> </span> </td> </tr> <tr valign="top" class="sbscrbr-messages-settings"> <th><?php _e('Message with unsubscribe link', 'subscriber'); ?> </th> <td colspan="2"> <input type="text" class="sbscrbr-input-text" id="sbscrbr-unsubscribe-message-subject" name="sbscrbr_unsubscribe_message_subject" maxlength="250" value="<?php echo stripslashes(esc_attr($sbscrbr_options['unsubscribe_message_subject'])); ?> "/> <span class="sbscrbr_info"><?php _e("Subject:", 'subscriber'); ?> </span> <br/> <textarea class="sbscrbr-input-text" id="sbscrbr-unsubscribe-message-text" name="sbscrbr_unsubscribe_message_text"><?php echo stripslashes(esc_textarea($sbscrbr_options['unsubscribe_message_text'])); ?> </textarea> <span class="sbscrbr_info sbscrbr_info_textarea"><?php _e("Text:", 'subscriber'); ?> </span> </td> </tr> <tr valign="top" class="sbscrbr-messages-settings"> <th><?php _e('Text to be attached to letters', 'subscriber'); ?> </th> <td colspan="2"> <textarea class="sbscrbr-input-text" id="sbscrbr-unsubscribe-link-text" name="sbscrbr_unsubscribe_link_text"><?php echo stripslashes(esc_textarea($sbscrbr_options['unsubscribe_link_text'])); ?> </textarea> <br/> <span class="sbscrbr_info"><?php _e('This text will be attached to each letter of the mailing, which was created with Sender plugin by BestWebsoft.', 'subscriber'); ?> </span> </td> </tr> <tr valign="top"> <th><?php _e('Delete users while plugin removing', 'subscriber'); ?> </th> <td colspan="2"> <input type="checkbox" id="sbscrbr-delete-user" name="sbscrbr_delete_users" value="1" <?php if ('1' == $sbscrbr_options['delete_users']) { echo 'checked="checked"'; } ?> /> <span class="sbscrbr_info"><?php _e('If this option enabled, when you remove plugin, all users with role "Mail Subscribed" will be removed from users list.', 'subscriber'); ?> </span> </td> </tr> <tr valign="top"> <th><?php _e('Add captcha to the form', 'subscriber'); ?> </th> <td colspan="2"> <?php if (array_key_exists('captcha-pro/captcha_pro.php', $all_plugins)) { if (is_plugin_active('captcha-pro/captcha_pro.php')) { ?> <input type="checkbox" name="sbscrbr_display_captcha" value="1" <?php if (isset($cptchpr_options) && 1 == $cptchpr_options["cptchpr_subscriber"]) { echo 'checked="checked"'; } ?> /> <span class="sbscrbr_info">(<?php _e('powered by', 'subscriber'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span> <?php } else { ?> <input disabled="disabled" type="checkbox" name="sbscrbr_display_captcha" value="1" <?php if (isset($cptchpr_options) && 1 == $cptchpr_options["cptchpr_subscriber"]) { echo 'checked="checked"'; } ?> /> <span class="sbscrbr_info">(<?php _e('powered by', 'subscriber'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate captcha', 'subscriber'); ?> </a></span> <?php } } else { ?> <input disabled="disabled" type="checkbox" name="sbscrbr_display_captcha" value="1" /> <span class="sbscrbr_info">(<?php _e('powered by', 'subscriber'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="http://bestwebsoft.com/products/captcha/?k=d045de4664b2e847f2612a815d838e60&pn=122&v=<?php echo $sbscrbr_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> "><?php _e('Download captcha', 'subscriber'); ?> </a></span> <?php } ?> </td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th><?php _e('Add to the subscribe form', 'subscriber'); ?> </th> <td> <label><input type="checkbox" name="sbscrbrpr_form_name_field" disabled value="1" /> <?php _e('"Name" field', 'subscriber'); ?> </label><br/> <label><input type="checkbox" name="sbscrbrpr_form_unsubscribe_checkbox" checked disabled value="1" /> <?php _e('"Unsubscribe" checkbox', 'subscriber'); ?> </label><br/> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to a PRO version.', 'subscriber'); ?> <a href="http://bestwebsoft.com/products/subscriber/?k=d356381b0c3554404e34cdc4fe936455&pn=122&v=<?php echo $sbscrbr_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Subscriber Pro"><?php _e("Learn More", 'subscriber'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/subscriber/buy/?k=d356381b0c3554404e34cdc4fe936455&pn=122&v=<?php echo $sbscrbr_plugin_info["Version"] . '&wp_v=' . $wp_version; ?> " target="_blank" title="Subscriber Pro"> <?php _e('Go', 'subscriber'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <?php if (false == sbscrbr_check_sender_install()) { echo '<p>' . __('If you want to send mailout to the users who have subscribed for newsletters use', 'subscriber') . ' <a href="http://bestwebsoft.com/products/sender/" target="_blank">Sender plugin</a> ' . __('that sends mail to registered users. There is also a premium version of the plugin', 'subscriber') . ' - <a href="http://bestwebsoft.com/products/sender/?k=01665f668edd3310e8c5cf13e9cb5181&pn=122&v=' . $sbscrbr_plugin_info["Version"] . '&wp_v=' . $wp_version . '" target="_blank">Sender Pro</a>, ' . __('allowing to create and save templates for letters, edit the content of messages with a visual editor TinyMce, set priority оf mailing, create and manage mailing lists.', 'subscriber') . '</p>'; } ?> <input type="hidden" name="sbscrbr_form_submit" value="submit" /> <p class="submit"> <input type="submit" id="sbscrbr-submit-button" class="button-primary" value="<?php _e('Save Changes', 'subscriber'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'sbscrbr_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($sbscrbr_plugin_info, $plugin_basename, 'sbscrbr_settings_page', 'sbscrbrpr_settings_page', 'subscriber-pro/subscriber-pro.php', 'subscriber', 'd356381b0c3554404e34cdc4fe936455', '122', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($sbscrbr_plugin_info['Name'], 'subscriber'); ?> </div><!-- .wrap --> <?php }
function gglnltcs_go_pro_tab() { global $gglnltcs_plugin_info; $error = ''; $plugin_basename = plugin_basename(__FILE__); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } ?> <div id="gglnltcs-settings-error" class="error" <?php if (empty($error)) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <div class="wrap"> <?php bws_go_pro_tab($gglnltcs_plugin_info, $plugin_basename, 'bws-google-analytics.php', 'bws-google-analytics-pro.php', 'bws-google-analytics-pro/bws-google-analytics-pro.php', 'bws-google-analytics', '0ceb29947727cb6b38a01b29102661a3', '125', isset($go_pro_result['pro_plugin_is_activated'])); ?> </div> <?php }
function cptch_settings_page() { global $cptch_options, $wp_version, $cptch_plugin_info, $cptch_option_defaults; $error = $message = ""; $plugin_basename = plugin_basename(__FILE__); /* These fields for the 'Enable CAPTCHA on the' block which is located at the admin setting captcha page */ $cptch_admin_fields_enable = array(array('cptch_login_form', __('Login form', 'captcha'), 'login_form.jpg'), array('cptch_register_form', __('Registration form', 'captcha'), 'register_form.jpg'), array('cptch_lost_password_form', __('Reset Password form', 'captcha'), 'lost_password_form.jpg'), array('cptch_comments_form', __('Comments form', 'captcha'), 'comment_form.jpg')); $cptch_admin_fields_hide = array(array('cptch_hide_register', __('in Comments form for registered users', 'captcha'))); /* These fields for the 'Arithmetic actions for CAPTCHA' block which is located at the admin setting captcha page */ $cptch_admin_fields_actions = array(array('cptch_math_action_plus', __('Plus (+)', 'captcha'), __('Plus', 'captcha')), array('cptch_math_action_minus', __('Minus (−)', 'captcha'), __('Minus', 'captcha')), array('cptch_math_action_increase', __('Multiplication (×)', 'captcha'), __('Multiply', 'captcha'))); /* This fields for the 'Difficulty for CAPTCHA' block which is located at the admin setting captcha page */ $cptch_admin_fields_difficulty = array(array('cptch_difficulty_number', __('Numbers', 'captcha'), __('Numbers', 'captcha')), array('cptch_difficulty_word', __('Words', 'captcha'), __('Words', 'captcha'))); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); /* Save data for settings page */ if (isset($_REQUEST['cptch_form_submit']) && check_admin_referer($plugin_basename, 'cptch_nonce_name')) { $cptch_request_options = array(); $cptch_request_options['cptch_login_form'] = isset($_REQUEST['cptch_login_form']) ? 1 : 0; $cptch_request_options['cptch_register_form'] = isset($_REQUEST['cptch_register_form']) ? 1 : 0; $cptch_request_options['cptch_lost_password_form'] = isset($_REQUEST['cptch_lost_password_form']) ? 1 : 0; $cptch_request_options['cptch_comments_form'] = isset($_REQUEST['cptch_comments_form']) ? 1 : 0; $cptch_request_options['cptch_hide_register'] = isset($_REQUEST['cptch_hide_register']) ? 1 : 0; $cptch_request_options['cptch_contact_form'] = isset($_REQUEST['cptch_contact_form']) ? 1 : 0; $cptch_request_options['cptch_label_form'] = isset($_REQUEST['cptch_label_form']) ? stripslashes(esc_html($_REQUEST['cptch_label_form'])) : ''; $cptch_request_options['cptch_required_symbol'] = isset($_REQUEST['cptch_required_symbol']) ? stripslashes(esc_html($_REQUEST['cptch_required_symbol'])) : ''; $cptch_request_options['cptch_error_empty_value'] = isset($_REQUEST['cptch_error_empty_value']) ? stripslashes(esc_html($_REQUEST['cptch_error_empty_value'])) : ''; $cptch_request_options['cptch_error_incorrect_value'] = isset($_REQUEST['cptch_error_incorrect_value']) ? stripslashes(esc_html($_REQUEST['cptch_error_incorrect_value'])) : ''; if ($cptch_request_options['cptch_error_empty_value'] == '') { $cptch_request_options['cptch_error_empty_value'] = $cptch_option_defaults['cptch_error_empty_value']; } if ($cptch_request_options['cptch_error_incorrect_value'] == '') { $cptch_request_options['cptch_error_incorrect_value'] = $cptch_option_defaults['cptch_error_incorrect_value']; } $cptch_request_options['cptch_math_action_plus'] = isset($_REQUEST['cptch_math_action_plus']) ? 1 : 0; $cptch_request_options['cptch_math_action_minus'] = isset($_REQUEST['cptch_math_action_minus']) ? 1 : 0; $cptch_request_options['cptch_math_action_increase'] = isset($_REQUEST['cptch_math_action_increase']) ? 1 : 0; $cptch_request_options['cptch_difficulty_number'] = isset($_REQUEST['cptch_difficulty_number']) ? 1 : 0; $cptch_request_options['cptch_difficulty_word'] = isset($_REQUEST['cptch_difficulty_word']) ? 1 : 0; /* Array merge incase this version has added new options */ $cptch_options = array_merge($cptch_options, $cptch_request_options); /* Check select one point in the blocks Arithmetic actions and Difficulty on settings page */ if (!isset($_REQUEST['cptch_difficulty_number']) && !isset($_REQUEST['cptch_difficulty_word']) || !isset($_REQUEST['cptch_math_action_plus']) && !isset($_REQUEST['cptch_math_action_minus']) && !isset($_REQUEST['cptch_math_action_increase'])) { $error = __("Please select one item in the block Arithmetic and Complexity for CAPTCHA", 'captcha'); } else { /* Update options in the database */ update_option('cptch_options', $cptch_options); $message = __("Settings saved.", 'captcha'); } } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $cptch_options = $cptch_option_defaults; update_option('cptch_options', $cptch_options); $message = __('All plugin settings were restored.', 'captcha'); } /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } } /* Display form on the setting page */ ?> <div class="wrap"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e('Captcha Settings', 'captcha'); ?> </h2> <ul class="subsubsub cptch_how_to_use""> <li><a href="https://docs.google.com/document/d/11_TUSAjMjG7hLa53lmyTZ1xox03hNlEA4tRmllFep3I/edit" target="_blank"><?php _e('How to Use Step-by-step Instruction', 'captcha'); ?> </a></li> </ul> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=captcha.php"><?php _e('Settings', 'captcha'); ?> </a> <a class="nav-tab <?php if (isset($_GET['action']) && 'whitelist' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=captcha.php&action=whitelist"><?php _e('Whitelist', 'captcha'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/captcha/faq/" target="_blank"><?php _e('FAQ', 'captcha'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=captcha.php&action=go_pro"><?php _e('Go PRO', 'captcha'); ?> </a> </h2> <div id="cptch_settings_notice" class="updated fade" style="display:none"><p><strong><?php _e("Notice:", 'captcha'); ?> </strong> <?php _e("The plugin's settings have been changed. In order to save them please don't forget to click the 'Save Changes' button.", 'captcha'); ?> </p></div> <div class="updated fade" <?php if ('' == $message || "" != $error) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error" <?php if ("" == $error) { echo "style=\"display:none\""; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <?php if (!isset($_GET['action'])) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { ?> <form id="cptch_settings_form" method="post" action="admin.php?page=captcha.php"> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Enable CAPTCHA for:', 'captcha'); ?> </th> <td><fieldset> <legend class="screen-reader-text"><span><?php _e('Arithmetic actions for CAPTCHA', 'captcha'); ?> </span></legend> <?php foreach ($cptch_admin_fields_enable as $fields) { ?> <label><input type="checkbox" name="<?php echo $fields[0]; ?> " value="<?php echo $fields[0]; ?> " <?php if (1 == $cptch_options[$fields[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo __($fields[1], 'captcha'); ?> </label> <div class="cptch_help_box cptch_thumb_block"> <div class="cptch_hidden_help_text cptch_thumb"><img src="<?php echo plugins_url('captcha/images') . '/' . $fields[2]; ?> " title="<?php echo $fields[1]; ?> " alt="<?php echo $fields[1]; ?> "/></div> </div><br /> <?php } if (array_key_exists('contact-form-plugin/contact_form.php', $all_plugins) || array_key_exists('contact-form-pro/contact_form_pro.php', $all_plugins)) { if (is_plugin_active('contact-form-plugin/contact_form.php') || is_plugin_active('contact-form-pro/contact_form_pro.php')) { ?> <label><input type="checkbox" name="cptch_contact_form" value="1" <?php if (1 == $cptch_options['cptch_contact_form']) { echo "checked=\"checked\""; } ?> /> Contact form by BestWebSoft</label> <?php } else { ?> <label><input disabled='disabled' type="checkbox" name="cptch_contact_form" value="1" <?php if (1 == $cptch_options['cptch_contact_form']) { echo "checked=\"checked\""; } ?> /> Contact form by BestWebSoft</label> <span class="cptch_span"><a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate contact form', 'captcha'); ?> </a></span> <?php } ?> <div class="cptch_help_box cptch_thumb_block"> <div class="cptch_hidden_help_text cptch_thumb"><img src="<?php echo plugins_url('captcha/images/contact_form.jpg'); ?> " title="<?php _e('Contact Form', 'captcha'); ?> " alt="<?php _e('Contact Form', 'captcha'); ?> "/></div> </div><br /> <?php } else { ?> <label><input disabled='disabled' type="checkbox" name="cptch_contact_form" value="1" <?php if (1 == $cptch_options['cptch_contact_form']) { echo "checked=\"checked\""; } ?> /> Contact form by BestWebSoft</label> <span class="cptch_span"><a href="http://bestwebsoft.com/products/contact-form/?k=d70b58e1739ab4857d675fed2213cedc&pn=75&v=<?php echo $cptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> "><?php _e('Download contact form', 'captcha'); ?> </a></span> <div class="cptch_help_box cptch_thumb_block"> <div class="cptch_hidden_help_text cptch_thumb"><img src="<?php echo plugins_url('captcha/images/contact_form.jpg'); ?> " title="<?php _e('Contact Form', 'captcha'); ?> " alt="<?php _e('Contact Form', 'captcha'); ?> "/></div> </div><br /> <?php } echo apply_filters('cptch_forms_list', ''); ?> <span class="cptch_span"><?php _e('If you would like to add Captcha to a custom form, please see', 'captcha'); ?> <a href="http://bestwebsoft.com/products/captcha/faq" target="_blank">FAQ</a></span> </fieldset></td> </tr> </table> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"> <?php _e('Enable CAPTCHA for:', 'captcha'); ?> </th> <td> <label><input disabled='disabled' type="checkbox" name="cptchpr_subscriber" value="1" /> Subscriber by BestWebSoft</label> </td> </tr> <tr valign="top"> <th scope="row"> <strong>Buddypress</strong><br/> <?php _e('Enable CAPTCHA for:', 'captcha'); ?> </th> <td><fieldset> <legend class="screen-reader-text"><span>Buddypress <?php _e('Enable CAPTCHA for:', 'captcha'); ?> </span></legend> <label><input disabled='disabled' type="checkbox" name="cptchpr_buddypress_register_form" value="1" /> <?php _e('Registration form', 'captcha'); ?> </label><br /> <label><input disabled='disabled' type="checkbox" name="cptchpr_buddypress_comment_form" value="1" /> <?php _e('Comments form', 'captcha'); ?> </label><br /> <label><input disabled='disabled' type="checkbox" name="cptchpr_buddypress_group_form" value="1" /> <?php _e('"Create a Group" form', 'captcha'); ?> </label> </fieldset></td> </tr> <tr valign="top"> <th scope="row"> <strong>Contact Form 7</strong><br/> <?php _e('Enable CAPTCHA:', 'captcha'); ?> </th> <td><br/> <input disabled='disabled' type="checkbox" name="cptchpr_cf7" value="1" /><br /> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'captcha'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to PRO version.', 'captcha'); ?> <a href="http://bestwebsoft.com/products/captcha/?k=9701bbd97e61e52baa79c58c3caacf6d&pn=75&v=<?php echo $cptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Captcha Pro"><?php _e('Learn More', 'captcha'); ?> </a> </div> <a class="bws_button" href="http://bestwebsoft.com/products/captcha/buy/?k=9701bbd97e61e52baa79c58c3caacf6d&pn=75&v=<?php echo $cptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Captcha Pro"> <?php _e('Go', 'captcha'); ?> <strong>PRO</strong> </a> <div class="clear"></div> </div> </div> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Hide CAPTCHA', 'captcha'); ?> </th> <td><?php foreach ($cptch_admin_fields_hide as $fields) { ?> <label><input type="checkbox" name="<?php echo $fields[0]; ?> " value="<?php echo $fields[0]; ?> " <?php if (1 == $cptch_options[$fields[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo $fields[1]; ?> </label><br /> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Title for CAPTCHA in the form', 'captcha'); ?> </th> <td><input class="cptch_settings_input" type="text" name="cptch_label_form" value="<?php echo $cptch_options['cptch_label_form']; ?> " maxlength="100" /></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Required symbol", 'captcha'); ?> </th> <td colspan="2"> <input class="cptch_settings_input" type="text" name="cptch_required_symbol" value="<?php echo $cptch_options['cptch_required_symbol']; ?> " maxlength="100" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Error messages", 'captcha'); ?> </th> <td colspan="2"> <p><input class="cptch_settings_input" type="text" name="cptch_error_empty_value" value="<?php echo $cptch_options['cptch_error_empty_value']; ?> " maxlength="100" /> <?php _e('If CAPTCHA field is empty', 'captcha'); ?> </p> <p><input class="cptch_settings_input" type="text" name="cptch_error_incorrect_value" value="<?php echo $cptch_options['cptch_error_incorrect_value']; ?> " maxlength="100" /> <?php _e('If CAPTCHA is incorrect', 'captcha'); ?> </p> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Arithmetic actions for CAPTCHA', 'captcha'); ?> </th> <td colspan="2"><fieldset> <legend class="screen-reader-text"><span><?php _e('Arithmetic actions for CAPTCHA', 'captcha'); ?> </span></legend> <?php foreach ($cptch_admin_fields_actions as $actions) { ?> <label><input type="checkbox" name="<?php echo $actions[0]; ?> " value="<?php echo $cptch_options[$actions[0]]; ?> " <?php if (1 == $cptch_options[$actions[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo __($actions[1], 'captcha'); ?> </label> <div class="cptch_help_box"> <div class="cptch_hidden_help_text"><?php cptch_display_example($actions[0]); ?> </div> </div> <br /> <?php } ?> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e('CAPTCHA complexity level', 'captcha'); ?> </th> <td colspan="2"><fieldset> <legend class="screen-reader-text"><span><?php _e('CAPTCHA complexity level', 'captcha'); ?> </span></legend> <?php foreach ($cptch_admin_fields_difficulty as $diff) { ?> <label><input type="checkbox" name="<?php echo $diff[0]; ?> " value="<?php echo $cptch_options[$diff[0]]; ?> " <?php if (1 == $cptch_options[$diff[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo __($diff[1], 'captcha'); ?> </label> <div class="cptch_help_box"> <div class="cptch_hidden_help_text"><?php cptch_display_example($diff[0]); ?> </div> </div> <br /> <?php } ?> </fieldset></td> </tr> </table> <input type="hidden" name="cptch_form_submit" value="submit" /> <p class="submit"> <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'captcha'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'cptch_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($cptch_plugin_info, $plugin_basename, 'captcha.php', 'captcha_pro.php', 'captcha-pro/captcha_pro.php', 'captcha', '9701bbd97e61e52baa79c58c3caacf6d', '75', isset($go_pro_result['pro_plugin_is_activated'])); } elseif ('whitelist' == $_GET['action']) { require_once dirname(__FILE__) . '/whitelist.php'; $cptch_whitelist = new Cptch_Whitelist($plugin_basename, $cptch_plugin_info['Version'], 'captcha'); $cptch_whitelist->display_content(); } bws_plugin_reviews_block($cptch_plugin_info['Name'], 'captcha'); ?> </div> <?php }
function adsns_settings_page() { global $wp_version; $plugin_basename = plugin_basename(__FILE__); if (!isset($_GET['action'])) { if (isset($_POST['adsns_upgrade']) && check_admin_referer(plugin_basename(__FILE__), 'adsns_nonce_name')) { $adsns_new_options['plugin_option_version'] = $this->adsns_options['plugin_option_version']; $adsns_new_options['widget_title'] = $this->adsns_options['widget_title']; $adsns_new_options['use_new_api'] = true; $this->adsns_adsense_api = true; $this->adsns_options = $adsns_new_options; update_option('adsns_settings', $this->adsns_options); } $adsns_current_tab = isset($_GET['tab']) ? urlencode($_GET['tab']) : 'home'; $adsns_form_action = $adsns_tab_url = ''; if (isset($_GET)) { unset($_GET['page']); foreach ($_GET as $action => $value) { $adsns_form_action .= sprintf('&%s=%s', $action, urlencode($value)); } $adsns_tab_url = preg_replace('/&tab=[\\w\\d+]+/', '', $adsns_form_action); } $adsns_tabs = array('home' => array('tab' => array('title' => __('Home page', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php%s', $adsns_tab_url)), 'adunit_positions' => array('after' => __('After the content', 'adsense-plugin'), 'before' => __('Before the content', 'adsense-plugin')), 'adunit_positions_pro' => array('1st_paragraph' => __('After the first paragraph (Available in PRO)', 'adsense-plugin'), 'random_paragraph' => __('After a random paragraph (Available in PRO)', 'adsense-plugin')), 'max_ads' => 3), 'pages' => array('tab' => array('title' => __('Pages', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php&tab=pages%s', $adsns_tab_url)), 'adunit_positions' => array('after' => __('After the content', 'adsense-plugin'), 'before' => __('Before the content', 'adsense-plugin'), 'commentform' => __('Below the comment form', 'adsense-plugin')), 'adunit_positions_pro' => array('1st_paragraph' => __('After the first paragraph (Available in PRO)', 'adsense-plugin'), 'random_paragraph' => __('After a random paragraph (Available in PRO)', 'adsense-plugin')), 'max_ads' => 3), 'posts+custom_posts' => array('tab' => array('title' => __('Posts / Custom posts', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php&tab=posts+custom_posts%s', $adsns_tab_url)), 'adunit_positions' => array('after' => __('After the content', 'adsense-plugin'), 'before' => __('Before the content', 'adsense-plugin'), 'commentform' => __('Below the comment form', 'adsense-plugin')), 'adunit_positions_pro' => array('1st_paragraph' => __('After the first paragraph (Available in PRO)', 'adsense-plugin'), 'random_paragraph' => __('After a random paragraph (Available in PRO)', 'adsense-plugin')), 'max_ads' => 3), 'categories+tags' => array('tab' => array('title' => __('Categories / Tags', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php&tab=categories+tags%s', $adsns_tab_url)), 'adunit_positions' => array('after' => __('After the content', 'adsense-plugin'), 'before' => __('Before the content', 'adsense-plugin')), 'adunit_positions_pro' => array('1st_paragraph' => __('After the first paragraph (Available in PRO)', 'adsense-plugin'), 'random_paragraph' => __('After a random paragraph (Available in PRO)', 'adsense-plugin')), 'max_ads' => 3), 'search' => array('tab' => array('title' => __('Search results', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php&tab=search%s', $adsns_tab_url)), 'adunit_positions' => array('after' => __('After the content', 'adsense-plugin'), 'before' => __('Before the content', 'adsense-plugin')), 'adunit_positions_pro' => array('1st_paragraph' => __('After the first paragraph (Available in PRO)', 'adsense-plugin'), 'random_paragraph' => __('After a random paragraph (Available in PRO)', 'adsense-plugin')), 'max_ads' => 3), 'widget' => array('tab' => array('title' => __('Widget', 'adsense-plugin'), 'url' => sprintf('admin.php?page=adsense-plugin.php&tab=widget%s', $adsns_tab_url)), 'adunit_positions' => array('static' => __('Static', 'adsense-plugin')), 'adunit_positions_pro' => array('fixed' => __('Fixed (Available in PRO)', 'adsense-plugin')), 'max_ads' => 1)); $adsns_tbl_data = array(); $adsns_adunit_types = array('TEXT' => __('Text', 'adsense-plugin'), 'IMAGE' => __('Image', 'adsense-plugin'), 'TEXT_IMAGE' => __('Text/Image', 'adsense-plugin'), 'LINK' => __('Link', 'adsense-plugin')); $adsns_adunit_statuses = array('NEW' => __('New', 'adsense-plugin'), 'ACTIVE' => __('Active', 'adsense-plugin'), 'INACTIVE' => __('Inactive', 'adsense-plugin')); $adsns_adunit_sizes = array('RESPONSIVE' => __('Responsive', 'adsense-plugin')); $adsns_client = $this->adsns_client(); $adsns_blog_prefix = '_' . get_current_blog_id(); if (isset($_POST['adsns_logout']) && check_admin_referer(plugin_basename(__FILE__), 'adsns_nonce_name')) { unset($_SESSION['adsns_authorization_code' . $adsns_blog_prefix]); unset($this->adsns_options['authorization_code']); update_option('adsns_settings', $this->adsns_options); } if (isset($_POST['adsns_authorization_code']) && !empty($_POST['adsns_authorization_code']) && check_admin_referer(plugin_basename(__FILE__), 'adsns_nonce_name')) { try { $adsns_client->authenticate($_POST['adsns_authorization_code']); $this->adsns_options['authorization_code'] = $_SESSION['adsns_authorization_code' . $adsns_blog_prefix] = $adsns_client->getAccessToken(); update_option('adsns_settings', $this->adsns_options); } catch (Exception $e) { } } if (!isset($_SESSION['adsns_authorization_code' . $adsns_blog_prefix]) && isset($this->adsns_options['authorization_code'])) { $_SESSION['adsns_authorization_code' . $adsns_blog_prefix] = $this->adsns_options['authorization_code']; } if (isset($_SESSION['adsns_authorization_code' . $adsns_blog_prefix])) { $adsns_client->setAccessToken($_SESSION['adsns_authorization_code' . $adsns_blog_prefix]); } if ($adsns_client->getAccessToken()) { $adsns_adsense = new Google_Service_AdSense($adsns_client); $adsns_adsense_accounts = $adsns_adsense->accounts; $adsns_adsense_adclients = $adsns_adsense->adclients; $adsns_adsense_adunits = $adsns_adsense->adunits; try { $adsns_list_accounts = $adsns_adsense_accounts->listAccounts()->getItems(); $adsns_publisher_id = $adsns_list_accounts[0]['id']; $this->adsns_options['publisher_id'] = $adsns_publisher_id; /* Start fix old options */ if (isset($this->adsns_options['adunits']) && !isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']])) { $adsns_temp_adunits = $this->adsns_options['adunits']; unset($this->adsns_options['adunits']); $this->adsns_options['adunits'][$this->adsns_options['publisher_id']] = $adsns_temp_adunits; } /* End fix old options */ update_option('adsns_settings', $this->adsns_options); try { $adsns_list_adclients = $adsns_adsense_adclients->listAdclients()->getItems(); $adsns_ad_client = null; foreach ($adsns_list_adclients as $adsns_list_adclient) { if ($adsns_list_adclient['productCode'] == 'AFC') { $adsns_ad_client = $adsns_list_adclient['id']; } } if ($adsns_ad_client) { try { $adsns_adunits = $adsns_adsense_adunits->listAdunits($adsns_ad_client)->getItems(); foreach ($adsns_adunits as $adsns_adunit) { $adsns_adunit_type = $adsns_adunit_types[$adsns_adunit->getContentAdsSettings()->getType()]; $adsns_adunit_size = preg_replace('/SIZE_([\\d]+)_([\\d]+)/', '$1x$2', $adsns_adunit->getContentAdsSettings()->getSize()); if (array_key_exists($adsns_adunit_size, $adsns_adunit_sizes)) { $adsns_adunit_size = $adsns_adunit_sizes[$adsns_adunit_size]; } $adsns_adunit_status = $adsns_adunit->getStatus(); if (array_key_exists($adsns_adunit_status, $adsns_adunit_statuses)) { $adsns_adunit_status = $adsns_adunit_statuses[$adsns_adunit_status]; } $adsns_tbl_data[$adsns_adunit->getName()] = array('id' => $adsns_adunit->getId(), 'name' => $adsns_adunit->getName(), 'code' => $adsns_adunit->getCode(), 'summary' => sprintf('%s, %s', $adsns_adunit_type, $adsns_adunit_size), 'status' => $adsns_adunit_status); } } catch (Google_Service_Exception $e) { $adsns_err = $e->getErrors(); $adsns_api_notice = array('class' => 'error adsns_api_notice', 'message' => sprintf('<strong>%s</strong> %s %s', __('AdUnits Error:', 'adsense-plugin'), $adsns_err[0]['message'], sprintf(__('Create account in %s', 'adsense-plugin'), '<a href="https://www.google.com/adsense" target="_blank">Google AdSense.</a>'))); } } } catch (Google_Service_Exception $e) { $adsns_err = $e->getErrors(); $adsns_api_notice = array('class' => 'error adsns_api_notice', 'message' => sprintf('<strong>%s</strong> %s %s', __('AdClient Error:', 'adsense-plugin'), $adsns_err[0]['message'], sprintf(__('Create account in %s', 'adsense-plugin'), '<a href="https://www.google.com/adsense" target="_blank">Google AdSense.</a>'))); } } catch (Google_Service_Exception $e) { $adsns_err = $e->getErrors(); $adsns_api_notice = array('class' => 'error adsns_api_notice', 'message' => sprintf('<strong>%s</strong> %s %s', __('Account Error:', 'adsense-plugin'), $adsns_err[0]['message'], sprintf(__('Create account in %s', 'adsense-plugin'), '<a href="https://www.google.com/adsense" target="_blank">Google AdSense.</a>'))); } catch (Exception $e) { $adsns_api_notice = array('class' => 'error adsns_api_notice', 'message' => $e->getMessage()); } } if (isset($_POST['adsns_authorization_code']) && isset($_POST['adsns_authorize']) && !$adsns_client->getAccessToken() && check_admin_referer(plugin_basename(__FILE__), 'adsns_nonce_name')) { $adsns_api_notice = array('class' => 'error adsns_api_notice', 'message' => __('Invalid authorization code. Please, try again.', 'adsense-plugin')); } if (isset($_POST['adsns_save_settings']) && check_admin_referer(plugin_basename(__FILE__), 'adsns_nonce_name')) { $adsns_old_options = $this->adsns_options; $adsns_area = isset($_POST['adsns_area']) ? $_POST['adsns_area'] : ''; if (array_key_exists($adsns_area, $adsns_tabs)) { $adsns_save_settings = true; if (isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_area])) { $this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_area] = array(); } if (isset($_POST['adsns_adunit_ids'])) { $adsns_adunit_ids = array_slice($_POST['adsns_adunit_ids'], 0, $adsns_tabs[$adsns_area]['max_ads']); $adsns_adunit_positions = isset($_POST['adsns_adunit_position']) ? $_POST['adsns_adunit_position'] : array(); if (isset($adsns_publisher_id) && isset($adsns_ad_client)) { foreach ($adsns_adunit_ids as $adsns_adunit_id) { try { $adsns_adunit_code = $adsns_adsense_adunits->getAdCode($adsns_ad_client, $adsns_adunit_id)->getAdCode(); $adsns_adunit_position = array_key_exists($adsns_adunit_id, $adsns_adunit_positions) ? $adsns_adunit_positions[$adsns_adunit_id] : NULL; $this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_area][] = array('id' => $adsns_adunit_id, 'position' => $adsns_adunit_position, 'code' => htmlspecialchars($adsns_adunit_code)); } catch (Google_Service_Exception $e) { $adsns_err = $e->getErrors(); $adsns_save_settings = false; $adsns_settings_notices[] = array('class' => 'error', 'message' => sprintf('%s<br/>%s<br/>%s', sprintf(__('An error occurred while obtaining the code for the block %s.', 'adsense-plugin'), sprintf('<strong>%s</strong>', $adsns_adunit_id)), $adsns_err[0]['message'], __("Settings are not saved.", 'adsense-plugin'))); } } } } if ($adsns_area != 'widget') { if (isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']]['widget'])) { if (count($this->adsns_options['adunits'][$this->adsns_options['publisher_id']]['widget']) > 0 && count($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_area]) > 2) { $adsns_save_settings = false; $adsns_settings_notices[] = array('class' => 'error', 'message' => sprintf('%s<br/>%s<br/>%s', sprintf(__("The maximum number of ad blocks on the page cannot be more than 3 ad blocks (%s).", 'adsense-plugin'), sprintf('<a href="https://support.google.com/adsense/answer/1346295?hl=en#Ad_limit_per_page" target="_blank">%s</a>', __('Learn more', 'adsense-plugin'))), sprintf(__('Please select a smaller number of ad blocks or disable the ad block display in the %s tab.', 'adsense-plugin'), sprintf('<strong>"%s"</strong>', __('Widget', 'adsense-plugin'))), __("Settings are not saved.", 'adsense-plugin'))); } } } else { if (isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']]['widget']) && count($this->adsns_options['adunits'][$this->adsns_options['publisher_id']]['widget']) > 0) { $adsns_crowded_tabs = ''; $adsns_crowded_tabs_count = 0; foreach ($this->adsns_options['adunits'][$this->adsns_options['publisher_id']] as $adsns_tab => $adsns_adunit) { if ($adsns_tab == 'widget') { continue; } if (count($adsns_adunit) > 2) { $adsns_crowded_tabs .= sprintf('"%s" (%s %s), ', $adsns_tabs[$adsns_tab]['tab']['title'], count($adsns_adunit), __('ad blocks', 'adsense-plugin')); $adsns_crowded_tabs_count++; } } $adsns_crowded_tabs = substr($adsns_crowded_tabs, 0, -2); if ($adsns_crowded_tabs_count > 0) { if ($adsns_crowded_tabs_count <= 1) { $adsns_settings_notices[] = array('class' => 'error', 'message' => sprintf('%s<br/>%s<br/>%s', sprintf(__("The maximum number of ad blocks on the page cannot be more than 3 ad blocks (%s).", 'adsense-plugin'), sprintf('<a href="https://support.google.com/adsense/answer/1346295?hl=en#Ad_limit_per_page" target="_blank">%s</a>', __('Learn more', 'adsense-plugin'))), sprintf(__('To display the ad block in widget, please set a smaller number of ad blocks in the %s tab.', 'adsense-plugin'), sprintf('<strong>%s</strong>', $adsns_crowded_tabs)), __("Settings are not saved.", 'adsense-plugin'))); } else { $adsns_settings_notices[] = array('class' => 'error', 'message' => sprintf('%s<br/>%s<br/>%s', sprintf(__("The maximum number of ad blocks on the page cannot be more than 3 ad blocks (%s).", 'adsense-plugin'), sprintf('<a href="https://support.google.com/adsense/answer/1346295?hl=en#Ad_limit_per_page" target="_blank">%s</a>', __('Learn more', 'adsense-plugin'))), sprintf(__('To display the ad block in widget, please set a smaller number of ad blocks in tabs: %s.', 'adsense-plugin'), sprintf('<strong>%s</strong>', $adsns_crowded_tabs)), __("Settings are not saved.", 'adsense-plugin'))); } $adsns_save_settings = false; } } } if ($adsns_save_settings) { update_option('adsns_settings', $this->adsns_options); $adsns_settings_notices[] = array('class' => 'updated fade', 'message' => __("Settings saved.", 'adsense-plugin')); } else { $this->adsns_options = $adsns_old_options; } } else { $adsns_settings_notices[] = array('class' => 'error', 'message' => __("Settings are not saved.", 'adsense-plugin')); } } } /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename); if (!empty($go_pro_result['error'])) { $adsns_settings_notices[] = array('class' => 'error', 'message' => $go_pro_result['error']); } } ?> <div class="wrap" id="adsns_wrap"> <h1><?php _e('Google AdSense Settings', 'adsense-plugin'); ?> </h1> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=adsense-plugin.php"><?php _e('Settings', 'adsense-plugin'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> bws_go_pro_tab" href="admin.php?page=adsense-plugin.php&action=go_pro"><?php _e('Go PRO', 'adsense-plugin'); ?> </a> </h2> <?php if (isset($adsns_api_notice)) { printf('<div class="below-h2 %s"><p>%s</p></div>', $adsns_api_notice['class'], $adsns_api_notice['message']); } if (isset($adsns_settings_notices)) { foreach ($adsns_settings_notices as $adsns_settings_notice) { printf('<div class="below-h2 %s"><p>%s</p></div>', $adsns_settings_notice['class'], $adsns_settings_notice['message']); } } bws_show_settings_notice(); if (!isset($_GET['action'])) { if (!$this->adsns_adsense_api) { ?> <form id="adsns_settings_form" action="admin.php?page=adsense-plugin.php" method="post"> <div id="adsns_update"> <p> <strong><?php _e("Attention:", 'adsense-plugin'); ?> </strong> <?php _e('We updated the plugin to use Google AdSense API, which is not compatible with the old settings. At the moment, plugin use old settings. But for further plugin usage with a new Google AdSense API, you will need to re-configure the ad blocks display. Please note that the old settings and plugin ad blocks in the frontend will be removed.', 'adsense-plugin'); ?> <div><input class="button-primary" type="submit" name="adsns_upgrade" value="<?php _e('Upgrade to new functionality', 'adsense-plugin'); ?> "></div> </p> <?php wp_nonce_field(plugin_basename(__FILE__), 'adsns_nonce_name'); ?> </div> </form> <?php } else { ?> <form id="adsns_settings_form" class="bws_form" action="admin.php?page=adsense-plugin.php<?php echo $adsns_form_action; ?> " method="post"> <table id="adsns_api" class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Remote work with Google AdSense', 'adsense-plugin'); ?> </th> <td> <?php if ($adsns_client->getAccessToken()) { ?> <div id="adsns_api_buttons"> <input class="button-secondary" name="adsns_logout" type="submit" value="<?php _e('Log out from Google AdSense', 'adsense-plugin'); ?> " /> </div> <?php } else { $adsns_state = mt_rand(); $adsns_client->setState($adsns_state); $_SESSION['gglstmp_state' . $adsns_blog_prefix] = $adsns_client; $adsns_auth_url = $adsns_client->createAuthUrl(); ?> <div id="adsns_authorization_notice"> <?php _e("Please authorize via your Google Account to manage ad blocks.", 'adsense-plugin'); ?> </div> <a id="adsns_authorization_button" class="button-primary" href="<?php echo $adsns_auth_url; ?> " target="_blank" onclick="window.open(this.href,'','top='+(screen.height/2-560/2)+',left='+(screen.width/2-640/2)+',width=640,height=560,resizable=0,scrollbars=0,menubar=0,toolbar=0,status=1,location=0').focus(); return false;"><?php _e('Get Authorization Code', 'adsense-plugin'); ?> </a> <div id="adsns_authorization_form"> <input id="adsns_authorization_code" name="adsns_authorization_code" type="text" autocomplete="off" maxlength="100"> <input id="adsns_authorize" class="button-primary" name="adsns_authorize" type="submit" value="<?php _e('Authorize', 'adsense-plugin'); ?> "> </div> <?php } ?> </td> </tr> <?php if (isset($adsns_publisher_id)) { ?> <tr valign="top"> <th scope="row"><?php _e('Your Publisher ID:', 'adsense-plugin'); ?> </th> <td> <span id="adsns_publisher_id"><?php echo $adsns_publisher_id; ?> </span> </td> </tr> <?php } ?> </table> <?php if (isset($adsns_publisher_id) && isset($adsns_tabs[$adsns_current_tab])) { ?> <h2 id="adsns-tabs" class="nav-tab-wrapper"> <?php foreach ($adsns_tabs as $adsns_tab => $adsns_tab_data) { if (isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_tab])) { $adsns_count_ads = count($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_tab]); } else { $adsns_count_ads = 0; } printf('<a class="nav-tab%s" href="%s">%s <span class="adsns_count_ads">%d</span></a>', $adsns_tab == $adsns_current_tab ? ' nav-tab-active' : '', $adsns_tab_data['tab']['url'], $adsns_tab_data['tab']['title'], $adsns_count_ads); } ?> </h2> <div id="adsns_tab_content" <?php if ($adsns_current_tab == 'search') { echo 'class="bws_pro_version_bloc adsns_pro_version_bloc"'; } ?> > <div <?php if ($adsns_current_tab == 'search') { echo 'class="bws_pro_version_table_bloc adsns_pro_version_table_bloc"'; } ?> > <div <?php if ($adsns_current_tab == 'search') { echo 'class="bws_table_bg adsns_table_bg"'; } ?> ></div> <div id="adsns_usage_notice"> <p><?php printf('<strong>%s</strong> %s <a href="https://support.google.com/adsense/answer/1346295?hl=en#Ad_limit_per_page" target="_blank">%s</a>.', __('Please note:', 'adsense-plugin'), __('The maximum number of ad blocks on the page cannot be more than 3 ad blocks.', 'adsense-plugin'), __('Learn more', 'adsense-plugin')); ?> </p> <?php if ($adsns_current_tab == 'widget') { ?> <p><?php printf(__("Please don't forget to place the AdSense widget into a needed sidebar on the %s.", 'adsense-plugin'), sprintf('<a href="widgets.php" target="_blank">%s</a>', __('widget page', 'adsense-plugin'))); printf(' %s <a href="http://bestwebsoft.com/products/google-adsense/?k=2887beb5e9d5e26aebe6b7de9152ad1f&pn=80&v=%s&wp_v=%s" target="_blank"><strong>PRO</strong></a>.', __('An opportunity to add several widgets is available in the', 'adsense-plugin'), $this->adsns_plugin_info["Version"], $wp_version); ?> </p> <?php } ?> <p> <?php printf(__('Add or manage existing ad blocks in the %s.', 'adsense-plugin'), sprintf('<a href="https://www.google.com/adsense/app#main/myads-viewall-adunits" target="_blank">%s</a>', __('Google AdSense', 'adsense-plugin'))); ?> <br /> <span class="bws_info"><?php printf(__('After adding the ad block in Google AdSense, please %s to see the new ad block in the list of plugin ad blocks.', 'adsense-plugin'), sprintf('<a href="admin.php?page=adsense-plugin.php%s">%s</a>', $adsns_form_action, __('reload the page', 'adsense-plugin'))); ?> </span> </p> </div> <?php if (isset($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_current_tab])) { foreach ($this->adsns_options['adunits'][$this->adsns_options['publisher_id']][$adsns_current_tab] as $adsns_tbl_adunit) { $adsns_tbl_adunits[$adsns_tbl_adunit['id']] = $adsns_tbl_adunit['position']; } } $adsns_lt = new Adsns_List_Table(); $adsns_lt->adsns_tbl_data = $adsns_tbl_data; $adsns_lt->adsns_tbl_adunits = isset($adsns_tbl_adunits) && is_array($adsns_tbl_adunits) ? $adsns_tbl_adunits : array(); $adsns_lt->adsns_adunit_positions = $adsns_tabs[$adsns_current_tab]['adunit_positions']; $adsns_lt->adsns_adunit_positions_pro = $adsns_tabs[$adsns_current_tab]['adunit_positions_pro']; $adsns_lt->prepare_items(); $adsns_lt->display(); ?> </div> <?php if ($adsns_current_tab == 'search') { ?> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'adsense-plugin'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-adsense/?k=2887beb5e9d5e26aebe6b7de9152ad1f&pn=80&v=<?php echo $this->adsns_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google AdSense Pro"><?php _e('Learn More', 'adsense-plugin'); ?> </a> <div class="clear"></div> </div> <?php } ?> </div> <?php } if ($adsns_current_tab != 'search') { ?> <p> <input type="hidden" name="adsns_area" value="<?php echo $adsns_current_tab; ?> " /> <input id="bws-submit-button" type="submit" class="button-primary" name="adsns_save_settings" value="<?php _e('Save Changes', 'adsense-plugin'); ?> " /> <?php wp_nonce_field(plugin_basename(__FILE__), 'adsns_nonce_name'); ?> </p> <?php } ?> </form> <?php } bws_plugin_reviews_block($this->adsns_plugin_info['Name'], 'adsense-plugin'); } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($this->adsns_plugin_info, $plugin_basename, 'adsense-plugin.php', 'adsense-pro.php', 'adsense-pro/adsense-pro.php', 'google-adsense', '2887beb5e9d5e26aebe6b7de9152ad1f', '80', isset($go_pro_result['pro_plugin_is_activated'])); } ?> </div> <?php }
function mltlngg_languages_tab() { global $mltlngg_message_value, $mltlngg_plugin_info, $mltlngg_go_pro_result; ?> <div class="wrap" id="mltlngg-settings"> <div class="icon32 icon32-bws" id="icon-options-general"></div> <h2><?php _e('Multilanguage Settings', 'multilanguage'); ?> <a class="add-new-h2" href="#" id="mltlngg-add-lang-link"><?php _e('Add language', 'multilanguage'); ?> </a> </h2> <!-- Display language tab on setting page --> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action']) || isset($_GET['action']) && 'go_pro' != $_GET['action']) { echo ' nav-tab-active'; } ?> " href="<?php echo admin_url('admin.php?page=mltlngg_settings', ''); ?> "><?php _e('Languages', 'multilanguage'); ?> </a> <a class="nav-tab" href="<?php echo admin_url('admin.php?page=mltlngg_settings&tab=settings', ''); ?> "><?php _e('Settings', 'multilanguage'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/multilanguage/faq/" target="_blank"><?php _e('FAQ', 'multilanguage'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=mltlngg_settings&action=go_pro"><?php _e('Go PRO', 'multilanguage'); ?> </a> </h2><!-- .nav-tab-wrapper --> <!-- /end language tab on setting page --> <?php if (isset($_POST['mltlngg_language_form_was_send']) || isset($_POST['mltlngg_add_new_language_form_was_send']) || isset($_GET['action'])) { if (!empty($mltlngg_message_value['error'])) { ?> <div class="error below-h2"><p><?php echo $mltlngg_message_value['error']; ?> </p></div> <?php } elseif (!empty($mltlngg_message_value['success'])) { ?> <div class="updated fade below-h2"><p><?php echo $mltlngg_message_value['success']; ?> </p></div> <?php } } bws_show_settings_notice(); /* Form for adding new language */ if (!isset($_GET['action']) || isset($_GET['action']) && 'go_pro' != $_GET['action']) { mltlngg_add_language_form(); ?> <!-- /form for adding new language --> <form class="bws_form" name="mltlngg_current_languages_form" method="post" action="" id="mltlngg-current-languages-form"> <!-- display table of languages, source - table.php --> <?php mltlngg_table(); wp_nonce_field('mltlngg_current_languages_form', 'mltlngg_current_languages_field'); ?> <!-- /table of languages --> <br> <input id="bws-submit-button" type="submit" name="mltlngg_language_form_submit" class="button-primary" value="<?php _e('Save changes', 'multilanguage'); ?> "> <input type="hidden" name="mltlngg_language_form_was_send" value="1"> </form><!-- #mltlngg_current_languages_form --> <div><p> </p></div> <?php } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab($mltlngg_plugin_info, plugin_basename(__FILE__), 'mltlngg_settings', 'mltlnggpr_settings', 'multilanguage-pro/multilanguage-pro.php', 'multilanguage', 'fa164f00821ed3a87e6f78cb3f5c277b', '143', isset($mltlngg_go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($mltlngg_plugin_info['Name'], 'multilanguage'); ?> </div><!-- .wrap --> <?php }