function gglcptch_settings_page() { global $gglcptch_options, $gglcptch_plugin_info, $wp_version, $gglcptch_default_options; $plugin_basename = plugin_basename(__FILE__); $message = $error = ''; $all_plugins = get_plugins(); $is_network = is_multisite() && is_network_admin(); $is_main_site = is_main_site(get_current_blog_id()); $admin_url = $is_network ? network_admin_url('/') : admin_url('/'); $bws_contact_form = gglcptch_plugin_status(array('contact-form-plugin/contact_form.php', 'contact-form-pro/contact_form_pro.php'), $all_plugins, $is_network); if (!isset($_GET['action'])) { $all_plugins = get_plugins(); $gglcptch_sizes_v2 = array('normal' => __('Normal', 'google-captcha'), 'compact' => __('Compact', 'google-captcha')); /* Private and public keys */ $gglcptch_keys = array('public' => array('display_name' => __('Site key', 'google-captcha'), 'form_name' => 'gglcptch_public_key', 'error_msg' => ''), 'private' => array('display_name' => __('Secret Key', 'google-captcha'), 'form_name' => 'gglcptch_private_key', 'error_msg' => '')); /* Checked forms */ $gglcptch_forms = array(array('login_form', __('Login form', 'google-captcha')), array('registration_form', __('Registration form', 'google-captcha')), array('reset_pwd_form', __('Reset password form', 'google-captcha')), array('comments_form', __('Comments form', 'google-captcha'))); /* Google captcha themes */ $gglcptch_themes = array(array('red', 'Red'), array('white', 'White'), array('blackglass', 'Blackglass'), array('clean', 'Clean')); /* Save data for settings page */ if (isset($_POST['gglcptch_form_submit']) && check_admin_referer($plugin_basename, 'gglcptch_nonce_name')) { if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($gglcptch_options); $gglcptch_options = $hide_result['options']; } if (!$_POST['gglcptch_public_key'] || '' == $_POST['gglcptch_public_key']) { $gglcptch_keys['public']['error_msg'] = __('Enter site key', 'google-captcha'); $error = __("WARNING: The captcha will not display while you don't fill key fields.", 'google-captcha'); } else { $gglcptch_keys['public']['error_msg'] = ''; } if (!$_POST['gglcptch_private_key'] || '' == $_POST['gglcptch_private_key']) { $gglcptch_keys['private']['error_msg'] = __('Enter secret key', 'google-captcha'); $error = __("WARNING: The captcha will not display while you don't fill key fields.", 'google-captcha'); } else { $gglcptch_keys['private']['error_msg'] = ''; } $gglcptch_options['public_key'] = trim(stripslashes(esc_html($_POST['gglcptch_public_key']))); $gglcptch_options['private_key'] = trim(stripslashes(esc_html($_POST['gglcptch_private_key']))); $gglcptch_options['login_form'] = isset($_POST['gglcptch_login_form']) ? 1 : 0; $gglcptch_options['registration_form'] = isset($_POST['gglcptch_registration_form']) ? 1 : 0; $gglcptch_options['reset_pwd_form'] = isset($_POST['gglcptch_reset_pwd_form']) ? 1 : 0; $gglcptch_options['comments_form'] = isset($_POST['gglcptch_comments_form']) ? 1 : 0; $gglcptch_options['contact_form'] = isset($_POST['gglcptch_contact_form']) ? 1 : 0; $gglcptch_options['recaptcha_version'] = $_POST['gglcptch_recaptcha_version']; $gglcptch_options['theme'] = $_POST['gglcptch_theme']; $gglcptch_options['theme_v2'] = $_POST['gglcptch_theme_v2']; if (function_exists('get_editable_roles')) { foreach (get_editable_roles() as $role => $fields) { $gglcptch_options[$role] = isset($_POST['gglcptch_' . $role]) ? 1 : 0; } } update_option('gglcptch_options', $gglcptch_options); $message = __('Settings saved', 'google-captcha'); } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $gglcptch_options = $gglcptch_default_options; update_option('gglcptch_options', $gglcptch_options); $message = __('All plugin settings were restored.', 'google-captcha'); } } $bws_hide_premium_options_check = bws_hide_premium_options_check($gglcptch_options); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename, 'gglcptch_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } ?> <div class="wrap"> <h1 style="line-height: normal;"><?php _e('Google Captcha Settings', 'google-captcha'); ?> </h1> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-captcha.php"><?php _e('Settings', 'google-captcha'); ?> </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=google-captcha.php&action=go_pro"><?php _e('Go PRO', 'google-captcha'); ?> </a> </h2> <?php if (!isset($_GET['action']) && !isset($_REQUEST['bws_restore_default'])) { if (!gglcptch_get_allow_url_fopen() && $gglcptch_options['recaptcha_version'] == 'v2') { printf('<div class="error inline"><p><strong>%s</strong></p></div>', __('Google Captcha version 2 will not work correctly, since the option "allow_url_fopen" is disabled. Please contact your hosting support service.', 'google-captcha')); } if ($gglcptch_options['recaptcha_version'] == 'v1') { printf('<div id="gglcptch_v1_notice" class="updated inline"><p><strong>%s</strong></p></div>', __("Only one reCAPTCHA can be displayed on the page, it's related to reCAPTCHA version 1 features.", 'google-captcha')); } } bws_show_settings_notice(); ?> <div class="updated fade inline" <?php if ("" == $message) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error inline" <?php if ("" == $error) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $error; ?> </strong></p></div> <?php if (!empty($hide_result['message'])) { ?> <div class="updated fade inline"><p><strong><?php echo $hide_result['message']; ?> </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 { ?> <div style="margin: 20px 0;"> <?php printf(__("If you would like to add a Google Captcha (reCAPTCHA) to your page or post, please use %s button", 'google-captcha'), '<span class="bws_code"><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt=""/></span>'); ?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help" style="vertical-align: middle;"> <div class="bws_hidden_help_text" style="min-width: 260px;"> <?php printf(__("You can add the Google Captcha (reCAPTCHA) to your page or post by clicking on %s button in the content edit block using the Visual mode. If the button isn't displayed or you would like to add the Google Captcha (reCAPTCHA) to your own form , please use the shortcode %s", 'google-captcha'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', sprintf('<span class="bws_code">[bws_google_captcha]</span><br/>')); ?> </div> </div> </div> <form class="bws_form" method="post" action="admin.php?page=google-captcha.php"> <h3><?php _e('Authentication', 'google-captcha'); ?> </h3> <p><?php printf(__('Before you are able to do something, you must to register %shere%s', 'google-captcha'), '<a target="_blank" href="https://www.google.com/recaptcha/admin#list">', '</a>.'); ?> </p> <p><?php _e('Enter site key and secret key, that you get after registration.', 'google-captcha'); ?> </p> <table id="gglcptch-keys" class="form-table"> <?php foreach ($gglcptch_keys as $key => $fields) { ?> <tr valign="top"> <th scope="row"><?php echo $fields['display_name']; ?> </th> <td> <input type="text" name="<?php echo $fields['form_name']; ?> " value="<?php echo $gglcptch_options[$key . '_key']; ?> " maxlength="200" /> <label class="gglcptch_error_msg"><?php echo $fields['error_msg']; ?> </label> </td> </tr> <?php } ?> </table> <h3><?php _e('Options', 'google-captcha'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Enable reCAPTCHA for', 'google-captcha'); ?> </th> <td> <fieldset> <p> <i><?php _e('WordPress default', 'google-captcha'); ?> </i> </p> <?php foreach ($gglcptch_forms as $form) { $gglcptch_form_type = $form[0]; $gglcptch_form_name = $form[1]; $gglcptch_form_attr = '1' == $gglcptch_options[$gglcptch_form_type] ? 'checked="checked"' : ''; $gglcptch_form_notice = ''; if (($gglcptch_form_type == 'registration_form' || $gglcptch_form_type == 'reset_pwd_form') && !$is_main_site) { $gglcptch_form_notice .= sprintf('<span class="bws_info">%s</span>', __('This option is available only for network or for main blog', 'google-captcha')); $gglcptch_form_attr = 'disabled="disabled" readonly="readonly"'; } ?> <label><input type="checkbox" name="<?php echo 'gglcptch_' . $gglcptch_form_type; ?> " value="<?php echo $gglcptch_form_type; ?> " <?php echo $gglcptch_form_attr; ?> /> <?php echo $gglcptch_form_name; ?> </label> <div class="bws_help_box dashicons dashicons-editor-help" style="vertical-align: middle;"><div class="bws_hidden_help_text"><img src="<?php echo plugins_url('google-captcha/images') . '/' . $gglcptch_form_type; ?> .jpg" title="<?php echo $gglcptch_form_name; ?> " alt="<?php echo $gglcptch_form_name; ?> "></div></div> <?php echo $gglcptch_form_notice; ?> <br /> <?php } ?> <br /> <p> <i><?php _e('Plugins', 'google-captcha'); ?> </i> </p> <?php /* Check Contact Form by BestWebSoft */ $gglcptch_plugin = $bws_contact_form; $gglcptch_plugin_name = 'Contact Form by BestWebSoft'; $gglcptch_attrs = $gglcptch_plugin_notice = ''; if ('deactivated' == $gglcptch_plugin['status']) { $gglcptch_attrs = 'disabled="disabled"'; $gglcptch_plugin_notice = sprintf(__('You should %s to use this functionality', 'google-captcha'), sprintf('<a href="%splugins.php">%s%s %s</a>', $admin_url, __('activate', 'google-captcha'), is_network_admin() ? ' ' . __('for network', 'google-captcha') : '', $gglcptch_plugin_name)); } elseif ('not_installed' == $gglcptch_plugin['status']) { $gglcptch_attrs = 'disabled="disabled"'; $gglcptch_plugin_notice = sprintf(__('You should %s to use this functionality', 'google-captcha'), sprintf('<a href="http://bestwebsoft.com/products/contact-form/?k=d70b58e1739ab4857d675fed2213cedc&pn=75&v=%s&wp_v=%s">%s %s</a>', $gglcptch_plugin_info["Version"], $wp_version, __('download', 'google-captcha'), $gglcptch_plugin_name)); } if ('1' == $gglcptch_options['contact_form'] && $gglcptch_attrs == '') { $gglcptch_attrs .= ' checked="checked"'; } ?> <label><input type="checkbox" <?php echo $gglcptch_attrs; ?> name="gglcptch_contact_form" value="contact_form" /> <?php echo $gglcptch_plugin_name; ?> </label> <div class="bws_help_box dashicons dashicons-editor-help" style="vertical-align: middle;"><div class="bws_hidden_help_text"><img src="<?php echo plugins_url('google-captcha/images'); ?> /contact_form.jpg" title="<?php echo $gglcptch_plugin_name; ?> " alt="<?php echo $gglcptch_plugin_name; ?> "></div></div> <span class="bws_info"><?php echo $gglcptch_plugin_notice; ?> </span><br /> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'google-captcha'); ?> "></button> <div class="bws_table_bg"></div> <div class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" disabled="disabled" name="gglcptch_sbscrbr" value="1"> Subscriber by BestWebSoft</label><br> <label><input disabled="disabled" type="checkbox" disabled="disabled" name="gglcptch_cf7" value="1"> Contact Form 7</label><br> <label><input disabled="disabled" type="checkbox" disabled="disabled" name="gglcptch_buddypress_register" value="1"> BuddyPress Registration form</label><br> <label><input disabled="disabled" type="checkbox" disabled="disabled" name="gglcptch_buddypress_comments" value="1"> BuddyPress Comments form</label><br> <label><input disabled="disabled" type="checkbox" disabled="disabled" name="gglcptch_buddypress_group" value="1"> BuddyPress "Create a Group" form</label> </div> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'google-captcha'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-captcha/?k=b850d949ccc1239cab0da315c3c822ab&pn=109&v=<?php echo $gglcptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Captcha Pro (reCAPTCHA)"> <?php _e('Learn More', 'google-captcha'); ?> </a> <div class="clear"></div> </div> </div><br> <?php } ?> <span class="bws_info"><?php printf(__('If you would like to add Google Captcha (reCAPTCHA) to a custom form see %s', 'google-captcha'), sprintf('<a href="http://bestwebsoft.com/products/google-captcha/faq/" target="_blank">%s</a>', __('FAQ', 'google-captcha'))); ?> </span> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Hide reCAPTCHA in Comments form for', 'google-captcha'); ?> </th> <td> <fieldset> <?php if (function_exists('get_editable_roles')) { foreach (get_editable_roles() as $role => $fields) { ?> <label><input type="checkbox" name="<?php echo 'gglcptch_' . $role; ?> " value=<?php echo $role; if (isset($gglcptch_options[$role]) && '1' == $gglcptch_options[$role]) { echo ' checked'; } ?> > <?php echo $fields['name']; ?> </label><br/> <?php } } ?> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA version', 'google-captcha'); ?> </th> <td> <fieldset> <label><input type="radio" name="gglcptch_recaptcha_version" value="v1"<?php if ('v1' == $gglcptch_options['recaptcha_version']) { echo ' checked="checked"'; } ?> > <?php _e('version', 'google-captcha'); ?> 1</label> <div class="bws_help_box dashicons dashicons-editor-help" style="vertical-align: middle;"><div class="bws_hidden_help_text"><img src="<?php echo plugins_url('google-captcha/images'); ?> /recaptcha_v1.png" title="reCAPTCHA <?php _e('version', 'google-captcha'); ?> 1" alt="reCAPTCHA <?php _e('version', 'google-captcha'); ?> 1"></div></div><br/> <label><input type="radio" name="gglcptch_recaptcha_version" value="v2"<?php if ('v2' == $gglcptch_options['recaptcha_version']) { echo ' checked="checked"'; } ?> > <?php _e('version', 'google-captcha'); ?> 2</label> <div class="bws_help_box dashicons dashicons-editor-help" style="vertical-align: middle;"><div class="bws_hidden_help_text"><img src="<?php echo plugins_url('google-captcha/images'); ?> /recaptcha_v2.png" title="reCAPTCHA <?php _e('version', 'google-captcha'); ?> 2" alt="reCAPTCHA <?php _e('version', 'google-captcha'); ?> 2"></div></div> </fieldset> </td> </tr> <tr class="gglcptch_theme_v1" valign="top"> <th scope="row"> <?php _e('reCAPTCHA theme', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 1)</span> </th> <td> <select name="gglcptch_theme"> <?php foreach ($gglcptch_themes as $theme) { ?> <option value=<?php echo $theme[0]; if ($theme[0] == $gglcptch_options['theme']) { echo ' selected'; } ?> > <?php echo $theme[1]; ?> </option> <?php } ?> </select> </td> </tr> <tr class="gglcptch_theme_v2" valign="top"> <th scope="row"> <?php _e('reCAPTCHA theme', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 2)</span> </th> <td> <select name="gglcptch_theme_v2"> <option value="light" <?php if ('light' == $gglcptch_options['theme_v2']) { echo ' selected'; } ?> >light</option> <option value="dark" <?php if ('dark' == $gglcptch_options['theme_v2']) { echo ' selected'; } ?> >dark</option> </select> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'google-captcha'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA language', 'google-captcha'); ?> </th> <td> <select disabled="disabled" name="gglcptch_language"> <option value="en" selected="selected">English (US)</option> </select> <div style="margin: 5px 0 0;"> <input disabled="disabled" id="gglcptch_use_multilanguage_locale" type="checkbox" name="gglcptch_use_multilanguage_locale" value="1" /> <label for="gglcptch_use_multilanguage_locale"><?php _e('Use the current site language', 'google-captcha'); ?> </label> <span class="bws_info">(<?php _e('Using', 'google-captcha'); ?> Multilanguage by BestWebSoft)</span> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php _e('reCAPTCHA size', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 2)</span> </th> <td><fieldset> <?php foreach ($gglcptch_sizes_v2 as $value => $name) { printf('<div class="gglcptch_size_v2"><label><input disabled="disabled" type="radio" name="gglcptch_size_v2" value="%s"%s> %s</label></div>', $value, $name == 'Normal' ? ' checked="checked"' : '', $name); } ?> </fieldset> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'google-captcha'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-captcha/?k=b850d949ccc1239cab0da315c3c822ab&pn=109&v=<?php echo $gglcptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Captcha Pro (reCAPTCHA)"> <?php _e('Learn More', 'google-captcha'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'google-captcha'); ?> " name="gglcptch_save_changes" /> <input type="hidden" name="gglcptch_form_submit" value="submit" /> <?php wp_nonce_field($plugin_basename, 'gglcptch_nonce_name'); ?> </p> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $gglcptch_plugin_info, $plugin_basename, 'google-captcha.php', 'google-captcha-pro.php', 'google-captcha-pro/google-captcha-pro.php', 'google-captcha', 'b850d949ccc1239cab0da315c3c822ab', '109', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($gglcptch_plugin_info['Name'], 'google-captcha'); ?> </div> <?php }
function cptch_settings_page() { global $cptch_options, $wp_version, $cptch_plugin_info, $cptch_option_defaults, $wpdb; $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')), array('cptch_difficulty_image', __('Images', 'captcha'))); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); $is_network = is_multisite() && is_network_admin(); $admin_url = $is_network ? network_admin_url('/') : admin_url('/'); $bws_contact_form = cptch_plugin_status(array('contact-form-plugin/contact_form.php', 'contact-form-pro/contact_form_pro.php'), $all_plugins, $is_network); /* Save data for settings page */ if (isset($_REQUEST['cptch_form_submit']) && check_admin_referer($plugin_basename, 'cptch_nonce_name')) { /* hide pro blocks */ if (isset($_POST['bws_hide_premium_options']) && check_admin_referer($plugin_basename, 'cptch_nonce_name')) { $hide_result = bws_hide_premium_options($cptch_options); $cptch_options = $hide_result['options']; } $cptch_options['cptch_login_form'] = isset($_REQUEST['cptch_login_form']) ? 1 : 0; $cptch_options['cptch_register_form'] = isset($_REQUEST['cptch_register_form']) ? 1 : 0; $cptch_options['cptch_lost_password_form'] = isset($_REQUEST['cptch_lost_password_form']) ? 1 : 0; $cptch_options['cptch_comments_form'] = isset($_REQUEST['cptch_comments_form']) ? 1 : 0; $cptch_options['cptch_hide_register'] = isset($_REQUEST['cptch_hide_register']) ? 1 : 0; $cptch_options['cptch_contact_form'] = isset($_REQUEST['cptch_contact_form']) ? 1 : 0; $cptch_options['cptch_label_form'] = isset($_REQUEST['cptch_label_form']) ? stripslashes(esc_html($_REQUEST['cptch_label_form'])) : ''; $cptch_options['cptch_required_symbol'] = isset($_REQUEST['cptch_required_symbol']) ? stripslashes(esc_html($_REQUEST['cptch_required_symbol'])) : ''; $cptch_options['cptch_error_empty_value'] = isset($_REQUEST['cptch_error_empty_value']) ? stripslashes(esc_html($_REQUEST['cptch_error_empty_value'])) : ''; $cptch_options['cptch_error_incorrect_value'] = isset($_REQUEST['cptch_error_incorrect_value']) ? stripslashes(esc_html($_REQUEST['cptch_error_incorrect_value'])) : ''; $cptch_options['cptch_error_time_limit'] = isset($_REQUEST['cptch_error_time_limit']) ? stripslashes(esc_html($_REQUEST['cptch_error_time_limit'])) : ''; $cptch_options['whitelist_message'] = isset($_REQUEST['cptch_whitelist_message']) ? stripslashes(esc_html($_REQUEST['cptch_whitelist_message'])) : ''; if ($cptch_options['cptch_error_empty_value'] == '') { $cptch_options['cptch_error_empty_value'] = $cptch_option_defaults['cptch_error_empty_value']; } if ($cptch_options['cptch_error_incorrect_value'] == '') { $cptch_options['cptch_error_incorrect_value'] = $cptch_option_defaults['cptch_error_incorrect_value']; } if ($cptch_options['cptch_error_time_limit'] == '') { $cptch_options['cptch_error_time_limit'] = $cptch_option_defaults['cptch_error_time_limit']; } $cptch_options['cptch_math_action_plus'] = isset($_REQUEST['cptch_math_action_plus']) ? 1 : 0; $cptch_options['cptch_math_action_minus'] = isset($_REQUEST['cptch_math_action_minus']) ? 1 : 0; $cptch_options['cptch_math_action_increase'] = isset($_REQUEST['cptch_math_action_increase']) ? 1 : 0; $cptch_options['cptch_difficulty_number'] = isset($_REQUEST['cptch_difficulty_number']) ? 1 : 0; $cptch_options['cptch_difficulty_word'] = isset($_REQUEST['cptch_difficulty_word']) ? 1 : 0; $cptch_options['cptch_difficulty_image'] = isset($_REQUEST['cptch_difficulty_image']) ? 1 : 0; $cptch_options['used_packages'] = isset($_REQUEST['cptch_used_packages']) ? $_REQUEST['cptch_used_packages'] : array(); $cptch_options['display_reload_button'] = isset($_REQUEST['cptch_display_reload_button']) ? 1 : 0; $cptch_options['enlarge_images'] = isset($_REQUEST['cptch_enlarge_images']) ? 1 : 0; $cptch_options['use_time_limit'] = isset($_REQUEST['cptch_use_time_limit']) ? 1 : 0; $cptch_options['time_limit'] = !isset($_REQUEST['cptch_time_limit']) || !is_numeric($_REQUEST['cptch_time_limit']) || 10 > $_REQUEST['cptch_time_limit'] ? 120 : $_REQUEST['cptch_time_limit']; /* Check select one point in the blocks Arithmetic actions and Difficulty on settings page */ $arithmetic_actions = isset($_REQUEST['cptch_math_action_plus']) || isset($_REQUEST['cptch_math_action_minus']) || isset($_REQUEST['cptch_math_action_increase']) ? true : false; $complexity_level = isset($_REQUEST['cptch_difficulty_number']) || isset($_REQUEST['cptch_difficulty_word']) || isset($_REQUEST['cptch_difficulty_image']) ? true : false; $image_optins = isset($_REQUEST['cptch_difficulty_image']) && isset($_REQUEST['cptch_used_packages']) || !isset($_REQUEST['cptch_difficulty_image']) ? true : false; /* if 'Arithmetic actions'- or 'Complexity level'- options are disabled */ if (!$arithmetic_actions || !$complexity_level) { $error = __("Please select one item in the block Arithmetic and Complexity for CAPTCHA", 'captcha'); /* if 'Use packages'-options are disabled */ } elseif (!$image_optins) { $error = __("Please select one item in the block Enable image packages", 'captcha'); } else { if (!is_null($wpdb->get_var("SELECT `id` FROM `{$wpdb->prefix}cptch_whitelist` LIMIT 1"))) { $cptch_options['whitelist_is_empty'] = false; } /* Update options in the database */ update_option('cptch_options', $cptch_options); $message = __("Settings saved.", 'captcha'); } } if (!class_exists('Cptch_package_loader')) { require_once dirname(__FILE__) . '/includes/package_loader.php'; } $package_loader = new Cptch_package_loader(); $error .= $package_loader->error; 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'); } require_once dirname(__FILE__) . '/includes/pro_banners.php'; /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename, 'cptch_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } /* Display form on the setting page */ ?> <div class="wrap"> <h1><?php _e('Captcha Settings', 'captcha'); ?> </h1> <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('Basic', 'captcha'); ?> </a> <a class="nav-tab<?php if (isset($_GET['action']) && 'advanced' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=captcha.php&action=advanced"><?php _e('Advanced', '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 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 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']) || !in_array($_GET['action'], array('whitelist', 'go_pro'))) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { bws_show_settings_notice(); if (!empty($hide_result['message'])) { ?> <div class="updated fade"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } ?> <form class="bws_form" method="post" action="admin.php?page=captcha.php<?php if (isset($_GET['action']) && 'advanced' == $_GET['action']) { echo '&action=advanced'; } ?> "> <table class="form-table"<?php if (isset($_GET['action'])) { echo ' style="display: none;"'; } ?> > <tr valign="top"> <th scope="row"><?php _e('Enable CAPTCHA for', 'captcha'); ?> :</th> <td> <fieldset> <legend class="screen-reader-text"><span><?php _e('Enable CAPTCHA for', 'captcha'); ?> </span></legend> <p><i><?php _e('WordPress default', 'captcha'); ?> </i></p> <?php foreach ($cptch_admin_fields_enable as $fields) { if (in_array($fields[0], array('cptch_register_form', 'cptch_lost_password_form')) && !in_array(get_current_blog_id(), array(0, 1))) { $notice = '<br /><span class="bws_info">' . __('This option is available only for main blog', 'captcha') . '</span>'; $disable_reg_form = ' disabled="disabled"'; $checked = ''; } else { $notice = $disable_reg_form = ''; $checked = 1 == $cptch_options[$fields[0]] ? ' checked="checked"' : ''; } ?> <label><input<?php echo $disable_reg_form . $checked; ?> type="checkbox" name="<?php echo $fields[0]; ?> " value="<?php echo $fields[0]; ?> "/> <?php echo $fields[1]; ?> </label> <div class="bws_help_box dashicons dashicons-editor-help cptch_thumb_block"> <div class="bws_hidden_help_text"><img src="<?php echo plugins_url('captcha/images') . '/' . $fields[2]; ?> " title="<?php echo $fields[1]; ?> " alt="<?php echo $fields[1]; ?> "/></div> </div> <?php echo $notice; ?> <br /> <?php } ?> <br /> <p><i><?php _e('Plugins', 'captcha'); ?> </i></p> <?php if ('actived' == $bws_contact_form['status']) { $disabled_attr = $info = ''; } elseif ('deactivated' == $bws_contact_form['status']) { $disabled_attr = "disabled='disabled'"; $info = '<span class="bws_info">' . __('You should', 'captcha') . ' <a href="' . $admin_url . 'plugins.php">' . __('activate', 'captcha') . ' Contact Form ' . (is_network_admin() ? __('for network', 'captcha') : '') . '</a>' . ' ' . __('to use this functionality', 'captcha') . '</span>'; } elseif ('not_installed' == $bws_contact_form['status']) { $disabled_attr = "disabled='disabled'"; $info = '<span class="bws_info">' . __('You should', 'captcha') . ' <a href="http://http://bestwebsoft.com/products/contact-form/?k=9ab9d358ad3a23b8a99a8328595ede2e&pn=72&v=' . $cptch_plugin_info["Version"] . '&wp_v=' . $wp_version . '">' . __('download', 'captcha') . ' Contact Form </a>' . ' ' . __('to use this functionality', 'captcha') . '</span>'; } ?> <label><input <?php echo $disabled_attr; ?> type="checkbox" name="cptch_contact_form" value="1" <?php if (1 == $cptch_options['cptch_contact_form']) { echo 'checked="checked"'; } ?> /> Contact Form by BestWebSoft</label> <div class="bws_help_box dashicons dashicons-editor-help cptch_thumb_block"> <div class="bws_hidden_help_text"> <img src="<?php echo plugins_url('captcha/images/contact_form.jpg'); ?> " title="Contact Form" alt="Contact Form"/> </div> </div> <?php echo $info; ?> <br /> <?php echo apply_filters('cptch_forms_list', ''); ?> <span class="bws_info"><?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> <?php if (!isset($_GET['action'])) { cptch_pro_block('cptch_basic_banner'); } ?> <table class="form-table"<?php if (isset($_GET['action'])) { echo ' style="display: none;"'; } ?> > <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', '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('Show "Reload" button', 'captcha'); ?> </th> <td> <input type="checkbox" name="cptch_display_reload_button" value="1" <?php if (1 == $cptch_options['display_reload_button']) { echo 'checked="checked"'; } ?> /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Arithmetic actions', '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="1" <?php if (1 == $cptch_options[$actions[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo $actions[1]; ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text"><?php cptch_display_example($actions[0]); ?> </div> </div> <br /> <?php } ?> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Complexity', 'captcha'); ?> </th> <td colspan="2"><fieldset> <legend class="screen-reader-text"><span><?php _e('Complexity', '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]; ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text<?php echo 'cptch_difficulty_image' == $diff[0] ? ' cptch_images_example' : ''; ?> "><?php cptch_display_example($diff[0]); ?> </div> </div> <br /> <?php } ?> </fieldset></td> </tr> </table> <?php $package_list = $wpdb->get_results("SELECT `id`, `name` FROM `{$wpdb->base_prefix}cptch_packages` ORDER BY `name` ASC;"); if (!empty($package_list)) { ?> <table class="form-table"<?php if (!isset($_GET['action'])) { echo ' style="display: none;"'; } ?> > <tr class="cptch_packages"> <th scope="row"><?php _e('Enable image packages', 'captcha'); ?> </th> <td> <select name="cptch_used_packages[]" multiple="multiple"> <?php foreach ($package_list as $pack) { ?> <option value="<?php echo $pack->id; ?> "<?php if (in_array($pack->id, $cptch_options['used_packages'])) { echo ' selected="selected"'; } ?> ><?php echo $pack->name; ?> </option> <?php } ?> </select> </td> </tr> <tr class="cptch_packages"> <th scope="row"><?php _e('Enlarge images on mouseover', 'captcha'); ?> </th> <td> <input type="checkbox" name="cptch_enlarge_images" value="1"<?php if (1 == $cptch_options['enlarge_images']) { echo ' checked="checked"'; } ?> /><br/> </td> </tr> </table> <?php } if (isset($_GET['action']) && 'advanced' == $_GET['action']) { cptch_pro_block('cptch_advanced_banner'); } ?> <table class="form-table"<?php if (!isset($_GET['action'])) { echo ' style="display: none;"'; } ?> > <tr valign="top"> <th scope="row"><?php _e('Enable time limit', 'captcha'); ?> </th> <td> <input type="checkbox" name="cptch_use_time_limit" value="1"<?php if (1 == $cptch_options['use_time_limit']) { echo ' checked="checked"'; } ?> /> </td> </tr> <tr valign="top" class="cptch_limt_options"<?php if (0 == $cptch_options['use_time_limit']) { echo ' style="display: none;"'; } ?> > <th scope="row"><?php _e('Set time limit', 'captcha'); ?> </th> <td> <label for="cptch_time_limit"> <input type="number" name="cptch_time_limit" id ="cptch_time_limit" min="10" max="9999" step="1" value="<?php echo $cptch_options['time_limit']; ?> " style="width: 70px;"/> <?php _e('seconds', 'captcha'); ?> </label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Notification messages", 'captcha'); ?> </th> <td colspan="2"> <p><i><?php _e("Error", 'captcha'); ?> </i></p> <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> <p><input class="cptch_settings_input" type="text" name="cptch_error_time_limit" value="<?php echo $cptch_options['cptch_error_time_limit']; ?> " maxlength="100" /> <?php _e('If time limit is exhausted', 'captcha'); ?> </p> <p><i><?php _e("Info", 'captcha'); ?> </i></p> <p><input class="cptch_settings_input" type="text" name="cptch_whitelist_message" value="<?php echo $cptch_options['whitelist_message']; ?> " maxlength="100" /> <?php _e('If the user IP is added to the whitelist (this message will be displayed instead of CAPTCHA).', 'captcha'); ?> </p> </td> </tr> </table> <input type="hidden" name="cptch_form_submit" value="submit" /> <p class="submit"> <input id="bws-submit-button" 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']) { $show = bws_hide_premium_options_check($cptch_options) ? true : false; bws_go_pro_tab_show($show, $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']) { $limit_attempts_info = cptch_plugin_status(array('limit-attempts/limit-attempts.php', 'limit-attempts-pro/limit-attempts-pro.php'), $all_plugins, $is_network); require_once dirname(__FILE__) . '/includes/whitelist.php'; $cptch_whitelist = new Cptch_Whitelist($plugin_basename, $limit_attempts_info); $cptch_whitelist->display_content(); } bws_plugin_reviews_block($cptch_plugin_info['Name'], 'captcha'); ?> </div> <?php }
function gllr_settings_page() { global $gllr_options, $wp_version, $gllr_plugin_info, $gllr_option_defaults, $gllr_BWS_demo_data; $error = $message = ""; $plugin_basename = plugin_basename(__FILE__); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); if ($cstmsrch_options = get_option('cstmsrchpr_options')) { $option_name = "cstmsrchpr_options"; } elseif ($cstmsrch_options = get_option('cstmsrch_options')) { $option_name = "cstmsrch_options"; } elseif ($cstmsrch_options = get_option('bws_custom_search')) { $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(); if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($gllr_request_options); $gllr_request_options = $hide_result['options']; } $gllr_request_options["gllr_custom_size_name"] = $gllr_options["gllr_custom_size_name"]; $gllr_custom_image_size_w_album = isset($_REQUEST['gllr_custom_image_size_w_album']) ? intval(trim($_REQUEST['gllr_custom_image_size_w_album'])) : $gllr_option_defaults["gllr_custom_size_px"][0][0]; $gllr_custom_image_size_h_album = isset($_REQUEST['gllr_custom_image_size_h_album']) ? intval(trim($_REQUEST['gllr_custom_image_size_h_album'])) : $gllr_option_defaults["gllr_custom_size_px"][0][1]; $gllr_custom_image_size_w_photo = isset($_REQUEST['gllr_custom_image_size_w_photo']) ? intval(trim($_REQUEST['gllr_custom_image_size_w_photo'])) : $gllr_option_defaults["gllr_custom_size_px"][1][0]; $gllr_custom_image_size_h_photo = isset($_REQUEST['gllr_custom_image_size_h_photo']) ? intval(trim($_REQUEST['gllr_custom_image_size_h_photo'])) : $gllr_option_defaults["gllr_custom_size_px"][1][1]; $gllr_request_options["gllr_custom_size_px"] = array(array($gllr_custom_image_size_w_album, $gllr_custom_image_size_h_album), array($gllr_custom_image_size_w_photo, $gllr_custom_image_size_h_photo)); $gllr_request_options["border_images"] = isset($_REQUEST['gllr_border_images']) ? 1 : 0; $gllr_request_options["border_images_width"] = isset($_REQUEST['gllr_border_images_width']) ? intval(trim($_REQUEST['gllr_border_images_width'])) : $gllr_option_defaults["border_images_width"]; $gllr_request_options["border_images_color"] = isset($_REQUEST['gllr_border_images_color']) ? trim($_REQUEST['gllr_border_images_color']) : $gllr_option_defaults["border_images_color"]; if (!preg_match('/^#[A-Fa-f0-9]{6}$/', $gllr_request_options["border_images_color"])) { $gllr_request_options["border_images_color"] = $gllr_option_defaults["border_images_color"]; } $gllr_request_options["custom_image_row_count"] = isset($_REQUEST['gllr_custom_image_row_count']) ? intval(trim($_REQUEST['gllr_custom_image_row_count'])) : $gllr_option_defaults["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"] = isset($_REQUEST['gllr_order_by']) ? stripslashes(esc_html($_REQUEST['gllr_order_by'])) : $gllr_option_defaults["order_by"]; $gllr_request_options["order"] = isset($_REQUEST['gllr_order']) ? stripslashes(esc_html($_REQUEST['gllr_order'])) : $gllr_option_defaults["order"]; $gllr_request_options["album_order_by"] = isset($_REQUEST['gllr_album_order_by']) ? stripslashes(esc_html($_REQUEST['gllr_album_order_by'])) : $gllr_option_defaults["album_order_by"]; $gllr_request_options["album_order"] = isset($_REQUEST['gllr_album_order']) ? stripslashes(esc_html($_REQUEST['gllr_album_order'])) : $gllr_option_defaults["album_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"] = isset($_REQUEST['gllr_return_link_page']) ? stripslashes(esc_html($_REQUEST['gllr_return_link_page'])) : $gllr_option_defaults["return_link_page"]; $gllr_request_options["return_link_url"] = isset($_REQUEST['gllr_return_link_url']) ? stripslashes(esc_html($_REQUEST['gllr_return_link_url'])) : $gllr_option_defaults["return_link_url"]; $gllr_request_options["return_link_shortcode"] = isset($_REQUEST['gllr_return_link_shortcode']) ? 1 : 0; $gllr_request_options["return_link_text"] = isset($_REQUEST['gllr_return_link_text']) ? stripslashes(esc_html($_REQUEST['gllr_return_link_text'])) : $gllr_option_defaults["return_link_text"]; $gllr_request_options["read_more_link_text"] = isset($_REQUEST['gllr_read_more_link_text']) ? stripslashes(esc_html($_REQUEST['gllr_read_more_link_text'])) : $gllr_option_defaults["read_more_link_text"]; $gllr_request_options["rewrite_template"] = isset($_REQUEST['gllr_rewrite_template']) ? 1 : 0; if (!empty($cstmsrch_options)) { if (isset($_REQUEST['gllr_add_to_search'])) { if (isset($cstmsrch_options['post_types']) && !in_array('gallery', $cstmsrch_options['post_types'])) { array_push($cstmsrch_options['post_types'], 'gallery'); } } else { if (isset($cstmsrch_options['post_types']) && 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'); } $bws_hide_premium_options_check = bws_hide_premium_options_check($gllr_options); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename, 'gllr_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } /* 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'); } /* check demo data */ $result = $gllr_BWS_demo_data->bws_handle_demo_data('gllr_plugin_upgrade'); if (!empty($result) && is_array($result)) { $error = $result['error']; $message = $result['done']; if (!empty($result['done']) && !empty($result['options'])) { $gllr_options = $result['options']; } } ?> <div class="wrap"> <h1 style="line-height: normal;"><?php _e('Gallery Settings', 'gallery-plugin'); ?> </h1> <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 <?php if (isset($_GET['action']) && 'custom_code' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=gallery-plugin.php&action=custom_code"><?php _e('Custom code', '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 below-h2 fade" <?php if ("" == $message) { echo 'style="display:none"'; } ?> ><p><strong><?php echo $message; ?> </strong></p></div> <div class="error below-h2" <?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')) { $gllr_BWS_demo_data->bws_demo_confirm(); } else { ?> <noscript><div class="error below-h2"><p><?php _e('Please enable JavaScript to use the option to renew images.', 'gallery-plugin'); ?> </p></div></noscript> <?php bws_show_settings_notice(); if (!empty($hide_result['message'])) { ?> <div class="updated below-h2 fade"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } ?> <br/> <div><?php printf(__("If you would like to add a Gallery to your page or post, please use %s button", 'gallery-plugin'), '<span class="bws_code"><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt=""/></span>'); ?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help gllr_help_box_shorcode_info"> <div class="bws_hidden_help_text" style="min-width: 180px;"> <?php printf(__("You can add the Gallery to your page or post by clicking on %s button in the content edit block using the Visual mode. If the button isn't displayed, please use the shortcode %s, where * stands for gallery ID", 'gallery-plugin'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', '<span class="bws_code">[print_gllr id=*]</span>'); ?> </div> </div> </div> <form class="bws_form" method="post" action="admin.php?page=gallery-plugin.php"> <table class="gllr_settings_table form-table"> <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"]; ?> " /> <span class="bws_info"><?php _e('The number of images per row can be less depending on the width of the parent block', 'gallery-plugin'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Image size', 'gallery-plugin'); ?> </th> <td> <fieldset> <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> <div class="gllr_settings_size" style="margin: 0 0 10px;"> <label><strong><?php _e('For the album cover', 'gallery-plugin'); ?> </strong> <span>(<?php echo $gllr_options["gllr_custom_size_name"][0]; ?> )</span></label><br /> <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]; ?> " /> x <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]; ?> " /> <span class="bws_info">(<?php _e('width x height', 'gallery-plugin'); ?> ) <?php _e('in px', 'gallery-plugin'); ?> </span> </div> <div class="gllr_settings_size" style="margin: 0 0 10px;"> <label><strong><?php _e('For thumbnails', 'gallery-plugin'); ?> </strong> (<?php echo $gllr_options["gllr_custom_size_name"][1]; ?> )</label><br /> <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]; ?> " /> x <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]; ?> " /> <span class="bws_info">(<?php _e('width x height', 'gallery-plugin'); ?> ) <?php _e('in px', 'gallery-plugin'); ?> </span> </div> <div class="gllr_settings_size" style="margin: 0 0 10px;"> <input type="button" value="<?php _e('Update images for gallery', '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> </div> </fieldset> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'gallery-plugin'); ?> "></button> <div class="bws_table_bg"></div> <table class="gllr_settings_table form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e('Image size', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><strong><?php _e('For images in the lightbox', 'gallery-plugin'); ?> </strong> (full-photo)</label> <div class="gllr_settings_size" style="margin: 0 0 10px;"> <input disabled class="gllrprfssnl_size_photo_full" type="number" name="gllrprfssnl_custom_image_size_w_full" min="1" max="10000" value="1024" /> x <input disabled class="gllrprfssnl_size_photo_full" type="number" name="gllrprfssnl_custom_image_size_h_full" min="1" max="10000" value="1024" /> <span class="bws_info">(<?php _e('width x height', 'gallery-plugin'); ?> ) <?php _e('in px', 'gallery-plugin'); ?> </span> </div> <input disabled type="checkbox" name="gllrprfssnl_size_photo_full" value="1" /> <?php _e('Display a full size image in the lightbox', 'gallery-plugin'); ?> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Crop position', 'gallery-plugin'); ?> </th> <td> <label> <select disabled style="min-width: 100px; max-width: 150px; width: 100%;"> <option value="center"><?php _e('center', 'gallery-plugin'); ?> </option> </select> <span class="bws_info"><?php _e('Horizontal', 'gallery-plugin'); ?> </span> </label><br /> <label> <select disabled style="min-width: 100px; max-width: 150px; width: 100%;"> <option value="center"><?php _e('center', 'gallery-plugin'); ?> </option> </select> <span class="bws_info"><?php _e('Vertical', 'gallery-plugin'); ?> </span> </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> <?php } ?> <table class="gllr_settings_table form-table"> <tr> <th scope="row"><?php _e('Display image text', '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('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 /> <div class="gllr_for_border_images"> <input type="number" min="0" max="10000" value="<?php echo $gllr_options["border_images_width"]; ?> " name="gllr_border_images_width" /> <span class="bws_info"><?php _e('Border width in px, just numbers', 'gallery-plugin'); ?> </span><br /> <input type="text" value="<?php echo $gllr_options["border_images_color"]; ?> " name="gllr_border_images_color" class="gllr_color_field" data-default-color="#F1F1F1" /> </div> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Sort images', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><input type="radio" name="gllr_order_by" value="ID" <?php if ('ID' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Attachment ID', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_order_by" value="title" <?php if ('title' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Image Name', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_order_by" value="date" <?php if ('date' == $gllr_options["order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Date', 'gallery-plugin'); ?> </label><br /> <label><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('by Sorting order in the Gallery', 'gallery-plugin'); ?> </label><br /> <label><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> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The images sort order', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><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><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> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Sort galleries', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><input type="radio" name="gllr_album_order_by" value="ID" <?php if ('ID' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Gallery ID', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="title" <?php if ('title' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Title', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="date" <?php if ('date' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Date', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="modified" <?php if ('modified' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Last modified date', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="comment_count" <?php if ('comment_count' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Comment count', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="menu_order" <?php if ('menu_order' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Sorting order (the input field for sorting order)', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="author" <?php if ('author' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('by Author', 'gallery-plugin'); ?> </label><br /> <label><input type="radio" name="gllr_album_order_by" value="rand" <?php if ('rand' == $gllr_options["album_order_by"]) { echo 'checked="checked"'; } ?> /> <?php _e('Random', 'gallery-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The galleries sort order', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><input type="radio" name="gllr_album_order" value="ASC" <?php if ('ASC' == $gllr_options["album_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><input type="radio" name="gllr_album_order" value="DESC" <?php if ('DESC' == $gllr_options["album_order"]) { echo 'checked="checked"'; } ?> /> <?php _e('DESC (descending order from highest to lowest values - 3, 2, 1; c, b, a)', 'gallery-plugin'); ?> </label> </fieldset> </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"'; } ?> /><br> <div class="gllr_for_start_slideshow"><input type="number" name="gllr_slideshow_interval" min="1" max="1000000" value="<?php echo $gllr_options["slideshow_interval"]; ?> " /> <span class="bws_info"><?php _e('Slideshow interval', 'gallery-plugin'); ?> <?php _e('(ms)', 'gallery-plugin'); ?> </span></div> </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('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"]; ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The Back link URL', 'gallery-plugin'); ?> </th> <td> <fieldset> <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 /> <input type="radio" 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" value="<?php echo $gllr_options["return_link_url"]; ?> " name="gllr_return_link_url" maxlength="250" /> <label for="gllr_return_link_url"><?php _e('(Full URL to custom page)', 'gallery-plugin'); ?> </label> </fieldset> </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"]; ?> " /> </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 (!empty($cstmsrch_options['post_types']) && 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 (!empty($cstmsrch_options['post_types']) && 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> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'gallery-plugin'); ?> "></button> <div class="bws_table_bg gllr_bws_table_bg"></div> <table class="gllr_settings_table form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e('Single gallery view', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><input disabled="disabled" type="radio" name="gllrprfssnl_view" value="grid" checked="checked" /> <?php _e('Grid', 'gallery-plugin'); ?> <span class="bws_help_box dashicons dashicons-editor-help gllr_help_box"><span class="bws_hidden_help_text"><img src="<?php echo plugins_url('images/view_grid.jpg', __FILE__); ?> "></span></span></label><br/> <label><input disabled="disabled" type="radio" name="gllrprfssnl_view" value="masonry" /> <?php _e('Masonry', 'gallery-plugin'); ?> <span class="bws_help_box dashicons dashicons-editor-help gllr_help_box"><span class="bws_hidden_help_text"><img src="<?php echo plugins_url('images/view_masonry.jpg', __FILE__); ?> "></span></span></label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Display image text', 'gallery-plugin'); ?> </th> <td> <fieldset> <label><input disabled type="radio" value="under" checked="checked"> <?php _e('Under image', 'gallery-plugin'); ?> <span class="bws_help_box dashicons dashicons-editor-help gllr_help_box"><span class="bws_hidden_help_text"><img src="<?php echo plugins_url('images/display_text_under_image.jpg', __FILE__); ?> "></span></span></label><br/> <label><input disabled type="radio" value="hover"> <?php _e('By mouse hover', 'gallery-plugin'); ?> <span class="bws_help_box dashicons dashicons-editor-help gllr_help_box"><span class="bws_hidden_help_text"><img src="<?php echo plugins_url('images/display_text_by_mouse_hover.jpg', __FILE__); ?> "></span></span></label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Use pagination for images', 'gallery-plugin'); ?> </th> <td> <input disabled type="checkbox" name="gllrprfssnl_images_pagination" value="1" checked="checked" /><br /> <label><input disabled type="number" name="gllrprfssnl_images_per_page" min="1" max="1000" value="10" style="width:100px;" /> <?php _e('per page', '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" /> <span class="bws_info"><?php _e('Background transparency (from 0 to 1)', 'gallery-plugin'); ?> </span> <br /> <input disabled type="text" value="#777777" name="gllr_border_images_color" class="gllr_color_field" data-default-color="#777777" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('The lightbox helper', 'gallery-plugin'); ?> </th> <td> <label><input disabled type="radio" name="gllrprfssnl_fancybox_helper" value="none" checked="checked" /> <?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"> <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"> <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> <?php } ?> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'gallery-plugin'); ?> " /> <input type="hidden" name="gllr_form_submit" value="submit" /> <?php wp_nonce_field($plugin_basename, 'gllr_nonce_name'); ?> </p> </form> <?php $gllr_BWS_demo_data->bws_show_demo_button(__('If you install the demo-data, will be created galleries with images, demo-post with available shortcodes and page with a list of all the galleries.', 'gallery-plugin')); bws_form_restore_default_settings($plugin_basename); } } elseif ('custom_code' == $_GET['action']) { bws_custom_code_tab(); } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $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 cntctfrm_settings_page() { global $cntctfrm_options, $wpdb, $cntctfrm_option_defaults, $wp_version, $cntctfrm_plugin_info, $lang_codes; $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']) || 'additional' == $_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'); } if (get_option('gglcptch_options')) { $gglcptch_options = get_option('gglcptch_options'); } if (get_option('gglcptchpr_options')) { $gglcptchpr_options = get_option('gglcptchpr_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'); if (isset($_POST['cntctfrm_form_appearance_submit']) && check_admin_referer($plugin_basename, 'cntctfrm_nonce_name')) { $cntctfrm_options_submit = array(); if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($cntctfrm_options_submit); $cntctfrm_options_submit = $hide_result['options']; if (isset($contact_form_multi_active) || isset($contact_form_multi_pro_active)) { $cntctfrm_options = array_merge($cntctfrm_options, $cntctfrm_options_submit); update_option('cntctfrm_options', $cntctfrm_options); } } $cntctfrm_layout = isset($_POST['cntctfrm_layout']) ? (int) $_POST['cntctfrm_layout'] : 1; $cntctfrm_submit_position = isset($_POST['cntctfrm_submit_position']) ? stripslashes(esc_html($_POST['cntctfrm_submit_position'])) : 'left'; $cntctfrm_layout_first_column_string = stripslashes(esc_html($_POST['cntctfrm_layout_first_column'])); $cntctfrm_layout_first_column = explode(',', $cntctfrm_layout_first_column_string); $cntctfrm_layout_first_column = array_diff($cntctfrm_layout_first_column, array('')); $cntctfrm_layout_second_column_string = stripslashes(esc_html($_POST['cntctfrm_layout_second_column'])); $cntctfrm_layout_second_column = explode(',', $cntctfrm_layout_second_column_string); $cntctfrm_layout_second_column = array_diff($cntctfrm_layout_second_column, array('')); if ($cntctfrm_layout === 1 && !empty($cntctfrm_layout_second_column)) { $cntctfrm_layout_first_column = array_merge($cntctfrm_layout_first_column, $cntctfrm_layout_second_column); $cntctfrm_layout_second_column = array(); } $cntctfrm_options_submit['cntctfrm_layout'] = $cntctfrm_layout; $cntctfrm_options_submit['cntctfrm_submit_position'] = $cntctfrm_submit_position; $cntctfrm_options_submit['cntctfrm_order_fields']['first_column'] = $cntctfrm_layout_first_column; $cntctfrm_options_submit['cntctfrm_order_fields']['second_column'] = $cntctfrm_layout_second_column; $cntctfrm_options = array_merge($cntctfrm_options, $cntctfrm_options_submit); 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-plugin'); } /* Save data for settings page */ if (isset($_POST['cntctfrm_form_submit']) && check_admin_referer($plugin_basename, 'cntctfrm_nonce_name')) { $cntctfrm_options_submit = array(); if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($cntctfrm_options_submit); $cntctfrm_options_submit = $hide_result['options']; if (isset($contact_form_multi_active) || isset($contact_form_multi_pro_active)) { $cntctfrm_options = array_merge($cntctfrm_options, $cntctfrm_options_submit); update_option('cntctfrm_options', $cntctfrm_options); } } $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_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-plugin'); } $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-plugin') . " <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-plugin'); } } } 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-plugin'); 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-plugin'); } } 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-plugin'); } else { $error .= ' ' . __("Settings are not saved.", 'contact-form-plugin'); } } $bws_hide_premium_options_check = bws_hide_premium_options_check(get_option('cntctfrm_options')); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename, 'cntctfrm_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } /* 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-plugin'); } /* end */ ?> <div class="wrap"> <h1><?php _e("Contact Form Settings", 'contact-form-plugin'); ?> </h1> <ul class="subsubsub cntctfrm_how_to_use"> <li><a href="https://docs.google.com/document/d/1qZYPJhkSdVyyM6XO5WfiBcTS2Sa9_9UMn4vS2g48JRY/" target="_blank"><?php _e('How to Use Step-by-step Instruction', 'contact-form-plugin'); ?> </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=contact_form.php"><?php _e('Settings', 'contact-form-plugin'); ?> </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-plugin'); ?> </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-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=contact_form.php&action=go_pro"><?php _e('Go PRO', 'contact-form-plugin'); ?> </a> </h2> <?php if (isset($_GET['action']) && 'additional' == $_GET['action']) { ?> <noscript> <div class="error"> <p> <strong><?php printf(__("Please enable JavaScript to add language in the contact form, change the names of the contact form fields and error messages.", 'contact-form-plugin'), __("Form layout", 'contact-form-plugin'), __("Submit position", 'contact-form-plugin')); ?> </strong> </p> </div> </noscript> <?php } ?> <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 bws_show_settings_notice(); if (!empty($hide_result['message'])) { ?> <div class="updated fade"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } if (!empty($notice)) { ?> <div class="error"><p><strong><?php _e('Notice:', 'contact-form-plugin'); ?> </strong> <?php echo $notice; ?> </p></div> <?php } if ((!isset($_GET['action']) || 'go_pro' != $_GET['action']) && !isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <h3 class="nav-tab-wrapper"> <span class="nav-tab nav-tab-active"><?php _e('NEW_FORM', 'contact-form-plugin'); ?> </span> <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-plugin'); ?> ">+</a> </h3> <?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 { ?> <form id="cntctfrm_settings_form" class="bws_form" method="post" action=""> <div style="margin: 20px 0;"> <?php printf(__("If you would like to add a Contact Form to your page or post, please use %s button", 'contact-form-plugin'), '<span class="bws_code"><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt=""/></span>'); ?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 260px;"> <?php printf(__("You can add the Contact Form to your page or post by clicking on %s button in the content edit block using the Visual mode. If the button isn't displayed, please use the shortcode %s or %s where * stands for Contact Form language.", 'contact-form-plugin'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', sprintf('<br/><span class="bws_code">[bestwebsoft_contact_form%s]</span><br/>', !isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active) ? '' : ' id=' . $_SESSION['cntctfrmmlt_id_form']), sprintf('<br/><span class="bws_code">[bestwebsoft_contact_form%s lang=*]</span>,<br/>', !isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active) ? '' : ' id=' . $_SESSION['cntctfrmmlt_id_form'])); ?> </div> </div> </div> <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-plugin'); ?> </p> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("The user's email address:", 'contact-form-plugin'); ?> </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-plugin'); ?> </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="bws_info"><?php _e("Enter a username of the person who should get the messages from the contact form.", 'contact-form-plugin'); ?> </span> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Use this email address:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Enter the email address you want the messages forwarded to.", 'contact-form-plugin'); ?> </span> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'contact-form-plugin'); ?> "></button> <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-plugin'); ?> </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-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', 'contact-form-plugin'); ?> </div> <a class="bws_button" 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-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("Save emails to the database", 'contact-form-plugin'); ?> </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-plugin'); ?> <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-plugin'); ?> ) <a href="<?php echo bloginfo("url"); ?> /wp-admin/plugins.php"><?php _e('Activate', 'contact-form-plugin'); ?> 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-plugin'); ?> ) <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-plugin'); ?> 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-plugin'); ?> </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-plugin'); ?> </label> <label><span class="bws_info">(<?php _e('You can use the wp_mail function for mailing', 'contact-form-plugin'); ?> )</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-plugin'); ?> </label> <label><span class="bws_info">(<?php _e('To send mail you can use the php mail function', 'contact-form-plugin'); ?> )</span></label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("'FROM' field", 'contact-form-plugin'); ?> </th> <td style="vertical-align: top;width: 210px;"> <div><?php _e("Name", 'contact-form-plugin'); ?> </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-plugin'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 200px;"><?php echo __("The name of the user who fills the form will be used in the field 'From'.", 'contact-form-plugin'); ?> </div> </div> </div> </div> </td> <td> <div><?php _e("Email", 'contact-form-plugin'); ?> </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-plugin'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 200px;"><?php echo __("The email address of the user who fills the form will be used in the field 'From'.", 'contact-form-plugin'); ?> </div> </div> </div> <div> <span class="bws_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-plugin'); ?> )</span> </div> </div> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Required symbol", 'contact-form-plugin'); ?> </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="max-width: auto;"> <thead> <tr valign="top"> <th scope="row"><?php _e("Fields", 'contact-form-plugin'); ?> </th> <th><?php _e("Used", 'contact-form-plugin'); ?> </th> <th><?php _e("Required", 'contact-form-plugin'); ?> </th> <?php if (!$bws_hide_premium_options_check) { ?> <th><?php _e("Visible", 'contact-form-plugin'); ?> </th> <th><?php _e("Disabled for editing", 'contact-form-plugin'); ?> </th> <th scope="row" ><?php _e("Field's default value", 'contact-form-plugin'); ?> </th> <?php } ?> </tr> </thead> <tbody> <?php if (!$bws_hide_premium_options_check) { ?> <tr valign="top" > <td><?php _e("Department selectbox", 'contact-form-plugin'); ?> </td> <td class="bws_pro_version"></td> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrm_required_department_field" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> </tr> <?php } ?> <tr valign="top"> <td><?php _e("Name", 'contact-form-plugin'); ?> </td> <td> <label><input type="checkbox" name="cntctfrm_display_name_field" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_display_name_field']) { echo 'checked="checked" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Used", 'contact-form-plugin'); ?> </span></label> </td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_visible_name" value="1" checked="checked" /> <span class="cntctfrm_mobile_title"><?php _e("Visible", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_name" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Disabled for editing", 'contact-form-plugin'); ?> </span></label> </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-plugin'); ?> <br /> <span class="bws_info">(<?php _e("'Visible' and 'Disabled for editing' options will be applied only to logged-in users.", 'contact-form-plugin'); ?> )</span> </td> <?php } ?> </tr> <?php if (!$bws_hide_premium_options_check) { ?> <tr valign="top"> <td><?php _e("Location selectbox", 'contact-form-plugin'); ?> </td> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_display_selectbox" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Used", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_required_selectbox" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"></td> <td class="bws_pro_version"></td> <td class="bws_pro_version"> <label> <span class="cntctfrmpr_mobile_title"><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input disabled="disabled" type="file" name="cntctfrmpr_default_location" /> </label> </td> </tr> <?php } ?> <tr valign="top"> <td><?php _e("Address", 'contact-form-plugin'); ?> </td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Used", 'contact-form-plugin'); ?> </span></label> </td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td></td> <td></td> <td></td> <?php } ?> </tr> <tr valign="top"> <td><?php _e("Email Address", 'contact-form-plugin'); ?> </td> <td></td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_visible_email" value="1" checked="checked" /> <span class="cntctfrm_mobile_title"><?php _e("Visible", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label><input disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_email" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Disabled for editing", 'contact-form-plugin'); ?> </span></label> </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-plugin'); ?> <br /> <span class="bws_info">(<?php _e("'Visible' and 'Disabled for editing' options will be applied only to logged-in users.", 'contact-form-plugin'); ?> )</span> </td> <?php } ?> </tr> <tr valign="top"> <td><?php _e("Phone number", 'contact-form-plugin'); ?> </td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Used", 'contact-form-plugin'); ?> </span></label> </td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td></td> <td></td> <td></td> <?php } ?> </tr> <tr valign="top"> <td><?php _e("Subject", 'contact-form-plugin'); ?> </td> <td></td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td class="bws_pro_version"> <label><input class="subject" disabled="disabled" type="checkbox" name="cntctfrmpr_visible_subject" value="1" checked="checked" /> <span class="cntctfrm_mobile_title"><?php _e("Visible", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label><input class="subject" disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_subject" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Disabled for editing", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label> <span class="cntctfrmpr_mobile_title"><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input class="subject" disabled="disabled" type="text" name="cntctfrmpr_default_subject" value="" /> </label> </td> <?php } ?> </tr> <tr valign="top"> <td><?php _e("Message", 'contact-form-plugin'); ?> </td> <td></td> <td> <label><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" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Required", 'contact-form-plugin'); ?> </span></label> </td> <?php if (!$bws_hide_premium_options_check) { ?> <td class="bws_pro_version"> <label><input class="message" disabled="disabled" type="checkbox" name="cntctfrmpr_visible_message" value="1" checked="checked" /> <span class="cntctfrm_mobile_title"><?php _e("Visible", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label><input class="message" disabled="disabled" disabled="disabled" type="checkbox" name="cntctfrmpr_disabled_message" value="1" /> <span class="cntctfrm_mobile_title"><?php _e("Disabled for editing", 'contact-form-plugin'); ?> </span></label> </td> <td class="bws_pro_version"> <label> <span class="cntctfrmpr_mobile_title"><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input class="message" disabled="disabled" type="text" name="cntctfrmpr_default_message" value="" /> </label> </td> <?php } ?> </tr> <?php if (!$bws_hide_premium_options_check) { ?> <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-plugin'); ?> </div> <a class="bws_button" 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-plugin'); ?> </a> <div class="clear"></div> </td> </tr> <?php } ?> <tr valign="top"> <td> <?php _e("Attachment block", 'contact-form-plugin'); ?> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 200px;"><?php echo __("Users can attach the following file formats", 'contact-form-plugin') . ": html, txt, css, gif, png, jpeg, jpg, tiff, bmp, ai, eps, ps, csv, rtf, pdf, doc, docx, xls, xlsx, zip, rar, wav, mp3, ppt, aar, sce"; ?> </div> </div> </td> <td> <label><input type="checkbox" id="cntctfrm_attachment" name="cntctfrm_attachment" value="1" <?php if ('1' == $cntctfrm_options['cntctfrm_attachment']) { echo 'checked="checked" '; } ?> /> <span class="cntctfrm_mobile_title"><?php _e("Used", 'contact-form-plugin'); ?> </span></label> </td> <td></td> <?php if (!$bws_hide_premium_options_check) { ?> <td></td> <td></td> <td></td> <?php } ?> </tr> </tbody> </table> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("Add to the form", 'contact-form-plugin'); ?> </th> <td colspan="3"><fieldset> <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-plugin'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 200px;"><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-plugin'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 200px;"><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-plugin'); ?> </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-plugin'); ?> </a></span> <?php } ?> </div> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'contact-form-plugin'); ?> "></button> <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-plugin'); ?> <span class="bws_info">(<?php _e('Required checkbox for submitting the form', 'contact-form-plugin'); ?> )</span></label><br /> <label><input disabled="disabled" type="checkbox" value="1" name="cntctfrmpr_display_optional_check"> <?php _e('Optional checkbox', 'contact-form-plugin'); ?> <span class="bws_info">(<?php _e('Optional checkbox, the results of which will be displayed in email', 'contact-form-plugin'); ?> )</span></label> </fieldset> </div> <div style="padding: 10px; "> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'contact-form-plugin'); ?> </div> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'contact-form-plugin'); ?> </div> <a class="bws_button" 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-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> </fieldset></td> </tr> <tr valign="top"> <th scope="row"><?php _e("Delete an attachment file from the server after the email is sent", 'contact-form-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </label> <label class="bws_info"><?php _e("Example: Sent from (IP address):\t127.0.0.1", 'contact-form-plugin'); ?> </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-plugin'); ?> </label> <label class="bws_info"><?php _e("Example: Date/Time:\tAugust 19, 2013 8:50 pm", 'contact-form-plugin'); ?> </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-plugin'); ?> </label> <label class="bws_info"><?php _e("Example: Sent from (referer):\thttp://bestwebsoft.com/contacts/contact-us/", 'contact-form-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Language settings for the field names in the form", 'contact-form-plugin'); ?> </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-plugin'); ?> " /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Change the names of the contact form fields and error messages", 'contact-form-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </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="bws_info"><?php _e("Name:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_address_label']['en']; ?> " /> <span class="bws_info"><?php _e("Address:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_label']['en']; ?> " /> <span class="bws_info"><?php _e("Email Address:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_label']['en']; ?> " /> <span class="bws_info"><?php _e("Phone number:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_label']['en']; ?> " /> <span class="bws_info"><?php _e("Subject:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_label']['en']; ?> " /> <span class="bws_info"><?php _e("Message:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_label']['en']; ?> " /> <span class="bws_info"><?php _e("Attachment:", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_tooltip']['en']; ?> " /> <span class="bws_info"><?php _e("Tips below the Attachment block", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Send me a copy", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_submit_label[en]" value="<?php echo $cntctfrm_options['cntctfrm_submit_label']['en']; ?> " /> <span class="bws_info"><?php _e("Submit", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_name_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_name_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Name field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_address_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_address_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Address field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_email_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_email_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Email field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_phone_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Phone field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_subject_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Subject field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_message_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_message_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Message field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_attachment_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message about the file type for the Attachment field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message while uploading a file for the Attachment field to the server", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message while moving the file for the Attachment field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message when file size limit for the Attachment field is exceeded", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_captcha_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_captcha_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the Captcha field", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_form_error[en]" value="<?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?> " /> <span class="bws_info"><?php _e("Error message for the whole form", 'contact-form-plugin'); ?> </span><br /> </div> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="bws_info cntctfrm_shortcode_for_language" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en]</span> <?php _e("or", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } else { ?> <span class="bws_info cntctfrm_shortcode_for_language" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("or", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </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-plugin'); ?> </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="bws_info"><?php _e("Name:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Address:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Email Address:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Phone number:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Subject:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Message:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Attachment:", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Tips below the Attachment block", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Send me a copy", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Submit", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Name field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Address field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Email field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Phone field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Subject field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Message field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message about the file type for the Attachment field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message while uploading a file for the Attachment field to the server", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message while moving the file for the Attachment field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message when file size limit for the Attachment field is exceeded", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the Captcha field", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Error message for the whole form", 'contact-form-plugin'); ?> </span><br /> </div> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="bws_info cntctfrm_shortcode_for_language" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } else { ?> <span class="bws_info cntctfrm_shortcode_for_language" style="margin-left: 5px;"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php $val . ' id=' . $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </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-plugin'); ?> </label><br /> <div class="cntctfrm_label_language_tab cntctfrm_active" id="cntctfrm_text_en"><?php _e('English', 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Text", 'contact-form-plugin'); ?> </span><br /> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="bws_info cntctfrm_shortcode_for_language"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en]</span> <?php _e("or", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } else { ?> <span class="bws_info cntctfrm_shortcode_for_language"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=en id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("or", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </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="bws_info"><?php _e("Text", 'contact-form-plugin'); ?> </span></label><br /> <?php if (!isset($contact_form_multi_active) && !isset($contact_form_multi_pro_active)) { ?> <span class="bws_info cntctfrm_shortcode_for_language"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } else { ?> <span class="bws_info cntctfrm_shortcode_for_language"><?php _e("Use shortcode", 'contact-form-plugin'); ?> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form lang=<?php echo $val . ' id=' . $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </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-plugin'); ?> <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="bws_info"><?php _e("Url", 'contact-form-plugin'); ?> </span></label> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'contact-form-plugin'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e("Add field 'Reply-To' to the email header", 'contact-form-plugin'); ?> </th> <td colspan="2"> <input disabled="disabled" type="checkbox" id="cntctfrm_header_reply_to" name="cntctfrm_header_reply_to" value="1"> <span class="bws_info">(<?php _e("Field 'Reply-To' will be initialized by user email", 'contact-form-plugin'); ?> )</span> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Auto Response', 'contact-form-plugin'); ?> </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="bws_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-plugin'); ?> </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-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', 'contact-form-plugin'); ?> </div> <a class="bws_button" 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-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> </div> <!-- end of 'Additional' settings --> <input type="hidden" name="cntctfrm_form_submit" value="submit" /> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'contact-form-plugin'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'cntctfrm_nonce_name'); ?> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('appearance' == $_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 { ?> <noscript> <div class="error"> <p> <strong><?php printf(__("Please enable JavaScript to change '%s', '%s' options and for fields sorting.", 'contact-form-plugin'), __("Form layout", 'contact-form-plugin'), __("Submit position", 'contact-form-plugin')); ?> </strong> </p> </div> </noscript> <form id="cntctfrm_settings_form" class="bws_form" method="post" action=""> <div id="cntctfrm_appearance_wrap" class="cntctfrm_appearance_<?php echo is_rtl() ? 'rtl' : 'ltr'; ?> "> <div id="<?php echo is_rtl() ? 'cntctfrm_right_table' : 'cntctfrm_left_table'; ?> "> <table class="form-table" style="width:auto;"> <tr valign="top"> <th scope="row"><?php _e("Form layout", 'contact-form-plugin'); ?> </th> <td colspan="2"> <fieldset> <input id="cntctfrm_layout_one_column" name="cntctfrm_layout" type="radio" value="1" <?php if ($cntctfrm_options['cntctfrm_layout'] === 1) { echo 'checked="checked"'; } ?> > <label for="cntctfrm_layout_one_column"><?php _e('One column', 'contact-form-plugin'); ?> </label> <br/> <input id="cntctfrm_layout_two_columns" name="cntctfrm_layout" type="radio" value="2" <?php if ($cntctfrm_options['cntctfrm_layout'] === 2) { echo 'checked="checked"'; } ?> > <label for="cntctfrm_layout_two_columns"><?php _e('Two columns', 'contact-form-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Submit position", 'contact-form-plugin'); ?> </th> <td colspan="2"> <fieldset> <input id="cntctfrm_submit_position_left" name="cntctfrm_submit_position" type="radio" value="left" <?php if ($cntctfrm_options['cntctfrm_submit_position'] == 'left') { echo 'checked="checked"'; } ?> > <label for="cntctfrm_submit_position_left"><?php _e('Left', 'contact-form-plugin'); ?> </label> <br/> <input id="cntctfrm_submit_position_right" name="cntctfrm_submit_position" type="radio" value="right" <?php if ($cntctfrm_options['cntctfrm_submit_position'] == 'right') { echo 'checked="checked"'; } ?> > <label for="cntctfrm_submit_position_right"><?php _e('Right', 'contact-form-plugin'); ?> </label> </fieldset> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'contact-form-plugin'); ?> "></button> <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-plugin'); ?> </th> <td colspan="2"> <select name="cntctfrmpr_error_displaying" disabled='disabled'> <option value="labels"><?php _e("Display error messages", 'contact-form-plugin'); ?> </option> <option value="input_colors"><?php _e("Color of the input field errors.", 'contact-form-plugin'); ?> </option> <option value="both" selected="selected"><?php _e("Display error messages & color of the input field errors", 'contact-form-plugin'); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Add placeholder to the input blocks", 'contact-form-plugin'); ?> </th> <td colspan="2"> <input disabled='disabled' type="checkbox" name="cntctfrmpr_placeholder" value="1" /> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Add tooltips", 'contact-form-plugin'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_name" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_name"><?php _e("Name", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_display_address_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_address" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_address"><?php _e("Address", 'contact-form-plugin'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_email" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_email"><?php _e("Email address", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_display_phone_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_phone" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_phone"><?php _e("Phone Number", 'contact-form-plugin'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_subject" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_subject"><?php _e("Subject", 'contact-form-plugin'); ?> </label> </div> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_message" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_message"><?php _e("Message", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['cntctfrm_attachment_explanations']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrmpr_tooltip_display_attachment" value="1" /> <label class="cntctfrmpr_tooltip_label" for="cntctfrmpr_tooltip_display_attachment"><?php _e("Attachment", 'contact-form-plugin'); ?> </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-plugin'); ?> </th> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Text color", 'contact-form-plugin'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Errors color", 'contact-form-plugin'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" id="" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Input fields", 'contact-form-plugin'); ?> </th> <td colspan="2"> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" id="" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> </td> </tr> <tr valign="top" class="cntctfrm_style_block"> <th scope="row"><?php _e("Submit button", 'contact-form-plugin'); ?> </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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" class="cntctfrmpr_default button-small button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <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-plugin'); ?> </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-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', 'contact-form-plugin'); ?> </div> <a class="bws_button" 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-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> </div> <?php if ($bws_hide_premium_options_check) { ?> <div class="clear"></div> <?php } ?> <div id="<?php echo is_rtl() ? 'cntctfrm_left_table' : 'cntctfrm_right_table'; ?> "> <h3><?php _e('Contact Form | Preview', 'contact-form-plugin'); ?> </h3> <span class="bws_info"><?php _e('Drag the necessary field to sort fields.', 'contact-form-plugin'); ?> </span> <?php $cntctfrm_classes = $cntctfrm_options['cntctfrm_layout'] === 1 ? ' cntctfrm_one_column' : ' cntctfrm_two_columns'; $cntctfrm_classes .= is_rtl() ? ' cntctfrm_rtl' : ' cntctfrm_ltr'; ?> <div id="cntctfrm_contact_form" class="cntctfrm_contact_form<?php echo $cntctfrm_classes; ?> "> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_form_error']['en']; ?> </div> <div id="cntctfrm_wrap"> <?php $cntctfrm_ordered_fields = cntctfrm_get_ordered_fields(); for ($i = 1; $i <= 2; $i++) { $cntctfrm_column = $i == 1 ? 'first_column' : 'second_column'; ?> <ul id="cntctfrm_<?php echo $cntctfrm_column; ?> " class="cntctfrm_column" <?php if ($i == 2 && $cntctfrm_options['cntctfrm_layout'] === 1) { echo 'style="display: none;"'; } ?> > <?php foreach ($cntctfrm_ordered_fields[$cntctfrm_column] as $cntctfrm_field) { switch ($cntctfrm_field) { case 'cntctfrm_contact_name': if (1 == $cntctfrm_options['cntctfrm_display_name_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_name"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_name_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_name"> <div class="cntctfrm_drag_wrap"></div> <input class="text bws_no_bind_notice" type="text" size="40" value="" name="cntctfrm_contact_name" id="cntctfrm_contact_name" /> </div> </li> <?php } break; case 'cntctfrm_contact_address': if (1 == $cntctfrm_options['cntctfrm_display_address_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_address"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_address_error']['en']; ?> </div> <?php } ?> <div class="cntctfrm_input cntctfrm_input_address"> <div class="cntctfrm_drag_wrap"></div> <input class="text bws_no_bind_notice" type="text" size="40" value="" name="cntctfrm_contact_address" id="cntctfrm_contact_address" /> </div> </li> <?php } break; case 'cntctfrm_contact_email': ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_email"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_email_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_email"> <div class="cntctfrm_drag_wrap"></div> <input class="text bws_no_bind_notice" type="text" size="40" value="" name="cntctfrm_contact_email" id="cntctfrm_contact_email" /> </div> </li> <?php break; case 'cntctfrm_contact_phone': if (1 == $cntctfrm_options['cntctfrm_display_phone_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_phone"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_phone_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_phone"> <div class="cntctfrm_drag_wrap"></div> <input class="text bws_no_bind_notice" type="text" size="40" value="" name="cntctfrm_contact_phone" id="cntctfrm_contact_phone" /> </div> </li> <?php } break; case 'cntctfrm_contact_subject': ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_subject"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_subject_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_subject"> <div class="cntctfrm_drag_wrap"></div> <input class="text bws_no_bind_notice" type="text" size="40" value="" name="cntctfrm_contact_subject" id="cntctfrm_contact_subject" /> </div> </li> <?php break; case 'cntctfrm_contact_message': ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_message"> <label for="cntctfrm_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="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_message_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_message"> <div class="cntctfrm_drag_wrap"></div> <textarea class="bws_no_bind_notice" rows="5" cols="30" name="cntctfrm_contact_message" id="cntctfrm_contact_message"></textarea> </div> </li> <?php break; case 'cntctfrm_contact_attachment': if (1 == $cntctfrm_options['cntctfrm_attachment']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_attachment"> <label for="cntctfrm_contact_attachment"><?php echo $cntctfrm_options['cntctfrm_attachment_label']['en']; ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['cntctfrm_attachment_error']['en']; ?> </div> <div class="cntctfrm_input cntctfrm_input_attachment"> <div class="cntctfrm_drag_wrap"></div> <input class="bws_no_bind_notice" type="file" name="cntctfrm_contact_attachment" id="cntctfrm_contact_attachment" /> <?php if (1 == $cntctfrm_options['cntctfrm_attachment_explanations']) { ?> <label class="cntctfrm_contact_attachment_extensions"><?php echo $cntctfrm_options['cntctfrm_attachment_tooltip']['en']; ?> </label> <?php } ?> </div> </li> <?php } break; case 'cntctfrm_contact_send_copy': if (1 == $cntctfrm_options['cntctfrm_send_copy']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_checkbox cntctfrm_checkbox_send_copy"> <div class="cntctfrm_drag_wrap"></div> <input type="checkbox" value="1" name="cntctfrm_contact_send_copy" id="cntctfrm_contact_send_copy" class="bws_no_bind_notice" tyle="margin: 0;" /> <label for="cntctfrm_contact_send_copy"><?php echo $cntctfrm_options['cntctfrm_send_copy_label']['en']; ?> </label> </div> </li> <?php } break; case 'cntctfrm_captcha': if (is_plugin_active('captcha/captcha.php') && (isset($cptch_options) && 1 == $cptch_options['cptch_contact_form']) || is_plugin_active('captcha-plus/captcha-plus.php') && (isset($cptchpls_options) && 1 == $cptchpls_options['cptchpls_contact_form']) || is_plugin_active('captcha-pro/captcha_pro.php') && (isset($cptchpr_options) && 1 == $cptchpr_options['cptchpr_contact_form']) || is_plugin_active('google-captcha/google-captcha.php') && (isset($gglcptch_options) && 1 == $gglcptch_options['contact_form']) || is_plugin_active('google-captcha-pro/google-captcha-pro.php') && (isset($gglcptchpr_options) && 1 == $gglcptchpr_options['contact_form'])) { $cntctfrm_captcha_label = $cntctfrm_captcha_required_symbol = ''; if (is_plugin_active('captcha/captcha.php') && (isset($cptch_options) && 1 == $cptch_options['cptch_contact_form'])) { $cntctfrm_captcha_label = $cptch_options['cptch_label_form']; $cntctfrm_captcha_required_symbol = sprintf(' <span class="required">%s</span>', isset($cptch_options['cptch_required_symbol']) ? $cptch_options['cptch_required_symbol'] : ''); } elseif (is_plugin_active('captcha-plus/captcha-plus.php') && (isset($cptchpls_options) && 1 == $cptchpls_options['cptchpls_contact_form'])) { $cntctfrm_captcha_label = $cptchpls_options['cptchpls_label_form']; $cntctfrm_captcha_required_symbol = sprintf(' <span class="required">%s</span>', isset($cptchpls_options['cptchpls_required_symbol']) ? $cptchpls_options['cptchpls_required_symbol'] : ''); } elseif (is_plugin_active('captcha-pro/captcha_pro.php') && (isset($cptchpr_options) && 1 == $cptchpr_options['cptchpr_contact_form'])) { $cntctfrm_captcha_label = $cptchpr_options['cptchpr_label_form']; $cntctfrm_captcha_required_symbol = sprintf(' <span class="required">%s</span>', isset($cptchpr_options['cptchpr_required_symbol']) ? $cptchpr_options['cptchpr_required_symbol'] : ''); } if (!empty($cntctfrm_captcha_label)) { $cntctfrm_display_captcha_label = sprintf('%1$s%2$s', $cntctfrm_captcha_label, $cntctfrm_captcha_required_symbol); } else { $cntctfrm_display_captcha_label = ''; } ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_captcha"> <label><?php echo $cntctfrm_display_captcha_label; ?> </label> </div> <div class="cntctfrm_input cntctfrm_input_captcha"> <div class="cntctfrm_drag_wrap"></div> <img src="<?php echo plugins_url('images/cptch.png', __FILE__); ?> "> <input id="cntctfrm_captcha" type="hidden" name="cntctfrm_captcha"> </div> </li> <?php } break; default: break; } } ?> </ul> <?php } ?> <div class="clear"></div> </div> <div class="cntctfrm_submit_wrap"> <?php $cntctfrm_direction = is_rtl() ? 'rtl' : 'ltr'; $cntctfrm_submit_position_value = array('ltr' => array('left' => 1, 'right' => 2), 'rtl' => array('left' => 2, 'right' => 1)); for ($i = 1; $i <= 2; $i++) { $cntctfrm_column = $i == 1 ? 'first_column' : 'second_column'; ?> <div id="cntctfrm_submit_<?php echo $cntctfrm_column; ?> " class="cntctfrm_column"> <?php if ($i == $cntctfrm_submit_position_value[$cntctfrm_direction][$cntctfrm_options['cntctfrm_submit_position']]) { ?> <div class="cntctfrm_input cntctfrm_input_submit" style="<?php printf('text-align: %s !important;', $cntctfrm_options['cntctfrm_submit_position']); ?> "> <input type="button" value="<?php echo $cntctfrm_options['cntctfrm_submit_label']['en']; ?> " class="bws_no_bind_notice" style="cursor: pointer; margin: 0; text-align: center;" /> </div> <?php } ?> </div> <?php } ?> <div class="clear"></div> </div> </div> <div id="cntctfrm_shortcode" class="cntctfrm_one_column"> <?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-plugin'); ?> <br/> <div> <div id="cntctfrm_shortcode_code"> <span class="cntctfrm_shortcode">[bestwebsoft_contact_form<?php if (isset($contact_form_multi_active) || isset($contact_form_multi_pro_active)) { printf(' id=%s', $_SESSION['cntctfrmmlt_id_form']); } ?> ]</span> </div> </div> </div> </div> <div class="clear"></div> <input type="hidden" name="cntctfrm_form_appearance_submit" value="submit" /> <input type="hidden" id="cntctfrm_layout_first_column" name="cntctfrm_layout_first_column" value="<?php echo implode(',', $cntctfrm_options['cntctfrm_order_fields']['first_column']); ?> " /> <input type="hidden" id="cntctfrm_layout_second_column" name="cntctfrm_layout_second_column" value="<?php echo implode(',', $cntctfrm_options['cntctfrm_order_fields']['second_column']); ?> " /> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'contact-form-plugin'); ?> " /> </p> <?php wp_nonce_field($plugin_basename, 'cntctfrm_nonce_name'); ?> </div> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $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__); /* Check htaccess plugin */ $gglstmp_htaccess_active = false; if (is_multisite() && !is_subdomain_install()) { $all_plugins = get_plugins(); $is_network = is_network_admin(); $admin_url = $is_network ? network_admin_url('/') : admin_url('/'); $gglstmp_htaccess = gglstmp_plugin_status(array('htaccess/htaccess.php', 'htaccess-pro/htaccess-pro.php'), $all_plugins, $is_network); $gglstmp_htaccess_options = false; if ($gglstmp_htaccess['status'] == 'actived') { if ($gglstmp_htaccess['plugin'] == 'htaccess/htaccess.php') { global $htccss_options; register_htccss_settings(); $gglstmp_htaccess_options =& $htccss_options; $gglstmp_htaccess_prefix = 'htccss'; } if ($gglstmp_htaccess['plugin'] == 'htaccess-pro/htaccess-pro.php') { global $htccsspr_options; register_htccsspr_settings(); $gglstmp_htaccess_options =& $htccsspr_options; $gglstmp_htaccess_prefix = 'htccsspr'; } $gglstmp_htaccess_active = true; $gglstmp_htaccess_options_name = "{$gglstmp_htaccess_prefix}_options"; $gglstmp_htaccess_function_generate = "{$gglstmp_htaccess_prefix}_generate_htaccess"; $gglstmp_htaccess_function_check = "{$gglstmp_htaccess_prefix}_check_xml_access"; if (function_exists($gglstmp_htaccess_function_check)) { $gglstmp_htaccess_check = $gglstmp_htaccess_function_check(); if ($gglstmp_htaccess_check != $gglstmp_htaccess_options['allow_xml']) { $gglstmp_htaccess_options['allow_xml'] = $gglstmp_htaccess_check; update_site_option($gglstmp_htaccess_options_name, $gglstmp_htaccess_options); } } } } 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')) { if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($gglstmp_settings); $gglstmp_settings = $hide_result['options']; } if ($gglstmp_htaccess_active && $gglstmp_htaccess_options && function_exists($gglstmp_htaccess_function_generate)) { $gglstmp_allow_xml = isset($_POST['gglstmp_allow_xml']) && $_POST['gglstmp_allow_xml'] == 1 ? 1 : 0; if ($gglstmp_allow_xml != $gglstmp_htaccess_options['allow_xml']) { $gglstmp_htaccess_options['allow_xml'] = $gglstmp_allow_xml; update_site_option($gglstmp_htaccess_options_name, $gglstmp_htaccess_options); $gglstmp_htaccess_function_generate(); } } $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.', 'google-sitemap-plugin'); $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.", 'google-sitemap-plugin'); } } /*## check banner */ $bws_hide_premium_options_check = bws_hide_premium_options_check($gglstmp_settings); if (isset($_POST['gglstmp_new']) && check_admin_referer($plugin_basename, 'gglstmp_nonce_name')) { $message = __("Your Sitemap file is created in the site root directory.", 'google-sitemap-plugin'); 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, 'gglstmp_settings'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } 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.', 'google-sitemap-plugin'); } } 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.', 'google-sitemap-plugin'); } ?> <div class="wrap"> <h1 style="line-height: normal;"><?php _e("Google Sitemap Settings", 'google-sitemap-plugin'); ?> </h1> <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', 'google-sitemap-plugin'); ?> </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', 'google-sitemap-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=google-sitemap-plugin.php&action=go_pro"><?php _e('Go PRO', 'google-sitemap-plugin'); ?> </a> </h2> <?php if (!isset($_GET['action']) && is_multisite() && !is_subdomain_install() && count(glob(ABSPATH . "sitemap*.xml")) > 0 && (!$gglstmp_htaccess_active || $gglstmp_htaccess_options['allow_xml'] == 0)) { ?> <div id="gglstmp_check_sitemap_block" class="error"> <p> <?php printf('<strong>%s</strong> %s', __('Warning:', 'google-sitemap-plugin'), sprintf(__('To have an access to subsites XML files, please add the following rule %s to your %s file in %s after line %s or you can use option %s.', 'google-sitemap-plugin'), '<code>RewriteRule ([^/]+\\.xml)$ $1 [L]</code>', '<strong>.htaccess</strong>', sprintf('<strong>"%s"</strong>', ABSPATH), '<strong>"RewriteBase"</strong>', sprintf('<strong>"%s"</strong>', __('Allow access to XML files', 'google-sitemap-plugin')))); ?> </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', 'google-sitemap-plugin'); ?> " /> <?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 } bws_show_settings_notice(); ?> <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 class="bws_form" action="admin.php?page=google-sitemap-plugin.php" method='post' 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", 'google-sitemap-plugin') . "</a> " . __("already exists. If you would like to replace it with a new one, please choose the necessary box below.", 'google-sitemap-plugin') . "</p>"; } else { echo '<p><a href="' . $gglstmppr_url_home . 'sitemap.xml" target="_new">' . __("The Sitemap file", 'google-sitemap-plugin') . "</a> " . __("already exists. If you would like to replace it with a new one, please choose the necessary box below.", 'google-sitemap-plugin') . "</p>"; } } else { gglstmp_sitemapcreate(); if (is_multisite()) { echo '<p><a href="' . $gglstmppr_url_home . "sitemap_" . $home_url . '.xml" target="_new">' . __("Your Sitemap file", 'google-sitemap-plugin') . "</a> " . __("is created in the site root directory.", 'google-sitemap-plugin') . "</p>"; } else { echo '<p><a href="' . $gglstmppr_url_home . 'sitemap.xml" target="_new">' . __("Your Sitemap file", 'google-sitemap-plugin') . "</a> " . __("is created in the site root directory.", 'google-sitemap-plugin') . "</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", 'google-sitemap-plugin') . " <a href=\"https://www.google.com/webmasters/tools/home?hl=en\">" . __("this", 'google-sitemap-plugin') . "</a> " . __("link - sign in, choose the necessary site, go to 'Sitemaps' and fill out the mandatory field", 'google-sitemap-plugin') . " - '" . $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", 'google-sitemap-plugin') . " <a href=\"https://www.google.com/webmasters/tools/home?hl=en\">" . __("this", 'google-sitemap-plugin') . "</a> " . __("link - sign in, choose the necessary site, go to 'Sitemaps' and fill out the mandatory field", 'google-sitemap-plugin') . " - '" . $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", 'google-sitemap-plugin'); ?> </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", 'google-sitemap-plugin'); ?> </label> <p style="color:red"><?php _e("Since you are using multisiting, the plugin does not allow to add a sitemap to robots.txt", 'google-sitemap-plugin'); ?> </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", 'google-sitemap-plugin'); ?> <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:', 'google-sitemap-plugin'); ?> </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> <?php if (is_multisite() && !is_subdomain_install()) { $gglstmp_plugin_name = isset($gglstmp_htaccess['plugin_info']['Name']) ? $gglstmp_htaccess['plugin_info']['Name'] : 'Htaccess by BestWebSoft'; $gglstmp_attr_checked = $gglstmp_attr_disabled = ''; $gglstmp_plugin_notice = sprintf(__('This option will be applied to all websites in the network', 'google-sitemap-plugin')); if ('deactivated' == $gglstmp_htaccess['status']) { $gglstmp_attr_disabled = 'disabled="disabled"'; $gglstmp_plugin_notice = sprintf(__('You should %s to use this functionality', 'google-sitemap-plugin'), sprintf('<a href="%splugins.php">%s%s %s</a>', $admin_url, __('activate', 'google-sitemap-plugin'), is_network_admin() ? ' ' . __('for network', 'google-sitemap-plugin') : '', $gglstmp_plugin_name)); } elseif ('not_installed' == $gglstmp_htaccess['status']) { $gglstmp_attr_disabled = 'disabled="disabled"'; $gglstmp_plugin_notice = sprintf(__('You should %s to use this functionality', 'google-sitemap-plugin'), sprintf('<a href="http://bestwebsoft.com/products/htaccess/?k=bc745b0c9d4b19ba95ae2c861418e0df&pn=106&v=%s&wp_v=%s">%s %s</a>', $gglstmp_plugin_info["Version"], $wp_version, __('download', 'google-sitemap-plugin'), $gglstmp_plugin_name)); } if ('1' == $gglstmp_htaccess_options['allow_xml'] && $gglstmp_attr_disabled == '') { $gglstmp_attr_checked = 'checked="checked"'; } ?> <tr valign="top" id="gglstmp_allow_xml_block"> <th scope="row"><?php _e('Allow access to XML files', 'google-sitemap-plugin'); ?> </th> <td> <label><input <?php printf("%s %s", $gglstmp_attr_checked, $gglstmp_attr_disabled); ?> type="checkbox" name="gglstmp_allow_xml" value="1" /></label> <div class="bws_help_box dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 270px;"> <p><?php _e('The following string will be added to your .htaccess file', 'google-sitemap-plugin'); ?> :</p> <code>RewriteRule ([^/]+\.xml)$ $1 [L]</code> </div> </div> <span class="bws_info"><?php echo $gglstmp_plugin_notice; ?> </span><br /> </td> </tr> <?php } ?> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'google-sitemap-plugin'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th><?php _e('XML Sitemap "Change Frequency" parameter', 'google-sitemap-plugin'); ?> </th> <td> <select name="gglstmp_sitemap_change_frequency"> <option value="always"><?php _e('Always', 'google-sitemap-plugin'); ?> </option> <option value="hourly"><?php _e('Hourly', 'google-sitemap-plugin'); ?> </option> <option value="daily"><?php _e('Daily', 'google-sitemap-plugin'); ?> </option> <option value="weekly"><?php _e('Weekly', 'google-sitemap-plugin'); ?> </option> <option selected value="monthly"><?php _e('Monthly', 'google-sitemap-plugin'); ?> </option> <option value="yearly"><?php _e('Yearly', 'google-sitemap-plugin'); ?> </option> <option value="never"><?php _e('Never', 'google-sitemap-plugin'); ?> </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.', 'google-sitemap-plugin'); ?> </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', 'google-sitemap-plugin'); ?> </div> <a class="bws_button" 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', 'google-sitemap-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <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.", 'google-sitemap-plugin'); ?> </td> </tr> <?php } else { ?> <tr id="gglstmp_google_webmaster" valign="top"> <th scope="row"><?php _e('Remote work with Google Webmaster Tools', 'google-sitemap-plugin'); ?> </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', 'google-sitemap-plugin'); ?> " /> </div> <?php $gglstmp_menu_ad = __("I want to add this site to Google Webmaster Tools", 'google-sitemap-plugin'); $gglstmp_menu_del = __("I want to delete this site from Google Webmaster Tools", 'google-sitemap-plugin'); $gglstmp_menu_inf = __("I want to get info about this site in Google Webmaster Tools", 'google-sitemap-plugin'); ?> <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="bws_info"> <?php _e('In case you failed to add a sitemap to Google automatically using this plugin, it is possible to do it manually', 'google-sitemap-plugin'); ?> : <a target="_blank" href="https://docs.google.com/document/d/1VOJx_OaasVskCqi9fsAbUmxfsckoagPU5Py97yjha9w/edit"><?php _e('View the Instruction', 'google-sitemap-plugin'); ?> </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.", 'google-sitemap-plugin'); ?> </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', 'google-sitemap-plugin'); ?> </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', 'google-sitemap-plugin'); ?> "> </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.', 'google-sitemap-plugin'); ?> </div> <?php } } ?> </td> </tr> <?php } ?> </table> <input type="hidden" name="gglstmp_submit" value="submit" /> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'google-sitemap-plugin'); ?> " /> </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:', 'google-sitemap-plugin'); ?> </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", 'google-sitemap-plugin'); ?> </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", 'google-sitemap-plugin'); ?> " title="<?php _e("Example of site pages' tree", 'google-sitemap-plugin'); ?> " /> </td> </tr> <tr valign="top"> <td colspan="2"> <input disabled="disabled" type="submit" class="button-primary" value="<?php _e('Save Changes', 'google-sitemap-plugin'); ?> " /> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'google-sitemap-plugin'); ?> </div> <a class="bws_button" 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', 'google-sitemap-plugin'); ?> </a> <div class="clear"></div> </div> </div> <?php } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $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 vstrsnln_settings_page() { global $wpdb, $vstrsnln_options, $vstrsnln_plugin_info, $vstrsnln_prefix, $wp_version; $message = $error = ''; if (isset($_REQUEST['vstrsnln_submit']) && check_admin_referer(plugin_basename(__FILE__), 'vstrsnln_nonce_name')) { if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($vstrsnln_options); $vstrsnln_options = $hide_result['options']; } /* Pressing the clear statistics */ if (isset($_POST['vstrsnln_button_clean'])) { $wpdb->query("TRUNCATE `" . $vstrsnln_prefix . "general`;"); $wpdb->query("TRUNCATE `" . $vstrsnln_prefix . "detailing`;"); $vstrsnln_number_general = $wpdb->get_var("\n\t\t\t\t\tSELECT count( * )\n\t\t\t\t\tFROM `" . $vstrsnln_prefix . "general`\n\t\t\t\t\tLIMIT 1"); if ($vstrsnln_number_general == 0) { $message = __('Statistics was cleared successfully', 'visitors-online'); } } else { /* Save data for settings page */ if ($vstrsnln_options['check_user_interval'] != $_REQUEST['vstrsnln_check_user_interval']) { /* Add the planned hook - check users online */ wp_clear_scheduled_hook('vstrsnln_check_users'); if (!wp_next_scheduled('vstrsnln_check_users')) { wp_schedule_event(time(), 'vstrsnln_interval', 'vstrsnln_check_users'); } } if (isset($_REQUEST['vstrsnln_check_user_interval'])) { if (empty($_REQUEST['vstrsnln_check_user_interval'])) { $error = __('Please fill The time period. The settings are not saved', 'visitors-online'); } else { $vstrsnln_options['check_user_interval'] = isset($_REQUEST['vstrsnln_check_user_interval']) ? $_REQUEST['vstrsnln_check_user_interval'] : 1; $vstrsnln_options['check_browser'] = isset($_REQUEST['check_browser']) ? 1 : 0; $vstrsnln_options['check_country'] = isset($_REQUEST['check_country']) ? 1 : 0; update_option('vstrsnln_options', $vstrsnln_options); $message = __('Settings saved', 'visitors-online'); } } } } /* Pressing the 'Import Country' */ $vstrsnln_result_downloaded = vstrsnln_press_buttom_import(); $result = $vstrsnln_result_downloaded['result']; if (0 !== $result) { $message = $vstrsnln_result_downloaded['message']; $error = $vstrsnln_result_downloaded['error']; } if (true == $result) { vstrsnln_check_country(true); } $bws_hide_premium_options_check = bws_hide_premium_options_check($vstrsnln_options); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check(plugin_basename(__FILE__), 'vstrsnln_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } ?> <div class="wrap"> <h2><?php _e('Visitors Online Settings', 'visitors-online'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab <?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=visitors-online.php"><?php _e('Settings', 'visitors-online'); ?> </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=visitors-online.php&action=go_pro"><?php _e('Go PRO', 'visitors-online'); ?> </a> </h2> <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 (!empty($hide_result['message'])) { ?> <div class="updated fade"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } if (!isset($_GET['action'])) { bws_show_settings_notice(); ?> <br/> <div> <?php printf(__('You can add the counter of Visitors Online by clicking on %s button.', 'visitors-online'), '<span class="bws_code"><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt=""/></span>'); ?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 180px;"> <?php printf(__("You can add the counter of Visitors Online to your content by clicking on %s button in the content edit block using the Visual mode. If the button isn't displayed, please use the shortcode %s", 'visitors-online'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', '<code>[vstrsnln_info]</code>'); ?> </div> </div> <br> <?php _e('You can also add a widget', 'visitors-online'); ?> : <strong>Visitors Online</strong> </div> <p><?php _e('Statistics can be viewed on the Dashboard.', 'visitors-online'); ?> </p> <form class="bws_form" method="post" action="admin.php?page=visitors-online.php"> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('The time period when the user is online, without making any actions', 'visitors-online'); ?> </th> <td> <input type="number" min="1" max="60" name="vstrsnln_check_user_interval" value="<?php echo $vstrsnln_options['check_user_interval']; ?> " /> <?php _e('min', 'visitors-online'); ?> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'visitors-online'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"> <?php _e('Update GeoIP', 'visitors-online'); ?> </th> <td> <?php _e('every', 'visitors-online'); ?> <input type="number" disabled name="vstrsnln_loading_country" value="0" /> <?php _e('months', 'visitors-online'); ?> <br> <span class="bws_info"> <?php _e('This option allows you to download lists with registered IP addresses all over the world to the database (from', 'visitors-online'); ?> <a href="https://www.maxmind.com" target="_blank">https://www.maxmind.com</a>). <br> <?php _e('With this, you receive an information about each IP address, and to which country it belongs to. You can select the desired frequency for IP database updating', 'visitors-online'); ?> . </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.', 'visitors-online'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'visitors-online'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/visitors-online/?k=1b01d30e84bb97b2afecb5f34c43931d&pn=216&v=<?php echo $vstrsnln_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Visitors Online Pro"><?php _e('Learn More', 'visitors-online'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Clear the statistics', 'visitors-online'); ?> </th> <td> <input type="submit" name="vstrsnln_button_clean" class="button" value=<?php _e('Clear', 'visitors-online'); ?> /> </td> </tr> </table> <p class="submit"> <input type="hidden" name="vstrsnln_submit" value="submit" /> <input id="bws-submit-button" type="submit" name="vstrsnln_button_save" class="button-primary" value="<?php _e('Save Changes', 'visitors-online'); ?> " /> </p> <?php wp_nonce_field(plugin_basename(__FILE__), 'vstrsnln_nonce_name'); ?> </form> <?php vstrsnln_form_import_country("admin.php?page=visitors-online.php"); } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $vstrsnln_plugin_info, plugin_basename(__FILE__), 'visitors-online.php', 'visitors-online-pro.php', 'visitors-online-pro/visitors-online-pro.php', 'visitors-online', '1b01d30e84bb97b2afecb5f34c43931d', '216', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($vstrsnln_plugin_info['Name'], 'visitors-online'); ?> </div> <?php }
function mltlngg_settings_page() { global $mltlngg_options, $mltlngg_default_options, $mltlngg_plugin_info, $mltlngg_languages, $wp_version; $mltlngg_message_value = array('success' => '', 'error' => ''); /* Change settings options */ if (isset($_POST['mltlngg_settings_form_was_send']) && check_admin_referer('mltlngg_settings_form', 'mltlngg_settings_form_field')) { if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($mltlngg_options); $mltlngg_options = $hide_result['options']; } $mltlngg_options['enabled_new_language'] = isset($_POST['mltlngg_new_language_enable']) ? true : false; $mltlngg_options['autosave_editor_content'] = isset($_POST['mltlngg_autosave_editor_content']) ? true : false; $mltlngg_options['display_alternative_link'] = isset($_POST['mltlngg_display_alternative_link']) ? true : false; $mltlngg_options['hide_link_slug'] = isset($_POST['mltlngg_hide_link_slug']) ? true : false; $mltlngg_options['wp_localization'] = isset($_POST['mltlngg_wp_localization']) ? true : false; $mltlngg_options['language_switcher'] = isset($_POST['mltlngg_language_switcher']) ? $_POST['mltlngg_language_switcher'] : 'drop-down-list'; $mltlngg_options['search'] = $_POST['mltlngg_search']; update_option('mltlngg_options', $mltlngg_options); $mltlngg_message_value['success'] = __('Settings saved', 'multilanguage'); } /* Adding language */ if (isset($_POST['mltlngg_add_new_language_form_was_send']) && !empty($_POST['mltlngg_lang_list']) && check_admin_referer('mltlngg_add_new_language_form', 'mltlngg_add_new_language_field')) { if (preg_match('/^([a-z]{2,3}|[a-z]{2,3}[_][A-Z]{2,3})-(.+?)$/u', $_POST['mltlngg_lang_list'], $matches)) { /* If language data is correct */ $done = mltlngg_add_language($matches[1], $matches[2]); /* Add new language (locale, name) */ if ($done) { $mltlngg_message_value['success'] = __('Language added', 'multilanguage'); } } else { /* If language data is incorrect */ $mltlngg_message_value['error'] = __('Incorrect language data', 'multilanguage'); } } /* Change priority and default language options */ if (isset($_POST['mltlngg_language_form_was_send']) && check_admin_referer('mltlngg_current_languages_form', 'mltlngg_current_languages_field')) { if (isset($_POST['mltlngg_language_form_submit'])) { foreach ($mltlngg_options['list_of_languages'] as $key => $mltlngg_language_to_action) { if (isset($_POST[$mltlngg_language_to_action['locale']]) && NULL != $_POST[$mltlngg_language_to_action['locale']]) { $mltlngg_options['list_of_languages'][$key]['priority'] = $_POST[$mltlngg_language_to_action['locale']]; } $mltlngg_priority[$key] = $mltlngg_options['list_of_languages'][$key]['priority']; } /* change default langguage */ if (isset($_POST['mltlngg_default_lang']) && !is_null($_POST['mltlngg_default_lang'])) { foreach ($mltlngg_options['list_of_languages'] as $key => $language) { /* if language data have been finded */ if (array_search($_POST['mltlngg_default_lang'], $language, true)) { $mltlngg_options['default_language'] = $_POST['mltlngg_default_lang']; $mltlngg_options['list_of_languages'][$key]['enable'] = true; break; } } } /* Sorting list of language by priority */ array_multisort($mltlngg_priority, SORT_ASC, $mltlngg_options['list_of_languages']); update_option('mltlngg_options', $mltlngg_options); $mltlngg_message_value['success'] = __('Settings saved', 'multilanguage'); } } /* Actions for table of languages */ if (!isset($_POST['mltlngg_language_form_submit'])) { if (isset($_POST['mltlngg_language']) && check_admin_referer('mltlngg_current_languages_form', 'mltlngg_current_languages_field')) { if (isset($_POST['action']) && -1 != $_POST['action']) { $action = $_POST['action']; $language = $_POST['mltlngg_language']; } elseif (isset($_POST['action2']) && -1 != $_POST['action2']) { $action = $_POST['action2']; $language = $_POST['mltlngg_language']; } } elseif (isset($_GET['mltlngg_language']) && wp_verify_nonce($_GET['_wpnonce'], 'mltlngg-action')) { $action = $_GET['action']; $language = $_GET['mltlngg_language']; } $action_result = isset($action) && in_array($action, array('enable', 'disable', 'delete')) ? mltlngg_actions($action, $language) : array(); if (isset($action_result['error'])) { $mltlngg_message_value['error'] .= $action_result['error']; } if (isset($action_result['success'])) { $mltlngg_message_value['success'] .= $action_result['success']; } } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer(plugin_basename(__FILE__), 'bws_settings_nonce_name')) { $mltlngg_options = $mltlngg_default_options; update_option('mltlngg_options', $mltlngg_options); $mltlngg_message_value['success'] = __('All plugin settings were restored.', 'multilanguage'); } $bws_hide_premium_options_check = bws_hide_premium_options_check($mltlngg_options); /* GO PRO */ if (isset($_GET['tab']) && 'go_pro' == $_GET['tab']) { $go_pro_result = bws_go_pro_tab_check(plugin_basename(__FILE__), 'mltlngg_options'); if (!empty($go_pro_result['error'])) { $mltlngg_message_value['error'] = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $mltlngg_message_value['success'] = $go_pro_result['message']; } } ?> <div class="wrap" id="mltlngg-settings"> <h1><?php _e('Multilanguage Settings', 'multilanguage'); if (!(isset($_GET['tab']) && in_array($_GET['tab'], array('settings', 'go_pro')))) { ?> <a class="page-title-action hide-if-no-js" href="#" id="mltlngg-add-lang-link"><?php _e('Add language', 'multilanguage'); ?> </a> <?php } ?> </h1> <!-- Display language tab on setting page --> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['tab'])) { echo ' nav-tab-active'; } ?> " href="<?php echo admin_url('admin.php?page=mltlngg_settings', ''); ?> "><?php _e('Languages', 'multilanguage'); ?> </a> <a class="nav-tab<?php if (isset($_GET['tab']) && 'settings' == $_GET['tab']) { echo ' nav-tab-active'; } ?> " href="<?php echo admin_url('admin.php?page=mltlngg_settings&tab=settings', ''); ?> "><?php _e('Settings', 'multilanguage'); ?> </a> <a class="nav-tab <?php if (isset($_GET['tab']) && 'custom_code' == $_GET['tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=mltlngg_settings&tab=custom_code"><?php _e('Custom code', 'multilanguage'); ?> </a> <a class="nav-tab bws_go_pro_tab<?php if (isset($_GET['tab']) && 'go_pro' == $_GET['tab']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=mltlngg_settings&tab=go_pro"><?php _e('Go PRO', 'multilanguage'); ?> </a> </h2><!-- .nav-tab-wrapper --> <?php if (!empty($mltlngg_message_value['error'])) { ?> <div class="error below-h2"><p><strong><?php echo $mltlngg_message_value['error']; ?> </strong></p></div> <?php } elseif (!empty($mltlngg_message_value['success'])) { ?> <div class="updated fade below-h2"><p><strong><?php echo $mltlngg_message_value['success']; ?> </strong></p></div> <?php } if (!empty($hide_result['message'])) { ?> <div class="updated fade below-h2"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } bws_show_settings_notice(); /* Display tab of setting page */ if (!isset($_GET['tab'])) { /* Form for adding new language */ 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 ('settings' == $_GET['tab']) { if (isset($_REQUEST['bws_restore_default']) && check_admin_referer(plugin_basename(__FILE__), 'bws_settings_nonce_name')) { bws_form_restore_default_confirm(plugin_basename(__FILE__)); } else { ?> <p><?php _e('If you would like to display Language switcher with a widget, you need to add the widget "Multilanguage" in the Widgets tab.', 'multilanguage'); ?> </p> <div> <?php printf(__("If you would like to add a Language switcher to your page or post, please use %s button", 'multilanguage'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt=""/></code>'); ?> <div class="bws_help_box bws_help_box_right dashicons dashicons-editor-help"> <div class="bws_hidden_help_text" style="min-width: 260px;"> <?php printf(__("You can add Language switcher to your page or post by clicking on %s button in the content edit block using the Visual mode. If the button isn't displayed, please use the shortcode %s.", 'multilanguage'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', '<code>[multilanguage_switcher]</code>'); ?> </div> </div> </div> <p><?php _e('Also, you can paste the following strings into the template source code', 'multilanguage'); ?> <code><?php if ( function_exists( 'mltlngg_display_switcher' ) ) mltlngg_display_switcher(); ?></code> <!-- Table with options form --> <form class="bws_form" name="mltlngg_settings_form" method="post" action="" id="mltlngg-current-languages-form"> <table class="form-table" style="max-width: 700px;"> <tr valign="middle"> <th scope="row"><?php _e('Enable new language', 'multilanguage'); ?> </th> <td> <input id="mltlngg_new_language_enable" name="mltlngg_new_language_enable" type="checkbox" value="true" <?php echo true == $mltlngg_options['enabled_new_language'] ? ' checked' : ''; ?> > <span class="bws_info"><?php _e("The newly added language will be enabled automatically", 'multilanguage'); ?> </span> </td> </tr> <tr valign="middle"> <th scope="row"><?php _e('Autosave translation in the editor', 'multilanguage'); ?> </th> <td> <input name="mltlngg_autosave_editor_content" type="checkbox" value="true" <?php echo true == $mltlngg_options['autosave_editor_content'] ? ' checked' : ''; ?> > <span class="bws_info"><?php _e("When switching edit posts/pages translation tab, the changes made in the previous tab will be saved automatically (only when the Javascript is enabled)", 'multilanguage'); ?> </span> </td> </tr> <tr valign="middle"> <th scope="row"><?php _e('Switch Wordpress localization', 'multilanguage'); ?> </th> <td><input name="mltlngg_wp_localization" type="checkbox" value="true" <?php echo true == $mltlngg_options['wp_localization'] ? ' checked' : ''; ?> > <span class="bws_info"><?php _e("When changing the language in the frontend, WordPress localization will also be changed (only in case additional WordPress language packs are installed)", 'multilanguage'); ?> </span></td> </tr> <tr valign="middle"> <th scope="row"><?php _e('Language switcher', 'multilanguage'); ?> </th> <td> <fieldset> <div style="clear: both;"> <label> <input name="mltlngg_language_switcher" type="radio" value="drop-down-list" <?php if ($mltlngg_options['language_switcher'] == 'drop-down-list') { echo 'checked'; } ?> /> <?php _e('Drop-down languages list', 'multilanguage'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help mltlngg_thumb_block"> <div class="bws_hidden_help_text"><img title="" src="<?php echo plugins_url('images/tooltip_drop_down_list.png', __FILE__); ?> " alt="" /></div> </div> </div> <div> <label> <input name="mltlngg_language_switcher" type="radio" value="drop-down-icons" <?php if ($mltlngg_options['language_switcher'] == 'drop-down-icons') { echo 'checked'; } ?> /> <?php _e('Drop-down flag icons', 'multilanguage'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help mltlngg_thumb_block"> <div class="bws_hidden_help_text"><img title="" src="<?php echo plugins_url('images/tooltip_drop_down_icons.png', __FILE__); ?> " alt="" /></div> </div> </div> <div> <label> <input name="mltlngg_language_switcher" type="radio" value="flags-icons" <?php if ($mltlngg_options['language_switcher'] == 'flags-icons') { echo 'checked'; } ?> /> <?php _e('Flag icons', 'multilanguage'); ?> </label> <div class="bws_help_box dashicons dashicons-editor-help mltlngg_thumb_block"> <div class="bws_hidden_help_text"><img title="" src="<?php echo plugins_url('images/tooltip_flags_icons.png', __FILE__); ?> " alt="" /></div> </div> </div> </fieldset> </td> </tr> <tr valign="middle"> <th scope="row"><?php _e("Display alternative page links", 'multilanguage'); ?> </th> <td> <input type="checkbox" id="mltlngg_display_alternative_link" name="mltlngg_display_alternative_link" value="1" <?php echo true == $mltlngg_options['display_alternative_link'] ? ' checked="checked"' : ''; ?> /> <div class="bws_help_box dashicons dashicons-editor-help mltlngg_thumb_block"> <div class="bws_hidden_help_text" style="width: 200px;"> <p><?php printf(__('With this option, there will be added links to your current page for each language from your site into the tag %s', 'multilanguage'), '<head>'); ?> </p> </div> </div> </td> </tr> <tr valign="middle"> <th scope="row"><?php _e("Hide link slug for default language", 'multilanguage'); ?> </th> <td> <input type="checkbox" id="mltlngg_hide_link_slug" name="mltlngg_hide_link_slug" value="1" <?php echo true == $mltlngg_options['hide_link_slug'] ? ' checked="checked"' : ''; ?> /> </td> </tr> <tr valign="middle"> <th scope="row"><?php _e('Default searching by', 'multilanguage'); ?> </th> <td> <fieldset> <label> <input type="radio" name="mltlngg_search" value="single" <?php if ('single' == $mltlngg_options['search']) { echo ' checked'; } ?> /> <?php _e('selected language', 'multilanguage'); ?> </label><br> <label> <input type="radio" name="mltlngg_search" value="all" <?php if ('all' == $mltlngg_options['search']) { echo ' checked'; } ?> /> <?php _e('all available languages', 'multilanguage'); ?> </label> </fieldset> </td> </tr> </table><!-- .form-table --> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc" style="overflow: visible;"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'multilanguage'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="middle"> <th scope="row"><?php _e("Determining the locale using the user's IP", 'multilanguage'); ?> </th> <td> <input type="checkbox" disabled id="mltlngg_determining_locale" name="mltlngg_determining_locale" value="true" /> </td> </tr> <tr valign="middle" class="mltlngg_display_add_block"> <th><?php _e('Update GeoIP', 'multilanguage'); ?> </th> <td> <label style="display: inline-block;margin-right: 20px;"><?php _e('every', 'multilanguage'); ?> <input type="number" value="3" style="width: 50px;" disabled="disabled" /> <?php _e('months', 'multilanguage'); ?> </label> <div style="display: inline-block;position: relative;"> <input type="submit" class="button bwsplgns_need_disable" value="<?php _e('Update now', 'multilanguage'); ?> " disabled="disabled" /> </div> <div class="bws_help_box bws_help_box_left dashicons dashicons-editor-help" style="position: relative;z-index: 10;"> <div class="bws_hidden_help_text" style="min-width: 220px;"> <p style="text-indent: 15px;"> <?php _e('This option allows you to download lists with registered IP addresses all over the world to the database (from', 'multilanguage'); ?> <a href="https://www.maxmind.com" target="_blank">https://www.maxmind.com</a>). </p> <p style="text-indent: 15px;"> <?php _e('With this, you receive an information about each IP address, and to which country it belongs to. You can select the desired frequency for IP database updating', 'multilanguage'); ?> . </p> <p style="text-indent: 15px;"> <?php _e('If you need to update GeoIP immediately, please click on the "Update now" button and wait until the operation is finished', 'multilanguage'); ?> . </p> <noscript> <div class="update-nag" style="margin-top: 0;"><?php _e('Due to the fact that JavaScript is disabled, GeoIP will be updated via wp_cron', 'multilanguage'); ?> .</div> </noscript> <p style="text-indent: 15px;"> <?php _e('Read more about', 'multilanguage'); ?> <a href="https://www.maxmind.com/en/geoip2-services-and-databases" target="_blank">GeoIp</a>. </p> </div> </div> <p id="bwscntrtbl_message"><?php _e('Last update was carried out', 'multilanguage'); ?> 2016-01-22 12:59:04</p> </td> </tr> <tr valign="top"> <th scope="row" colspan="2"> * <?php _e('If you upgrade to Pro version all your settings will be saved.', 'multilanguage'); ?> </th> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'multilanguage'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/multilanguage/?k=fa164f00821ed3a87e6f78cb3f5c277b&pn=143&v=<?php echo $mltlngg_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Multilanguage Pro"><?php _e('Learn More', 'multilanguage'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <p> <input id="bws-submit-button" type="submit" name="mltlngg_settings_form_submit" class="button-primary" value="<?php _e('Save changes', 'multilanguage'); ?> "> <input type="hidden" name="mltlngg_settings_form_was_send" value="1"> <?php wp_nonce_field('mltlngg_settings_form', 'mltlngg_settings_form_field'); ?> </p> </form><!-- name="mltlngg_settings_form" --> <!-- /table with options form --> <?php bws_form_restore_default_settings(plugin_basename(__FILE__)); } } elseif ('custom_code' == $_GET['tab']) { bws_custom_code_tab(); } elseif ('go_pro' == $_GET['tab']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $mltlngg_plugin_info, plugin_basename(__FILE__), 'mltlngg_settings', 'mltlnggpr_settings', 'multilanguage-pro/multilanguage-pro.php', 'multilanguage', 'fa164f00821ed3a87e6f78cb3f5c277b', '143', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($mltlngg_plugin_info['Name'], 'multilanguage'); ?> </div><!-- .wrap --> <?php }
function gglcptch_settings_page() { global $gglcptch_options, $gglcptch_plugin_info, $wp_version, $gglcptch_allow_url_fopen, $gglcptch_default_options; $plugin_basename = plugin_basename(__FILE__); $message = $error = ''; if (!isset($_GET['action'])) { $all_plugins = get_plugins(); $gglcptch_sizes_v2 = array('normal' => __('Normal', 'google-captcha'), 'compact' => __('Compact', 'google-captcha')); /* Private and public keys */ $gglcptch_keys = array('public' => array('display_name' => __('Site key', 'google-captcha'), 'form_name' => 'gglcptch_public_key', 'error_msg' => ''), 'private' => array('display_name' => __('Secret Key', 'google-captcha'), 'form_name' => 'gglcptch_private_key', 'error_msg' => '')); /* Checked forms */ $gglcptch_forms = array(array('login_form', __('Login form', 'google-captcha')), array('registration_form', __('Registration form', 'google-captcha')), array('reset_pwd_form', __('Reset password form', 'google-captcha')), array('comments_form', __('Comments form', 'google-captcha'))); /* Google captcha themes */ $gglcptch_themes = array(array('red', 'Red'), array('white', 'White'), array('blackglass', 'Blackglass'), array('clean', 'Clean')); /* Save data for settings page */ if (isset($_POST['gglcptch_form_submit']) && check_admin_referer($plugin_basename, 'gglcptch_nonce_name')) { if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($gglcptch_options); $gglcptch_options = $hide_result['options']; } if (!$_POST['gglcptch_public_key'] || '' == $_POST['gglcptch_public_key']) { $gglcptch_keys['public']['error_msg'] = __('Enter site key', 'google-captcha'); $error = __("WARNING: The captcha will not display while you don't fill key fields.", 'google-captcha'); } else { $gglcptch_keys['public']['error_msg'] = ''; } if (!$_POST['gglcptch_private_key'] || '' == $_POST['gglcptch_private_key']) { $gglcptch_keys['private']['error_msg'] = __('Enter secret key', 'google-captcha'); $error = __("WARNING: The captcha will not display while you don't fill key fields.", 'google-captcha'); } else { $gglcptch_keys['private']['error_msg'] = ''; } $gglcptch_options['public_key'] = trim(stripslashes(esc_html($_POST['gglcptch_public_key']))); $gglcptch_options['private_key'] = trim(stripslashes(esc_html($_POST['gglcptch_private_key']))); $gglcptch_options['login_form'] = isset($_POST['gglcptch_login_form']) ? 1 : 0; $gglcptch_options['registration_form'] = isset($_POST['gglcptch_registration_form']) ? 1 : 0; $gglcptch_options['reset_pwd_form'] = isset($_POST['gglcptch_reset_pwd_form']) ? 1 : 0; $gglcptch_options['comments_form'] = isset($_POST['gglcptch_comments_form']) ? 1 : 0; $gglcptch_options['contact_form'] = isset($_POST['gglcptch_contact_form']) ? 1 : 0; $gglcptch_options['recaptcha_version'] = $_POST['gglcptch_recaptcha_version']; $gglcptch_options['theme'] = $_POST['gglcptch_theme']; $gglcptch_options['theme_v2'] = $_POST['gglcptch_theme_v2']; foreach (get_editable_roles() as $role => $fields) { $gglcptch_options[$role] = isset($_POST['gglcptch_' . $role]) ? 1 : 0; } update_option('gglcptch_options', $gglcptch_options); $message = __('Settings saved', 'google-captcha'); } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $gglcptch_options = $gglcptch_default_options; update_option('gglcptch_options', $gglcptch_options); $message = __('All plugin settings were restored.', 'google-captcha'); } } $bws_hide_premium_options_check = bws_hide_premium_options_check($gglcptch_options); /* GO PRO */ if (isset($_GET['action']) && 'go_pro' == $_GET['action']) { $go_pro_result = bws_go_pro_tab_check($plugin_basename, 'gglcptch_options'); if (!empty($go_pro_result['error'])) { $error = $go_pro_result['error']; } elseif (!empty($go_pro_result['message'])) { $message = $go_pro_result['message']; } } ?> <div class="wrap"> <h2><?php _e('Google Captcha Settings', 'google-captcha'); ?> </h2> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-captcha.php"><?php _e('Settings', 'google-captcha'); ?> </a> <a class="nav-tab" href="http://bestwebsoft.com/products/google-captcha/faq/" target="_blank"><?php _e('FAQ', 'google-captcha'); ?> </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=google-captcha.php&action=go_pro"><?php _e('Go PRO', 'google-captcha'); ?> </a> </h2> <?php bws_show_settings_notice(); ?> <div 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 (!empty($hide_result['message'])) { ?> <div class="updated fade"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } if (!$gglcptch_allow_url_fopen && $gglcptch_options['recaptcha_version'] == 'v2') { printf('<div class="error"><p><strong>%s</strong> <a href="http://php.net/manual/en/filesystem.configuration.php" target="_blank">%s</a></p></div>', __('Google Captcha version 2 will not work correctly, since the option "allow_url_fopen" is disabled in the PHP settings of your hosting.', 'google-captcha'), __('Read more.', 'google-captcha')); } 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 { ?> <p><?php _e('If you would like to add the Google Captcha to your own form, just copy and paste this shortcode to your form:', 'google-captcha'); ?> <span class="bws_code">[bws_google_captcha]</span></p> <form class="bws_form" method="post" action="admin.php?page=google-captcha.php"> <h3><?php _e('Authentication', 'google-captcha'); ?> </h3> <p><?php printf(__('Before you are able to do something, you must to register %s here %s', 'google-captcha'), '<a target="_blank" href="https://www.google.com/recaptcha/admin#list">', '</a>.'); ?> </p> <p><?php _e('Enter site key and secret key, that you get after registration.', 'google-captcha'); ?> </p> <table id="gglcptch-keys" class="form-table"> <?php foreach ($gglcptch_keys as $key => $fields) { ?> <tr valign="top"> <th scope="row"><?php echo $fields['display_name']; ?> </th> <td> <input type="text" name="<?php echo $fields['form_name']; ?> " value="<?php echo $gglcptch_options[$key . '_key']; ?> " maxlength="200" /> <label class="gglcptch_error_msg"><?php echo $fields['error_msg']; ?> </label> </td> </tr> <?php } ?> </table> <h3><?php _e('Options', 'google-captcha'); ?> </h3> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Enable reCAPTCHA for', 'google-captcha'); ?> </th> <td> <?php foreach ($gglcptch_forms as $form) { ?> <label><input type="checkbox" name="<?php echo 'gglcptch_' . $form[0]; ?> " value=<?php echo $form[0]; if ('1' == $gglcptch_options[$form[0]]) { echo ' checked'; } ?> > <?php echo $form[1]; ?> </label><br /> <?php } if (isset($all_plugins['contact-form-plugin/contact_form.php']) || isset($all_plugins['contact-form-pro/contact_form_pro.php'])) { 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="gglcptch_contact_form" value="contact_form"<?php if ('1' == $gglcptch_options['contact_form']) { echo ' checked'; } ?> > Contact Form</label> <span class="bws_info">(<?php _e('powered by', 'google-captcha'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>)</span><br /> <?php } else { ?> <label><input type="checkbox" disabled name="gglcptch_contact_form" value="contact_form"<?php if ('1' == $gglcptch_options['contact_form']) { echo ' checked'; } ?> > Contact Form</label> <span class="bws_info">(<?php _e('powered by', 'google-captcha'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="<?php echo admin_url('plugins.php'); ?> "><?php _e('Activate', 'google-captcha'); ?> Contact Form</a></span><br /> <?php } } else { ?> <label><input type="checkbox" disabled name="gglcptch_contact_form" value="contact_form"<?php if ('1' == $gglcptch_options['contact_form']) { echo ' checked'; } ?> > Contact Form</label> <span class="bws_info">(<?php _e('powered by', 'google-captcha'); ?> <a href="http://bestwebsoft.com/products/">bestwebsoft.com</a>) <a href="http://bestwebsoft.com/products/contact-form/?k=d70b58e1739ab4857d675fed2213cedc&pn=75&v=<?php echo $gglcptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> "><?php _e('Download', 'google-captcha'); ?> Contact Form</a></span><br /> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Hide reCAPTCHA in Comments form for', 'google-captcha'); ?> </th> <td> <?php foreach (get_editable_roles() as $role => $fields) { ?> <label><input type="checkbox" name="<?php echo 'gglcptch_' . $role; ?> " value=<?php echo $role; if (isset($gglcptch_options[$role]) && '1' == $gglcptch_options[$role]) { echo ' checked'; } ?> > <?php echo $fields['name']; ?> </label><br/> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA version', 'google-captcha'); ?> </th> <td> <fieldset> <label><input type="radio" name="gglcptch_recaptcha_version" value="v1"<?php if ('v1' == $gglcptch_options['recaptcha_version']) { echo ' checked="checked"'; } ?> > <?php _e('version', 'google-captcha'); ?> 1</label><br/> <label><input type="radio" name="gglcptch_recaptcha_version" value="v2"<?php if ('v2' == $gglcptch_options['recaptcha_version']) { echo ' checked="checked"'; } ?> > <?php _e('version', 'google-captcha'); ?> 2</label> </fieldset> </td> </tr> <tr class="gglcptch_theme_v1" valign="top"> <th scope="row"> <?php _e('reCAPTCHA theme', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 1)</span> </th> <td> <select name="gglcptch_theme"> <?php foreach ($gglcptch_themes as $theme) { ?> <option value=<?php echo $theme[0]; if ($theme[0] == $gglcptch_options['theme']) { echo ' selected'; } ?> > <?php echo $theme[1]; ?> </option> <?php } ?> </select> </td> </tr> <tr class="gglcptch_theme_v2" valign="top"> <th scope="row"> <?php _e('reCAPTCHA theme', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 2)</span> </th> <td> <select name="gglcptch_theme_v2"> <option value="light" <?php if ('light' == $gglcptch_options['theme_v2']) { echo ' selected'; } ?> >light</option> <option value="dark" <?php if ('dark' == $gglcptch_options['theme_v2']) { echo ' selected'; } ?> >dark</option> </select> </td> </tr> </table> <?php if (!$bws_hide_premium_options_check) { ?> <div class="bws_pro_version_bloc"> <div class="bws_pro_version_table_bloc"> <button type="submit" name="bws_hide_premium_options" class="notice-dismiss bws_hide_premium_options" title="<?php _e('Close', 'google-captcha'); ?> "></button> <div class="bws_table_bg"></div> <table class="form-table bws_pro_version"> <tr valign="top"> <th scope="row"><?php _e('reCAPTCHA language', 'google-captcha'); ?> </th> <td> <select disabled name="gglcptch_language"> <option value="en" selected="selected">English (US)</option> </select> <div style="margin: 5px 0 0;"> <?php $gglcptch_multilanguage = $gglcptch_use_multilanguage = $gglcptch_multilanguage_message = ''; if (array_key_exists('multilanguage/multilanguage.php', $all_plugins) || array_key_exists('multilanguage-pro/multilanguage-pro.php', $all_plugins)) { if (is_plugin_active('multilanguage/multilanguage.php') || is_plugin_active('multilanguage-pro/multilanguage-pro.php')) { $gglcptch_use_multilanguage = $gglcptch_options["use_multilanguage_locale"] == 1 ? 'checked="checked"' : ''; } else { $gglcptch_multilanguage = 'disabled="disabled"'; $gglcptch_multilanguage_message = sprintf('<a href="plugins.php">%s Multilanguage</a>', __('Activate', 'google-captcha')); } } else { $gglcptch_multilanguage = 'disabled="disabled"'; $gglcptch_multilanguage_message = sprintf('<a href="http://bestwebsoft.com/products/multilanguage/?k=390f8e0d92066f2b73a14429d02dcee7&pn=281&v=%s&wp_v=%s">%s Multilanguage</a>', $gglcptch_plugin_info["Version"], $wp_version, __('Download', 'google-captcha')); } ?> <input id="gglcptch_use_multilanguage_locale" type="checkbox" name="gglcptch_use_multilanguage_locale" value="1" <?php printf('%s %s', $gglcptch_use_multilanguage, $gglcptch_multilanguage); ?> /> <label for="gglcptch_use_multilanguage_locale"><?php _e('Use the current site language', 'google-captcha'); ?> </label> <span class="bws_info">(<?php _e('Using', 'google-captcha'); ?> Multilanguage by BestWebSoft) <?php echo $gglcptch_multilanguage_message; ?> </span> </div> </td> </tr> <tr valign="top"> <th scope="row"> <?php _e('reCAPTCHA size', 'google-captcha'); ?> <br/><span class="bws_info">(<?php _e('for version', 'google-captcha'); ?> 2)</span> </th> <td><fieldset> <?php foreach ($gglcptch_sizes_v2 as $value => $name) { printf('<div class="gglcptch_size_v2"><label><input disabled type="radio" name="gglcptch_size_v2" value="%s"%s> %s</label></div>', $value, $name == 'Normal' ? ' checked="checked"' : '', $name); } ?> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"> <strong>Contact Form 7</strong><br/> <?php _e('Enable CAPTCHA', 'google-captcha'); ?> </th> <td> <?php if (array_key_exists('contact-form-7/wp-contact-form-7.php', $all_plugins)) { if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) { ?> <br/><input disabled='disabled' type="checkbox" name="gglcptchpr_cf7" value="1" /> <?php } else { ?> <span class="bws_info"><?php _e('You should', 'google-captcha'); ?> <a href="<?php echo admin_url('plugins.php'); ?> "><?php _e('activate', 'google-captcha'); ?> Contact Form 7</a> <?php _e('to use this functionality', 'google-captcha'); ?> </span><br/> <input disabled='disabled' type="checkbox" name="gglcptchpr_cf7" value="1" /> <?php } } else { ?> <span class="bws_info"><?php _e('You should', 'google-captcha'); ?> <a target="_blank" href="http://wordpress.org/plugins/contact-form-7/"><?php _e('download', 'google-captcha'); ?> Contact Form 7</a> <?php _e('to use this functionality', 'google-captcha'); ?> </span><br/> <input disabled='disabled' type="checkbox" name="gglcptchpr_cf7" value="1" /> <?php } ?> </td> </tr> </table> </div> <div class="bws_pro_version_tooltip"> <div class="bws_info"> <?php _e('Unlock premium options by upgrading to Pro version', 'google-captcha'); ?> </div> <a class="bws_button" href="http://bestwebsoft.com/products/google-captcha/?k=b850d949ccc1239cab0da315c3c822ab&pn=109&v=<?php echo $gglcptch_plugin_info["Version"]; ?> &wp_v=<?php echo $wp_version; ?> " target="_blank" title="Google Captcha Pro (reCAPTCHA)"> <?php _e('Learn More', 'google-captcha'); ?> </a> <div class="clear"></div> </div> </div> <?php } ?> <p class="submit"> <input id="bws-submit-button" type="submit" class="button-primary" value="<?php _e('Save Changes', 'google-captcha'); ?> " name="gglcptch_save_changes" /> <input type="hidden" name="gglcptch_form_submit" value="submit" /> <?php wp_nonce_field($plugin_basename, 'gglcptch_nonce_name'); ?> </p> </form> <?php bws_form_restore_default_settings($plugin_basename); } } elseif ('go_pro' == $_GET['action']) { bws_go_pro_tab_show($bws_hide_premium_options_check, $gglcptch_plugin_info, $plugin_basename, 'google-captcha.php', 'google-captcha-pro.php', 'google-captcha-pro/google-captcha-pro.php', 'google-captcha', 'b850d949ccc1239cab0da315c3c822ab', '109', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($gglcptch_plugin_info['Name'], 'google-captcha'); ?> </div> <?php }