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, $wp_version, $cntctfrm_plugin_info, $cntctfrm_lang_codes, $cntctfrm_related_plugins; if (empty($cntctfrm_related_plugins)) { cntctfrm_related_plugins(); } /* Check contact-form-multi plugin */ $contact_form_multi_active = cntctfrm_check_cf_multi_active(); $error = $message = $notice = ''; $plugin_basename = plugin_basename(__FILE__); if (!function_exists('get_plugins')) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } if (!isset($_GET['action']) || 'additional' == $_GET['action'] || 'appearance' == $_GET['action']) { $all_plugins = get_plugins(); } $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')) { $options_submit = array(); if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($options_submit); $options_submit = $hide_result['options']; if ($contact_form_multi_active) { $cntctfrm_options = array_merge($cntctfrm_options, $options_submit); update_option('cntctfrm_options', $cntctfrm_options); } } $layout = isset($_POST['cntctfrm_layout']) ? (int) $_POST['cntctfrm_layout'] : 1; $submit_position = isset($_POST['cntctfrm_submit_position']) ? stripslashes(esc_html($_POST['cntctfrm_submit_position'])) : 'left'; $layout_first_column_string = stripslashes(esc_html($_POST['cntctfrm_layout_first_column'])); $layout_first_column = explode(',', $layout_first_column_string); $layout_first_column = array_diff($layout_first_column, array('')); $layout_second_column_string = stripslashes(esc_html($_POST['cntctfrm_layout_second_column'])); $layout_second_column = explode(',', $layout_second_column_string); $layout_second_column = array_diff($layout_second_column, array('')); if ($layout === 1 && !empty($layout_second_column)) { $layout_first_column = array_merge($layout_first_column, $layout_second_column); $layout_second_column = array(); } $options_submit['layout'] = $layout; $options_submit['submit_position'] = $submit_position; $options_submit['order_fields']['first_column'] = $layout_first_column; $options_submit['order_fields']['second_column'] = $layout_second_column; $cntctfrm_options = array_merge($cntctfrm_options, $options_submit); if ('pro' == $contact_form_multi_active && get_option('cntctfrmmltpr_options_main')) { $options_main = get_option('cntctfrmmltpr_options_main'); if ($options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } else { if ($options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } } } elseif ($contact_form_multi_active) { $options_main = get_option('cntctfrmmlt_options_main'); if ($options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } else { if ($options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $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')) { $options_submit = array(); if (isset($_POST['bws_hide_premium_options'])) { $hide_result = bws_hide_premium_options($options_submit); $options_submit = $hide_result['options']; if ($contact_form_multi_active) { $cntctfrm_options = array_merge($cntctfrm_options, $options_submit); update_option('cntctfrm_options', $cntctfrm_options); } } $options_submit['user_email'] = $_POST['cntctfrm_user_email']; $options_submit['custom_email'] = trim(stripslashes(esc_html($_POST['cntctfrm_custom_email'])), " ,"); $options_submit['select_email'] = $_POST['cntctfrm_select_email']; $options_submit['from_email'] = $_POST['cntctfrm_from_email']; $options_submit['custom_from_email'] = stripslashes(esc_html($_POST['cntctfrm_custom_from_email'])); $options_submit['mail_method'] = $_POST['cntctfrm_mail_method']; $options_submit['from_field'] = stripslashes(esc_html($_POST['cntctfrm_from_field'])); $options_submit['select_from_field'] = $_POST['cntctfrm_select_from_field']; $options_submit['display_name_field'] = isset($_POST['cntctfrm_display_name_field']) ? 1 : 0; $options_submit['display_address_field'] = isset($_POST['cntctfrm_display_address_field']) ? 1 : 0; $options_submit['display_phone_field'] = isset($_POST['cntctfrm_display_phone_field']) ? 1 : 0; $options_submit['attachment'] = isset($_POST['cntctfrm_attachment']) ? $_POST['cntctfrm_attachment'] : 0; $options_submit['attachment_explanations'] = isset($_POST['cntctfrm_attachment_explanations']) ? $_POST['cntctfrm_attachment_explanations'] : 0; $options_submit['send_copy'] = isset($_POST['cntctfrm_send_copy']) ? $_POST['cntctfrm_send_copy'] : 0; $options_submit['delete_attached_file'] = isset($_POST['cntctfrm_delete_attached_file']) ? $_POST['cntctfrm_delete_attached_file'] : 0; if (isset($_POST['cntctfrm_add_language_button'])) { cntctfrm_add_language(); } if (isset($_POST['cntctfrm_delete_button'])) { cntctfrm_remove_language(); } if ($contact_form_multi_active) { $options_submit['display_captcha'] = isset($_POST['cntctfrm_display_captcha']) ? 1 : 0; $options_submit['display_google_captcha'] = isset($_POST['cntctfrm_display_google_captcha']) ? 1 : 0; $options_submit['display_subscribe'] = isset($_POST['cntctfrm_display_subscriber']) ? 1 : 0; $options_submit['save_email_to_db'] = isset($_POST['cntctfrm_save_email_to_db']) ? 1 : 0; } else { /* Update related plugins options if Contact Form Multi is not active */ if (array_key_exists('captcha', $cntctfrm_related_plugins)) { $cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['display_option']] = isset($_POST['cntctfrm_display_captcha']) ? 1 : 0; update_option($cntctfrm_related_plugins['captcha']['options_name'], $cntctfrm_related_plugins['captcha']['options']); } if (array_key_exists('google-captcha', $cntctfrm_related_plugins)) { $cntctfrm_related_plugins['google-captcha']['options']['contact_form'] = isset($_POST['cntctfrm_display_google_captcha']) ? 1 : 0; update_option($cntctfrm_related_plugins['google-captcha']['options_name'], $cntctfrm_related_plugins['google-captcha']['options']); } if (is_multisite()) { if (array_key_exists('subscriber', $cntctfrm_related_plugins)) { $cntctfrm_related_plugins['subscriber']['options']['contact_form'] = isset($_POST['cntctfrm_display_subscriber']) ? 1 : 0; update_site_option($cntctfrm_related_plugins['subscriber']['options_name'], $cntctfrm_related_plugins['subscriber']['options']); } } else { if (array_key_exists('subscriber', $cntctfrm_related_plugins)) { $cntctfrm_related_plugins['subscriber']['options']['contact_form'] = isset($_POST['cntctfrm_display_subscriber']) ? 1 : 0; update_option($cntctfrm_related_plugins['subscriber']['options_name'], $cntctfrm_related_plugins['subscriber']['options']); } } if (array_key_exists('contact-form-to-db', $cntctfrm_related_plugins)) { $cntctfrm_related_plugins['contact-form-to-db']['options'][$cntctfrm_related_plugins['contact-form-to-db']['save_option']] = isset($_POST['cntctfrm_save_email_to_db']) ? 1 : 0; update_option($cntctfrm_related_plugins['contact-form-to-db']['options_name'], $cntctfrm_related_plugins['contact-form-to-db']['options']); } } if (0 == $options_submit['display_name_field']) { $options_submit['required_name_field'] = 0; } else { $options_submit['required_name_field'] = isset($_POST['cntctfrm_required_name_field']) ? 1 : 0; } if (0 == $options_submit['display_address_field']) { $options_submit['required_address_field'] = 0; } else { $options_submit['required_address_field'] = isset($_POST['cntctfrm_required_address_field']) ? 1 : 0; } $options_submit['required_email_field'] = isset($_POST['cntctfrm_required_email_field']) ? 1 : 0; if (0 == $options_submit['display_phone_field']) { $options_submit['required_phone_field'] = 0; } else { $options_submit['required_phone_field'] = isset($_POST['cntctfrm_required_phone_field']) ? 1 : 0; } $options_submit['required_subject_field'] = isset($_POST['cntctfrm_required_subject_field']) ? 1 : 0; $options_submit['required_message_field'] = isset($_POST['cntctfrm_required_message_field']) ? 1 : 0; $options_submit['required_symbol'] = isset($_POST['cntctfrm_required_symbol']) ? stripslashes(esc_html($_POST['cntctfrm_required_symbol'])) : '*'; $options_submit['html_email'] = isset($_POST['cntctfrm_html_email']) ? 1 : 0; $options_submit['display_add_info'] = isset($_POST['cntctfrm_display_add_info']) ? 1 : 0; $options_submit['display_sent_from'] = isset($_POST['cntctfrm_display_sent_from']) ? 1 : 0; $options_submit['display_date_time'] = isset($_POST['cntctfrm_display_date_time']) ? 1 : 0; $options_submit['display_coming_from'] = isset($_POST['cntctfrm_display_coming_from']) ? 1 : 0; $options_submit['display_user_agent'] = isset($_POST['cntctfrm_display_user_agent']) ? 1 : 0; if (0 == $options_submit['display_sent_from'] && 0 == $options_submit['display_date_time'] && 0 == $options_submit['display_coming_from'] && 0 == $options_submit['display_user_agent']) { $options_submit['display_add_info'] = 0; } if (0 == $options_submit['display_add_info']) { $options_submit['display_sent_from'] = 1; $options_submit['display_date_time'] = 1; $options_submit['display_coming_from'] = 1; $options_submit['display_user_agent'] = 1; } $options_submit['change_label'] = isset($_POST['cntctfrm_change_label']) ? 1 : 0; $options_submit['change_label_in_email'] = isset($_POST['cntctfrm_change_label_in_email']) ? 1 : 0; if (1 == $options_submit['change_label']) { foreach ($_POST['cntctfrm_name_label'] as $key => $val) { $options_submit['name_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_name_label'][$key])); $options_submit['address_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_address_label'][$key])); $options_submit['email_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_email_label'][$key])); $options_submit['phone_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_phone_label'][$key])); $options_submit['subject_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_subject_label'][$key])); $options_submit['message_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_message_label'][$key])); $options_submit['attachment_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_label'][$key])); $options_submit['attachment_tooltip'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_tooltip'][$key])); $options_submit['send_copy_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_send_copy_label'][$key])); $options_submit['thank_text'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_thank_text'][$key])); $options_submit['submit_label'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_submit_label'][$key])); $options_submit['name_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_name_error'][$key])); $options_submit['address_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_address_error'][$key])); $options_submit['email_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_email_error'][$key])); $options_submit['phone_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_phone_error'][$key])); $options_submit['subject_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_subject_error'][$key])); $options_submit['message_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_message_error'][$key])); $options_submit['attachment_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_error'][$key])); $options_submit['attachment_upload_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_upload_error'][$key])); $options_submit['attachment_move_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_move_error'][$key])); $options_submit['attachment_size_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_attachment_size_error'][$key])); $options_submit['captcha_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_captcha_error'][$key])); $options_submit['form_error'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_form_error'][$key])); } } else { $option_defaults = cntctfrm_get_option_defaults(); if (empty($cntctfrm_options['language'])) { $options_submit['name_label'] = $option_defaults['name_label']; $options_submit['address_label'] = $option_defaults['address_label']; $options_submit['email_label'] = $option_defaults['email_label']; $options_submit['phone_label'] = $option_defaults['phone_label']; $options_submit['subject_label'] = $option_defaults['subject_label']; $options_submit['message_label'] = $option_defaults['message_label']; $options_submit['attachment_label'] = $option_defaults['attachment_label']; $options_submit['attachment_tooltip'] = $option_defaults['attachment_tooltip']; $options_submit['send_copy_label'] = $option_defaults['send_copy_label']; $options_submit['thank_text'] = $_POST['cntctfrm_thank_text']; $options_submit['submit_label'] = $option_defaults['submit_label']; $options_submit['name_error'] = $option_defaults['name_error']; $options_submit['address_error'] = $option_defaults['address_error']; $options_submit['email_error'] = $option_defaults['email_error']; $options_submit['phone_error'] = $option_defaults['phone_error']; $options_submit['subject_error'] = $option_defaults['subject_error']; $options_submit['message_error'] = $option_defaults['message_error']; $options_submit['attachment_error'] = $option_defaults['attachment_error']; $options_submit['attachment_upload_error'] = $option_defaults['attachment_upload_error']; $options_submit['attachment_move_error'] = $option_defaults['attachment_move_error']; $options_submit['attachment_size_error'] = $option_defaults['attachment_size_error']; $options_submit['captcha_error'] = $option_defaults['captcha_error']; $options_submit['form_error'] = $option_defaults['form_error']; foreach ($options_submit['thank_text'] as $key => $val) { $options_submit['thank_text'][$key] = stripcslashes(htmlspecialchars($val)); } } else { $options_submit['name_label']['default'] = $option_defaults['name_label']['default']; $options_submit['address_label']['default'] = $option_defaults['address_label']['default']; $options_submit['email_label']['default'] = $option_defaults['email_label']['default']; $options_submit['phone_label']['default'] = $option_defaults['phone_label']['default']; $options_submit['subject_label']['default'] = $option_defaults['subject_label']['default']; $options_submit['message_label']['default'] = $option_defaults['message_label']['default']; $options_submit['attachment_label']['default'] = $option_defaults['attachment_label']['default']; $options_submit['attachment_tooltip']['default'] = $option_defaults['attachment_tooltip']['default']; $options_submit['send_copy_label']['default'] = $option_defaults['send_copy_label']['default']; $options_submit['submit_label']['default'] = $option_defaults['submit_label']['default']; $options_submit['name_error']['default'] = $option_defaults['name_error']['default']; $options_submit['address_error']['default'] = $option_defaults['address_error']['default']; $options_submit['email_error']['default'] = $option_defaults['email_error']['default']; $options_submit['phone_error']['default'] = $option_defaults['phone_error']['default']; $options_submit['subject_error']['default'] = $option_defaults['subject_error']['default']; $options_submit['message_error']['default'] = $option_defaults['message_error']['default']; $options_submit['attachment_error']['default'] = $option_defaults['attachment_error']['default']; $options_submit['attachment_upload_error']['default'] = $option_defaults['attachment_upload_error']['default']; $options_submit['attachment_move_error']['default'] = $option_defaults['attachment_move_error']['default']; $options_submit['attachment_size_error']['default'] = $option_defaults['attachment_size_error']['default']; $options_submit['captcha_error']['default'] = $option_defaults['captcha_error']['default']; $options_submit['form_error']['default'] = $option_defaults['form_error']['default']; foreach ($_POST['cntctfrm_thank_text'] as $key => $val) { $options_submit['thank_text'][$key] = stripcslashes(htmlspecialchars($_POST['cntctfrm_thank_text'][$key])); } } } /* if 'FROM' field was changed */ if ('custom' == $cntctfrm_options['from_email'] && 'custom' != $options_submit['from_email'] || 'custom' == $options_submit['from_email'] && $cntctfrm_options['custom_from_email'] != $options_submit['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'); } $options_submit['action_after_send'] = $_POST['cntctfrm_action_after_send']; $options_submit['redirect_url'] = esc_url($_POST['cntctfrm_redirect_url']); $cntctfrm_options = array_merge($cntctfrm_options, $options_submit); if (0 == $options_submit['action_after_send'] && ("" == trim($options_submit['redirect_url']) || !filter_var($options_submit['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['action_after_send'] = 1; } if ('user' == $options_submit['select_email']) { if (false !== get_user_by('login', $options_submit['user_email'])) { /**/ } else { $error .= __("Such user does not exist.", 'contact-form-plugin'); } } else { if (preg_match('|,|', $options_submit['custom_email'])) { $cntctfrm_custom_emails = explode(',', $options_submit['custom_email']); } else { $cntctfrm_custom_emails[0] = $options_submit['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' == $options_submit['from_email']) { if ("" == $options_submit['custom_from_email'] || !is_email(trim($options_submit['custom_from_email']))) { $error .= __("Please enter a valid email address in the 'FROM' field.", 'contact-form-plugin'); } } if ('' == $error) { if ('pro' == $contact_form_multi_active && ($options_main = get_option('cntctfrmmltpr_options_main'))) { if ($options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } else { if ($options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } } } elseif ($contact_form_multi_active) { $options_main = get_option('cntctfrmmlt_options_main'); if ($options_main['id_form'] !== $_SESSION['cntctfrmmlt_id_form']) { add_option('cntctfrmmlt_options_' . $options_main['id_form'], $cntctfrm_options); } else { if ($options_main['id_form'] == $_SESSION['cntctfrmmlt_id_form']) { update_option('cntctfrmmlt_options_' . $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')) { $option_defaults = cntctfrm_get_option_defaults(); if ($contact_form_multi_active) { $contact_form_multi_options = array('display_captcha' => 0, 'display_google_captcha' => 0, 'display_subscribe' => 0, 'save_email_to_db' => 1); $option_defaults = array_merge($option_defaults, $contact_form_multi_options); } $cntctfrm_options = $option_defaults; if ($contact_form_multi_active) { if (isset($_SESSION['cntctfrmmlt_id_form']) && get_option('cntctfrmmlt_options_' . $_SESSION['cntctfrmmlt_id_form'])) { update_option('cntctfrmmlt_options_' . $_SESSION['cntctfrmmlt_id_form'], $cntctfrm_options); } else { update_option('cntctfrmmlt_options', $cntctfrm_options); } } else { 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 <?php if (isset($_GET['action']) && 'custom_code' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=contact_form.php&action=custom_code"><?php _e('Custom code', '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> <div class="updated fade below-h2" <?php if ($message == "" || "" != $error) { 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 bws_show_settings_notice(); if (!empty($hide_result['message'])) { ?> <div class="updated fade below-h2"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } if (!empty($notice)) { ?> <div class="error below-h2"><p><strong><?php _e('Notice', 'contact-form-plugin') . ":"; ?> </strong> <?php echo $notice; ?> </p></div> <?php } if ((!isset($_GET['action']) || 'go_pro' != $_GET['action'] && 'custom_code' != $_GET['action']) && !$contact_form_multi_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/>', !$contact_form_multi_active ? '' : ' id=' . $_SESSION['cntctfrmmlt_id_form']), sprintf('<br/><span class="bws_code">[bestwebsoft_contact_form%s lang=*]</span>,<br/>', !$contact_form_multi_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"> <label><input type="radio" id="cntctfrm_select_email_user" name="cntctfrm_select_email" value="user" <?php if ($cntctfrm_options['select_email'] == 'user') { echo 'checked="checked" '; } ?> /> <select class="cntctfrm_user_email" 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['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['user_email'] == $value->user_login) { echo 'selected="selected" '; } ?> ><?php echo $value->user_login; ?> </option> <?php } } } ?> </select> <span class="bws_info cntctfrm_info"><?php _e("Select a username of the person who should get the messages from the contact form.", 'contact-form-plugin'); ?> </span></label> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Use this email address", 'contact-form-plugin'); ?> :</th> <td colspan="2"> <label><input type="radio" id="cntctfrm_select_email_custom" name="cntctfrm_select_email" value="custom" <?php if ('custom' == $cntctfrm_options['select_email']) { echo 'checked="checked" '; } ?> /> <input type="text" name="cntctfrm_custom_email" value="<?php echo $cntctfrm_options['custom_email']; ?> " maxlength="500" /> <span class="bws_info cntctfrm_info"><?php _e("Enter the email address for receiving messages", '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 department selectbox to the contact form", 'contact-form-plugin'); ?> :</th> <td colspan="2"> <input type="radio" name="cntctfrm_select_email" value="departments" disabled="disabled" /> <div><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 (array_key_exists('contact-form-to-db', $cntctfrm_related_plugins)) { $save_emails = false; if (!$contact_form_multi_active) { $save_emails = !empty($cntctfrm_related_plugins['contact-form-to-db']['options'][$cntctfrm_related_plugins['contact-form-to-db']['save_option']]) ? true : false; } else { $save_emails = !empty($cntctfrm_options['save_email_to_db']) ? true : false; } if (!$contact_form_multi_active || !empty($cntctfrm_related_plugins['contact-form-to-db']['options'][$cntctfrm_related_plugins['contact-form-to-db']['save_option']])) { ?> <label><input type="checkbox" name="cntctfrm_save_email_to_db" value="1" <?php if ($save_emails) { echo 'checked="checked"'; } ?> /> <span class="bws_info"> (<?php _e('Using', 'contact-form-plugin'); ?> <a href="<?php echo self_admin_url('/admin.php?page=' . $cntctfrm_related_plugins['contact-form-to-db']['settings_page']); ?> " target="_blank">Contact Form to DB by BestWebSoft</a>) </span> </label> <?php } else { ?> <label><input type="checkbox" name="cntctfrm_save_email_to_db" value="1" disabled="disabled" <?php if ($save_emails) { echo 'checked="checked"'; } ?> /></label> <span class="bws_info"> (<?php _e('Please activate the appropriate option on', 'contact-form-plugin'); ?> <?php printf('<a href="%s" target="_blank"> Contact Form to DB %s</a> )', self_admin_url('/admin.php?page=' . $cntctfrm_related_plugins['contact-form-to-db']['settings_page']), __('settings page', 'contact-form-plugin')); ?> </span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_save_email_to_db" value="1" <?php if (!empty($cntctfrm_options["save_email_to_db"])) { echo 'checked="checked"'; } ?> /> <span class="bws_info">(<?php _e('Using', 'contact-form-plugin'); ?> Contact Form to DB by BestWebSoft) <?php printf('<a href="%s" target="_blank">%s Contact Form to DB</a>', self_admin_url('plugins.php'), __('Activate', 'contact-form-plugin')); ?> </span> </label> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_save_email_to_db" value="1" /> <span class="bws_info">(<?php _e('Using', 'contact-form-plugin'); ?> Contact Form to DB by BestWebSoft) <?php printf('<a href="http://bestwebsoft.com/products/contact-form-to-db/?k=19d806f45d866e70545de83169b274f2&pn=77&v=%s&wp_v=%s"> %s Contact Form to DB</a>', $cntctfrm_plugin_info["Version"], $wp_version, __('Download', 'contact-form-plugin')); ?> </span> </label> <?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('Sending method', '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['mail_method']) { echo 'checked="checked" '; } ?> /> <?php _e('Wp-mail', 'contact-form-plugin'); ?> </label> <label><span class="bws_info">(<?php _e('You can use the Wordpress 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['mail_method']) { echo 'checked="checked" '; } ?> /> <?php _e('Mail', 'contact-form-plugin'); ?> </label> <label><span class="bws_info">(<?php _e('You can use the PHP mail function for mailing', 'contact-form-plugin'); ?> )</span></label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("'FROM' field", 'contact-form-plugin'); ?> </th> <td class="cntctfrm_td_name" style="vertical-align: top;width: 210px;"> <legend><?php _e("Name", 'contact-form-plugin'); ?> </legend> <fieldset> <label><input type="radio" id="cntctfrm_select_from_custom_field" name="cntctfrm_select_from_field" value="custom" <?php if ('custom' == $cntctfrm_options['select_from_field']) { echo 'checked="checked" '; } ?> /><input type="text" name="cntctfrm_from_field" value="<?php echo stripslashes($cntctfrm_options['from_field']); ?> " size="18" maxlength="100" /></label><br /> <label><input type="radio" id="cntctfrm_select_from_field" name="cntctfrm_select_from_field" value="user_name" <?php if ('user_name' == $cntctfrm_options['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> </fieldset> </td> <td class="cntctfrm_td_email" > <legend><?php _e("Email", 'contact-form-plugin'); ?> </legend> <fieldset> <label><input type="radio" id="cntctfrm_from_custom_email" name="cntctfrm_from_email" value="custom" <?php if ('custom' == $cntctfrm_options['from_email']) { echo 'checked="checked" '; } ?> /><input type="text" name="cntctfrm_custom_from_email" value="<?php echo $cntctfrm_options['custom_from_email']; ?> " maxlength="100" /></label><br /> <label><input type="radio" id="cntctfrm_from_email" name="cntctfrm_from_email" value="user" <?php if ('user' == $cntctfrm_options['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> <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> </fieldset> </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['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['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['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="cntctfrm_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="cntctfrm_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="cntctfrm_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="cntctfrm_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="cntctfrm_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><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input disabled="disabled" type="file" name="cntctfrm_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['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['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['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="cntctfrm_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="cntctfrm_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="cntctfrm_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['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['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['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="cntctfrm_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="cntctfrm_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><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input class="subject" disabled="disabled" type="text" name="cntctfrm_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['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="cntctfrm_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="cntctfrm_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><?php _e("Field's default value", 'contact-form-plugin'); ?> </span> <input class="message" disabled="disabled" type="text" name="cntctfrm_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['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['attachment_explanations'] && '1' == $cntctfrm_options['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['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('subscriber/subscriber.php', $all_plugins) || array_key_exists('subscriber-pro/subscriber-pro.php', $all_plugins)) { if (array_key_exists('subscriber', $cntctfrm_related_plugins)) { if (!$contact_form_multi_active) { $display_subscriber = !empty($cntctfrm_related_plugins['subscriber']['options']['contact_form']) ? true : false; } else { $display_subscriber = !empty($cntctfrm_options['display_subscribe']) ? true : false; } if (!$contact_form_multi_active || !empty($cntctfrm_related_plugins['subscriber']['options']['contact_form'])) { ?> <label><input type="checkbox" name="cntctfrm_display_subscriber" value="1" <?php if ($display_subscriber) { echo 'checked="checked"'; } ?> /> Subscriber by BestWebSoft</label> <?php } else { ?> <label><input type="checkbox" name="cntctfrm_display_subscriber" value="1" disabled="disabled" <?php if ($display_subscriber) { echo 'checked="checked"'; } ?> /> Subscriber by BestWebSoft</label> <span class="bws_info"> (<?php _e('Please activate the appropriate option on', 'contact-form-plugin'); ?> <?php printf('<a href="%s" target="_blank"> Subscriber %s</a> )', network_admin_url('/admin.php?page=' . $cntctfrm_related_plugins['subscriber']['settings_page']), __('settings page', 'contact-form-plugin')); ?> </span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_subscriber" value="1" <?php if (isset($cntctfrm_options['display_subscribe']) && 1 == $cntctfrm_options['display_subscribe']) { echo 'checked="checked"'; } ?> /> Subscriber by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="%s" target="_blank"> %s Subscriber</a>', network_admin_url('plugins.php'), __('Activate', 'contact-form-plugin')); ?> </span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_subscriber" value="1" /> Subscriber by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="http://bestwebsoft.com/products/subscriber/?k=a9dfd3fa8513784c36622993b350b19e&pn=77&v=%s&wp_v=%s">%s Subscriber</a>', $cntctfrm_plugin_info["Version"], $wp_version, __('Download', 'contact-form-plugin')); ?> </span> <?php } ?> </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 (array_key_exists('captcha', $cntctfrm_related_plugins)) { if (!$contact_form_multi_active) { $display_captcha = !empty($cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['display_option']]) ? true : false; } else { $display_captcha = !empty($cntctfrm_options['display_captcha']) ? true : false; } if (!$contact_form_multi_active || !empty($cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['display_option']])) { ?> <label><input type="checkbox" name="cntctfrm_display_captcha" value="1" <?php if ($display_captcha) { echo 'checked="checked"'; } ?> /> Captcha by BestWebSoft </label> <?php } else { ?> <label> <input type="checkbox" name="cntctfrm_display_captcha" value="1" disabled="disabled" <?php if ($display_captcha) { echo 'checked="checked"'; } ?> /> Captcha by BestWebSoft <span class="bws_info"> (<?php _e('Please activate the appropriate option on', 'contact-form-plugin'); ?> <?php printf('<a href="%s" target="_blank"> Captcha %s</a> )', self_admin_url('/admin.php?page=' . $cntctfrm_related_plugins['captcha']['settings_page']), __('settings page', 'contact-form-plugin')); ?> </span> </label> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_captcha" value="1" /> Captcha by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="%s" target="_blank">%s Captcha</a>', self_admin_url('plugins.php'), __('Activate', 'contact-form-plugin')); ?> </span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_captcha" value="1" /> Captcha by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="http://bestwebsoft.com/products/captcha/?k=19ac1e9b23bea947cfc4a9b8e3326c03&pn=77&v=%s&wp_v=%s">%s Captcha</a>', $cntctfrm_plugin_info["Version"], $wp_version, __('Download', 'contact-form-plugin')); ?> </span> <?php } ?> </div> <div style="clear: both;"> <?php if (array_key_exists('google-captcha/google-captcha.php', $all_plugins) || array_key_exists('google-captcha-pro/google-captcha-pro.php', $all_plugins)) { if (array_key_exists('google-captcha', $cntctfrm_related_plugins)) { if (!$contact_form_multi_active) { $display_google_captcha = !empty($cntctfrm_related_plugins['google-captcha']['options']['contact_form']) ? true : false; } else { $display_google_captcha = !empty($cntctfrm_options['display_google_captcha']) ? true : false; } if (!$contact_form_multi_active || !empty($cntctfrm_related_plugins['google-captcha']['options']['contact_form'])) { ?> <label><input type="checkbox" name="cntctfrm_display_google_captcha" value="1" <?php if ($display_google_captcha) { echo 'checked="checked"'; } ?> /> Google Captcha (reCaptcha) by BestWebSoft</label> <?php } else { ?> <label> <input type="checkbox" name="cntctfrm_display_google_captcha" value="1" disabled="disabled" <?php if ($display_google_captcha) { echo 'checked="checked"'; } ?> /> Google Captcha (reCaptcha) by BestWebSoft <span class="bws_info"> (<?php _e('Please activate the appropriate option on', 'contact-form-plugin'); ?> <?php printf('<a href="%s" target="_blank"> Google Captcha %s</a> )', self_admin_url('/admin.php?page=' . $cntctfrm_related_plugins['google-captcha']['settings_page']), __('settings page', 'contact-form-plugin')); ?> </span> </label> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_google_captcha" value="1" /> Google Captcha (reCaptcha) by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="%s" target="_blank">%s Google Captcha</a>', self_admin_url('plugins.php'), __('Activate', 'contact-form-plugin')); ?> </span> <?php } } else { ?> <label><input disabled="disabled" type="checkbox" name="cntctfrm_display_google_captcha" value="1" /> Google Captcha (reCaptcha) by BestWebSoft</label> <span class="bws_info"> <?php printf('<a href="http://bestwebsoft.com/products/google-captcha/?k=7d74e61dd1cea23d0e9bf2fa88b5b117&pn=77&v=%s&wp_v=%s">%s Google Captcha</a>', $cntctfrm_plugin_info["Version"], $wp_version, __('Download', 'contact-form-plugin')); ?> </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="cntctfrm_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="cntctfrm_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['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['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['display_add_info']) { echo 'checked="checked" '; } ?> /> </td> <td class="cntctfrm_display_add_info_block" <?php if ('0' == $cntctfrm_options['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['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['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['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['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 ($cntctfrm_lang_codes as $key => $val) { if (in_array($key, $cntctfrm_options['language'])) { continue; } echo '<option value="' . esc_attr($key) . '"> ' . esc_html($val) . '</option>'; } ?> </select> <input type="submit" class="button-secondary" name="cntctfrm_add_language_button" 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['change_label'] == '1') { echo 'checked="checked" '; } ?> /> </td> <td class="cntctfrm_change_label_block" <?php if ('0' == $cntctfrm_options['change_label']) { echo 'style="display:none"'; } ?> > <div class="cntctfrm_label_language_tab <?php echo !isset($_POST['cntctfrm_change_tab']) || 'default' == $_POST['cntctfrm_change_tab'] ? 'cntctfrm_active' : ''; ?> " id="cntctfrm_label_default"><?php _e('Default', 'contact-form-plugin'); ?> <noscript> <input type="submit" class="cntctfrm_change_tab" value="default" name="cntctfrm_change_tab"> </noscript> </div> <?php if (!empty($cntctfrm_options['language'])) { foreach ($cntctfrm_options['language'] as $val) { $active_tab_class = isset($_POST["cntctfrm_change_tab"]) && $val == $_POST["cntctfrm_change_tab"] ? "cntctfrm_active" : ""; echo '<div class="cntctfrm_label_language_tab ' . $active_tab_class . '" id="cntctfrm_label_' . $val . '">' . $cntctfrm_lang_codes[$val] . ' <span class="cntctfrm_delete" rel="' . $val . '">X</span><noscript><input type="submit" class="cntctfrm_change_tab" value="' . $val . '" name="cntctfrm_change_tab"><span class="cntctfrm_del_button_wrap"><input type="submit" class="cntctfrm_delete_button" value="' . $val . '" name="cntctfrm_delete_button"></span></noscript></div>'; } } ?> <div class="clear"></div> <div class="cntctfrm_language_tab cntctfrm_tab_default <?php echo !isset($_POST['cntctfrm_change_tab']) || 'default' == $_POST['cntctfrm_change_tab'] ? '' : 'hidden'; ?> " style="padding: 1px 3px;"> <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[default]" value="<?php echo $cntctfrm_options['name_label']['default']; ?> " /> <span class="bws_info"><?php _e("Name", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_address_label[default]" value="<?php echo $cntctfrm_options['address_label']['default']; ?> " /> <span class="bws_info"><?php _e("Address", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_email_label[default]" value="<?php echo $cntctfrm_options['email_label']['default']; ?> " /> <span class="bws_info"><?php _e("Email Address", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_phone_label[default]" value="<?php echo $cntctfrm_options['phone_label']['default']; ?> " /> <span class="bws_info"><?php _e("Phone number", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_subject_label[default]" value="<?php echo $cntctfrm_options['subject_label']['default']; ?> " /> <span class="bws_info"><?php _e("Subject", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_message_label[default]" value="<?php echo $cntctfrm_options['message_label']['default']; ?> " /> <span class="bws_info"><?php _e("Message", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_label[default]" value="<?php echo $cntctfrm_options['attachment_label']['default']; ?> " /> <span class="bws_info"><?php _e("Attachment", 'contact-form-plugin'); ?> :</span><br /> <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[default]" value="<?php echo $cntctfrm_options['attachment_tooltip']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['send_copy_label']['default']; ?> " /> <span class="bws_info"><?php _e("Send me a copy", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_submit_label[default]" value="<?php echo $cntctfrm_options['submit_label']['default']; ?> " /> <span class="bws_info"><?php _e("Submit", 'contact-form-plugin'); ?> </span><br /> <input type="text" maxlength="250" name="cntctfrm_name_error[default]" value="<?php echo $cntctfrm_options['name_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['address_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['email_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['phone_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['subject_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['message_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['attachment_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['attachment_upload_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['attachment_move_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['attachment_size_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['captcha_error']['default']; ?> " /> <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[default]" value="<?php echo $cntctfrm_options['form_error']['default']; ?> " /> <span class="bws_info"><?php _e("Error message for the whole form", 'contact-form-plugin'); ?> </span><br /> </div> <?php if (!$contact_form_multi_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]</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 id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } ?> </div> <?php if (!empty($cntctfrm_options['language'])) { foreach ($cntctfrm_options['language'] as $val) { if (isset($_POST['cntctfrm_change_tab']) && $val != $_POST['cntctfrm_change_tab'] || !isset($_POST['cntctfrm_change_tab'])) { $labels_table_class = 'hidden'; } else { $labels_table_class = ''; } ?> <div class="cntctfrm_language_tab <?php echo $labels_table_class; ?> 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['name_label'][$val])) { echo $cntctfrm_options['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['address_label'][$val])) { echo $cntctfrm_options['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['email_label'][$val])) { echo $cntctfrm_options['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['phone_label'][$val])) { echo $cntctfrm_options['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['subject_label'][$val])) { echo $cntctfrm_options['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['message_label'][$val])) { echo $cntctfrm_options['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['attachment_label'][$val])) { echo $cntctfrm_options['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['attachment_tooltip'][$val])) { echo $cntctfrm_options['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['send_copy_label'][$val])) { echo $cntctfrm_options['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['submit_label'][$val])) { echo $cntctfrm_options['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['name_error'][$val])) { echo $cntctfrm_options['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['address_error'][$val])) { echo $cntctfrm_options['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['email_error'][$val])) { echo $cntctfrm_options['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['phone_error'][$val])) { echo $cntctfrm_options['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['subject_error'][$val])) { echo $cntctfrm_options['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['message_error'][$val])) { echo $cntctfrm_options['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['attachment_error'][$val])) { echo $cntctfrm_options['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['attachment_upload_error'][$val])) { echo $cntctfrm_options['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['attachment_move_error'][$val])) { echo $cntctfrm_options['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['attachment_size_error'][$val])) { echo $cntctfrm_options['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['captcha_error'][$val])) { echo $cntctfrm_options['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['form_error'][$val])) { echo $cntctfrm_options['form_error'][$val]; } ?> " /> <span class="bws_info"><?php _e("Error message for the whole form", 'contact-form-plugin'); ?> </span><br /> </div> <?php if (!$contact_form_multi_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['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['action_after_send']) { echo 'checked="checked" '; } ?> /> <?php _e("Display text", 'contact-form-plugin'); ?> </label><br /> <div class="cntctfrm_label_language_tab <?php echo !isset($_POST['cntctfrm_change_tab']) || 'default' == $_POST['cntctfrm_change_tab'] ? 'cntctfrm_active' : ''; ?> " id="cntctfrm_text_default"><?php _e('Default', 'contact-form-plugin'); ?> <noscript> <input type="submit" class="cntctfrm_change_tab" value="default" name="cntctfrm_change_tab"> </noscript> </div> <?php if (!empty($cntctfrm_options['language'])) { foreach ($cntctfrm_options['language'] as $val) { $active_tab_class = isset($_POST["cntctfrm_change_tab"]) && $val == $_POST["cntctfrm_change_tab"] ? "cntctfrm_active" : ""; echo '<div class="cntctfrm_label_language_tab ' . $active_tab_class . '" id="cntctfrm_text_' . $val . '">' . $cntctfrm_lang_codes[$val] . ' <span class="cntctfrm_delete" rel="' . $val . '">X</span><noscript><input type="submit" class="cntctfrm_change_tab" value="' . $val . '" name="cntctfrm_change_tab"><span class="cntctfrm_del_button_wrap"><input type="submit" class="cntctfrm_delete_button" value="' . $val . '" name="cntctfrm_delete_button"></span></noscript></div>'; } } ?> <div class="clear"></div> <div class="cntctfrm_language_tab cntctfrm_tab_default <?php echo !isset($_POST['cntctfrm_change_tab']) || 'default' == $_POST['cntctfrm_change_tab'] ? '' : 'hidden'; ?> " style="padding: 5px 10px 5px 5px;"> <label><input type="text" maxlength="250" name="cntctfrm_thank_text[default]" value="<?php echo $cntctfrm_options['thank_text']['default']; ?> " /> <span class="bws_info"><?php _e("Text", 'contact-form-plugin'); ?> </span></label><br /> <?php if (!$contact_form_multi_active) { ?> <span class="bws_info cntctfrm_shortcode_for_language"><?php _e("Use shortcode", '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 id=<?php echo $_SESSION['cntctfrmmlt_id_form']; ?> ]</span> <?php _e("for this language", 'contact-form-plugin'); ?> </span> <?php } ?> </div> <?php if (!empty($cntctfrm_options['language'])) { foreach ($cntctfrm_options['language'] as $val) { if (isset($_POST['cntctfrm_change_tab']) && $val != $_POST['cntctfrm_change_tab'] || !isset($_POST['cntctfrm_change_tab'])) { $labels_table_class = 'hidden'; } else { $labels_table_class = ''; } ?> <div class="cntctfrm_language_tab <?php echo $labels_table_class; ?> 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['thank_text'][$val])) { echo $cntctfrm_options['thank_text'][$val]; } ?> " /> <span class="bws_info"><?php _e("Text", 'contact-form-plugin'); ?> </span></label><br /> <?php if (!$contact_form_multi_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 /> <label><input type="radio" id="cntctfrm_action_after_send_url" name="cntctfrm_action_after_send" value="0" <?php if ('0' == $cntctfrm_options['action_after_send']) { echo 'checked="checked" '; } ?> /> <?php _e("Redirect to the page", 'contact-form-plugin'); ?> </label><br /> <label><input type="text" maxlength="250" name="cntctfrm_redirect_url" value="<?php echo $cntctfrm_options['redirect_url']; ?> " /> <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 class="cntctfrm_auto_response_message" name="cntctfrm_auto_response_message">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['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['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['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['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("Form align", 'contact-form-plugin'); ?> </th> <td colspan="2"> <fieldset> <input disabled="disabled" name="cntctfrm_form_align" type="radio" value="left" checked="checked"> <label for="cntctfrm_form_align_left"><?php _e('Left', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_form_align" type="radio" value="center"> <label for="cntctfrm_form_align_center"><?php _e('Center', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_form_align" type="radio" value="right"> <label for="cntctfrm_form_align_right"><?php _e('Right', 'contact-form-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Labels position", 'contact-form-plugin'); ?> </th> <td colspan="2"> <fieldset> <input disabled="disabled" name="cntctfrm_labels_position" type="radio" value="top" checked="checked"> <label for="cntctfrm_labels_position_top"><?php _e('Top', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_labels_position" type="radio" value="left"> <label for="cntctfrm_labels_position_left"><?php _e('Left', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_labels_position" type="radio" value="right"> <label for="cntctfrm_labels_position_right"><?php _e('Right', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_labels_position" type="radio" value="bottom"> <label for="cntctfrm_labels_position_bottom"><?php _e('Bottom', 'contact-form-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top" id="cntctfrm_labels_align" class="cntctfrm_labels_align_show"> <th scope="row"><?php _e("Labels align", 'contact-form-plugin'); ?> </th> <td colspan="2"> <fieldset> <input disabled="disabled" name="cntctfrm_labels_align" type="radio" value="left" checked="checked"> <label for="cntctfrm_labels_align_left"><?php _e('Left', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_labels_align" type="radio" value="center"> <label for="cntctfrm_labels_align_center"><?php _e('Center', 'contact-form-plugin'); ?> </label> <br/> <input disabled="disabled" name="cntctfrm_labels_align" type="radio" value="right"> <label for="cntctfrm_labels_align_right"><?php _e('Right', 'contact-form-plugin'); ?> </label> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Errors output", 'contact-form-plugin'); ?> </th> <td colspan="2"> <select name="cntctfrm_error_displaying" disabled='disabled' style="max-width:400px; width:100%;"> <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="cntctfrm_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="cntctfrm_tooltip_display_name" value="1" /> <label for="cntctfrm_tooltip_display_name"><?php _e("Name", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['display_address_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_address" value="1" /> <label for="cntctfrm_tooltip_display_address"><?php _e("Address", 'contact-form-plugin'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_email" value="1" /> <label for="cntctfrm_tooltip_display_email"><?php _e("Email address", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['display_phone_field']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_phone" value="1" /> <label for="cntctfrm_tooltip_display_phone"><?php _e("Phone Number", 'contact-form-plugin'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_subject" value="1" /> <label for="cntctfrm_tooltip_display_subject"><?php _e("Subject", 'contact-form-plugin'); ?> </label> </div> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_message" value="1" /> <label for="cntctfrm_tooltip_display_message"><?php _e("Message", 'contact-form-plugin'); ?> </label> </div> <?php if ('1' == $cntctfrm_options['attachment_explanations']) { ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_attachment" value="1" /> <label for="cntctfrm_tooltip_display_attachment"><?php _e("Attachment", 'contact-form-plugin'); ?> </label> </div> <?php } ?> <div> <input disabled='disabled' type="checkbox" name="cntctfrm_tooltip_display_captcha" value="1" /> <label for="cntctfrm_tooltip_display_captcha">Captcha by BestWebSoft</label> </div> </td> </tr> <tr valign="top"> <th colspan="3" scope="row"> <input disabled='disabled' type="checkbox" name="cntctfrm_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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_label_color" value="" /> <div class="cntctfrm_label_block"><?php _e('Label text color', 'contact-form-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_input_placeholder_color" value="" /> <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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_error_color" value="" /> <div class="cntctfrm_label_block"><?php _e('Error text color', 'contact-form-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_error_input_color" value="" /> <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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_error_input_border_color" value="" /> <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" id="" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_input_placeholder_error_color" value=""/> <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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_input_background" value="" /> <div class="cntctfrm_label_block"><?php _e("Input fields background color", 'contact-form-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_input_color" value="" /> <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="cntctfrm_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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_border_input_color" value="" /> <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="cntctfrm_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" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_button_backgroud" value="" /> <div class="cntctfrm_label_block"><?php _e('Button color', 'contact-form-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_button_color" value="" /> <div class="cntctfrm_label_block"><?php _e("Button text color", 'contact-form-plugin'); ?> </div> </div> <div> <input disabled='disabled' type="button" value="<?php _e('Default', 'contact-form-plugin'); ?> " /> <input disabled='disabled' type="text" size="8" name="cntctfrm_border_button_color" value="" /> <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 $classes = $cntctfrm_options['layout'] === 1 ? ' cntctfrm_one_column' : ' cntctfrm_two_columns'; $classes .= is_rtl() ? ' cntctfrm_rtl' : ' cntctfrm_ltr'; ?> <div id="cntctfrm_contact_form" class="cntctfrm_contact_form<?php echo $classes; ?> "> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['form_error']['default']; ?> </div> <div id="cntctfrm_wrap"> <?php $cntctfrm_ordered_fields = cntctfrm_get_ordered_fields(); for ($i = 1; $i <= 2; $i++) { $column = $i == 1 ? 'first_column' : 'second_column'; ?> <ul id="cntctfrm_<?php echo $column; ?> " class="cntctfrm_column" <?php if ($i == 2 && $cntctfrm_options['layout'] === 1) { echo 'style="display: none;"'; } ?> > <?php foreach ($cntctfrm_ordered_fields[$column] as $cntctfrm_field) { switch ($cntctfrm_field) { case 'cntctfrm_contact_name': if (1 == $cntctfrm_options['display_name_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_name"> <label for="cntctfrm_contact_name"><?php echo $cntctfrm_options['name_label']['default']; if (1 == $cntctfrm_options['required_name_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['name_error']['default']; ?> </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['display_address_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_address"> <label for="cntctfrm_contact_address"><?php echo $cntctfrm_options['address_label']['default']; if (1 == $cntctfrm_options['required_address_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <?php if (1 == $cntctfrm_options['required_address_field']) { ?> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['address_error']['default']; ?> </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['email_label']['default']; if (1 == $cntctfrm_options['required_email_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['email_error']['default']; ?> </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['display_phone_field']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_phone"> <label for="cntctfrm_contact_phone"><?php echo $cntctfrm_options['phone_label']['default']; if (1 == $cntctfrm_options['required_phone_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['phone_error']['default']; ?> </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['subject_label']['default']; if (1 == $cntctfrm_options['required_subject_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['subject_error']['default']; ?> </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['message_label']['default']; if (1 == $cntctfrm_options['required_message_field']) { echo '<span class="required"> ' . $cntctfrm_options['required_symbol'] . '</span>'; } ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['message_error']['default']; ?> </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['attachment']) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_attachment"> <label for="cntctfrm_contact_attachment"><?php echo $cntctfrm_options['attachment_label']['default']; ?> </label> </div> <div class="cntctfrm_error_text hidden"><?php echo $cntctfrm_options['attachment_error']['default']; ?> </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['attachment_explanations']) { ?> <label class="cntctfrm_contact_attachment_extensions"><?php echo $cntctfrm_options['attachment_tooltip']['default']; ?> </label> <?php } ?> </div> </li> <?php } break; case 'cntctfrm_contact_send_copy': if (1 == $cntctfrm_options['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" style="margin: 0;" /> <label for="cntctfrm_contact_send_copy"><?php echo $cntctfrm_options['send_copy_label']['default']; ?> </label> </div> </li> <?php } break; case 'cntctfrm_subscribe': if (array_key_exists('subscriber', $cntctfrm_related_plugins)) { if (!$contact_form_multi_active && !empty($cntctfrm_related_plugins['subscriber']['options']['contact_form']) || !empty($cntctfrm_options['display_subscribe'])) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_checkbox cntctfrm_checkbox_subscribe"> <div class="cntctfrm_drag_wrap"></div> <input type="hidden" value="1" name="cntctfrm_subscribe"/> <?php $cntctfrm_sbscrbr_checkbox = apply_filters('sbscrbr_cntctfrm_checkbox_add', array()); if (isset($cntctfrm_sbscrbr_checkbox['content'])) { echo $cntctfrm_sbscrbr_checkbox['content']; } ?> </div> </li> <?php } } break; case 'cntctfrm_captcha': if (array_key_exists('captcha', $cntctfrm_related_plugins) || array_key_exists('google-captcha', $cntctfrm_related_plugins)) { $display_captcha_label = ''; if (array_key_exists('captcha', $cntctfrm_related_plugins) && (!$contact_form_multi_active && !empty($cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['display_option']]) || !empty($cntctfrm_options['display_captcha']))) { $display_captcha = true; $captcha_label = $cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['label']]; if (!empty($captcha_label)) { $captcha_required_symbol = sprintf(' <span class="required">%s</span>', isset($cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['required_symbol']]) ? $cntctfrm_related_plugins['captcha']['options'][$cntctfrm_related_plugins['captcha']['required_symbol']] : ''); $display_captcha_label = $captcha_label . $captcha_required_symbol; } } if (array_key_exists('google-captcha', $cntctfrm_related_plugins) && (!$contact_form_multi_active && !empty($cntctfrm_related_plugins['google-captcha']['options']['contact_form']) || $contact_form_multi_active && !empty($cntctfrm_options['display_google_captcha']))) { $display_google_captcha = true; } if (isset($display_google_captcha) || isset($display_captcha)) { ?> <li class="cntctfrm_field_wrap"> <div class="cntctfrm_label cntctfrm_label_captcha"> <label><?php echo $display_captcha_label; ?> </label> </div> <?php if (isset($display_captcha)) { ?> <div class="cntctfrm_input cntctfrm_input_captcha"> <div class="cntctfrm_drag_wrap"></div> <img src="<?php echo plugins_url('images/cptch.png', __FILE__); ?> "> </div> <?php } if (isset($display_google_captcha)) { ?> <div class="cntctfrm_input cntctfrm_input_captcha"> <div class="cntctfrm_drag_wrap"></div> <img src="<?php echo plugins_url('images/google-captcha.png', __FILE__); ?> "> </div> <?php } ?> </li> <?php } } break; default: break; } } ?> </ul> <?php } ?> <div class="clear"></div> </div> <div class="cntctfrm_submit_wrap"> <?php $cntctfrm_direction = is_rtl() ? 'rtl' : 'ltr'; $submit_position_value = array('ltr' => array('left' => 1, 'right' => 2), 'rtl' => array('left' => 2, 'right' => 1)); for ($i = 1; $i <= 2; $i++) { $column = $i == 1 ? 'first_column' : 'second_column'; ?> <div id="cntctfrm_submit_<?php echo $column; ?> " class="cntctfrm_column"> <?php if ($i == $submit_position_value[$cntctfrm_direction][$cntctfrm_options['submit_position']]) { ?> <div class="cntctfrm_input cntctfrm_input_submit" style="<?php printf('text-align: %s !important;', $cntctfrm_options['submit_position']); ?> "> <input type="button" value="<?php echo $cntctfrm_options['submit_label']['default']; ?> " 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 ($contact_form_multi_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['order_fields']['first_column']); ?> " /> <input type="hidden" id="cntctfrm_layout_second_column" name="cntctfrm_layout_second_column" value="<?php echo implode(',', $cntctfrm_options['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 ('custom_code' == $_GET['action']) { bws_custom_code_tab(); } 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-plugin', '697c5e74f39779ce77850e11dbe21962', '77', isset($go_pro_result['pro_plugin_is_activated'])); } bws_plugin_reviews_block($cntctfrm_plugin_info['Name'], 'contact-form-plugin'); ?> </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 prflxtrflds_settings_page() { global $wpdb, $prflxtrflds_options, $wp_version, $prflxtrflds_plugin_info, $prflxtrflds_option_defaults; $plugin_basename = plugin_basename(__FILE__); /* Remove slug */ if (isset($_GET['remove']) && wp_verify_nonce($_GET['_wpnonce'], 'prflxtrflds_nonce_name')) { if (isset($_GET['prflxtrflds_field_id'])) { $field_id = filter_input(INPUT_GET, 'prflxtrflds_field_id', FILTER_SANITIZE_STRING); prflxtrflds_remove_field($field_id); } } /* Get all available fields and print it */ $available_fields = $wpdb->get_results("SELECT `field_id` FROM `" . $wpdb->base_prefix . "prflxtrflds_fields_id` LIMIT 1;", ARRAY_A); if (isset($_GET['tab-action']) && 'shortcode' == $_GET['tab-action']) { if (0 < sizeof($available_fields)) { if (isset($_REQUEST['prflxtrflds_form_submit']) && check_admin_referer($plugin_basename, 'prflxtrflds_nonce_name')) { $prflxtrflds_options['empty_value'] = stripslashes(esc_html($_POST['prflxtrflds_empty_value'])); $prflxtrflds_options['not_available_message'] = stripslashes(esc_html($_POST['prflxtrflds_not_available_message'])); $prflxtrflds_options['sort_sequence'] = $_POST['prflxtrflds_sort_sequence']; $prflxtrflds_options['show_empty_columns'] = isset($_POST['prflxtrflds_show_empty_columns']) ? 1 : 0; $prflxtrflds_options['show_id'] = isset($_POST['prflxtrflds_show_id']) ? 1 : 0; $prflxtrflds_options['header_table'] = $_POST['prflxtrflds_header_table']; $prflxtrflds_options['available_fields'] = !empty($_POST['prflxtrflds_options_available_fields']) ? $_POST['prflxtrflds_options_available_fields'] : array(); $prflxtrflds_options['available_values'] = !empty($_POST['prflxtrflds_options_available_values']) ? $_POST['prflxtrflds_options_available_values'] : array(); update_option('prflxtrflds_options', $prflxtrflds_options); $message = __('Settings saved', 'profile-extra-fields'); } if (isset($_REQUEST['bws_restore_confirm']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { $prflxtrflds_options = $prflxtrflds_option_defaults; update_option('prflxtrflds_options', $prflxtrflds_options); $message = __('All plugin settings were restored.', 'profile-extra-fields'); } } } ?> <div class="wrap"> <h1>Profile Extra Fields</h1> <h2 class="nav-tab-wrapper"> <a class="nav-tab<?php if (!isset($_GET['tab-action'])) { echo ' nav-tab-active'; } ?> " href="admin.php?page=profile-extra-fields.php"><?php _e('Extra fields', 'profile-extra-fields'); ?> </a> <a class="nav-tab <?php if (isset($_GET['tab-action']) && 'userdata' == $_GET['tab-action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=profile-extra-fields.php&tab-action=userdata"><?php _e('User data', 'profile-extra-fields'); ?> </a> <?php if (0 < sizeof($available_fields)) { ?> <a class="nav-tab <?php if (isset($_GET['tab-action']) && 'shortcode' == $_GET['tab-action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=profile-extra-fields.php&tab-action=shortcode"><?php _e('Shortcode settings', 'profile-extra-fields'); ?> </a> <?php } ?> <a class="nav-tab <?php if (isset($_GET['tab-action']) && 'custom_code' == $_GET['tab-action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=profile-extra-fields.php&tab-action=custom_code"><?php _e('Custom code', 'profile-extra-fields'); ?> </a> </h2> <?php /* add new/edit entry */ if (isset($_POST['prflxtrflds_new_entry']) || isset($_GET['edit'])) { prflxtrflds_edit_field(); } elseif (!isset($_GET['tab-action'])) { ?> <form method="post" action="<?php get_admin_url(); ?> ?page=profile-extra-fields.php"> <input type="hidden" name="prflxtrflds_new_entry" value="1" /> <p> <input type="submit" class="button action" name="prflxtrflds_add_new_field" value="<?php _e('Add new field', 'profile-extra-fields'); ?> " /> </p> </form> <div class="prflxtrflds-wplisttable-fullwidth-sort-container"> <?php $prflxtrflds_fields_list_table = new Srrlxtrflds_Fields_List(); /* Wp list table to show all fields */ $prflxtrflds_fields_list_table->prepare_items(); if (isset($prflxtrflds_fields_list_table->items) && 1 < sizeof($prflxtrflds_fields_list_table->items)) { /* Show drag-n-drop message if items > 2 */ ?> <p class="hide-if-no-js prflxtrflds-hide-if-is-mobile"> <?php _e('Drag each item into the order you prefer display fields on user page', 'profile-extra-fields'); ?> </p> <?php } ?> <form class="prflxtrflds-wplisttable-searchform" method="get" action="<?php get_admin_url(); ?> ?page=profile-extra-fields.php"> <input type="hidden" name="page" value="profile-extra-fields.php" /> <?php wp_nonce_field('prflxtrflds_nonce_name', 'prflxtrflds_nonce_name', false); $prflxtrflds_fields_list_table->search_box('search', 'search_id'); ?> <?php $prflxtrflds_fields_list_table->display(); ?> </form> </div><!-- .prflxtrflds-wplisttable-container --> <?php } else { if (isset($_GET['tab-action']) && 'userdata' == $_GET['tab-action']) { global $prflxtrflds_userdatalist_table; if (!isset($prflxtrflds_userdatalist_table)) { $prflxtrflds_userdatalist_table = new Srrlxtrflds_Userdata_List(); } $prflxtrflds_userdatalist_table->prepare_items(); ?> <div class="prflxtrflds-wplisttable-fullwidth-container"> <form method="get" class="prflxtrflds-wplisttable-form"> <input type="hidden" name="page" value="profile-extra-fields.php" /> <input type="hidden" name="tab-action" value="userdata" /> <?php if (!empty($_GET['role'])) { ?> <input type="hidden" name="role" value="<?php echo $_GET['role']; ?> " /> <?php } $prflxtrflds_userdatalist_table->search_box('search', 'search_id'); $prflxtrflds_userdatalist_table->display(); ?> </form> </div> <?php } else { if (isset($_GET['tab-action']) && 'shortcode' == $_GET['tab-action'] && 0 < sizeof($available_fields)) { bws_show_settings_notice(); if (!empty($message)) { ?> <div class="updated fade below-h2"><p><?php echo $message; ?> </p></div> <?php } if (isset($_REQUEST['bws_restore_default']) && check_admin_referer($plugin_basename, 'bws_settings_nonce_name')) { bws_form_restore_default_confirm($plugin_basename); } else { ?> <br/> <div><?php printf(__("If you would like to add user data to your page or post, please use %s button", 'profile-extra-fields'), '<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 user data 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 you can specify a header position (top, left or right), a user role and a user ID", 'profile-extra-fields'), '<code><img style="vertical-align: sub;" src="' . plugins_url('bws_menu/images/shortcode-icon.png', __FILE__) . '" alt="" /></code>', '<code>[prflxtrflds_user_data display=* user_role=* user_id=*]</code>'); ?> </div> </div> </div> <form class="bws_form" method="post" action=""> <table class="form-table"> <tbody> <tr> <th><?php _e('Message for empty field', 'profile-extra-fields'); ?> </th> <td> <input type="text" name="prflxtrflds_empty_value" value="<?php echo $prflxtrflds_options['empty_value']; ?> " /> </td> </tr> <tr> <th><?php _e('Message for the field unavaliable for the user', 'profile-extra-fields'); ?> </th> <td> <input type="text" name="prflxtrflds_not_available_message" value="<?php echo $prflxtrflds_options['not_available_message']; ?> " /> </td> </tr> <tr> <th><?php _e('Sort by user name', 'profile-extra-fields'); ?> </th> <td> <select name="prflxtrflds_sort_sequence" > <option value="ASC" <?php selected($prflxtrflds_options['sort_sequence'], 'ASC'); ?> ><?php _e('ASC', 'profile-extra-fields'); ?> </option> <option value="DESC" <?php selected($prflxtrflds_options['sort_sequence'], 'DESC'); ?> ><?php _e('DESC', 'profile-extra-fields'); ?> </option> </select> </td> </tr> <tr> <th><?php _e('Show empty fields', 'profile-extra-fields'); ?> </th> <td> <label> <input type="checkbox" name="prflxtrflds_show_empty_columns" value="1" <?php checked($prflxtrflds_options['show_empty_columns']); ?> /> <?php _e('Show the field if the value is not filled in by any user', 'profile-extra-fields'); ?> </label> </td> </tr> <tr> <th><?php _e('Show user ID', 'profile-extra-fields'); ?> </th> <td> <input type="checkbox" name="prflxtrflds_show_id" value="1" <?php checked($prflxtrflds_options['show_id']); ?> /> </td> </tr> <tr> <th><?php _e('Position of the table header', 'profile-extra-fields'); ?> </th> <td> <select name="prflxtrflds_header_table" > <option value="top"<?php selected($prflxtrflds_options['header_table'], 'top'); ?> ><?php _e('Top', 'profile-extra-fields'); ?> </option> <option value="side"<?php selected($prflxtrflds_options['header_table'], 'side'); ?> ><?php _e('Side', 'profile-extra-fields'); ?> </option> </select> </td> </tr> </tbody> </table><!--.form-table--> <div class="prflxtrflds-wplisttable-container"> <?php $prflxtrflds_shortcodelist_table = new Srrlxtrflds_Shortcode_List(); /* Wp lis table for shortcode settings */ $prflxtrflds_shortcodelist_table->prepare_items(); $prflxtrflds_shortcodelist_table->views(); $prflxtrflds_shortcodelist_table->display(); ?> </div><!--.prflxtrflds-wplisttable-container--> <p class="submit"> <input type="hidden" name="prflxtrflds_form_submit" value="submit" /> <?php wp_nonce_field($plugin_basename, 'prflxtrflds_nonce_name'); ?> <input id="bws-submit-button" type="submit" class="button-primary" name="prflxtrflds_save_changes" value="<?php _e('Save Changes', 'profile-extra-fields'); ?> " /> </p> </form> <?php bws_form_restore_default_settings($plugin_basename); } } else { bws_custom_code_tab(); } } } bws_plugin_reviews_block($prflxtrflds_plugin_info['Name'], 'profile-extra-fields'); ?> </div><!--.wrap--> <?php }
function gglcptch_add_settings_page() { global $gglcptch_options, $gglcptch_plugin_info, $wp_version; $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'] = ''; } if ($_POST['gglcptch_public_key'] != $gglcptch_options['public_key'] || $_POST['gglcptch_private_key'] != $gglcptch_options['private_key']) { $gglcptch_options['keys_verified'] = false; } $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_get_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']) && 'custom_code' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=google-captcha.php&action=custom_code"><?php _e('Custom code', '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_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 id="gglcptch_admin_settings_page" 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 error"><?php echo $fields['error_msg']; ?> </label> <span class="dashicons dashicons-yes gglcptch_verified <?php if (!isset($gglcptch_options['keys_verified']) || true !== $gglcptch_options['keys_verified']) { echo 'hidden'; } ?> "></span> </td> </tr> <?php } ?> </table> <?php if (!empty($gglcptch_options['public_key']) && !empty($gglcptch_options['private_key'])) { ?> <p id="gglcptch-test-keys" class="submit hide-if-no-js"> <a class="button button-secondary" href="<?php echo add_query_arg(array('_wpnonce' => wp_create_nonce('gglcptch-test-keys'), 'action' => 'gglcptch-test-keys'), admin_url('admin-ajax.php')); ?> "><?php _e('Test Keys', 'google-captcha'); ?> </a> </p> <?php } ?> <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=0a750deb99a8e5296a5432f4c9cb9b55&pn=75&v=%s&wp_v=%s">%s %s</a>', $gglcptch_plugin_info["Version"], $wp_version, __('download', 'google-captcha'), $gglcptch_plugin_name)); } if ($gglcptch_attrs == '' && (is_plugin_active('contact-form-multi-pro/contact-form-multi-pro.php') || is_plugin_active('contact-form-multi/contact-form-multi.php'))) { $gglcptch_plugin_notice = ' (' . __('Check off for adding captcha to forms on their settings pages.', 'google-captcha') . ')'; } 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 ('custom_code' == $_GET['action']) { bws_custom_code_tab(); } 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); if (isset($_GET['action']) && 'advanced' == $_GET['action']) { $package_list = $wpdb->get_results("SELECT `id`, `name` FROM `{$wpdb->base_prefix}cptch_packages` ORDER BY `name` ASC;"); } /* 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']; } if (!isset($_GET['action'])) { $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_contact_form'] = isset($_REQUEST['cptch_contact_form']) ? 1 : 0; $cptch_options['cptch_hide_register'] = isset($_REQUEST['cptch_hide_register']) ? 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['display_reload_button'] = isset($_REQUEST['cptch_display_reload_button']) ? 1 : 0; $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; if (1 == $cptch_options['cptch_difficulty_image']) { $package_list = $wpdb->get_results("SELECT `id`, `name` FROM `{$wpdb->base_prefix}cptch_packages` ORDER BY `name` ASC LIMIT 1;"); if (empty($package_list)) { if (!class_exists('Cptch_package_loader')) { require_once dirname(__FILE__) . '/includes/package_loader.php'; } $package_loader = new Cptch_package_loader(); $package_loader->parse_packages(dirname(__FILE__) . '/images/package'); } } /* 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; /* 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'); } } else { $cptch_options['used_packages'] = isset($_REQUEST['cptch_used_packages']) ? $_REQUEST['cptch_used_packages'] : array(); if (!empty($package_list) && empty($cptch_options['used_packages']) && 1 == $cptch_options['cptch_difficulty_image']) { $error = __("Please select one item in the block Enable image packages", 'captcha'); } $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']; $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']; } } if (empty($error)) { /* 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 <?php if (isset($_GET['action']) && 'custom_code' == $_GET['action']) { echo ' nav-tab-active'; } ?> " href="admin.php?page=captcha.php&action=custom_code"><?php _e('Custom code', '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 below-h2" <?php if ('' == $message || "" != $error) { 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']) || !in_array($_GET['action'], array('whitelist', 'custom_code', '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 below-h2"><p><strong><?php echo $hide_result['message']; ?> </strong></p></div> <?php } ?> <form class="bws_form" method="post" action=""> <?php if (!isset($_GET['action'])) { ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Enable CAPTCHA for', 'captcha'); ?> :</th> <td> <fieldset> <legend class="screen-reader-text"><span><?php _e('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://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 cptch_pro_block('cptch_basic_banner'); ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php _e('Hide CAPTCHA', 'captcha'); ?> </th> <td><?php foreach ($cptch_admin_fields_hide as $fields) { ?> <label><input type="checkbox" name="<?php echo $fields[0]; ?> " value="<?php echo $fields[0]; ?> " <?php if (1 == $cptch_options[$fields[0]]) { echo "checked=\"checked\""; } ?> /> <?php echo $fields[1]; ?> </label><br /> <?php } ?> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Title', '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 cptch_display_example($diff[0]); ?> </div> </div> <br /> <?php } ?> </fieldset></td> </tr> </table> <?php } else { if (!empty($package_list)) { ?> <table class="form-table"> <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 } cptch_pro_block('cptch_advanced_banner'); ?> <table class="form-table"> <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> <?php } ?> <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 ('custom_code' == $_GET['action']) { bws_custom_code_tab(); } 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 }