From: Steve Sutton Date: Tue, 9 Sep 2014 13:10:44 +0000 (-0400) Subject: Adding plugins X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=05fbc0bcaed4d43fdf333a498d4b0fe27399c6dc;p=web%2FPetoskeyRobotics.git Adding plugins add-logo-to-admin akismet contact-form-7 ml-slider realy-simple-captcha wordfence --- diff --git a/wp-content/plugins/add-logo-to-admin/add-logo-to-admin.php b/wp-content/plugins/add-logo-to-admin/add-logo-to-admin.php new file mode 100644 index 0000000..24040bc --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/add-logo-to-admin.php @@ -0,0 +1,256 @@ + + + ' : ''; + $display = ( $plugin_options['image'] ) ? '' : 'style="display: none;"'; + ?> +
+

+ +
+ + + + + + + + + + + +
+
+ +
+ +
+
+ +
+    > +
+

+
+ + +
+ +
+ 'on', + 'admin' => 'on', + 'image' => plugins_url( 'images/logo.png', __FILE__ ) + ); + + add_option( 'wp_add_logo_to_admin', $default_option ); + } + + /** + * Remove all options on deactivation + * + * This functions is referenced in 'register_deactivation_hook()' + * + * @since 1.6 + */ + public static function deactivate() { + delete_option( 'wp_add_logo_to_admin' ); + } + + /** + * Initialization of the plugin which creates the admin page + * + * This functions is attached to the 'admin_enqueue_scripts' action hook + * + * @since 1.6 + */ + public function admin_enqueue_scripts( $hook ) { + $plugin_options = get_option( 'wp_add_logo_to_admin' ); + + if ( 'settings_page_add-logo-to-admin/add-logo-to-admin' == $hook ) { + wp_enqueue_media(); + wp_enqueue_script( 'add_logo_to_admin', plugins_url( 'js/add-logo-select-image.js', __FILE__ ), array( 'jquery', 'media-upload', 'media-views' ), ADD_LOGO_VERSION, true ); + } + + if ( 'on' == $plugin_options['admin'] ) { + wp_enqueue_script( 'add_logo_jquery', plugins_url( 'js/add-logo.js', __FILE__ ), array( 'jquery' ), ADD_LOGO_VERSION, true ); + wp_localize_script( 'add_logo_jquery', 'add_logo_image', esc_url( $plugin_options['image'] ) ); + wp_enqueue_style( 'add_logo_to_admin', plugins_url( 'css/add-logo.css', __FILE__ ), '', ADD_LOGO_VERSION ); + } + } + + } // END class WP_Plugin_Template +} + +if ( class_exists( 'WP_Add_Logo_To_Admin' ) ) { + /** + * Installing the activation and deactivation hooks + * + * @since 1.6 + */ + register_activation_hook( __FILE__, array( 'WP_Add_Logo_To_Admin', 'activate' ) ); + register_deactivation_hook( __FILE__, array( 'WP_Add_Logo_To_Admin', 'deactivate' ) ); + + // instantiate the plugin class + $wp_add_logo_to_admin = new WP_Add_Logo_To_Admin(); + + /** + * Add settings link to plugin admin page + * + * @since 1.6 + */ + if ( isset( $wp_add_logo_to_admin ) ) { + function add_logo_plugin_settings_link( $links ) { + $settings_link = '' . __( 'Settings', 'add-logo' ) . ''; + array_unshift( $links, $settings_link ); + return $links; + } + + $plugin = plugin_basename( __FILE__ ); + add_filter( "plugin_action_links_$plugin", 'add_logo_plugin_settings_link' ); + } +} \ No newline at end of file diff --git a/wp-content/plugins/add-logo-to-admin/css/add-logo.css b/wp-content/plugins/add-logo-to-admin/css/add-logo.css new file mode 100644 index 0000000..5fcd23e --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/css/add-logo.css @@ -0,0 +1,6 @@ +#admin-logo { + margin: 10px 0; + padding: 0 0 5px; + border-bottom: 1px solid #ddd; + width: 100%; +} diff --git a/wp-content/plugins/add-logo-to-admin/images/logo.png b/wp-content/plugins/add-logo-to-admin/images/logo.png new file mode 100644 index 0000000..18d68e1 Binary files /dev/null and b/wp-content/plugins/add-logo-to-admin/images/logo.png differ diff --git a/wp-content/plugins/add-logo-to-admin/js/add-logo-select-image.js b/wp-content/plugins/add-logo-to-admin/js/add-logo-select-image.js new file mode 100644 index 0000000..ab2f46e --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/js/add-logo-select-image.js @@ -0,0 +1,35 @@ +( function($) { + var file_frame; + $( '#add-logo-table' ) + .on( 'click', '.select-image', function(e) { + e.preventDefault(); + + // Let's start over to make sure everything works + if ( file_frame ) + file_frame.remove(); + + file_frame = wp.media.frames.file_frame = wp.media( { + title: $(this).data( 'uploader_title' ), + button: { + text: $(this).data( 'uploader_button_text' ) + }, + multiple: false + } ); + + file_frame.on( 'select', function() { + var attachment = file_frame.state().get( 'selection' ).first().toJSON(); + $( '#add-logo-image' ).val( attachment.url ); + $( '#add-logo-image-container' ).html( '' ); + } ); + + file_frame.open(); + $( '.delete-image' ).show(); + } ) + .on( 'click', '.delete-image', function(e) { + e.preventDefault(); + $(this).hide(); + $( '#add-logo-image' ).val( '' ); + $( '#add-logo-image-container' ).html( '' ); + } ); + +} )(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/add-logo-to-admin/js/add-logo.js b/wp-content/plugins/add-logo-to-admin/js/add-logo.js new file mode 100644 index 0000000..6a58d2b --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/js/add-logo.js @@ -0,0 +1,3 @@ +( function($) { + $( '.wrap' ).prepend( '' ); +} )( jQuery ); \ No newline at end of file diff --git a/wp-content/plugins/add-logo-to-admin/languages/add-logo.pot b/wp-content/plugins/add-logo-to-admin/languages/add-logo.pot new file mode 100644 index 0000000..2e528fd --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/languages/add-logo.pot @@ -0,0 +1,50 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Text in function +#: add-logo-to-admin/add-logo-to-admin.php:1 +#: add-logo-to-admin/add-logo-to-admin.php:137 +msgid "Add Logo to Admin" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:162 +msgid "Delete image" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:153 +msgid "Display logo on all admin pages" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:149 +msgid "Display logo on the login page" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:144 +msgid "Logo Options" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:162 +msgid "Select image" +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:158 +msgid "Upload Logo" +msgstr "" + +#. Text in function +#: add-logo-to-admin/add-logo-to-admin.php:117 +msgid "You do not have sufficient permissions to access this page." +msgstr "" + +#. Text in echo +#: add-logo-to-admin/add-logo-to-admin.php:164 +msgid "Your logo should be no larger than 320px by 80px or else it will be resized on the login screen." +msgstr "" diff --git a/wp-content/plugins/add-logo-to-admin/readme.txt b/wp-content/plugins/add-logo-to-admin/readme.txt new file mode 100644 index 0000000..5b6c048 --- /dev/null +++ b/wp-content/plugins/add-logo-to-admin/readme.txt @@ -0,0 +1,112 @@ +=== Add Logo to Admin === +Contributors: tinkerpriest +Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4W58JWNBHWKK4 +Tags: custom logo, admin, login, wp-admin, admin logo +Text Domain: add-logo +Domain Path: /languages +Requires at least: 3.5 +Tested up to: 3.8 +Stable tag: 1.6 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Add a custom logo to your wp-admin and login page. + +== Description == + +This plugin allows you to customize your admin by adding your own logo to the header. It also replaces the WordPress logo on the login screen with the same custom logo. Tested in Firefox, Safari, Chrome and IE. + +== Installation == + +1. Unzip the add-logo-to-admin.zip file. +2. Upload the `add-logo-to-admin` folder to the `/wp-content/plugins/` directory. +3. Activate the plugin through the 'Plugins' menu in WordPress. +4. Go to Settings => Add Logo to Admin and set your options and add your logo. + +== Frequently Asked Questions == + +1) How do I add my own logo? + +Just go to Settings => Add Logo to Admin and click on "Select image" to upload your logo. + +2) How big does my logo need to be? + +Your logo shouldn't exceed 320px by 80px or it will be resized on the login screen. + +== Screenshots == + +1. The Add Logo to Admin page +2. How your logo will appear on the login screen + +== Change Log == + += 1.6 (2014-02-12) = + +* Added WP media uploader +* Rebuilt plugin using OOP +* Created language file +* Updated screenshots to reflect new admin page +* Added validation to settings + +1.5.1 (2012-10-04) + +* Fixed login screen image size + +1.5 (2012-01-12) + +* Updated for WP 3.3 +* Improved coding +* Added security nonce + +1.4 (2011-02-18) + +* Updated for WP 3.1 +* Removed extraneous CSS and JS files +* Improved coding + +1.3.3 (2009-03-10) + +* Fixed issue with IE7 and logo not displaying + +1.3.2 (2009-03-01) + +* Fixed issue with invading other admin pages save function + +1.3.1 (2009-02-26) + +* Fixed issue with spaces in filename + +1.3 (2009-02-25) + +* Created uploader for logos +* Added "Settings" link on plugins page +* Added option to delete logo +* Added logo select option +* Updated CSS + +1.2 (2009-02-23) + +* Fixed issue with WP installs in subdirectories +* Removed old code +* Tested on WP version 2.7.1 + +1.1 (2008-12-24) + +* Added admin page with options +* Fixed window.onload JavaScript issue +* Fixed issue with blogs not located in the root directory +* Removed extraneous code + +1.0.2 (2008-12-16) +Fixed weirdness with extra folder + +1.0.1 (2008-12-16) +Fixed the code to direct to the proper plugin folder + +1.0 (2008-12-15) +Initial Public Release + +== Upgrade Notice == + += 1.6 = +Now you can easily select your logo using the WordPress media uploader. Plus the login screen logo will redirect back to your site and use your site name for the link's title tag. \ No newline at end of file diff --git a/wp-content/plugins/add-logo-to-admin/screenshot-1.jpg b/wp-content/plugins/add-logo-to-admin/screenshot-1.jpg new file mode 100644 index 0000000..02daef4 Binary files /dev/null and b/wp-content/plugins/add-logo-to-admin/screenshot-1.jpg differ diff --git a/wp-content/plugins/add-logo-to-admin/screenshot-2.jpg b/wp-content/plugins/add-logo-to-admin/screenshot-2.jpg new file mode 100644 index 0000000..bc166b4 Binary files /dev/null and b/wp-content/plugins/add-logo-to-admin/screenshot-2.jpg differ diff --git a/wp-content/plugins/akismet/.htaccess b/wp-content/plugins/akismet/.htaccess new file mode 100644 index 0000000..6d8b4ec --- /dev/null +++ b/wp-content/plugins/akismet/.htaccess @@ -0,0 +1,11 @@ +Order Deny,Allow +Deny from all + + + Allow from all + + +#allow access to any image + + Allow from all + \ No newline at end of file diff --git a/wp-content/plugins/akismet/_inc/akismet.css b/wp-content/plugins/akismet/_inc/akismet.css new file mode 100644 index 0000000..ff076aa --- /dev/null +++ b/wp-content/plugins/akismet/_inc/akismet.css @@ -0,0 +1,361 @@ + +#submitted-on { + position: relative; +} +#the-comment-list .author .akismet-user-comment-count { + display: inline; +} +#the-comment-list .author a span { + text-decoration: none; + color: #999; +} +#the-comment-list .author a span.akismet-span-link { + text-decoration: inherit; + color: inherit; +} +#the-comment-list .remove_url { + margin-left: 3px; + color: #999; + padding: 2px 3px 2px 0; +} +#the-comment-list .remove_url:hover { + color: #A7301F; + font-weight: bold; + padding: 2px 2px 2px 0; +} +#dashboard_recent_comments .akismet-status { + display: none; +} +.akismet-status { + float: right; +} +.akismet-status a { + color: #AAA; + font-style: italic; +} +span.comment-link a { + text-decoration: underline; +} +span.comment-link:after { + content: " "attr(title) " "; + color: #aaa; + text-decoration: none; +} +.mshot-arrow { + width: 0; + height: 0; + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-right: 10px solid #5C5C5C; + position: absolute; + left: -6px; + top: 91px; +} +.mshot-container { + background: #5C5C5C; + position: absolute; + top: -94px; + padding: 7px; + width: 450px; + height: 338px; + z-index: 20000; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-border-radius: 6px; +} +h2.ak-header { + padding: 30px; + background: #649316 url('img/logo-full-2x.png') no-repeat 20px center; + background-size: 185px 33px; + height: 33px; + text-indent: -9999em; + margin-right: 10px; +} +.checkforspam { + display: inline-block !important; +} +.checkforspam-spinner { + display: inline-block; + margin-top: 7px; +} + +.config-wrap { + margin-top: 2em; + max-width: 700px; +} + +.activate-option { + background: #e3e3e3; + border-radius: 3px; + margin-bottom: 30px; + overflow: hidden; + padding: 20px; +} +.activate-option.clicked { + background: #649316; + color: #fff; +} +.activate-option.clicked:hover { + background: #68802E; + color: #fff; +} + +.activate-option .button.button-secondary { + margin: 15px 0; +} + +.activate-option p { + margin: 10px 0 10px; +} + +.activate-highlight { + background: #fff; + padding: 30px; + margin-right: 10px; +} + +.activate-highlight.secondary { + background: #ddd; + padding: 20px 30px; +} + +.activate-highlight h3 { + margin: 0 0 0.3em; +} +.activate-highlight p { + color: #777; +} +.activate-highlight .button-primary { + margin-top: 15px; +} + +#akismet-enter-api-key .regular-text { + width: 18em; + margin-top: 15px; +} + +.right { + float: right; +} + +.alert-text { + color: #dd3d36; +} +.success { + color: #649316; +} +.option-description { + float: left; + font-size: 16px; +} +.option-description span { + color: #666; + display: block; + font-size: 14px; + margin-top: 5px; +} +.option-action { + float: right; +} +.key-config-link { + font-size: 14px; + margin-left: 20px; +} +.jetpack-account { + float: left; + font-size: 18px; + margin-right: 40px; +} +.small-heading { + color: #777; + display: block; + font-size: 12px; + font-weight: bold; + margin-bottom: 5px; + text-transform: uppercase; +} +.inline-label { + background: #ddd; + border-radius: 3px; + font-size: 11px; + padding: 3px 8px; + text-transform: uppercase; +} +.inline-label.alert { + background: #e54747; + color: #fff; +} +.jetpack-account .inline-label { + margin-left: 5px; +} +.option-action .manual-key { + margin-top: 7px; +} + +.alert { + border: 1px solid #e5e5e5; + padding: 0.4em 1em 1.4em 1em; + border-radius: 3px; + -webkit-border-radius: 3px; + border-width: 1px; + border-style: solid; +} + +.alert h3.key-status { + color: #fff; + margin: 1em 0 0.5em 0; +} + +.alert.critical { + background-color: #993300; +} + +.alert.active { + background-color: #649316; +} + +.alert p.key-status { + font-size: 24px; +} + +.alert p.description { + color:#fff; + font-size: 14px; + margin: 0 0; + font-style: normal; +} + +.alert p.description a, +.alert p.description a, +.alert p.description a, +.alert p.description a { + color: #fff; +} + +.new-snapshot { + margin-top: 1em; + padding: 1em; + text-align: center; +} + +.new-snapshot.stats { + background: #fff; + border: 1px solid #e5e5e5; +} + +.new-snapshot h3 { + background: #f5f5f5; + color: #888; + font-size: 11px; + margin: 0; + padding: 3px; +} + +.new-snapspot ul { + font-size: 12px; + width: 100%; +} + +.new-snapshot ul li { + color: #999; + float: left; + font-size: 11px; + padding: 0 20px; + text-transform: uppercase; + width: 33%; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; +} + +.new-snapshot.stats ul li:first-child, +.new-snapshot.stats ul li:nth-child(2) { + border-right:1px dotted #ccc; +} + +.new-snapshot.account ul li:nth-child(2) { + border-right: none; +} + +.new-snapshot ul li span { + color: #52accc; + display: block; + font-size: 32px; + font-weight: lighter; + line-height: 1.5em; +} + +.new-snapshot.stats { +} + +.new-snapshot.account, +.new-snapshot.settings { + float: left; + padding: 0; + text-align: left; + width: 50%; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; +} + +.account-container { + background: #fff; + border: 1px solid #e5e5e5; + margin-right: 0.5em; +} + +.settings-container { + background: #fff; + border: 1px solid #e5e5e5; + margin-left: 0.5em; +} + +.new-snapshot.account ul li { + width:100% +} + +.new-snapshot.account ul li span { + font-size: 14px; + font-weight: normal; +} + + +.new-snapshot.settings ul li { + border: none; + display: block; + width:100% +} + +.new-snapshot.settings ul li span { + display: block; + font-size: 14px; + font-weight: normal; +} + +.new-snapshot.settings p.submit { + margin: 0; + text-align: center; +} + +.akismet-settings th.strictness { + vertical-align: top; + padding-top: 15px; +} + +.akismet-settings input[type=text] { + width: 75%; +} + +.akismet-settings span.note{ + float: left; + padding-left: 23px; + font-size: 75%; + margin-top: -10px; +} + +.clearfix { + clear:both; +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/_inc/akismet.js b/wp-content/plugins/akismet/_inc/akismet.js new file mode 100644 index 0000000..aa0aab4 --- /dev/null +++ b/wp-content/plugins/akismet/_inc/akismet.js @@ -0,0 +1,158 @@ +jQuery( function ( $ ) { + $( 'a.activate-option' ).click( function(){ + var link = $( this ); + if ( link.hasClass( 'clicked' ) ) { + link.removeClass( 'clicked' ); + } + else { + link.addClass( 'clicked' ); + } + $( '.toggle-have-key' ).slideToggle( 'slow', function() {}); + return false; + }); + $('.akismet-status').each(function () { + var thisId = $(this).attr('commentid'); + $(this).prependTo('#comment-' + thisId + ' .column-comment'); + }); + $('.akismet-user-comment-count').each(function () { + var thisId = $(this).attr('commentid'); + $(this).insertAfter('#comment-' + thisId + ' .author strong:first').show(); + }); + $('#the-comment-list').find('tr.comment, tr[id ^= "comment-"]').find('.column-author a[title ^= "http://"]').each(function () { + var thisTitle = $(this).attr('title'); + thisCommentId = $(this).parents('tr:first').attr('id').split("-"); + + $(this).attr("id", "author_comment_url_"+ thisCommentId[1]); + + if (thisTitle) { + $(this).after( + $( 'x' ) + .attr( 'commentid', thisCommentId[1] ) + .attr( 'title', WPAkismet.strings['Remove this URL'] ) + ); + } + }); + $('.remove_url').live('click', function () { + var thisId = $(this).attr('commentid'); + var data = { + action: 'comment_author_deurl', + _wpnonce: WPAkismet.comment_author_url_nonce, + id: thisId + }; + $.ajax({ + url: ajaxurl, + type: 'POST', + data: data, + beforeSend: function () { + // Removes "x" link + $("a[commentid='"+ thisId +"']").hide(); + // Show temp status + $("#author_comment_url_"+ thisId).html( $( '' ).text( WPAkismet.strings['Removing...'] ) ); + }, + success: function (response) { + if (response) { + // Show status/undo link + $("#author_comment_url_"+ thisId) + .attr('cid', thisId) + .addClass('akismet_undo_link_removal') + .html( + $( '' ).text( WPAkismet.strings['URL removed'] ) + ) + .append( ' ' ) + .append( + $( '' ) + .text( WPAkismet.strings['(undo)'] ) + .addClass( 'akismet-span-link' ) + ); + } + } + }); + + return false; + }); + $('.akismet_undo_link_removal').live('click', function () { + var thisId = $(this).attr('cid'); + var thisUrl = $(this).attr('href').replace("http://www.", "").replace("http://", ""); + var data = { + action: 'comment_author_reurl', + _wpnonce: WPAkismet.comment_author_url_nonce, + id: thisId, + url: thisUrl + }; + $.ajax({ + url: ajaxurl, + type: 'POST', + data: data, + beforeSend: function () { + // Show temp status + $("#author_comment_url_"+ thisId).html( $( '' ).text( WPAkismet.strings['Re-adding...'] ) ); + }, + success: function (response) { + if (response) { + // Add "x" link + $("a[commentid='"+ thisId +"']").show(); + // Show link + $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').html(thisUrl); + } + } + }); + + return false; + }); + $('a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type').mouseover(function () { + var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://'; + // Need to determine size of author column + var thisParentWidth = $(this).parent().width(); + // It changes based on if there is a gravatar present + thisParentWidth = ($(this).parent().find('.grav-hijack').length) ? thisParentWidth - 42 + 'px' : thisParentWidth + 'px'; + if ($(this).find('.mShot').length == 0 && !$(this).hasClass('akismet_undo_link_removal')) { + var self = $( this ); + $('.widefat td').css('overflow', 'visible'); + $(this).css('position', 'relative'); + var thisHref = $.URLEncode( $(this).attr('href') ); + $(this).append('
'); + setTimeout(function () { + self.find( '.mshot-image' ).attr('src', '//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2'); + }, 6000); + setTimeout(function () { + self.find( '.mshot-image' ).attr('src', '//s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3'); + }, 12000); + } else { + $(this).find('.mShot').css('left', thisParentWidth).show(); + } + }).mouseout(function () { + $(this).find('.mShot').hide(); + }); + $('.checkforspam:not(.button-disabled)').click( function(e) { + $('.checkforspam:not(.button-disabled)').addClass('button-disabled'); + $('.checkforspam-spinner').addClass( 'spinner' ); + akismet_check_for_spam(0, 100); + e.preventDefault(); + }); + + function akismet_check_for_spam(offset, limit) { + $.post( + ajaxurl, + { + 'action': 'akismet_recheck_queue', + 'offset': offset, + 'limit': limit + }, + function(result) { + if (result.processed < limit) { + window.location.reload(); + } + else { + akismet_check_for_spam(offset + limit, limit); + } + } + ); + } +}); +// URL encode plugin +jQuery.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/; + while(x1 && m[1]!=''){o+=m[1];x+=m[1].length; + }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16); + o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;} +}); diff --git a/wp-content/plugins/akismet/_inc/form.js b/wp-content/plugins/akismet/_inc/form.js new file mode 100644 index 0000000..3a5be8a --- /dev/null +++ b/wp-content/plugins/akismet/_inc/form.js @@ -0,0 +1,30 @@ +var ak_js = document.getElementById( "ak_js" ); + +if ( ! ak_js ) { + ak_js = document.createElement( 'input' ); + ak_js.setAttribute( 'id', 'ak_js' ); + ak_js.setAttribute( 'name', 'ak_js' ); + ak_js.setAttribute( 'type', 'hidden' ); +} +else { + ak_js.parentNode.removeChild( ak_js ); +} + +ak_js.setAttribute( 'value', ( new Date() ).getTime() ); + +var commentForm = document.getElementById( 'commentform' ); + +if ( commentForm ) { + commentForm.appendChild( ak_js ); +} +else { + var replyRowContainer = document.getElementById( 'replyrow' ); + + if ( replyRowContainer ) { + var children = replyRowContainer.getElementsByTagName( 'td' ); + + if ( children.length > 0 ) { + children[0].appendChild( ak_js ); + } + } +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/_inc/img/logo-full-2x.png b/wp-content/plugins/akismet/_inc/img/logo-full-2x.png new file mode 100644 index 0000000..a9bed8b Binary files /dev/null and b/wp-content/plugins/akismet/_inc/img/logo-full-2x.png differ diff --git a/wp-content/plugins/akismet/akismet.php b/wp-content/plugins/akismet/akismet.php new file mode 100644 index 0000000..68289a3 --- /dev/null +++ b/wp-content/plugins/akismet/akismet.php @@ -0,0 +1,59 @@ +protect your blog from comment and trackback spam. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) Sign up for an Akismet API key, and 3) Go to your Akismet configuration page, and save your API key. +Version: 3.0.2 +Author: Automattic +Author URI: http://automattic.com/wordpress-plugins/ +License: GPLv2 or later +Text Domain: akismet +*/ + +/* +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +// Make sure we don't expose any info if called directly +if ( !function_exists( 'add_action' ) ) { + echo 'Hi there! I\'m just a plugin, not much I can do when called directly.'; + exit; +} + +define( 'AKISMET_VERSION', '3.0.2' ); +define( 'AKISMET__MINIMUM_WP_VERSION', '3.1' ); +define( 'AKISMET__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); +define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); +define( 'AKISMET_DELETE_LIMIT', 100000 ); + +register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) ); +register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) ); + +require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' ); +require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' ); + +add_action( 'init', array( 'Akismet', 'init' ) ); + +if ( is_admin() ) { + require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' ); + add_action( 'init', array( 'Akismet_Admin', 'init' ) ); +} + +//add wrapper class around deprecated akismet functions that are referenced elsewhere +require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' ); + diff --git a/wp-content/plugins/akismet/class.akismet-admin.php b/wp-content/plugins/akismet/class.akismet-admin.php new file mode 100644 index 0000000..a1c712e --- /dev/null +++ b/wp-content/plugins/akismet/class.akismet-admin.php @@ -0,0 +1,862 @@ +'.__('Settings', 'akismet').''; + array_unshift( $links, $settings_link ); + return $links; + } + + public static function load_menu() { + if ( class_exists( 'Jetpack' ) ) + $hook = add_submenu_page( 'jetpack', __( 'Akismet' , 'akismet'), __( 'Akismet' , 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); + else + $hook = add_options_page( __('Akismet', 'akismet'), __('Akismet', 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); + + if ( version_compare( $GLOBALS['wp_version'], '3.3', '>=' ) ) { + add_action( "load-$hook", array( 'Akismet_Admin', 'admin_help' ) ); + } + } + + public static function load_resources() { + global $hook_suffix; + + if ( in_array( $hook_suffix, array( + 'index.php', # dashboard + 'edit-comments.php', + 'comment.php', + 'post.php', + 'settings_page_akismet-key-config', + 'jetpack_page_akismet-key-config', + ) ) ) { + wp_register_style( 'akismet.css', AKISMET__PLUGIN_URL . '_inc/akismet.css', array(), AKISMET_VERSION ); + wp_enqueue_style( 'akismet.css'); + + wp_register_script( 'akismet.js', AKISMET__PLUGIN_URL . '_inc/akismet.js', array('jquery','postbox'), AKISMET_VERSION ); + wp_enqueue_script( 'akismet.js' ); + wp_localize_script( 'akismet.js', 'WPAkismet', array( + 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ), + 'strings' => array( + 'Remove this URL' => __( 'Remove this URL' , 'akismet'), + 'Removing...' => __( 'Removing...' , 'akismet'), + 'URL removed' => __( 'URL removed' , 'akismet'), + '(undo)' => __( '(undo)' , 'akismet'), + 'Re-adding...' => __( 'Re-adding...' , 'akismet'), + ) + ) ); + } + } + + /** + * Add help to the Akismet page + * + * @return false if not the Akismet page + */ + public static function admin_help() { + $current_screen = get_current_screen(); + + // Screen Content + if ( current_user_can( 'manage_options' ) ) { + if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) { + //setup page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Setup' , 'akismet') . '

' . + '

' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

' . + '

' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' , 'akismet') . '

', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'setup-signup', + 'title' => __( 'New to Akismet' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Setup' , 'akismet') . '

' . + '

' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' , 'akismet') . '

' . + '

' . sprintf( __( 'Signup for an account on %s to get an API Key.' , 'akismet'), 'Akismet.com' ) . '

', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'setup-manual', + 'title' => __( 'Enter an API Key' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Setup' , 'akismet') . '

' . + '

' . esc_html__( 'If you already have an API key' , 'akismet') . '

' . + '
    ' . + '
  1. ' . esc_html__( 'Copy and paste the API key into the text field.' , 'akismet') . '
  2. ' . + '
  3. ' . esc_html__( 'Click the Use this Key button.' , 'akismet') . '
  4. ' . + '
', + ) + ); + } + elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) { + //stats page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Stats' , 'akismet') . '

' . + '

' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

' . + '

' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' , 'akismet') . '

', + ) + ); + } + else { + //configuration page + $current_screen->add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Configuration' , 'akismet') . '

' . + '

' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' , 'akismet') . '

' . + '

' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' , 'akismet') . '

', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'settings', + 'title' => __( 'Settings' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Configuration' , 'akismet') . '

' . + '

' . esc_html__( 'API Key' , 'akismet') . ' - ' . esc_html__( 'Enter/remove an API key.' , 'akismet') . '

' . + '

' . esc_html__( 'Comments' , 'akismet') . ' - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.' , 'akismet') . '

' . + '

' . esc_html__( 'Strictness' , 'akismet') . ' - ' . esc_html__( 'Choose to either discard the worst spam automatically or to always put all spam in spam folder.' , 'akismet') . '

', + ) + ); + + $current_screen->add_help_tab( + array( + 'id' => 'account', + 'title' => __( 'Account' , 'akismet'), + 'content' => + '

' . esc_html__( 'Akismet Configuration' , 'akismet') . '

' . + '

' . esc_html__( 'Subscription Type' , 'akismet') . ' - ' . esc_html__( 'The Akismet subscription plan' , 'akismet') . '

' . + '

' . esc_html__( 'Status' , 'akismet') . ' - ' . esc_html__( 'The subscription status - active, cancelled or suspended' , 'akismet') . '

', + ) + ); + } + } + + // Help Sidebar + $current_screen->set_help_sidebar( + '

' . esc_html__( 'For more information:' , 'akismet') . '

' . + '

' . esc_html__( 'Akismet FAQ' , 'akismet') . '

' . + '

' . esc_html__( 'Akismet Support' , 'akismet') . '

' + ); + } + + public static function enter_api_key() { + if ( function_exists('current_user_can') && !current_user_can('manage_options') ) + die(__('Cheatin’ uh?', 'akismet')); + + if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) ) + return false; + + foreach( array( 'akismet_strictness', 'akismet_show_user_comments_approved' ) as $option ) { + update_option( $option, isset( $_POST[$option] ) && (int) $_POST[$option] == 1 ? '1' : '0' ); + } + + if ( defined( 'WPCOM_API_KEY' ) ) + return false; //shouldn't have option to save key if already defined + + $new_key = preg_replace( '/[^a-h0-9]/i', '', $_POST['key'] ); + $old_key = Akismet::get_api_key(); + + if ( empty( $new_key ) ) { + if ( !empty( $old_key ) ) { + delete_option( 'wordpress_api_key' ); + self::$notices[] = 'new-key-empty'; + } + } + elseif ( $new_key != $old_key ) { + self::save_key( $new_key ); + } + + return true; + } + + public static function save_key( $api_key ) { + $key_status = Akismet::verify_key( $api_key ); + + if ( $key_status == 'valid' ) { + $akismet_user = self::get_akismet_user( $api_key ); + + if ( $akismet_user ) { + if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) ) + update_option( 'wordpress_api_key', $api_key ); + + if ( $akismet_user->status == 'active' ) + self::$notices['status'] = 'new-key-valid'; + else + self::$notices['status'] = $akismet_user->status; + } + else + self::$notices['status'] = 'new-key-invalid'; + } + elseif ( in_array( $key_status, array( 'invalid', 'failed' ) ) ) + self::$notices['status'] = 'new-key-'.$key_status; + } + + public static function dashboard_stats() { + if ( !function_exists('did_action') || did_action( 'rightnow_end' ) ) + return; // We already displayed this info in the "Right Now" section + + if ( !$count = get_option('akismet_spam_count') ) + return; + + global $submenu; + + echo '

' . esc_html( _x( 'Spam', 'comments' , 'akismet') ) . '

'; + + echo '

'.sprintf( _n( + 'Akismet has protected your site from %3$s spam comment.', + 'Akismet has protected your site from %3$s spam comments.', + $count + , 'akismet'), 'https://akismet.com/wordpress/', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'

'; + } + + // WP 2.5+ + public static function rightnow_stats() { + global $submenu, $wp_db_version; + + if ( 8645 < $wp_db_version ) // 2.7 + $link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) ); + elseif ( isset( $submenu['edit-comments.php'] ) ) + $link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit-comments.php' ) ); + else + $link = add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( 'edit.php' ) ); + + if ( $count = get_option('akismet_spam_count') ) { + $intro = sprintf( _n( + 'Akismet has protected your site from %2$s spam comment already. ', + 'Akismet has protected your site from %2$s spam comments already. ', + $count + , 'akismet'), 'https://akismet.com/wordpress/', number_format_i18n( $count ) ); + } else { + $intro = sprintf( __('Akismet blocks spam from getting to your blog. ', 'akismet'), 'https://akismet.com/wordpress/' ); + } + + $link = function_exists( 'esc_url' ) ? esc_url( $link ) : clean_url( $link ); + if ( $queue_count = self::get_spam_count() ) { + $queue_text = sprintf( _n( + 'There’s %1$s comment in your spam queue right now.', + 'There are %1$s comments in your spam queue right now.', + $queue_count + , 'akismet'), number_format_i18n( $queue_count ), $link ); + } else { + $queue_text = sprintf( __( "There’s nothing in your spam queue at the moment." , 'akismet'), $link ); + } + + $text = $intro . '
' . $queue_text; + echo "

$text

\n"; + } + + public static function check_for_spam_button( $comment_status ) { + if ( 'approved' == $comment_status ) + return; + + if ( function_exists('plugins_url') ) + $link = add_query_arg( array( 'action' => 'akismet_recheck_queue' ), admin_url( 'admin.php' ) ); + else + $link = add_query_arg( array( 'page' => 'akismet-admin', 'recheckqueue' => 'true', 'noheader' => 'true' ), admin_url( 'edit-comments.php' ) ); + + echo '
' . esc_html__('Check for Spam', 'akismet') . ''; + } + + public static function recheck_queue() { + global $wpdb; + + Akismet::fix_scheduled_recheck(); + + if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) + return; + + $paginate = ''; + if ( isset( $_POST['limit'] ) && isset( $_POST['offset'] ) ) { + $paginate = $wpdb->prepare( " LIMIT %d OFFSET %d", array( $_POST['limit'], $_POST['offset'] ) ); + } + $moderation = $wpdb->get_results( "SELECT * FROM {$wpdb->comments} WHERE comment_approved = '0'{$paginate}", ARRAY_A ); + + foreach ( (array) $moderation as $c ) { + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_bloginfo('url'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + + $c['user_role'] = ''; + if ( isset( $c['user_ID'] ) ) + $c['user_role'] = Akismet::get_user_roles($c['user_ID']); + + if ( Akismet::is_test_mode() ) + $c['is_test'] = 'true'; + + add_comment_meta( $c['comment_ID'], 'akismet_rechecking', true ); + + $response = Akismet::http_post( Akismet::build_query( $c ), 'comment-check' ); + + if ( 'true' == $response[1] ) { + wp_set_comment_status( $c['comment_ID'], 'spam' ); + update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' ); + delete_comment_meta( $c['comment_ID'], 'akismet_error' ); + delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' ); + Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam', 'akismet'), 'check-spam' ); + + } elseif ( 'false' == $response[1] ) { + update_comment_meta( $c['comment_ID'], 'akismet_result', 'false' ); + delete_comment_meta( $c['comment_ID'], 'akismet_error' ); + delete_comment_meta( $c['comment_ID'], 'akismet_delayed_moderation_email' ); + Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment', 'akismet'), 'check-ham' ); + // abnormal result: error + } else { + update_comment_meta( $c['comment_ID'], 'akismet_result', 'error' ); + Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)', 'akismet'), substr($response[1], 0, 50)), 'check-error' ); + } + + delete_comment_meta( $c['comment_ID'], 'akismet_rechecking' ); + } + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + wp_send_json( array( + 'processed' => count((array) $moderation), + )); + } + else { + $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' ); + wp_safe_redirect( $redirect_to ); + exit; + } + } + + // Adds an 'x' link next to author URLs, clicking will remove the author URL and show an undo link + public static function remove_comment_author_url() { + if ( !empty( $_POST['id'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { + $comment = get_comment( intval( $_POST['id'] ), ARRAY_A ); + if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { + $comment['comment_author_url'] = ''; + do_action( 'comment_remove_author_url' ); + print( wp_update_comment( $comment ) ); + die(); + } + } + } + + public static function add_comment_author_url() { + if ( !empty( $_POST['id'] ) && !empty( $_POST['url'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { + $comment = get_comment( intval( $_POST['id'] ), ARRAY_A ); + if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { + $comment['comment_author_url'] = esc_url( $_POST['url'] ); + do_action( 'comment_add_author_url' ); + print( wp_update_comment( $comment ) ); + die(); + } + } + } + + public static function comment_row_action( $a, $comment ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return $a; + + $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true ); + $akismet_error = get_comment_meta( $comment->comment_ID, 'akismet_error', true ); + $user_result = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true); + $comment_status = wp_get_comment_status( $comment->comment_ID ); + $desc = null; + if ( $akismet_error ) { + $desc = __( 'Awaiting spam check' , 'akismet'); + } elseif ( !$user_result || $user_result == $akismet_result ) { + // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same + if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' ) + $desc = __( 'Flagged as spam by Akismet' , 'akismet'); + elseif ( $akismet_result == 'false' && $comment_status == 'spam' ) + $desc = __( 'Cleared by Akismet' , 'akismet'); + } else { + $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true ); + if ( $user_result == 'true' ) + $desc = sprintf( __('Flagged as spam by %s', 'akismet'), $who ); + else + $desc = sprintf( __('Un-spammed by %s', 'akismet'), $who ); + } + + // add a History item to the hover links, just after Edit + if ( $akismet_result ) { + $b = array(); + foreach ( $a as $k => $item ) { + $b[ $k ] = $item; + if ( + $k == 'edit' + || ( $k == 'unspam' && $GLOBALS['wp_version'] >= 3.4 ) + ) { + $b['history'] = ' '. esc_html__('History', 'akismet') . ''; + } + } + + $a = $b; + } + + if ( $desc ) + echo ''.esc_html( $desc ).''; + + $show_user_comments = apply_filters( 'akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved') ); + $show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; //option used to be saved as 'false' / 'true' + + if ( $show_user_comments ) { + $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); + $comment_count = intval( $comment_count ); + echo ''; + } + + return $a; + } + + public static function comment_status_meta_box( $comment ) { + $history = Akismet::get_comment_history( $comment->comment_ID ); + + if ( $history ) { + echo '
'; + foreach ( $history as $row ) { + $time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT'; + echo '
' . sprintf( esc_html__('%s ago', 'akismet'), human_time_diff( $row['time'] ) ) . ' - '; + echo esc_html( $row['message'] ) . '
'; + } + echo '
'; + } + } + + public static function plugin_action_links( $links, $file ) { + if ( $file == plugin_basename( AKISMET__PLUGIN_URL . '/akismet.php' ) ) { + $links[] = ''.esc_html__( 'Settings' , 'akismet').''; + } + + return $links; + } + + public static function text_add_link_callback( $m ) { + // bare link? + if ( $m[4] == $m[2] ) + return ''.$m[4].''; + else + return ''.$m[4].''; + } + + public static function text_add_link_class( $comment_text ) { + return preg_replace_callback( '#]*)href="([^"]+)"([^>]*)>(.*?)#i', array( 'Akismet_Admin', 'text_add_link_callback' ), $comment_text ); + } + + // Total spam in queue + // get_option( 'akismet_spam_count' ) is the total caught ever + public static function get_spam_count( $type = false ) { + global $wpdb; + + if ( !$type ) { // total + $count = wp_cache_get( 'akismet_spam_count', 'widget' ); + if ( false === $count ) { + if ( function_exists('wp_count_comments') ) { + $count = wp_count_comments(); + $count = $count->spam; + } else { + $count = (int) $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam'"); + } + wp_cache_set( 'akismet_spam_count', $count, 'widget', 3600 ); + } + return $count; + } elseif ( 'comments' == $type || 'comment' == $type ) { // comments + $type = ''; + } + + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam' AND comment_type = %s", $type ) ); + } + + // Check connectivity between the WordPress blog and Akismet's servers. + // Returns an associative array of server IP addresses, where the key is the IP address, and value is true (available) or false (unable to connect). + public static function check_server_ip_connectivity() { + + $servers = $ips = array(); + + // Some web hosts may disable this function + if ( function_exists('gethostbynamel') ) { + + $ips = gethostbynamel( 'rest.akismet.com' ); + if ( $ips && is_array($ips) && count($ips) ) { + $api_key = Akismet::get_api_key(); + + foreach ( $ips as $ip ) { + $response = Akismet::verify_key( $api_key, $ip ); + // even if the key is invalid, at least we know we have connectivity + if ( $response == 'valid' || $response == 'invalid' ) + $servers[$ip] = 'connected'; + else + $servers[$ip] = $response ? $response : 'unable to connect'; + } + } + } + + return $servers; + } + + // Simpler connectivity check + public static function check_server_connectivity($cache_timeout = 86400) { + + $debug = array(); + $debug[ 'PHP_VERSION' ] = PHP_VERSION; + $debug[ 'WORDPRESS_VERSION' ] = $GLOBALS['wp_version']; + $debug[ 'AKISMET_VERSION' ] = AKISMET_VERSION; + $debug[ 'AKISMET__PLUGIN_DIR' ] = AKISMET__PLUGIN_DIR; + $debug[ 'SITE_URL' ] = site_url(); + $debug[ 'HOME_URL' ] = home_url(); + + $servers = get_option('akismet_available_servers'); + if ( (time() - get_option('akismet_connectivity_time') < $cache_timeout) && $servers !== false ) { + $servers = self::check_server_ip_connectivity(); + update_option('akismet_available_servers', $servers); + update_option('akismet_connectivity_time', time()); + } + + $response = wp_remote_get( 'http://rest.akismet.com/1.1/test' ); + + $debug[ 'gethostbynamel' ] = function_exists('gethostbynamel') ? 'exists' : 'not here'; + $debug[ 'Servers' ] = $servers; + $debug[ 'Test Connection' ] = $response; + + Akismet::log( $debug ); + + if ( $response && 'connected' == wp_remote_retrieve_body( $response ) ) + return true; + + return false; + } + + // Check the server connectivity and store the available servers in an option. + public static function get_server_connectivity($cache_timeout = 86400) { + return self::check_server_connectivity( $cache_timeout ); + } + + public static function get_number_spam_waiting() { + global $wpdb; + return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" ); + } + + public static function get_page_url( $page = 'config' ) { + + $args = array( 'page' => 'akismet-key-config' ); + + if ( $page == 'stats' ) + $args = array( 'page' => 'akismet-key-config', 'view' => 'stats' ); + elseif ( $page == 'delete_key' ) + $args = array( 'page' => 'akismet-key-config', 'view' => 'start', 'action' => 'delete-key', '_wpnonce' => wp_create_nonce( self::NONCE ) ); + + $url = add_query_arg( $args, class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'options-general.php' ) ); + + return $url; + } + + public static function get_akismet_user( $api_key ) { + $akismet_user = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key ) ), 'get-subscription' ); + + if ( ! empty( $akismet_user[1] ) ) + $akismet_user = json_decode( $akismet_user[1] ); + else + $akismet_user = false; + + return $akismet_user; + } + + public static function get_stats( $api_key ) { + $stat_totals = array(); + + foreach( array( '6-months', 'all' ) as $interval ) { + $response = Akismet::http_post( Akismet::build_query( array( 'blog' => urlencode( get_bloginfo('url') ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' ); + + if ( ! empty( $response[1] ) ) { + $stat_totals[$interval] = json_decode( $response[1] ); + } + } + return $stat_totals; + } + + public static function verify_wpcom_key( $api_key, $user_id, $token = '' ) { + $akismet_account = Akismet::http_post( Akismet::build_query( array( + 'user_id' => $user_id, + 'api_key' => $api_key, + 'token' => $token, + 'get_account_type' => 'true' + ) ), 'verify-wpcom-key' ); + + if ( ! empty( $akismet_account[1] ) ) + $akismet_account = json_decode( $akismet_account[1] ); + + Akismet::log( compact( 'akismet_account' ) ); + + return $akismet_account; + } + + public static function display_alert() { + Akismet::view( 'notice', array( + 'type' => 'alert', + 'code' => (int) get_option( 'akismet_alert_code' ), + 'msg' => get_option( 'akismet_alert_msg' ) + ) ); + } + + public static function display_spam_check_warning() { + Akismet::fix_scheduled_recheck(); + + if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::get_number_spam_waiting() > 0 ) { + $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your Akismet configuration and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) ); + Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) ); + } + } + + public static function display_invalid_version() { + Akismet::view( 'notice', array( 'type' => 'version' ) ); + } + + public static function display_api_key_warning() { + Akismet::view( 'notice', array( 'type' => 'plugin' ) ); + } + + public static function display_page() { + if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) + self::display_start_page(); + elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) + self::display_stats_page(); + else + self::display_configuration_page(); + } + + public static function display_start_page() { + if ( isset( $_GET['action'] ) ) { + if ( $_GET['action'] == 'delete-key' ) { + if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], self::NONCE ) ) + delete_option( 'wordpress_api_key' ); + } + } + + if ( $api_key = Akismet::get_api_key() ) { + self::display_configuration_page(); + return; + } + + //the user can choose to auto connect their API key by clicking a button on the akismet done page + //if jetpack, get verified api key by using connected wpcom user id + //if no jetpack, get verified api key by using an akismet token + + $akismet_user = false; + + if ( isset( $_GET['token'] ) && preg_match('/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) ) + $akismet_user = self::verify_wpcom_key( '', '', $_GET['token'] ); + elseif ( $jetpack_user = self::get_jetpack_user() ) + $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); + + if ( isset( $_GET['action'] ) ) { + if ( $_GET['action'] == 'save-key' ) { + if ( is_object( $akismet_user ) ) { + self::save_key( $akismet_user->api_key ); + self::display_notice(); + self::display_configuration_page(); + return; + } + } + } + + echo '

'.esc_html__('Akismet', 'akismet').'

'; + + self::display_status(); + + Akismet::view( 'start', compact( 'akismet_user' ) ); + } + + public static function display_stats_page() { + Akismet::view( 'stats' ); + } + + public static function display_configuration_page() { + $api_key = Akismet::get_api_key(); + $akismet_user = self::get_akismet_user( $api_key ); + $stat_totals = self::get_stats( $api_key ); + + // If unset, create the new strictness option using the old discard option to determine its default + if ( get_option( 'akismet_strictness' ) === false ) + add_option( 'akismet_strictness', (get_option('akismet_discard_month') === 'true' ? '1' : '0') ); + + if ( empty( self::$notices ) ) { + //show status + if ( ! empty( $stat_totals['all'] ) && isset( $stat_totals['all']->time_saved ) && $akismet_user->status == 'active' && $akismet_user->account_type == 'free-api-key' ) { + + $time_saved = false; + + if ( $stat_totals['all']->time_saved > 1800 ) { + $total_in_minutes = round( $stat_totals['all']->time_saved / 60 ); + $total_in_hours = round( $total_in_minutes / 60 ); + $total_in_days = round( $total_in_hours / 8 ); + $cleaning_up = __( 'Cleaning up spam takes time.' , 'akismet'); + + if ( $total_in_days > 1 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' , 'akismet'), number_format_i18n( $total_in_days ) ); + elseif ( $total_in_hours > 1 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' , 'akismet'), $total_in_hours ); + elseif ( $total_in_minutes >= 30 ) + $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' , 'akismet'), $total_in_minutes ); + } + + Akismet::view( 'notice', array( 'type' => 'active-notice', 'time_saved' => $time_saved ) ); + } + + if ( !empty( $akismet_user->limit_reached ) && in_array( $akismet_user->limit_reached, array( 'yellow', 'red' ) ) ) { + Akismet::view( 'notice', array( 'type' => 'limit-reached', 'level' => $akismet_user->limit_reached ) ); + } + } + + if ( !isset( self::$notices['status'] ) && in_array( $akismet_user->status, array( 'cancelled', 'suspended', 'missing', 'no-sub' ) ) ) + Akismet::view( 'notice', array( 'type' => $akismet_user->status ) ); + + Akismet::log( compact( 'stat_totals', 'akismet_user' ) ); + Akismet::view( 'config', compact( 'api_key', 'akismet_user', 'stat_totals' ) ); + } + + public static function display_notice() { + global $hook_suffix; + + if ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config', 'edit-comments.php' ) ) && (int) get_option( 'akismet_alert_code' ) > 0 ) { + self::display_alert(); + } + elseif ( $hook_suffix == 'plugins.php' && !Akismet::get_api_key() ) { + self::display_api_key_warning(); + } + elseif ( $hook_suffix == 'edit-comments.php' && wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) { + self::display_spam_check_warning(); + } + elseif ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config' ) ) && Akismet::get_api_key() ) { + self::display_status(); + } + } + + public static function display_status() { + $type = ''; + + if ( !self::get_server_connectivity() ) + $type = 'servers-be-down'; + + if ( !empty( $type ) ) + Akismet::view( 'notice', compact( 'type' ) ); + elseif ( !empty( self::$notices ) ) { + foreach ( self::$notices as $type ) + Akismet::view( 'notice', compact( 'type' ) ); + } + } + + private static function get_jetpack_user() { + if ( !class_exists('Jetpack') ) + return false; + + Jetpack::load_xml_rpc_client(); + $xml = new Jetpack_IXR_ClientMulticall( array( 'user_id' => get_current_user_id() ) ); + + $xml->addCall( 'wpcom.getUserID' ); + $xml->addCall( 'akismet.getAPIKey' ); + $xml->query(); + + Akismet::log( compact( 'xml' ) ); + + if ( !$xml->isError() ) { + $responses = $xml->getResponse(); + if ( count( $responses ) > 1 ) { + $api_key = array_shift( $responses[0] ); + $user_id = (int) array_shift( $responses[1] ); + return compact( 'api_key', 'user_id' ); + } + } + return false; + } + + /** + * Some commentmeta isn't useful in an export file. Suppress it (when supported). + * + * @param bool $exclude + * @param string $key The meta key + * @param object $meta The meta object + * @return bool Whether to exclude this meta entry from the export. + */ + public static function exclude_commentmeta_from_export( $exclude, $key, $meta ) { + if ( in_array( $key, array( 'akismet_as_submitted', 'akismet_rechecking', 'akismet_delayed_moderation_email' ) ) ) { + return true; + } + + return $exclude; + } +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/class.akismet-widget.php b/wp-content/plugins/akismet/class.akismet-widget.php new file mode 100644 index 0000000..a60ae60 --- /dev/null +++ b/wp-content/plugins/akismet/class.akismet-widget.php @@ -0,0 +1,110 @@ + __( 'Display the number of spam comments Akismet has caught' , 'akismet') ) + ); + + if ( is_active_widget( false, false, $this->id_base ) ) { + add_action( 'wp_head', array( $this, 'css' ) ); + } + } + + function css() { +?> + + + + + +

+ + +

+ + + + + + $key, 'blog' => get_option('home') ) ), 'verify-key', $ip ); + } + + public static function verify_key( $key, $ip = null ) { + $response = self::check_key_status( $key, $ip ); + + if ( $response[1] != 'valid' && $response[1] != 'invalid' ) + return 'failed'; + + self::update_alert( $response ); + + return $response[1]; + } + + public static function auto_check_comment( $commentdata ) { + self::$last_comment_result = null; + + $comment = $commentdata; + + $comment['user_ip'] = self::get_ip_address(); + $comment['user_agent'] = self::get_user_agent(); + $comment['referrer'] = self::get_referer(); + $comment['blog'] = get_option('home'); + $comment['blog_lang'] = get_locale(); + $comment['blog_charset'] = get_option('blog_charset'); + $comment['permalink'] = get_permalink( $comment['comment_post_ID'] ); + + if ( !empty( $comment['user_ID'] ) ) + $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] ); + + $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) ); + $comment['akismet_comment_nonce'] = 'inactive'; + if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) { + $comment['akismet_comment_nonce'] = 'failed'; + if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) ) + $comment['akismet_comment_nonce'] = 'passed'; + + // comment reply in wp-admin + if ( isset( $_POST['_ajax_nonce-replyto-comment'] ) && check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ) ) + $comment['akismet_comment_nonce'] = 'passed'; + + } + + if ( self::is_test_mode() ) + $comment['is_test'] = 'true'; + + foreach( $_POST as $key => $value ) { + if ( is_string( $value ) ) + $comment["POST_{$key}"] = $value; + } + + $ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' ); + + foreach ( $_SERVER as $key => $value ) { + if ( !in_array( $key, $ignore ) && is_string($value) ) + $comment["$key"] = $value; + else + $comment["$key"] = ''; + } + + $post = get_post( $comment['comment_post_ID'] ); + $comment[ 'comment_post_modified_gmt' ] = $post->post_modified_gmt; + + $response = self::http_post( Akismet::build_query( $comment ), 'comment-check' ); + + do_action( 'akismet_comment_check_response', $response ); + + self::update_alert( $response ); + + $commentdata['comment_as_submitted'] = array_intersect_key( $comment, array( 'blog' => '', 'blog_charset' => '', 'blog_lang' => '', 'blog_ua' => '', 'comment_agent' => '', 'comment_author' => '', 'comment_author_IP' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'comment_date_gmt' => '', 'comment_tags' => '', 'comment_type' => '', 'guid' => '', 'is_test' => '', 'permalink' => '', 'reporter' => '', 'site_domain' => '', 'submit_referer' => '', 'submit_uri' => '', 'user_ID' => '', 'user_agent' => '', 'user_id' => '', 'user_ip' => '' ) ); + $commentdata['akismet_result'] = $response[1]; + + if ( isset( $response[0]['x-akismet-pro-tip'] ) ) + $commentdata['akismet_pro_tip'] = $response[0]['x-akismet-pro-tip']; + + if ( isset( $response[0]['x-akismet-error'] ) ) { + // An error occurred that we anticipated (like a suspended key) and want the user to act on. + // Send to moderation. + self::$last_comment_result = '0'; + } + else if ( 'true' == $response[1] ) { + // akismet_spam_count will be incremented later by comment_is_spam() + self::$last_comment_result = 'spam'; + + $discard = ( isset( $commentdata['akismet_pro_tip'] ) && $commentdata['akismet_pro_tip'] === 'discard' && self::allow_discard() ); + + do_action( 'akismet_spam_caught', $discard ); + + if ( $discard ) { + // akismet_result_spam() won't be called so bump the counter here + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : get_permalink( $post ); + wp_safe_redirect( esc_url_raw( $redirect_to ) ); + die(); + } + } + + // if the response is neither true nor false, hold the comment for moderation and schedule a recheck + if ( 'true' != $response[1] && 'false' != $response[1] ) { + if ( !current_user_can('moderate_comments') ) { + // Comment status should be moderated + self::$last_comment_result = '0'; + } + if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_single_event') ) { + if ( !wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) { + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + } + } + + self::$prevent_moderation_email_for_these_comments[] = $commentdata; + } + + if ( function_exists('wp_next_scheduled') && function_exists('wp_schedule_event') ) { + // WP 2.1+: delete old comments daily + if ( !wp_next_scheduled( 'akismet_scheduled_delete' ) ) + wp_schedule_event( time(), 'daily', 'akismet_scheduled_delete' ); + } + elseif ( (mt_rand(1, 10) == 3) ) { + // WP 2.0: run this one time in ten + self::delete_old_comments(); + } + + self::set_last_comment( $commentdata ); + self::fix_scheduled_recheck(); + + return self::$last_comment; + } + + public static function get_last_comment() { + return self::$last_comment; + } + + public static function set_last_comment( $comment ) { + if ( is_null( $comment ) ) { + self::$last_comment = null; + } + else { + // We filter it here so that it matches the filtered comment data that we'll have to compare against later. + // wp_filter_comment expects comment_author_IP + self::$last_comment = wp_filter_comment( + array_merge( + array( 'comment_author_IP' => self::get_ip_address() ), + $comment + ) + ); + } + } + + // this fires on wp_insert_comment. we can't update comment_meta when auto_check_comment() runs + // because we don't know the comment ID at that point. + public static function auto_check_update_meta( $id, $comment ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + if ( !isset( self::$last_comment['comment_author_email'] ) ) + self::$last_comment['comment_author_email'] = ''; + + // wp_insert_comment() might be called in other contexts, so make sure this is the same comment + // as was checked by auto_check_comment + if ( is_object( $comment ) && !empty( self::$last_comment ) && is_array( self::$last_comment ) ) { + if ( self::matches_last_comment( $comment ) ) { + + load_plugin_textdomain( 'akismet' ); + + // normal result: true or false + if ( self::$last_comment['akismet_result'] == 'true' ) { + update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' ); + self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam', 'akismet'), 'check-spam' ); + if ( $comment->comment_approved != 'spam' ) + self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed'.$comment->comment_approved ); + } + elseif ( self::$last_comment['akismet_result'] == 'false' ) { + update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' ); + self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment', 'akismet'), 'check-ham' ); + if ( $comment->comment_approved == 'spam' ) { + if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) ) + self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check', 'akismet'), 'wp-blacklisted' ); + else + self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s', 'akismet'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved ); + } + } // abnormal result: error + else { + update_comment_meta( $comment->comment_ID, 'akismet_error', time() ); + self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.', 'akismet'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' ); + } + + // record the complete original data as submitted for checking + if ( isset( self::$last_comment['comment_as_submitted'] ) ) + update_comment_meta( $comment->comment_ID, 'akismet_as_submitted', self::$last_comment['comment_as_submitted'] ); + + if ( isset( self::$last_comment['akismet_pro_tip'] ) ) + update_comment_meta( $comment->comment_ID, 'akismet_pro_tip', self::$last_comment['akismet_pro_tip'] ); + } + } + } + + public static function delete_old_comments() { + global $wpdb; + + while( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_id FROM {$wpdb->comments} WHERE DATE_SUB(NOW(), INTERVAL 15 DAY) > comment_date_gmt AND comment_approved = 'spam' LIMIT %d", defined( 'AKISMET_DELETE_LIMIT' ) ? AKISMET_DELETE_LIMIT : 10000 ) ) ) { + if ( empty( $comment_ids ) ) + return; + + $wpdb->queries = array(); + + do_action( 'delete_comment', $comment_ids ); + + $comma_comment_ids = implode( ', ', array_map('intval', $comment_ids) ); + + $wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_id IN ( $comma_comment_ids )"); + $wpdb->query("DELETE FROM {$wpdb->commentmeta} WHERE comment_id IN ( $comma_comment_ids )"); + + clean_comment_cache( $comment_ids ); + } + + if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->comments ) ) // lucky number + $wpdb->query("OPTIMIZE TABLE {$wpdb->comments}"); + } + + public static function delete_old_comments_meta() { + global $wpdb; + + $interval = apply_filters( 'akismet_delete_commentmeta_interval', 15 ); + + # enfore a minimum of 1 day + $interval = absint( $interval ); + if ( $interval < 1 ) + $interval = 1; + + // akismet_as_submitted meta values are large, so expire them + // after $interval days regardless of the comment status + while ( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT m.comment_id FROM {$wpdb->commentmeta} as m INNER JOIN {$wpdb->comments} as c USING(comment_id) WHERE m.meta_key = 'akismet_as_submitted' AND DATE_SUB(NOW(), INTERVAL %d DAY) > c.comment_date_gmt LIMIT 10000", $interval ) ) ) { + if ( empty( $comment_ids ) ) + return; + + $wpdb->queries = array(); + + foreach ( $comment_ids as $comment_id ) { + delete_comment_meta( $comment_id, 'akismet_as_submitted' ); + } + } + + if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number + $wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}"); + } + + // how many approved comments does this author have? + public static function get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) { + global $wpdb; + + if ( !empty( $user_id ) ) + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE user_id = %d AND comment_approved = 1", $user_id ) ); + + if ( !empty( $comment_author_email ) ) + return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE comment_author_email = %s AND comment_author = %s AND comment_author_url = %s AND comment_approved = 1", $comment_author_email, $comment_author, $comment_author_url ) ); + + return 0; + } + + // get the full comment history for a given comment, as an array in reverse chronological order + public static function get_comment_history( $comment_id ) { + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + $history = get_comment_meta( $comment_id, 'akismet_history', false ); + usort( $history, array( 'Akismet', '_cmp_time' ) ); + return $history; + } + + // log an event for a given comment, storing it in comment_meta + public static function update_comment_history( $comment_id, $message, $event=null ) { + global $current_user; + + // failsafe for old WP versions + if ( !function_exists('add_comment_meta') ) + return false; + + $user = ''; + if ( is_object( $current_user ) && isset( $current_user->user_login ) ) + $user = $current_user->user_login; + + $event = array( + 'time' => self::_get_microtime(), + 'message' => $message, + 'event' => $event, + 'user' => $user, + ); + + // $unique = false so as to allow multiple values per comment + $r = add_comment_meta( $comment_id, 'akismet_history', $event, false ); + } + + public static function check_db_comment( $id, $recheck_reason = 'recheck_queue' ) { + global $wpdb; + + $c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $id ), ARRAY_A ); + if ( !$c ) + return; + + $c['user_ip'] = $c['comment_author_IP']; + $c['user_agent'] = $c['comment_agent']; + $c['referrer'] = ''; + $c['blog'] = get_option('home'); + $c['blog_lang'] = get_locale(); + $c['blog_charset'] = get_option('blog_charset'); + $c['permalink'] = get_permalink($c['comment_post_ID']); + $c['recheck_reason'] = $recheck_reason; + + if ( self::is_test_mode() ) + $c['is_test'] = 'true'; + + $response = self::http_post( Akismet::build_query( $c ), 'comment-check' ); + + return ( is_array( $response ) && ! empty( $response[1] ) ) ? $response[1] : false; + } + + + + public static function transition_comment_status( $new_status, $old_status, $comment ) { + + if ( $new_status == $old_status ) + return; + + # we don't need to record a history item for deleted comments + if ( $new_status == 'delete' ) + return; + + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) ) + return; + + if ( defined('WP_IMPORTING') && WP_IMPORTING == true ) + return; + + // if this is present, it means the status has been changed by a re-check, not an explicit user action + if ( get_comment_meta( $comment->comment_ID, 'akismet_rechecking' ) ) + return; + + global $current_user; + $reporter = ''; + if ( is_object( $current_user ) ) + $reporter = $current_user->user_login; + + // Assumption alert: + // We want to submit comments to Akismet only when a moderator explicitly spams or approves it - not if the status + // is changed automatically by another plugin. Unfortunately WordPress doesn't provide an unambiguous way to + // determine why the transition_comment_status action was triggered. And there are several different ways by which + // to spam and unspam comments: bulk actions, ajax, links in moderation emails, the dashboard, and perhaps others. + // We'll assume that this is an explicit user action if certain POST/GET variables exist. + if ( ( isset( $_POST['status'] ) && in_array( $_POST['status'], array( 'spam', 'unspam' ) ) ) || + ( isset( $_POST['spam'] ) && (int) $_POST['spam'] == 1 ) || + ( isset( $_POST['unspam'] ) && (int) $_POST['unspam'] == 1 ) || + ( isset( $_POST['comment_status'] ) && in_array( $_POST['comment_status'], array( 'spam', 'unspam' ) ) ) || + ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'spam', 'unspam' ) ) ) || + ( isset( $_POST['action'] ) && in_array( $_POST['action'], array( 'editedcomment' ) ) ) + ) { + if ( $new_status == 'spam' && ( $old_status == 'approved' || $old_status == 'unapproved' || !$old_status ) ) { + return self::submit_spam_comment( $comment->comment_ID ); + } elseif ( $old_status == 'spam' && ( $new_status == 'approved' || $new_status == 'unapproved' ) ) { + return self::submit_nonspam_comment( $comment->comment_ID ); + } + } + + self::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s', 'akismet'), $reporter, $new_status ), 'status-' . $new_status ); + } + + public static function submit_spam_comment( $comment_id ) { + global $wpdb, $current_user, $current_site; + + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) ); + + if ( !$comment ) // it was deleted + return; + + if ( 'spam' != $comment->comment_approved ) + return; + + // use the original version stored in comment_meta if available + $as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true); + + if ( $as_submitted && is_array( $as_submitted ) && isset( $as_submitted['comment_content'] ) ) + $comment = (object) array_merge( (array)$comment, $as_submitted ); + + $comment->blog = get_bloginfo('url'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink($comment->comment_post_ID); + + if ( is_object($current_user) ) + $comment->reporter = $current_user->user_login; + + if ( is_object($current_site) ) + $comment->site_domain = $current_site->domain; + + $comment->user_role = ''; + if ( isset( $comment->user_ID ) ) + $comment->user_role = Akismet::get_user_roles( $comment->user_ID ); + + if ( self::is_test_mode() ) + $comment->is_test = 'true'; + + $post = get_post( $comment->comment_post_ID ); + $comment->comment_post_modified_gmt = $post->post_modified_gmt; + + $response = Akismet::http_post( Akismet::build_query( $comment ), 'submit-spam' ); + if ( $comment->reporter ) { + self::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam', 'akismet'), $comment->reporter ), 'report-spam' ); + update_comment_meta( $comment_id, 'akismet_user_result', 'true' ); + update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); + } + + do_action('akismet_submit_spam_comment', $comment_id, $response[1]); + } + + public static function submit_nonspam_comment( $comment_id ) { + global $wpdb, $current_user, $current_site; + + $comment_id = (int) $comment_id; + + $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) ); + if ( !$comment ) // it was deleted + return; + + // use the original version stored in comment_meta if available + $as_submitted = get_comment_meta( $comment_id, 'akismet_as_submitted', true); + + if ( $as_submitted && is_array($as_submitted) && isset($as_submitted['comment_content']) ) + $comment = (object) array_merge( (array)$comment, $as_submitted ); + + $comment->blog = get_bloginfo('url'); + $comment->blog_lang = get_locale(); + $comment->blog_charset = get_option('blog_charset'); + $comment->permalink = get_permalink( $comment->comment_post_ID ); + $comment->user_role = ''; + + if ( is_object($current_user) ) + $comment->reporter = $current_user->user_login; + + if ( is_object($current_site) ) + $comment->site_domain = $current_site->domain; + + if ( isset( $comment->user_ID ) ) + $comment->user_role = Akismet::get_user_roles($comment->user_ID); + + if ( Akismet::is_test_mode() ) + $comment->is_test = 'true'; + + $post = get_post( $comment->comment_post_ID ); + $comment->comment_post_modified_gmt = $post->post_modified_gmt; + + $response = self::http_post( Akismet::build_query( $comment ), 'submit-ham' ); + if ( $comment->reporter ) { + self::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam', 'akismet'), $comment->reporter ), 'report-ham' ); + update_comment_meta( $comment_id, 'akismet_user_result', 'false' ); + update_comment_meta( $comment_id, 'akismet_user', $comment->reporter ); + } + + do_action('akismet_submit_nonspam_comment', $comment_id, $response[1]); + } + + public static function cron_recheck() { + global $wpdb; + + $api_key = self::get_api_key(); + + $status = self::verify_key( $api_key ); + if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) { + // since there is currently a problem with the key, reschedule a check for 6 hours hence + wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' ); + return false; + } + + delete_option('akismet_available_servers'); + + $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error' LIMIT 100" ); + + load_plugin_textdomain( 'akismet' ); + + foreach ( (array) $comment_errors as $comment_id ) { + // if the comment no longer exists, or is too old, remove the meta entry from the queue to avoid getting stuck + $comment = get_comment( $comment_id ); + if ( !$comment || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) ) { + delete_comment_meta( $comment_id, 'akismet_error' ); + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + continue; + } + + add_comment_meta( $comment_id, 'akismet_rechecking', true ); + $status = self::check_db_comment( $comment_id, 'retry' ); + + $msg = ''; + if ( $status == 'true' ) { + $msg = __( 'Akismet caught this comment as spam during an automatic retry.' , 'akismet'); + } elseif ( $status == 'false' ) { + $msg = __( 'Akismet cleared this comment during an automatic retry.' , 'akismet'); + } + + // If we got back a legit response then update the comment history + // other wise just bail now and try again later. No point in + // re-trying all the comments once we hit one failure. + if ( !empty( $msg ) ) { + delete_comment_meta( $comment_id, 'akismet_error' ); + self::update_comment_history( $comment_id, $msg, 'cron-retry' ); + update_comment_meta( $comment_id, 'akismet_result', $status ); + // make sure the comment status is still pending. if it isn't, that means the user has already moved it elsewhere. + $comment = get_comment( $comment_id ); + if ( $comment && 'unapproved' == wp_get_comment_status( $comment_id ) ) { + if ( $status == 'true' ) { + wp_spam_comment( $comment_id ); + } elseif ( $status == 'false' ) { + // comment is good, but it's still in the pending queue. depending on the moderation settings + // we may need to change it to approved. + if ( check_comment($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent, $comment->comment_type) ) + wp_set_comment_status( $comment_id, 1 ); + else if ( get_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true ) ) + wp_notify_moderator( $comment_id ); + } + } + + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + } else { + // If this comment has been pending moderation for longer than MAX_DELAY_BEFORE_MODERATION_EMAIL, + // send a moderation email now. + if ( ( intval( gmdate( 'U' ) ) - strtotime( $comment->comment_date_gmt ) ) < self::MAX_DELAY_BEFORE_MODERATION_EMAIL ) { + delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' ); + wp_notify_moderator( $comment_id ); + } + + delete_comment_meta( $comment_id, 'akismet_rechecking' ); + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + return; + } + delete_comment_meta( $comment_id, 'akismet_rechecking' ); + } + + $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" ); + if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) { + wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' ); + } + } + + public static function fix_scheduled_recheck() { + $future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' ); + if ( !$future_check ) { + return; + } + + if ( get_option( 'akismet_alert_code' ) > 0 ) { + return; + } + + $check_range = time() + 1200; + if ( $future_check > $check_range ) { + wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' ); + wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' ); + } + } + + public static function add_comment_nonce( $post_id ) { + echo '

'; + wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE ); + echo '

'; + } + + public static function is_test_mode() { + return defined('AKISMET_TEST_MODE') && AKISMET_TEST_MODE; + } + + public static function allow_discard() { + if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) + return false; + if ( is_user_logged_in() ) + return false; + + return ( get_option( 'akismet_strictness' ) === '1' ); + } + + public static function get_ip_address() { + return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null; + } + + /** + * Do these two comments, without checking the comment_ID, "match"? + * + * @param mixed $comment1 A comment object or array. + * @param mixed $comment2 A comment object or array. + * @return bool Whether the two comments should be treated as the same comment. + */ + private static function comments_match( $comment1, $comment2 ) { + $comment1 = (array) $comment1; + $comment2 = (array) $comment2; + + return ( + isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] ) + && intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] ) + && $comment1['comment_author'] == $comment2['comment_author'] + && $comment1['comment_author_email'] == $comment2['comment_author_email'] + ); + } + + // Does the supplied comment match the details of the one most recently stored in self::$last_comment? + public static function matches_last_comment( $comment ) { + if ( is_object( $comment ) ) + $comment = (array) $comment; + + return self::comments_match( self::$last_comment, $comment ); + } + + private static function get_user_agent() { + return isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null; + } + + private static function get_referer() { + return isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : null; + } + + // return a comma-separated list of role names for the given user + public static function get_user_roles( $user_id ) { + $roles = false; + + if ( !class_exists('WP_User') ) + return false; + + if ( $user_id > 0 ) { + $comment_user = new WP_User( $user_id ); + if ( isset( $comment_user->roles ) ) + $roles = join( ',', $comment_user->roles ); + } + + if ( is_multisite() && is_super_admin( $user_id ) ) { + if ( empty( $roles ) ) { + $roles = 'super_admin'; + } else { + $comment_user->roles[] = 'super_admin'; + $roles = join( ',', $comment_user->roles ); + } + } + + return $roles; + } + + // filter handler used to return a spam result to pre_comment_approved + public static function last_comment_status( $approved, $comment ) { + // Only do this if it's the correct comment + if ( is_null(self::$last_comment_result) || ! self::matches_last_comment( $comment ) ) { + self::log( "comment_is_spam mismatched comment, returning unaltered $approved" ); + return $approved; + } + + // bump the counter here instead of when the filter is added to reduce the possibility of overcounting + if ( $incr = apply_filters('akismet_spam_count_incr', 1) ) + update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr ); + + return self::$last_comment_result; + } + + /** + * If Akismet is temporarily unreachable, we don't want to "spam" the blogger with + * moderation emails for comments that will be automatically cleared or spammed on + * the next retry. + * + * For comments that will be rechecked later, empty the list of email addresses that + * the moderation email would be sent to. + * + * @param array $emails An array of email addresses that the moderation email will be sent to. + * @param int $comment_id The ID of the relevant comment. + * @return array An array of email addresses that the moderation email will be sent to. + */ + public static function disable_moderation_emails_if_unreachable( $emails, $comment_id ) { + if ( ! empty( self::$prevent_moderation_email_for_these_comments ) && ! empty( $emails ) ) { + $comment = get_comment( $comment_id ); + + foreach ( self::$prevent_moderation_email_for_these_comments as $possible_match ) { + if ( self::comments_match( $possible_match, $comment ) ) { + update_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true ); + return array(); + } + } + } + + return $emails; + } + + public static function _cmp_time( $a, $b ) { + return $a['time'] > $b['time'] ? -1 : 1; + } + + public static function _get_microtime() { + $mtime = explode( ' ', microtime() ); + return $mtime[1] + $mtime[0]; + } + + /** + * Make a POST request to the Akismet API. + * + * @param string $request The body of the request. + * @param string $path The path for the request. + * @param string $ip The specific IP address to hit. + * @return array A two-member array consisting of the headers and the response body, both empty in the case of a failure. + */ + public static function http_post( $request, $path, $ip=null ) { + + $akismet_ua = sprintf( 'WordPress/%s | Akismet/%s', $GLOBALS['wp_version'], constant( 'AKISMET_VERSION' ) ); + $akismet_ua = apply_filters( 'akismet_ua', $akismet_ua ); + + $content_length = strlen( $request ); + + $api_key = self::get_api_key(); + $host = self::API_HOST; + + if ( !empty( $api_key ) ) + $host = $api_key.'.'.$host; + + $http_host = $host; + // use a specific IP if provided + // needed by Akismet_Admin::check_server_connectivity() + if ( $ip && long2ip( ip2long( $ip ) ) ) { + $http_host = $ip; + } + + $http_args = array( + 'body' => $request, + 'headers' => array( + 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ), + 'Host' => $host, + 'User-Agent' => $akismet_ua, + ), + 'httpversion' => '1.0', + 'timeout' => 15 + ); + + $akismet_url = "http://{$http_host}/1.1/{$path}"; + $response = wp_remote_post( $akismet_url, $http_args ); + Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) ); + if ( is_wp_error( $response ) ) + return array( '', '' ); + + return array( $response['headers'], $response['body'] ); + } + + // given a response from an API call like check_key_status(), update the alert code options if an alert is present. + private static function update_alert( $response ) { + $code = $msg = null; + if ( isset( $response[0]['x-akismet-alert-code'] ) ) { + $code = $response[0]['x-akismet-alert-code']; + $msg = $response[0]['x-akismet-alert-msg']; + } + + // only call update_option() if the value has changed + if ( $code != get_option( 'akismet_alert_code' ) ) { + if ( ! $code ) { + delete_option( 'akismet_alert_code' ); + delete_option( 'akismet_alert_msg' ); + } + else { + update_option( 'akismet_alert_code', $code ); + update_option( 'akismet_alert_msg', $msg ); + } + } + } + + public static function load_form_js() { + // WP < 3.3 can't enqueue a script this late in the game and still have it appear in the footer. + // Once we drop support for everything pre-3.3, this can change back to a single enqueue call. + wp_register_script( 'akismet-form', AKISMET__PLUGIN_URL . '_inc/form.js', array(), AKISMET_VERSION, true ); + add_action( 'wp_footer', array( 'Akismet', 'print_form_js' ) ); + add_action( 'admin_footer', array( 'Akismet', 'print_form_js' ) ); + } + + public static function print_form_js() { + wp_print_scripts( 'akismet-form' ); + } + + public static function inject_ak_js( $fields ) { + echo '

'; + echo ''; + echo '

'; + } + + private static function bail_on_activation( $message, $deactivate = true ) { +?> + + + + + + +

+ + + $plugin ) { + if ( $plugin === $akismet ) { + $plugins[$i] = false; + $update = true; + } + } + + if ( $update ) { + update_option( 'active_plugins', array_filter( $plugins ) ); + } + } + exit; + } + + public static function view( $name, array $args = array() ) { + $args = apply_filters( 'akismet_view_arguments', $args, $name ); + + foreach ( $args AS $key => $val ) { + $$key = $val; + } + + load_plugin_textdomain( 'akismet' ); + + $file = AKISMET__PLUGIN_DIR . 'views/'. $name . '.php'; + + include( $file ); + } + + /** + * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() + * @static + */ + public static function plugin_activation() { + if ( version_compare( $GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<' ) ) { + load_plugin_textdomain( 'akismet' ); + + $message = ''.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' , 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).' '.sprintf(__('Please upgrade WordPress to a current version, or downgrade to version 2.4 of the Akismet plugin.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/'); + + Akismet::bail_on_activation( $message ); + } + } + + /** + * Removes all connection options + * @static + */ + public static function plugin_deactivation( ) { + //tidy up + } + + /** + * Essentially a copy of WP's build_query but one that doesn't expect pre-urlencoded values. + * + * @param array $args An array of key => value pairs + * @return string A string ready for use as a URL query string. + */ + public static function build_query( $args ) { + return _http_build_query( $args, '', '&' ); + } + + public static function log( $akismet_debug ) { + if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) + error_log( print_r( compact( 'akismet_debug' ), 1 ) ); //send message to debug.log when in debug mode + } +} \ No newline at end of file diff --git a/wp-content/plugins/akismet/index.php b/wp-content/plugins/akismet/index.php new file mode 100644 index 0000000..cf879a5 --- /dev/null +++ b/wp-content/plugins/akismet/index.php @@ -0,0 +1,2 @@ + + +

+ +
+ + spam > 0 ) : ?> + +
+ + + + + + +
    +
  • +

    + spam );?> + +
  • +
  • +

    + spam );?> + +
  • +
  • +

    + accuracy; ?>% + false_positives , 'akismet') + ), + number_format( $stat_totals['all']->missed_spam ), + number_format( $stat_totals['all']->false_positives ) + ); ?> +
  • +
+
+
+ + + + +
+ +
+
+
+

+

+
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
+

+ +

+
+
+

+

+
+ spam folder older than 15 days is deleted automatically.' , 'akismet'), admin_url( 'edit-comments.php?comment_status=spam' ) );?> +
+
+
+ +
+ +
+ + +
+ + + +
+
+
+
+
+
+
+
+
+
+

+

+
+ + + + + + + + + + + next_billing_date ) : ?> + + + + + + +
+ + account_name; ?> +
+ + status ) : + esc_html_e( 'Cancelled', 'akismet' ); + elseif ( 'suspended' == $akismet_user->status ) : + esc_html_e( 'Suspended', 'akismet' ); + elseif ( 'missing' == $akismet_user->status ) : + esc_html_e( 'Missing', 'akismet' ); + elseif ( 'no-sub' == $akismet_user->status ) : + esc_html_e( 'No Subscription Found', 'akismet' ); + else : + esc_html_e( 'Active', 'akismet' ); + endif; ?> +
+ + next_billing_date ); ?> +
+
+
+
+ ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?> +
+
+
+
+
+
+
+ + + +
+
\ No newline at end of file diff --git a/wp-content/plugins/akismet/views/get.php b/wp-content/plugins/akismet/views/get.php new file mode 100644 index 0000000..70727f6 --- /dev/null +++ b/wp-content/plugins/akismet/views/get.php @@ -0,0 +1,5 @@ +
+ + + +
\ No newline at end of file diff --git a/wp-content/plugins/akismet/views/notice.php b/wp-content/plugins/akismet/views/notice.php new file mode 100644 index 0000000..8a1411d --- /dev/null +++ b/wp-content/plugins/akismet/views/notice.php @@ -0,0 +1,102 @@ + +
+ +
+
+
A
+
+
+
+
+
+
Almost done - activate your account and say goodbye to comment spam', 'akismet');?>
+
+
+
+ +
+

+

+ +

+ +
+ +

upgrade WordPress to a current version, or downgrade to version 2.4 of the Akismet plugin.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?>

+ +
+

+

+

https://akismet.com/errors/' . $code . '' ); + + ?> +

+
+ +
+

+

gethostbynamel functions. Akismet cannot work correctly until this is fixed. Please contact your web host or firewall administrator and give them this information about Akismet’s system requirements.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?>

+
+ +
+

+

our guide about firewalls.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?>

+
+ +
+

+

update your payment details.', 'akismet'), 'https://akismet.com/account/'); ?>

+
+ +
+

+

Akismet account page to reactivate your subscription.', 'akismet'), 'https://akismet.com/account/'); ?>

+
+ +
+

+

Akismet support for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?>

+
+ +
+

+

contributing a token amount.', 'akismet'), 'https://akismet.com/account/upgrade/'); ?>

+
+ +
+

+

Akismet support for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?>

+
+ +
+

+

sign into your account and choose one. Please contact our support team with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/' ); ?>

+
+ +
+

+
+ +
+

+
+ +
+

+
+ +
+ +

+

upgrade to an Enterprise subscription. If you have any questions, please get in touch with our support team', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?>

+ +

+

upgrade to an Enterprise subscription, which covers an unlimited number of sites. Please contact our support team with any questions.', 'akismet'), 'https://akismet.com/account/upgrade/', 'https://akismet.com/contact/'); ?>

+ +
+ \ No newline at end of file diff --git a/wp-content/plugins/akismet/views/start.php b/wp-content/plugins/akismet/views/start.php new file mode 100644 index 0000000..692b8af --- /dev/null +++ b/wp-content/plugins/akismet/views/start.php @@ -0,0 +1,95 @@ +
status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) : + if ( $akismet_user->status == 'missing' ) :?> +

+
+
+ + user_email ); ?> +
+
+ + + + +
+
+status == 'cancelled' ) :?> +

+
+
+ + user_email ); ?> +
+
+ + + + +
+
+status == 'suspended' ) : ?> +

+
+ +

user_email ); ?>

+

+ +
+ +

+
+
+ + user_email ); ?> +
+
+ + + + +
+
+ +
+
+ +

+
+ __( 'Register a different email address' , 'akismet'), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?> +
+
+
+ +

+
+
+ + + + +
+
+ +

+
+
+ +

+
+ __( 'Get your API key' , 'akismet'), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?> +
+
+
+ +

+
+
+ + + + +
+
+
\ No newline at end of file diff --git a/wp-content/plugins/akismet/views/stats.php b/wp-content/plugins/akismet/views/stats.php new file mode 100644 index 0000000..1ca7661 --- /dev/null +++ b/wp-content/plugins/akismet/views/stats.php @@ -0,0 +1,4 @@ +
+

+ +
\ No newline at end of file diff --git a/wp-content/plugins/akismet/views/strict.php b/wp-content/plugins/akismet/views/strict.php new file mode 100644 index 0000000..3cf197c --- /dev/null +++ b/wp-content/plugins/akismet/views/strict.php @@ -0,0 +1,7 @@ + + +
+

+

+
+ \ No newline at end of file diff --git a/wp-content/plugins/akismet/wrapper.php b/wp-content/plugins/akismet/wrapper.php new file mode 100644 index 0000000..12641c7 --- /dev/null +++ b/wp-content/plugins/akismet/wrapper.php @@ -0,0 +1,293 @@ + $title, + 'content' => $elm_id, + 'options' => $options ); + + if ( is_callable( $callback ) ) + add_action( 'wpcf7_admin_footer', $callback ); + + return true; +} + +function wpcf7_tag_generators() { + global $wpcf7_tag_generators; + + $taggenerators = array(); + + foreach ( (array) $wpcf7_tag_generators as $name => $tg ) { + $taggenerators[$name] = array_merge( + (array) $tg['options'], + array( 'title' => $tg['title'], 'content' => $tg['content'] ) ); + } + + return $taggenerators; +} + +function wpcf7_save_contact_form( $post_id = -1 ) { + if ( -1 != $post_id ) { + $contact_form = wpcf7_contact_form( $post_id ); + } + + if ( empty( $contact_form ) ) { + $contact_form = WPCF7_ContactForm::get_template(); + } + + if ( isset( $_POST['wpcf7-title'] ) ) { + $contact_form->set_title( $_POST['wpcf7-title'] ); + } + + if ( isset( $_POST['wpcf7-locale'] ) ) { + $locale = trim( $_POST['wpcf7-locale'] ); + + if ( wpcf7_is_valid_locale( $locale ) ) { + $contact_form->locale = $locale; + } + } + + $properties = $contact_form->get_properties(); + + if ( isset( $_POST['wpcf7-form'] ) ) { + $properties['form'] = trim( $_POST['wpcf7-form'] ); + } + + $mail = $properties['mail']; + + if ( isset( $_POST['wpcf7-mail-subject'] ) ) { + $mail['subject'] = trim( $_POST['wpcf7-mail-subject'] ); + } + + if ( isset( $_POST['wpcf7-mail-sender'] ) ) { + $mail['sender'] = trim( $_POST['wpcf7-mail-sender'] ); + } + + if ( isset( $_POST['wpcf7-mail-body'] ) ) { + $mail['body'] = trim( $_POST['wpcf7-mail-body'] ); + } + + if ( isset( $_POST['wpcf7-mail-recipient'] ) ) { + $mail['recipient'] = trim( $_POST['wpcf7-mail-recipient'] ); + } + + if ( isset( $_POST['wpcf7-mail-additional-headers'] ) ) { + $mail['additional_headers'] = trim( $_POST['wpcf7-mail-additional-headers'] ); + } + + if ( isset( $_POST['wpcf7-mail-attachments'] ) ) { + $mail['attachments'] = trim( $_POST['wpcf7-mail-attachments'] ); + } + + $mail['use_html'] = ! empty( $_POST['wpcf7-mail-use-html'] ); + $mail['exclude_blank'] = ! empty( $_POST['wpcf7-mail-exclude-blank'] ); + + $properties['mail'] = $mail; + + $mail_2 = $properties['mail_2']; + + $mail_2['active'] = ! empty( $_POST['wpcf7-mail-2-active'] ); + + if ( isset( $_POST['wpcf7-mail-2-subject'] ) ) { + $mail_2['subject'] = trim( $_POST['wpcf7-mail-2-subject'] ); + } + + if ( isset( $_POST['wpcf7-mail-2-sender'] ) ) { + $mail_2['sender'] = trim( $_POST['wpcf7-mail-2-sender'] ); + } + + if ( isset( $_POST['wpcf7-mail-2-body'] ) ) { + $mail_2['body'] = trim( $_POST['wpcf7-mail-2-body'] ); + } + + if ( isset( $_POST['wpcf7-mail-2-recipient'] ) ) { + $mail_2['recipient'] = trim( $_POST['wpcf7-mail-2-recipient'] ); + } + + if ( isset( $_POST['wpcf7-mail-2-additional-headers'] ) ) { + $mail_2['additional_headers'] = trim( + $_POST['wpcf7-mail-2-additional-headers'] ); + } + + if ( isset( $_POST['wpcf7-mail-2-attachments'] ) ) { + $mail_2['attachments'] = trim( $_POST['wpcf7-mail-2-attachments'] ); + } + + $mail_2['use_html'] = ! empty( $_POST['wpcf7-mail-2-use-html'] ); + $mail_2['exclude_blank'] = ! empty( $_POST['wpcf7-mail-2-exclude-blank'] ); + + $properties['mail_2'] = $mail_2; + + foreach ( wpcf7_messages() as $key => $arr ) { + $field_name = 'wpcf7-message-' . strtr( $key, '_', '-' ); + + if ( isset( $_POST[$field_name] ) ) { + $properties['messages'][$key] = trim( $_POST[$field_name] ); + } + } + + if ( isset( $_POST['wpcf7-additional-settings'] ) ) { + $properties['additional_settings'] = trim( + $_POST['wpcf7-additional-settings'] ); + } + + $contact_form->set_properties( $properties ); + + do_action( 'wpcf7_save_contact_form', $contact_form ); + + return $contact_form->save(); +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/admin.php b/wp-content/plugins/contact-form-7/admin/admin.php new file mode 100644 index 0000000..7a75dd3 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/admin.php @@ -0,0 +1,453 @@ + ( -1 == $_POST['post_ID'] ) ? 'created' : 'saved', + 'post' => $id ); + + $redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) ); + wp_safe_redirect( $redirect_to ); + exit(); + } + + if ( 'copy' == $action ) { + $id = empty( $_POST['post_ID'] ) + ? absint( $_REQUEST['post'] ) + : absint( $_POST['post_ID'] ); + + check_admin_referer( 'wpcf7-copy-contact-form_' . $id ); + + if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) + wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) ); + + $query = array(); + + if ( $contact_form = wpcf7_contact_form( $id ) ) { + $new_contact_form = $contact_form->copy(); + $new_contact_form->save(); + + $query['post'] = $new_contact_form->id(); + $query['message'] = 'created'; + } + + $redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) ); + + wp_safe_redirect( $redirect_to ); + exit(); + } + + if ( 'delete' == $action ) { + if ( ! empty( $_POST['post_ID'] ) ) + check_admin_referer( 'wpcf7-delete-contact-form_' . $_POST['post_ID'] ); + elseif ( ! is_array( $_REQUEST['post'] ) ) + check_admin_referer( 'wpcf7-delete-contact-form_' . $_REQUEST['post'] ); + else + check_admin_referer( 'bulk-posts' ); + + $posts = empty( $_POST['post_ID'] ) + ? (array) $_REQUEST['post'] + : (array) $_POST['post_ID']; + + $deleted = 0; + + foreach ( $posts as $post ) { + $post = WPCF7_ContactForm::get_instance( $post ); + + if ( empty( $post ) ) + continue; + + if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id() ) ) + wp_die( __( 'You are not allowed to delete this item.', 'contact-form-7' ) ); + + if ( ! $post->delete() ) + wp_die( __( 'Error in deleting.', 'contact-form-7' ) ); + + $deleted += 1; + } + + $query = array(); + + if ( ! empty( $deleted ) ) + $query['message'] = 'deleted'; + + $redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) ); + + wp_safe_redirect( $redirect_to ); + exit(); + } + + $_GET['post'] = isset( $_GET['post'] ) ? $_GET['post'] : ''; + + $post = null; + + if ( 'wpcf7-new' == $plugin_page && isset( $_GET['locale'] ) ) { + $post = WPCF7_ContactForm::get_template( array( + 'locale' => $_GET['locale'] ) ); + } elseif ( ! empty( $_GET['post'] ) ) { + $post = WPCF7_ContactForm::get_instance( $_GET['post'] ); + } + + if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) { + wpcf7_add_meta_boxes( $post->id() ); + + } else { + $current_screen = get_current_screen(); + + if ( ! class_exists( 'WPCF7_Contact_Form_List_Table' ) ) + require_once WPCF7_PLUGIN_DIR . '/admin/includes/class-contact-forms-list-table.php'; + + add_filter( 'manage_' . $current_screen->id . '_columns', + array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ) ); + + add_screen_option( 'per_page', array( + 'label' => __( 'Contact Forms', 'contact-form-7' ), + 'default' => 20, + 'option' => 'cfseven_contact_forms_per_page' ) ); + } +} + +add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_scripts' ); + +function wpcf7_admin_enqueue_scripts( $hook_suffix ) { + if ( false === strpos( $hook_suffix, 'wpcf7' ) ) + return; + + wp_enqueue_style( 'contact-form-7-admin', + wpcf7_plugin_url( 'admin/css/styles.css' ), + array(), WPCF7_VERSION, 'all' ); + + if ( wpcf7_is_rtl() ) { + wp_enqueue_style( 'contact-form-7-admin-rtl', + wpcf7_plugin_url( 'admin/css/styles-rtl.css' ), + array(), WPCF7_VERSION, 'all' ); + } + + wp_enqueue_script( 'wpcf7-admin-taggenerator', + wpcf7_plugin_url( 'admin/js/taggenerator.js' ), + array( 'jquery' ), WPCF7_VERSION, true ); + + wp_enqueue_script( 'wpcf7-admin', + wpcf7_plugin_url( 'admin/js/scripts.js' ), + array( 'jquery', 'postbox', 'wpcf7-admin-taggenerator' ), + WPCF7_VERSION, true ); + + $current_screen = get_current_screen(); + + wp_localize_script( 'wpcf7-admin', '_wpcf7', array( + 'screenId' => $current_screen->id, + 'generateTag' => __( 'Generate Tag', 'contact-form-7' ), + 'pluginUrl' => wpcf7_plugin_url(), + 'tagGenerators' => wpcf7_tag_generators() ) ); +} + +function wpcf7_admin_management_page() { + if ( $post = wpcf7_get_current_contact_form() ) { + $post_id = $post->initial() ? -1 : $post->id(); + + require_once WPCF7_PLUGIN_DIR . '/admin/includes/meta-boxes.php'; + require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php'; + return; + } + + $list_table = new WPCF7_Contact_Form_List_Table(); + $list_table->prepare_items(); + +?> +
+ +

' . esc_html( __( 'Add New', 'contact-form-7' ) ) . ''; + + if ( ! empty( $_REQUEST['s'] ) ) { + echo sprintf( '' + . __( 'Search results for “%s”', 'contact-form-7' ) + . '', esc_html( $_REQUEST['s'] ) ); + } +?>

+ + + +
+ + search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?> + display(); ?> +
+ +
+ +
+ +

+ + + +

+

+ + +

+
+ + + +
+
+ 'wpcf7-mail-2', + 'name' => 'mail_2', + 'use' => __( 'Use mail (2)', 'contact-form-7' ) ) ); + + add_meta_box( 'messagesdiv', __( 'Messages', 'contact-form-7' ), + 'wpcf7_messages_meta_box', null, 'messages', 'core' ); + + add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'contact-form-7' ), + 'wpcf7_additional_settings_meta_box', null, 'additional_settings', 'core' ); + + do_action( 'wpcf7_add_meta_boxes', $post_id ); +} + +/* Misc */ + +add_action( 'wpcf7_admin_notices', 'wpcf7_admin_updated_message' ); + +function wpcf7_admin_updated_message() { + if ( empty( $_REQUEST['message'] ) ) + return; + + if ( 'created' == $_REQUEST['message'] ) + $updated_message = esc_html( __( 'Contact form created.', 'contact-form-7' ) ); + elseif ( 'saved' == $_REQUEST['message'] ) + $updated_message = esc_html( __( 'Contact form saved.', 'contact-form-7' ) ); + elseif ( 'deleted' == $_REQUEST['message'] ) + $updated_message = esc_html( __( 'Contact form deleted.', 'contact-form-7' ) ); + + if ( empty( $updated_message ) ) + return; + +?> +

+' + . esc_html( __( 'Settings', 'contact-form-7' ) ) . ''; + + array_unshift( $links, $settings_link ); + + return $links; +} + +add_action( 'wpcf7_admin_notices', 'wpcf7_cf7com_links', 9 ); + +function wpcf7_cf7com_links() { + $links = ''; + + echo apply_filters( 'wpcf7_cf7com_links', $links ); +} + +add_action( 'admin_notices', 'wpcf7_old_wp_version_error', 9 ); + +function wpcf7_old_wp_version_error() { + global $plugin_page; + + if ( 'wpcf7' != substr( $plugin_page, 0, 5 ) ) { + return; + } + + $wp_version = get_bloginfo( 'version' ); + + if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) ) + return; + +?> +
+

Contact Form 7 %1$s requires WordPress %2$s or higher. Please update WordPress first.', 'contact-form-7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) ); ?>

+
+ +
+ + + +
+
+
+

+

+

+
+ +
+

+
    +
  • +
  • +
  • +
  • +
+
+ +
+

+
    +
  • +
  • +
  • +
  • +
+
+
+
+
+ \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/css/styles-rtl.css b/wp-content/plugins/contact-form-7/admin/css/styles-rtl.css new file mode 100644 index 0000000..6a62300 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/css/styles-rtl.css @@ -0,0 +1,21 @@ +div.save-contact-form { + direction: rtl; +} + +div.actions-link { + right: auto; + left: 0; +} + +div.tg-pane table caption { + text-align: right; +} + +div.tg-dropdown { + left: auto; + right: 0; +} + +div.wrap div.cf7com-links { + text-align: left; +} \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/css/styles.css b/wp-content/plugins/contact-form-7/admin/css/styles.css new file mode 100644 index 0000000..b1aaecd --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/css/styles.css @@ -0,0 +1,263 @@ +#icon-wpcf7 { + background: transparent url(../images/screen-icon.png) no-repeat 2px 1px; +} + +div.wrap div.cf7com-links { + text-align: right; + font-size: .9em; + margin: -20px 1em 1em 0; +} + +div.wrap div.cf7com-links a { + text-decoration: none; + font-weight: bold; +} + +#titlediv { + margin-bottom: 20px; + position: relative; + border: 1px solid #c7c7c7; + padding: 6px; + background-color: #fff; +} + +div.save-contact-form { + padding: 1.4em 0 0 0; + text-align: right; +} + +div.actions-link { + position: absolute; + top: 0; + right: 0; + margin: 0; + padding: 6px; +} + +div.actions-link input { + padding: 0; + margin: 0; + border: none; + font-size: 11px; + cursor: pointer; + background: inherit; +} + +div.actions-link input.copy { + color: #006505; +} + +div.actions-link input.delete { + color: #bc0b0b; +} + +input#wpcf7-title { + color: #5f5f5f; + border: none; + font-weight: bold; + font-size: 1.5em; + cursor: pointer; + background-color: transparent; + box-shadow: none; + width: 80%; +} + +input#wpcf7-title.focus { + color: #3f3f3f; + border: 1px solid #aaa; + cursor: text; + background-color: transparent; + box-shadow: inset 0 1px 2px rgba(0,0,0,0.07); +} + +input#wpcf7-title.mouseover { + background-color: #ffffdd; +} + +p.tagcode { + color: #333; + margin: 2ex 0 1ex 0; +} + +input#contact-form-anchor-text, input#contact-form-anchor-text-old { + width: 100%; +} + +.postbox .half, .postbox .half-left, .postbox .half-right { + float: left; + width: 50%; +} + +.postbox .half-right > * { + margin-left: 10px; +} + +@media only screen and (max-width: 768px) { + .postbox .half, .postbox .half-left, .postbox .half-right { + width: 100%; + } + + .postbox .half-right { + margin-top: 1em; + } + + .postbox .half-right > * { + margin-left: inherit; + } +} + +.postbox .mail-field, .postbox .message-field { + margin-top: 6px; + margin-bottom: 8px; +} + +.postbox .mail-field label, .postbox .message-field label { + line-height: 1.4em; +} + +div.pseudo-hr { + border-bottom: 1px solid transparent; + margin: 8px 0; +} + +input, textarea { + border: 1px solid #dfdfdf; +} + +input.wide { + width: 100%; +} + +textarea { + width: 100%; +} + +label.disabled { + color: #777; +} + +#messagesdiv div.inside { + height: 28em; + overflow: auto; +} + +div.tag-generator { + position: relative; + background: transparent; + padding: 0 0 5px 1px; +} + +div.tg-pane { + border: 1px solid #e1e1e1; + background: #f7f7f7; + margin: 1ex 0 0 0; + padding: 10px; + line-height: 140%; +} + +div.tg-pane table { + width: 100%; + margin: 0 0 0.7em 0; +} + +div.tg-pane table caption { + text-align: left; + padding: 0 0 0.2em 0; + font-weight: bolder; + color: #777; +} + +div.tg-pane table code { + background-color: inherit; +} + +div.tg-pane table td { + vertical-align: top; + width: 50%; + border: none; + padding: 2px 0; +} + +div.tg-pane input.tag, div.tg-pane input.mail-tag { + width: 100%; + font-size: 90%; +} + +div.tg-pane input.mail-tag { + width: 65%; +} + +div.tg-mail-tag { + margin-top: 2.4em; + text-align: right; +} + +div.tg-pane input.tg-name { + border-color: #555; +} + +div.tg-pane input.oneline { + width: 94%; + font-size: smaller; + -moz-box-sizing: border-box; +} + +div.tg-pane textarea { + width: 94%; + height: 100px; + font-size: smaller; +} + +div.tg-pane div.tg-tag { + margin: .4em 0; +} + +div.tg-dropdown { + position: absolute; + top: 26px; + left: 0; + z-index: 10; + border: 1px solid #ddd; +} + +span.tg-closebutton { + color: #777; + font: bold 18px monospace; + padding: 1px 4px; + cursor: pointer; +} + +div.tg-panetitle { + font-weight: bold; + font-size: 1.5em; + margin: 0 0 .5em; + color: #5f5f5f; +} + +.fixed .column-title { + width: 32%; +} + +input.shortcode-in-list-table { + width: 100%; + font-size: 90%; +} + +input[readonly].code { + background: #f3f3f3; + color: #3f3f3f; +} + +/* welcome panel */ +.welcome-panel p.message { + line-height: 1.4em; + margin-right: 25px; +} + +.welcome-panel li { + margin-bottom: 12px; +} + +.welcome-panel-close { + z-index: 2; +} \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/edit-contact-form.php b/wp-content/plugins/contact-form-7/admin/edit-contact-form.php new file mode 100644 index 0000000..6d1a6d9 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/edit-contact-form.php @@ -0,0 +1,117 @@ +
+ +

initial() ) { + echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) ); + } else { + echo esc_html( __( 'Edit Contact Form', 'contact-form-7' ) ); + + echo ' ' . esc_html( __( 'Add New', 'contact-form-7' ) ) . ''; + } +?>

+ + + +
+ + + +
> + + + + + + +
+ +
+ /> + + initial() ) : ?> +

+
+ + +

+ + + + + +
+ +
+ + + initial() ) : ?> + + +
+ + +
+ +
+ + + +
+ + diff --git a/wp-content/plugins/contact-form-7/admin/images/dropdown.gif b/wp-content/plugins/contact-form-7/admin/images/dropdown.gif new file mode 100644 index 0000000..a342dfd Binary files /dev/null and b/wp-content/plugins/contact-form-7/admin/images/dropdown.gif differ diff --git a/wp-content/plugins/contact-form-7/admin/images/fade-butt.png b/wp-content/plugins/contact-form-7/admin/images/fade-butt.png new file mode 100644 index 0000000..42f08b7 Binary files /dev/null and b/wp-content/plugins/contact-form-7/admin/images/fade-butt.png differ diff --git a/wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php b/wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php new file mode 100644 index 0000000..34b532a --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php @@ -0,0 +1,173 @@ + '', + 'title' => __( 'Title', 'contact-form-7' ), + 'shortcode' => __( 'Shortcode', 'contact-form-7' ), + 'author' => __( 'Author', 'contact-form-7' ), + 'date' => __( 'Date', 'contact-form-7' ) ); + + return $columns; + } + + function __construct() { + parent::__construct( array( + 'singular' => 'post', + 'plural' => 'posts', + 'ajax' => false ) ); + } + + function prepare_items() { + $current_screen = get_current_screen(); + $per_page = $this->get_items_per_page( 'cfseven_contact_forms_per_page' ); + + $this->_column_headers = $this->get_column_info(); + + $args = array( + 'posts_per_page' => $per_page, + 'orderby' => 'title', + 'order' => 'ASC', + 'offset' => ( $this->get_pagenum() - 1 ) * $per_page ); + + if ( ! empty( $_REQUEST['s'] ) ) + $args['s'] = $_REQUEST['s']; + + if ( ! empty( $_REQUEST['orderby'] ) ) { + if ( 'title' == $_REQUEST['orderby'] ) + $args['orderby'] = 'title'; + elseif ( 'author' == $_REQUEST['orderby'] ) + $args['orderby'] = 'author'; + elseif ( 'date' == $_REQUEST['orderby'] ) + $args['orderby'] = 'date'; + } + + if ( ! empty( $_REQUEST['order'] ) ) { + if ( 'asc' == strtolower( $_REQUEST['order'] ) ) + $args['order'] = 'ASC'; + elseif ( 'desc' == strtolower( $_REQUEST['order'] ) ) + $args['order'] = 'DESC'; + } + + $this->items = WPCF7_ContactForm::find( $args ); + + $total_items = WPCF7_ContactForm::count(); + $total_pages = ceil( $total_items / $per_page ); + + $this->set_pagination_args( array( + 'total_items' => $total_items, + 'total_pages' => $total_pages, + 'per_page' => $per_page ) ); + } + + function get_columns() { + return get_column_headers( get_current_screen() ); + } + + function get_sortable_columns() { + $columns = array( + 'title' => array( 'title', true ), + 'author' => array( 'author', false ), + 'date' => array( 'date', false ) ); + + return $columns; + } + + function get_bulk_actions() { + $actions = array( + 'delete' => __( 'Delete', 'contact-form-7' ) ); + + return $actions; + } + + function column_default( $item, $column_name ) { + return ''; + } + + function column_cb( $item ) { + return sprintf( + '', + $this->_args['singular'], + $item->id() ); + } + + function column_title( $item ) { + $url = admin_url( 'admin.php?page=wpcf7&post=' . absint( $item->id() ) ); + $edit_link = add_query_arg( array( 'action' => 'edit' ), $url ); + + $actions = array( + 'edit' => '' . __( 'Edit', 'contact-form-7' ) . '' ); + + if ( current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) { + $copy_link = wp_nonce_url( + add_query_arg( array( 'action' => 'copy' ), $url ), + 'wpcf7-copy-contact-form_' . absint( $item->id() ) ); + + $actions = array_merge( $actions, array( + 'copy' => '' . __( 'Copy', 'contact-form-7' ) . '' ) ); + } + + $a = sprintf( '%3$s', + $edit_link, + esc_attr( sprintf( __( 'Edit “%s”', 'contact-form-7' ), + $item->title() ) ), + esc_html( $item->title() ) ); + + return '' . $a . ' ' . $this->row_actions( $actions ); + } + + function column_author( $item ) { + $post = get_post( $item->id() ); + + if ( ! $post ) + return; + + $author = get_userdata( $post->post_author ); + + return esc_html( $author->display_name ); + } + + function column_shortcode( $item ) { + $shortcodes = array( + sprintf( '[contact-form-7 id="%1$d" title="%2$s"]', + $item->id(), $item->title() ) ); + + $output = ''; + + foreach ( $shortcodes as $shortcode ) { + $output .= "\n" . ''; + } + + return trim( $output ); + } + + function column_date( $item ) { + $post = get_post( $item->id() ); + + if ( ! $post ) + return; + + $t_time = mysql2date( __( 'Y/m/d g:i:s A', 'contact-form-7' ), $post->post_date, true ); + $m_time = $post->post_date; + $time = mysql2date( 'G', $post->post_date ) - get_option( 'gmt_offset' ) * 3600; + + $time_diff = time() - $time; + + if ( $time_diff > 0 && $time_diff < 24*60*60 ) + $h_time = sprintf( __( '%s ago', 'contact-form-7' ), human_time_diff( $time ) ); + else + $h_time = mysql2date( __( 'Y/m/d', 'contact-form-7' ), $m_time ); + + return '' . $h_time . ''; + } +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/includes/meta-boxes.php b/wp-content/plugins/contact-form-7/admin/includes/meta-boxes.php new file mode 100644 index 0000000..8edbae5 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/includes/meta-boxes.php @@ -0,0 +1,113 @@ + +
+ +
+ +
+ 'wpcf7-mail', + 'name' => 'mail', + 'use' => null ) ); + + $id = esc_attr( $args['id'] ); + $mail = $post->prop( $args['name'] ); + + if ( ! empty( $args['use'] ) ) : +?> +
+ /> + +
+
+ +
+ + +
+
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+ /> + +
+
+ +
+
+
+ +
+ +
+ /> + +
+
+ +
+
+ $arr ) : + $field_name = 'wpcf7-message-' . strtr( $key, '_', '-' ); + +?> +
+
+ +
+ + + \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/js/scripts.js b/wp-content/plugins/contact-form-7/admin/js/scripts.js new file mode 100644 index 0000000..37239fb --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/js/scripts.js @@ -0,0 +1,93 @@ +(function($) { + + $(function() { + try { + var welcomePanel = $('#welcome-panel'); + var updateWelcomePanel; + + updateWelcomePanel = function( visible ) { + $.post( ajaxurl, { + action: 'wpcf7-update-welcome-panel', + visible: visible, + welcomepanelnonce: $( '#welcomepanelnonce' ).val() + }); + }; + + $('a.welcome-panel-close', welcomePanel).click(function(event) { + event.preventDefault(); + welcomePanel.addClass('hidden'); + updateWelcomePanel( 0 ); + }); + + $('div.cf7com-links').insertAfter($('div.wrap h2:first')); + + $.extend($.tgPanes, _wpcf7.tagGenerators); + $('#taggenerator').tagGenerator(_wpcf7.generateTag, { + dropdownIconUrl: _wpcf7.pluginUrl + '/admin/images/dropdown.gif', + fadebuttImageUrl: _wpcf7.pluginUrl + '/admin/images/fade-butt.png' }); + + $('input#wpcf7-title:disabled').css({cursor: 'default'}); + + $('input#wpcf7-title').mouseover(function() { + $(this).not('.focus').addClass('mouseover'); + }); + + $('input#wpcf7-title').mouseout(function() { + $(this).removeClass('mouseover'); + }); + + $('input#wpcf7-title').focus(function() { + $(this).addClass('focus').removeClass('mouseover'); + }); + + $('input#wpcf7-title').blur(function() { + $(this).removeClass('focus'); + }); + + $('input#wpcf7-title').change(function() { + updateTag(); + }); + + updateTag(); + + $('.check-if-these-fields-are-active').each(function(index) { + if (! $(this).is(':checked')) + $(this).parent().siblings('.mail-fields').hide(); + + $(this).click(function() { + if ($(this).parent().siblings('.mail-fields').is(':hidden') + && $(this).is(':checked')) { + $(this).parent().siblings('.mail-fields').slideDown('fast'); + } else if ($(this).parent().siblings('.mail-fields').is(':visible') + && $(this).not(':checked')) { + $(this).parent().siblings('.mail-fields').slideUp('fast'); + } + }); + }); + + postboxes.add_postbox_toggles(_wpcf7.screenId); + + } catch (e) { + } + }); + + function updateTag() { + var title = $('input#wpcf7-title').val(); + + if (title) + title = title.replace(/["'\[\]]/g, ''); + + $('input#wpcf7-title').val(title); + var postId = $('input#post_ID').val(); + var tag = '[contact-form-7 id="' + postId + '" title="' + title + '"]'; + $('input#contact-form-anchor-text').val(tag); + + var oldId = $('input#wpcf7-id').val(); + + if (0 != oldId) { + var tagOld = '[contact-form ' + oldId + ' "' + title + '"]'; + $('input#contact-form-anchor-text-old').val(tagOld).parent('p.tagcode').show(); + } + } + +})(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/admin/js/taggenerator.js b/wp-content/plugins/contact-form-7/admin/js/taggenerator.js new file mode 100644 index 0000000..1750467 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/js/taggenerator.js @@ -0,0 +1,266 @@ +(function($) { + + $.fn.tagGenerator = function(title, options) { + var menu = $('
'); + + var selector = $('' + title + ''); + + selector.css({ + border: '1px solid #ddd', + padding: '2px 4px', + background: '#fff url(' + options.fadebuttImageUrl + ') repeat-x 0 0', + '-moz-border-radius': '3px', + '-khtml-border-radius': '3px', + '-webkit-border-radius': '3px', + 'border-radius': '3px' + }); + + selector.mouseover(function() { + $(this).css({ 'border-color': '#bbb' }); + }); + selector.mouseout(function() { + $(this).css({ 'border-color': '#ddd' }); + }); + selector.mousedown(function() { + $(this).css({ background: '#ddd' }); + }); + selector.mouseup(function() { + $(this).css({ + background: '#fff url(' + options.fadebuttImageUrl + ') repeat-x 0 0' + }); + }); + selector.click(function() { + dropdown.slideDown('fast'); + return false; + }); + $('body').click(function() { + dropdown.hide(); + }); + + if (options.dropdownIconUrl) { + var dropdown_icon = $(''); + dropdown_icon.css({ 'vertical-align': 'bottom' }); + selector.append(dropdown_icon); + } + + menu.append(selector); + + var pane = $('
'); + pane.hide(); + menu.append(pane); + + var dropdown = $('
'); + dropdown.hide(); + menu.append(dropdown); + + $.each($.tgPanes, function(i, n) { + var submenu = $('
' + $.tgPanes[i].title + '
'); + submenu.css({ + margin: 0, + padding: '0 4px', + 'line-height': '180%', + background: '#fff' + }); + submenu.mouseover(function() { + $(this).css({ background: '#d4f2f2' }); + }); + submenu.mouseout(function() { + $(this).css({ background: '#fff' }); + }); + submenu.click(function() { + dropdown.hide(); + pane.hide(); + pane.empty(); + $.tgPane(pane, i); + pane.slideDown('fast'); + return false; + }); + dropdown.append(submenu); + }); + + this.append(menu); + }; + + $.tgPane = function(pane, tagType) { + var closeButtonDiv = $('
'); + closeButtonDiv.css({ float: 'right' }); + + var closeButton = $('×'); + closeButton.click(function() { + pane.slideUp('fast').empty(); + }); + closeButtonDiv.append(closeButton); + + pane.append(closeButtonDiv); + + var paneTitle = $('
' + $.tgPanes[tagType].title + '
'); + pane.append(paneTitle); + + pane.append($('#' + $.tgPanes[tagType].content).clone().contents()); + + pane.find(':checkbox.exclusive').change(function() { + if ($(this).is(':checked')) + $(this).siblings(':checkbox.exclusive').removeAttr('checked'); + }); + + if ($.isFunction($.tgPanes[tagType].change)) + $.tgPanes[tagType].change(pane, tagType); + else + $.tgCreateTag(pane, tagType); + + pane.find(':input').change(function() { + if ($.isFunction($.tgPanes[tagType].change)) + $.tgPanes[tagType].change(pane, tagType); + else + $.tgCreateTag(pane, tagType); + }); + } + + $.tgCreateTag = function(pane, tagType) { + pane.find('input[name="name"]').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^0-9a-zA-Z:._-]/g, '').replace(/^[^a-zA-Z]+/, ''); + if ('' == val) { + var rand = Math.floor(Math.random() * 1000); + val = tagType + '-' + rand; + } + $(this).val(val); + }); + + pane.find(':input.numeric').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^0-9.-]/g, ''); + $(this).val(val); + }); + + pane.find(':input.idvalue').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^-0-9a-zA-Z_]/g, ''); + $(this).val(val); + }); + + pane.find(':input.classvalue').each(function(i) { + var val = $(this).val(); + val = $.map(val.split(' '), function(n) { + return n.replace(/[^-0-9a-zA-Z_]/g, ''); + }).join(' '); + val = $.trim(val.replace(/\s+/g, ' ')); + $(this).val(val); + }); + + pane.find(':input.color').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^0-9a-fA-F]/g, ''); + $(this).val(val); + }); + + pane.find(':input.filesize').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^0-9kKmMbB]/g, ''); + $(this).val(val); + }); + + pane.find(':input.filetype').each(function(i) { + var val = $(this).val(); + val = val.replace(/[^0-9a-zA-Z.,|\s]/g, ''); + $(this).val(val); + }); + + pane.find(':input.date').each(function(i) { + var val = $(this).val(); + if (! val.match(/^\d{4}-\d{2}-\d{2}$/)) // 'yyyy-mm-dd' ISO 8601 format + $(this).val(''); + }); + + pane.find(':input[name="values"]').each(function(i) { + var val = $(this).val(); + val = $.trim(val); + $(this).val(val); + }); + + pane.find('input.tag').each(function(i) { + var type = $(this).attr('name'); + + var scope = pane.find('.scope.' + type); + if (! scope.length) + scope = pane; + + if (pane.find(':input[name="required"]').is(':checked')) + type += '*'; + + var name = pane.find(':input[name="name"]').val(); + + var options = []; + + var size = scope.find(':input[name="size"]').val() || ''; + var maxlength = scope.find(':input[name="maxlength"]').val() || ''; + var cols = scope.find(':input[name="cols"]').val() || ''; + var rows = scope.find(':input[name="rows"]').val() || ''; + + if ((cols || rows) && maxlength) + options.push(cols + 'x' + rows + '/' + maxlength); + else if (cols || rows) + options.push(cols + 'x' + rows); + else if (size || maxlength) + options.push(size + '/' + maxlength); + + scope.find('input.option').not(':checkbox,:radio').each(function(i) { + var excluded = ['size', 'maxlength', 'cols', 'rows']; + + if (-1 < $.inArray($(this).attr('name'), excluded)) + return; + + var val = $(this).val(); + + if (! val) + return; + + if ($(this).hasClass('filetype')) + val = val.split(/[,|\s]+/).join('|'); + + if ($(this).hasClass('color')) + val = '#' + val; + + if ('class' == $(this).attr('name')) { + $.each(val.split(' '), function(i, n) { options.push('class:' + n) }); + } else { + options.push($(this).attr('name') + ':' + val); + } + }); + + scope.find('input:checkbox.option').each(function(i) { + if ($(this).is(':checked')) + options.push($(this).attr('name')); + }); + + options = (options.length > 0) ? ' ' + options.join(' ') : ''; + + var value = ''; + + if (scope.find(':input[name="values"]').val()) { + $.each(scope.find(':input[name="values"]').val().split("\n"), function(i, n) { + value += ' "' + n.replace(/["]/g, '"') + '"'; + }); + } + + if ($.tgPanes[tagType].nameless) + var tag = '[' + type + options + value + ']'; + else + var tag = name ? '[' + type + ' ' + name + options + value + ']' : ''; + + $(this).val(tag); + }); + + pane.find('input.mail-tag').each(function(i) { + var name = pane.find(':input[name="name"]').val(); + + var tag = name ? '[' + name + ']' : ''; + + $(this).val(tag); + }); + + } + + $.tgPanes = {}; + +})(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/images/ajax-loader.gif b/wp-content/plugins/contact-form-7/images/ajax-loader.gif new file mode 100644 index 0000000..f2cfafd Binary files /dev/null and b/wp-content/plugins/contact-form-7/images/ajax-loader.gif differ diff --git a/wp-content/plugins/contact-form-7/includes/capabilities.php b/wp-content/plugins/contact-form-7/includes/capabilities.php new file mode 100644 index 0000000..1faea9b --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/capabilities.php @@ -0,0 +1,22 @@ + WPCF7_ADMIN_READ_WRITE_CAPABILITY, + 'wpcf7_edit_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY, + 'wpcf7_read_contact_forms' => WPCF7_ADMIN_READ_CAPABILITY, + 'wpcf7_delete_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY ); + + $meta_caps = apply_filters( 'wpcf7_map_meta_cap', $meta_caps ); + + $caps = array_diff( $caps, array_keys( $meta_caps ) ); + + if ( isset( $meta_caps[$cap] ) ) + $caps[] = $meta_caps[$cap]; + + return $caps; +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/contact-form.php b/wp-content/plugins/contact-form-7/includes/contact-form.php new file mode 100644 index 0000000..10b2822 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/contact-form.php @@ -0,0 +1,921 @@ + array( + 'name' => __( 'Contact Forms', 'contact-form-7' ), + 'singular_name' => __( 'Contact Form', 'contact-form-7' ) ), + 'rewrite' => false, + 'query_var' => false ) ); + } + + public static function find( $args = '' ) { + $defaults = array( + 'post_status' => 'any', + 'posts_per_page' => -1, + 'offset' => 0, + 'orderby' => 'ID', + 'order' => 'ASC' ); + + $args = wp_parse_args( $args, $defaults ); + + $args['post_type'] = self::post_type; + + $q = new WP_Query(); + $posts = $q->query( $args ); + + self::$found_items = $q->found_posts; + + $objs = array(); + + foreach ( (array) $posts as $post ) + $objs[] = new self( $post ); + + return $objs; + } + + public static function get_template( $args = '' ) { + global $l10n; + + $defaults = array( 'locale' => null, 'title' => '' ); + $args = wp_parse_args( $args, $defaults ); + + $locale = $args['locale']; + $title = $args['title']; + + if ( $locale ) { + $mo_orig = $l10n['contact-form-7']; + wpcf7_load_textdomain( $locale ); + } + + self::$current = $contact_form = new self; + $contact_form->title = + ( $title ? $title : __( 'Untitled', 'contact-form-7' ) ); + $contact_form->locale = ( $locale ? $locale : get_locale() ); + + $properties = $contact_form->get_properties(); + + foreach ( $properties as $key => $value ) { + $properties[$key] = wpcf7_get_default_template( $key ); + } + + $contact_form->properties = $properties; + + $contact_form = apply_filters( 'wpcf7_contact_form_default_pack', + $contact_form, $args ); + + if ( isset( $mo_orig ) ) { + $l10n['contact-form-7'] = $mo_orig; + } + + return $contact_form; + } + + public static function get_instance( $post ) { + $post = get_post( $post ); + + if ( ! $post || self::post_type != get_post_type( $post ) ) { + return false; + } + + self::$current = $contact_form = new self( $post ); + + return $contact_form; + } + + private static function get_unit_tag( $id = 0 ) { + static $global_count = 0; + + $global_count += 1; + + if ( in_the_loop() ) { + $unit_tag = sprintf( 'wpcf7-f%1$d-p%2$d-o%3$d', + absint( $id ), get_the_ID(), $global_count ); + } else { + $unit_tag = sprintf( 'wpcf7-f%1$d-o%2$d', + absint( $id ), $global_count ); + } + + return $unit_tag; + } + + private function __construct( $post = null ) { + $post = get_post( $post ); + + if ( $post && self::post_type == get_post_type( $post ) ) { + $this->id = $post->ID; + $this->name = $post->post_name; + $this->title = $post->post_title; + $this->locale = get_post_meta( $post->ID, '_locale', true ); + + $properties = $this->get_properties(); + + foreach ( $properties as $key => $value ) { + if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) { + $properties[$key] = get_post_meta( $post->ID, '_' . $key, true ); + } elseif ( metadata_exists( 'post', $post->ID, $key ) ) { + $properties[$key] = get_post_meta( $post->ID, $key, true ); + } + } + + $this->properties = $properties; + $this->upgrade(); + } + + do_action( 'wpcf7_contact_form', $this ); + } + + public function __get( $name ) { + $message = __( '%1$s property of a WPCF7_ContactForm object is no longer accessible. Use %2$s method instead.', 'contact-form-7' ); + + if ( 'id' == $name ) { + if ( WP_DEBUG ) { + trigger_error( sprintf( $message, 'id', 'id()' ) ); + } + + return $this->id; + } elseif ( 'title' == $name ) { + if ( WP_DEBUG ) { + trigger_error( sprintf( $message, 'title', 'title()' ) ); + } + + return $this->title; + } elseif ( $prop = $this->prop( $name ) ) { + if ( WP_DEBUG ) { + trigger_error( + sprintf( $message, $name, 'prop(\'' . $name . '\')' ) ); + } + + return $prop; + } + } + + public function initial() { + return empty( $this->id ); + } + + public function prop( $name ) { + $props = $this->get_properties(); + return isset( $props[$name] ) ? $props[$name] : null; + } + + public function get_properties() { + $properties = (array) $this->properties; + + $properties = wp_parse_args( $properties, array( + 'form' => '', + 'mail' => array(), + 'mail_2' => array(), + 'messages' => array(), + 'additional_settings' => '' ) ); + + $properties = (array) apply_filters( 'wpcf7_contact_form_properties', + $properties, $this ); + + return $properties; + } + + public function set_properties( $properties ) { + $defaults = $this->get_properties(); + + $properties = wp_parse_args( $properties, $defaults ); + $properties = array_intersect_key( $properties, $defaults ); + + $this->properties = $properties; + } + + public function id() { + return $this->id; + } + + public function name() { + return $this->name; + } + + public function title() { + return $this->title; + } + + public function set_title( $title ) { + $title = trim( $title ); + + if ( '' === $title ) { + $title = __( 'Untitled', 'contact-form-7' ); + } + + $this->title = $title; + } + + // Return true if this form is the same one as currently POSTed. + public function is_posted() { + if ( ! WPCF7_Submission::get_instance() ) { + return false; + } + + if ( empty( $_POST['_wpcf7_unit_tag'] ) ) { + return false; + } + + return $this->unit_tag == $_POST['_wpcf7_unit_tag']; + } + + /* Generating Form HTML */ + + public function form_html( $atts = array() ) { + $atts = wp_parse_args( $atts, array( + 'html_id' => '', + 'html_name' => '', + 'html_class' => '', + 'output' => 'form' ) ); + + if ( 'raw_form' == $atts['output'] ) { + return '
'
+				. esc_html( $this->prop( 'form' ) ) . '
'; + } + + $this->unit_tag = self::get_unit_tag( $this->id ); + + $html = sprintf( '
', wpcf7_format_atts( array( + 'class' => 'wpcf7', + 'id' => $this->unit_tag, + ( get_option( 'html_type' ) == 'text/html' ) ? 'lang' : 'xml:lang' + => str_replace( '_', '-', $this->locale ), + 'dir' => wpcf7_is_rtl( $this->locale ) ? 'rtl' : 'ltr' ) ) ) . "\n"; + + $html .= $this->screen_reader_response() . "\n"; + + $url = wpcf7_get_request_uri(); + + if ( $frag = strstr( $url, '#' ) ) + $url = substr( $url, 0, -strlen( $frag ) ); + + $url .= '#' . $this->unit_tag; + + $url = apply_filters( 'wpcf7_form_action_url', $url ); + + $id_attr = apply_filters( 'wpcf7_form_id_attr', + preg_replace( '/[^A-Za-z0-9:._-]/', '', $atts['html_id'] ) ); + + $name_attr = apply_filters( 'wpcf7_form_name_attr', + preg_replace( '/[^A-Za-z0-9:._-]/', '', $atts['html_name'] ) ); + + $class = 'wpcf7-form'; + + if ( $this->is_posted() ) { + $submission = WPCF7_Submission::get_instance(); + + if ( $submission->is( 'validation_failed' ) ) { + $class .= ' invalid'; + } elseif ( $submission->is( 'spam' ) ) { + $class .= ' spam'; + } elseif ( $submission->is( 'mail_sent' ) ) { + $class .= ' sent'; + } elseif ( $submission->is( 'mail_failed' ) ) { + $class .= ' failed'; + } + } + + if ( $atts['html_class'] ) { + $class .= ' ' . $atts['html_class']; + } + + if ( $this->in_demo_mode() ) { + $class .= ' demo'; + } + + $class = explode( ' ', $class ); + $class = array_map( 'sanitize_html_class', $class ); + $class = array_filter( $class ); + $class = array_unique( $class ); + $class = implode( ' ', $class ); + $class = apply_filters( 'wpcf7_form_class_attr', $class ); + + $enctype = apply_filters( 'wpcf7_form_enctype', '' ); + + $novalidate = apply_filters( 'wpcf7_form_novalidate', wpcf7_support_html5() ); + + $html .= sprintf( '
', + wpcf7_format_atts( array( + 'action' => esc_url( $url ), + 'method' => 'post', + 'id' => $id_attr, + 'name' => $name_attr, + 'class' => $class, + 'enctype' => wpcf7_enctype_value( $enctype ), + 'novalidate' => $novalidate ? 'novalidate' : '' ) ) ) . "\n"; + + $html .= $this->form_hidden_fields(); + $html .= $this->form_elements(); + + if ( ! $this->responses_count ) { + $html .= $this->form_response_output(); + } + + $html .= '
'; + $html .= '
'; + + return $html; + } + + private function form_hidden_fields() { + $hidden_fields = array( + '_wpcf7' => $this->id, + '_wpcf7_version' => WPCF7_VERSION, + '_wpcf7_locale' => $this->locale, + '_wpcf7_unit_tag' => $this->unit_tag ); + + if ( WPCF7_VERIFY_NONCE ) + $hidden_fields['_wpnonce'] = wpcf7_create_nonce( $this->id ); + + $content = ''; + + foreach ( $hidden_fields as $name => $value ) { + $content .= '' . "\n"; + } + + return '
' . "\n" . $content . '
' . "\n"; + } + + public function form_response_output() { + $class = 'wpcf7-response-output'; + $role = ''; + $content = ''; + + if ( $this->is_posted() ) { // Post response output for non-AJAX + $role = 'alert'; + + $submission = WPCF7_Submission::get_instance(); + $content = $submission->get_response(); + + if ( $submission->is( 'validation_failed' ) ) { + $class .= ' wpcf7-validation-errors'; + } elseif ( $submission->is( 'spam' ) ) { + $class .= ' wpcf7-spam-blocked'; + } elseif ( $submission->is( 'mail_sent' ) ) { + $class .= ' wpcf7-mail-sent-ok'; + } elseif ( $submission->is( 'mail_failed' ) ) { + $class .= ' wpcf7-mail-sent-ng'; + } + } else { + $class .= ' wpcf7-display-none'; + } + + $atts = array( + 'class' => trim( $class ), + 'role' => trim( $role ) ); + + $atts = wpcf7_format_atts( $atts ); + + $output = sprintf( '
%2$s
', + $atts, esc_html( $content ) ); + + $output = apply_filters( 'wpcf7_form_response_output', + $output, $class, $content, $this ); + + $this->responses_count += 1; + + return $output; + } + + public function screen_reader_response() { + $class = 'screen-reader-response'; + $role = ''; + $content = ''; + + if ( $this->is_posted() ) { // Post response output for non-AJAX + $role = 'alert'; + + $submission = WPCF7_Submission::get_instance(); + + if ( $response = $submission->get_response() ) { + $content = esc_html( $response ); + } + + if ( $invalid_fields = $submission->get_invalid_fields() ) { + $content .= "\n" . '
    ' . "\n"; + + foreach ( (array) $invalid_fields as $name => $field ) { + if ( $field['idref'] ) { + $link = sprintf( '%2$s', + esc_attr( $field['idref'] ), + esc_html( $field['reason'] ) ); + $content .= sprintf( '
  • %s
  • ', $link ); + } else { + $content .= sprintf( '
  • %s
  • ', + esc_html( $field['reason'] ) ); + } + + $content .= "\n"; + } + + $content .= '
' . "\n"; + } + } + + $atts = array( + 'class' => trim( $class ), + 'role' => trim( $role ) ); + + $atts = wpcf7_format_atts( $atts ); + + $output = sprintf( '
%2$s
', + $atts, $content ); + + return $output; + } + + public function validation_error( $name ) { + $error = ''; + + if ( $this->is_posted() ) { + $submission = WPCF7_Submission::get_instance(); + + if ( $invalid_field = $submission->get_invalid_field( $name ) ) { + $error = trim( $invalid_field['reason'] ); + } + } + + if ( ! $error ) { + return $error; + } + + $error = sprintf( + '%s', + esc_html( $error ) ); + + return apply_filters( 'wpcf7_validation_error', $error, $name, $this ); + } + + /* Form Elements */ + + public function form_do_shortcode() { + $manager = WPCF7_ShortcodeManager::get_instance(); + $form = $this->prop( 'form' ); + + if ( WPCF7_AUTOP ) { + $form = $manager->normalize_shortcode( $form ); + $form = wpcf7_autop( $form ); + } + + $form = $manager->do_shortcode( $form ); + $this->scanned_form_tags = $manager->get_scanned_tags(); + + return $form; + } + + public function form_scan_shortcode( $cond = null ) { + $manager = WPCF7_ShortcodeManager::get_instance(); + + if ( ! empty( $this->scanned_form_tags ) ) { + $scanned = $this->scanned_form_tags; + } else { + $scanned = $manager->scan_shortcode( $this->prop( 'form' ) ); + $this->scanned_form_tags = $scanned; + } + + if ( empty( $scanned ) ) + return null; + + if ( ! is_array( $cond ) || empty( $cond ) ) + return $scanned; + + for ( $i = 0, $size = count( $scanned ); $i < $size; $i++ ) { + + if ( isset( $cond['type'] ) ) { + if ( is_string( $cond['type'] ) && ! empty( $cond['type'] ) ) { + if ( $scanned[$i]['type'] != $cond['type'] ) { + unset( $scanned[$i] ); + continue; + } + } elseif ( is_array( $cond['type'] ) ) { + if ( ! in_array( $scanned[$i]['type'], $cond['type'] ) ) { + unset( $scanned[$i] ); + continue; + } + } + } + + if ( isset( $cond['name'] ) ) { + if ( is_string( $cond['name'] ) && ! empty( $cond['name'] ) ) { + if ( $scanned[$i]['name'] != $cond['name'] ) { + unset ( $scanned[$i] ); + continue; + } + } elseif ( is_array( $cond['name'] ) ) { + if ( ! in_array( $scanned[$i]['name'], $cond['name'] ) ) { + unset( $scanned[$i] ); + continue; + } + } + } + } + + return array_values( $scanned ); + } + + public function form_elements() { + return apply_filters( 'wpcf7_form_elements', $this->form_do_shortcode() ); + } + + public function submit( $ajax = false ) { + $submission = WPCF7_Submission::get_instance( $this ); + + $result = array( + 'status' => $submission->get_status(), + 'message' => $submission->get_response(), + 'demo_mode' => $this->in_demo_mode() ); + + if ( $submission->is( 'validation_failed' ) ) { + $result['invalid_fields'] = $submission->get_invalid_fields(); + } + + if ( $submission->is( 'mail_sent' ) ) { + if ( $ajax ) { + $on_sent_ok = $this->additional_setting( 'on_sent_ok', false ); + + if ( ! empty( $on_sent_ok ) ) { + $result['scripts_on_sent_ok'] = array_map( + 'wpcf7_strip_quote', $on_sent_ok ); + } + } + } + + if ( $ajax ) { + $on_submit = $this->additional_setting( 'on_submit', false ); + + if ( ! empty( $on_submit ) ) { + $result['scripts_on_submit'] = array_map( + 'wpcf7_strip_quote', $on_submit ); + } + } + + do_action( 'wpcf7_submit', $this, $result ); + + return $result; + } + + /* Message */ + + public function message( $status, $filter = true ) { + $messages = $this->prop( 'messages' ); + $message = isset( $messages[$status] ) ? $messages[$status] : ''; + + if ( $filter ) { + $message = wpcf7_mail_replace_tags( $message, array( 'html' => true ) ); + $message = apply_filters( 'wpcf7_display_message', $message, $status ); + } + + return $message; + } + + /* Additional settings */ + + public function additional_setting( $name, $max = 1 ) { + $tmp_settings = (array) explode( "\n", $this->prop( 'additional_settings' ) ); + + $count = 0; + $values = array(); + + foreach ( $tmp_settings as $setting ) { + if ( preg_match('/^([a-zA-Z0-9_]+)[\t ]*:(.*)$/', $setting, $matches ) ) { + if ( $matches[1] != $name ) + continue; + + if ( ! $max || $count < (int) $max ) { + $values[] = trim( $matches[2] ); + $count += 1; + } + } + } + + return $values; + } + + public function is_true( $name ) { + $settings = $this->additional_setting( $name, false ); + + foreach ( $settings as $setting ) { + if ( in_array( $setting, array( 'on', 'true', '1' ) ) ) + return true; + } + + return false; + } + + public function in_demo_mode() { + return $this->is_true( 'demo_mode' ); + } + + /* Upgrade */ + + private function upgrade() { + $mail = $this->prop( 'mail' ); + + if ( is_array( $mail ) && ! isset( $mail['recipient'] ) ) { + $mail['recipient'] = get_option( 'admin_email' ); + } + + $this->properties['mail'] = $mail; + + $messages = $this->prop( 'messages' ); + + if ( is_array( $messages ) ) { + foreach ( wpcf7_messages() as $key => $arr ) { + if ( ! isset( $messages[$key] ) ) { + $messages[$key] = $arr['default']; + } + } + } + + $this->properties['messages'] = $messages; + } + + /* Save */ + + public function save() { + $props = $this->get_properties(); + + $post_content = implode( "\n", wpcf7_array_flatten( $props ) ); + + if ( $this->initial() ) { + $post_id = wp_insert_post( array( + 'post_type' => self::post_type, + 'post_status' => 'publish', + 'post_title' => $this->title, + 'post_content' => trim( $post_content ) ) ); + } else { + $post_id = wp_update_post( array( + 'ID' => (int) $this->id, + 'post_status' => 'publish', + 'post_title' => $this->title, + 'post_content' => trim( $post_content ) ) ); + } + + if ( $post_id ) { + foreach ( $props as $prop => $value ) { + update_post_meta( $post_id, '_' . $prop, + wpcf7_normalize_newline_deep( $value ) ); + } + + if ( wpcf7_is_valid_locale( $this->locale ) ) { + update_post_meta( $post_id, '_locale', $this->locale ); + } + + if ( $this->initial() ) { + $this->id = $post_id; + do_action( 'wpcf7_after_create', $this ); + } else { + do_action( 'wpcf7_after_update', $this ); + } + + do_action( 'wpcf7_after_save', $this ); + } + + return $post_id; + } + + public function copy() { + $new = new self; + $new->title = $this->title . '_copy'; + $new->locale = $this->locale; + $new->properties = $this->properties; + + return apply_filters( 'wpcf7_copy', $new, $this ); + } + + public function delete() { + if ( $this->initial() ) + return; + + if ( wp_delete_post( $this->id, true ) ) { + $this->id = 0; + return true; + } + + return false; + } +} + +function wpcf7_contact_form( $id ) { + return WPCF7_ContactForm::get_instance( $id ); +} + +function wpcf7_get_contact_form_by_old_id( $old_id ) { + global $wpdb; + + $q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'" + . $wpdb->prepare( " AND meta_value = %d", $old_id ); + + if ( $new_id = $wpdb->get_var( $q ) ) + return wpcf7_contact_form( $new_id ); +} + +function wpcf7_get_contact_form_by_title( $title ) { + $page = get_page_by_title( $title, OBJECT, WPCF7_ContactForm::post_type ); + + if ( $page ) + return wpcf7_contact_form( $page->ID ); + + return null; +} + +function wpcf7_get_current_contact_form() { + if ( $current = WPCF7_ContactForm::get_current() ) { + return $current; + } +} + +function wpcf7_is_posted() { + if ( ! $contact_form = wpcf7_get_current_contact_form() ) + return false; + + return $contact_form->is_posted(); +} + +function wpcf7_get_hangover( $name, $default = null ) { + if ( ! wpcf7_is_posted() ) { + return $default; + } + + $submission = WPCF7_Submission::get_instance(); + + if ( ! $submission || $submission->is( 'mail_sent' ) ) { + return $default; + } + + return isset( $_POST[$name] ) ? wp_unslash( $_POST[$name] ) : $default; +} + +function wpcf7_get_validation_error( $name ) { + if ( ! $contact_form = wpcf7_get_current_contact_form() ) + return ''; + + return $contact_form->validation_error( $name ); +} + +function wpcf7_get_message( $status ) { + if ( ! $contact_form = wpcf7_get_current_contact_form() ) + return ''; + + return $contact_form->message( $status ); +} + +function wpcf7_scan_shortcode( $cond = null ) { + if ( ! $contact_form = wpcf7_get_current_contact_form() ) + return null; + + return $contact_form->form_scan_shortcode( $cond ); +} + +function wpcf7_form_controls_class( $type, $default = '' ) { + $type = trim( $type ); + $default = array_filter( explode( ' ', $default ) ); + + $classes = array_merge( array( 'wpcf7-form-control' ), $default ); + + $typebase = rtrim( $type, '*' ); + $required = ( '*' == substr( $type, -1 ) ); + + $classes[] = 'wpcf7-' . $typebase; + + if ( $required ) + $classes[] = 'wpcf7-validates-as-required'; + + $classes = array_unique( $classes ); + + return implode( ' ', $classes ); +} + +function wpcf7_get_default_template( $prop = 'form' ) { + if ( 'form' == $prop ) + $template = wpcf7_default_form_template(); + elseif ( 'mail' == $prop ) + $template = wpcf7_default_mail_template(); + elseif ( 'mail_2' == $prop ) + $template = wpcf7_default_mail_2_template(); + elseif ( 'messages' == $prop ) + $template = wpcf7_default_messages_template(); + else + $template = null; + + return apply_filters( 'wpcf7_default_template', $template, $prop ); +} + +function wpcf7_default_form_template() { + $template = + '

' . __( 'Your Name', 'contact-form-7' ) . ' ' . __( '(required)', 'contact-form-7' ) . '
' . "\n" + . ' [text* your-name]

' . "\n\n" + . '

' . __( 'Your Email', 'contact-form-7' ) . ' ' . __( '(required)', 'contact-form-7' ) . '
' . "\n" + . ' [email* your-email]

' . "\n\n" + . '

' . __( 'Subject', 'contact-form-7' ) . '
' . "\n" + . ' [text your-subject]

' . "\n\n" + . '

' . __( 'Your Message', 'contact-form-7' ) . '
' . "\n" + . ' [textarea your-message]

' . "\n\n" + . '

[submit "' . __( 'Send', 'contact-form-7' ) . '"]

'; + + return $template; +} + +function wpcf7_default_mail_template() { + $subject = '[your-subject]'; + $sender = '[your-name] <[your-email]>'; + $body = sprintf( __( 'From: %s', 'contact-form-7' ), '[your-name] <[your-email]>' ) . "\n" + . sprintf( __( 'Subject: %s', 'contact-form-7' ), '[your-subject]' ) . "\n\n" + . __( 'Message Body:', 'contact-form-7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n" + . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ), + get_bloginfo( 'name' ), get_bloginfo( 'url' ) ); + $recipient = get_option( 'admin_email' ); + $additional_headers = ''; + $attachments = ''; + $use_html = 0; + $exclude_blank = 0; + return compact( 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html', 'exclude_blank' ); +} + +function wpcf7_default_mail_2_template() { + $active = false; + $subject = '[your-subject]'; + $sender = '[your-name] <[your-email]>'; + $body = __( 'Message Body:', 'contact-form-7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n" + . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ), + get_bloginfo( 'name' ), get_bloginfo( 'url' ) ); + $recipient = '[your-email]'; + $additional_headers = ''; + $attachments = ''; + $use_html = 0; + $exclude_blank = 0; + return compact( 'active', 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html', 'exclude_blank' ); +} + +function wpcf7_default_messages_template() { + $messages = array(); + + foreach ( wpcf7_messages() as $key => $arr ) { + $messages[$key] = $arr['default']; + } + + return $messages; +} + +function wpcf7_messages() { + $messages = array( + 'mail_sent_ok' => array( + 'description' => __( "Sender's message was sent successfully", 'contact-form-7' ), + 'default' => __( 'Your message was sent successfully. Thanks.', 'contact-form-7' ) + ), + + 'mail_sent_ng' => array( + 'description' => __( "Sender's message was failed to send", 'contact-form-7' ), + 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' ) + ), + + 'validation_error' => array( + 'description' => __( "Validation errors occurred", 'contact-form-7' ), + 'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'contact-form-7' ) + ), + + 'spam' => array( + 'description' => __( "Submission was referred to as spam", 'contact-form-7' ), + 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' ) + ), + + 'accept_terms' => array( + 'description' => __( "There are terms that the sender must accept", 'contact-form-7' ), + 'default' => __( 'Please accept the terms to proceed.', 'contact-form-7' ) + ), + + 'invalid_required' => array( + 'description' => __( "There is a field that the sender must fill in", 'contact-form-7' ), + 'default' => __( 'Please fill the required field.', 'contact-form-7' ) + ) + ); + + return apply_filters( 'wpcf7_messages', $messages ); +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/controller.php b/wp-content/plugins/contact-form-7/includes/controller.php new file mode 100644 index 0000000..14941d8 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/controller.php @@ -0,0 +1,266 @@ + false, + 'into' => '#' . $unit_tag, + 'captcha' => null ); + + $result = $contact_form->submit( true ); + + if ( ! empty( $result['message'] ) ) { + $items['message'] = $result['message']; + } + + if ( 'mail_sent' == $result['status'] ) { + $items['mailSent'] = true; + } + + if ( 'validation_failed' == $result['status'] ) { + $invalids = array(); + + foreach ( $result['invalid_fields'] as $name => $field ) { + $invalids[] = array( + 'into' => 'span.wpcf7-form-control-wrap.' + . sanitize_html_class( $name ), + 'message' => $field['reason'], + 'idref' => $field['idref'] ); + } + + $items['invalids'] = $invalids; + } + + if ( 'spam' == $result['status'] ) { + $items['spam'] = true; + } + + if ( ! empty( $result['scripts_on_sent_ok'] ) ) { + $items['onSentOk'] = $result['scripts_on_sent_ok']; + } + + if ( ! empty( $result['scripts_on_submit'] ) ) { + $items['onSubmit'] = $result['scripts_on_submit']; + } + + $items = apply_filters( 'wpcf7_ajax_json_echo', $items, $result ); + } + } + + $echo = json_encode( $items ); + + if ( wpcf7_is_xhr() ) { + @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); + echo $echo; + } else { + @header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) ); + echo ''; + } + + exit(); +} + +function wpcf7_is_xhr() { + if ( ! isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) ) + return false; + + return $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'; +} + +function wpcf7_submit_nonajax() { + if ( ! isset( $_POST['_wpcf7'] ) ) + return; + + if ( $contact_form = wpcf7_contact_form( (int) $_POST['_wpcf7'] ) ) { + $contact_form->submit(); + } +} + +add_filter( 'widget_text', 'wpcf7_widget_text_filter', 9 ); + +function wpcf7_widget_text_filter( $content ) { + if ( ! preg_match( '/\[[\r\n\t ]*contact-form(-7)?[\r\n\t ].*?\]/', $content ) ) + return $content; + + $content = do_shortcode( $content ); + + return $content; +} + +/* Shortcodes */ + +add_action( 'plugins_loaded', 'wpcf7_add_shortcodes' ); + +function wpcf7_add_shortcodes() { + add_shortcode( 'contact-form-7', 'wpcf7_contact_form_tag_func' ); + add_shortcode( 'contact-form', 'wpcf7_contact_form_tag_func' ); +} + +function wpcf7_contact_form_tag_func( $atts, $content = null, $code = '' ) { + if ( is_feed() ) + return '[contact-form-7]'; + + if ( 'contact-form-7' == $code ) { + $atts = shortcode_atts( array( + 'id' => 0, + 'title' => '', + 'html_id' => '', + 'html_name' => '', + 'html_class' => '', + 'output' => 'form' ), $atts ); + + $id = (int) $atts['id']; + $title = trim( $atts['title'] ); + + if ( ! $contact_form = wpcf7_contact_form( $id ) ) + $contact_form = wpcf7_get_contact_form_by_title( $title ); + + } else { + if ( is_string( $atts ) ) + $atts = explode( ' ', $atts, 2 ); + + $id = (int) array_shift( $atts ); + $contact_form = wpcf7_get_contact_form_by_old_id( $id ); + } + + if ( ! $contact_form ) + return '[contact-form-7 404 "Not Found"]'; + + return $contact_form->form_html( $atts ); +} + +add_action( 'wp_enqueue_scripts', 'wpcf7_do_enqueue_scripts' ); + +function wpcf7_do_enqueue_scripts() { + if ( wpcf7_load_js() ) { + wpcf7_enqueue_scripts(); + } + + if ( wpcf7_load_css() ) { + wpcf7_enqueue_styles(); + } +} + +function wpcf7_enqueue_scripts() { + // jquery.form.js originally bundled with WordPress is out of date and deprecated + // so we need to deregister it and re-register the latest one + wp_deregister_script( 'jquery-form' ); + wp_register_script( 'jquery-form', + wpcf7_plugin_url( 'includes/js/jquery.form.min.js' ), + array( 'jquery' ), '3.51.0-2014.06.20', true ); + + $in_footer = true; + + if ( 'header' === wpcf7_load_js() ) { + $in_footer = false; + } + + wp_enqueue_script( 'contact-form-7', + wpcf7_plugin_url( 'includes/js/scripts.js' ), + array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer ); + + $_wpcf7 = array( + 'loaderUrl' => wpcf7_ajax_loader(), + 'sending' => __( 'Sending ...', 'contact-form-7' ) ); + + if ( defined( 'WP_CACHE' ) && WP_CACHE ) + $_wpcf7['cached'] = 1; + + if ( wpcf7_support_html5_fallback() ) + $_wpcf7['jqueryUi'] = 1; + + wp_localize_script( 'contact-form-7', '_wpcf7', $_wpcf7 ); + + do_action( 'wpcf7_enqueue_scripts' ); +} + +function wpcf7_script_is() { + return wp_script_is( 'contact-form-7' ); +} + +function wpcf7_enqueue_styles() { + wp_enqueue_style( 'contact-form-7', + wpcf7_plugin_url( 'includes/css/styles.css' ), + array(), WPCF7_VERSION, 'all' ); + + if ( wpcf7_is_rtl() ) { + wp_enqueue_style( 'contact-form-7-rtl', + wpcf7_plugin_url( 'includes/css/styles-rtl.css' ), + array(), WPCF7_VERSION, 'all' ); + } + + do_action( 'wpcf7_enqueue_styles' ); +} + +function wpcf7_style_is() { + return wp_style_is( 'contact-form-7' ); +} + +/* HTML5 Fallback */ + +add_action( 'wp_enqueue_scripts', 'wpcf7_html5_fallback', 20 ); + +function wpcf7_html5_fallback() { + if ( ! wpcf7_support_html5_fallback() ) { + return; + } + + if ( wpcf7_script_is() ) { + wp_enqueue_script( 'jquery-ui-datepicker' ); + wp_enqueue_script( 'jquery-ui-spinner' ); + } + + if ( wpcf7_style_is() ) { + wp_enqueue_style( 'jquery-ui-smoothness', + wpcf7_plugin_url( 'includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css' ), array(), '1.10.3', 'screen' ); + } +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/css/styles-rtl.css b/wp-content/plugins/contact-form-7/includes/css/styles-rtl.css new file mode 100644 index 0000000..dce5be2 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/css/styles-rtl.css @@ -0,0 +1,13 @@ +span.wpcf7-not-valid-tip { + direction: rtl; +} + +.use-floating-validation-tip span.wpcf7-not-valid-tip { + left: auto; + right: 20%; +} + +span.wpcf7-list-item { + margin-left: 0; + margin-right: 0.5em; +} diff --git a/wp-content/plugins/contact-form-7/includes/css/styles.css b/wp-content/plugins/contact-form-7/includes/css/styles.css new file mode 100644 index 0000000..448c9fa --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/css/styles.css @@ -0,0 +1,78 @@ +div.wpcf7 { + margin: 0; + padding: 0; +} + +div.wpcf7-response-output { + margin: 2em 0.5em 1em; + padding: 0.2em 1em; +} + +div.wpcf7 .screen-reader-response { + position: absolute; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); + height: 1px; + width: 1px; + margin: 0; + padding: 0; + border: 0; +} + +div.wpcf7-mail-sent-ok { + border: 2px solid #398f14; +} + +div.wpcf7-mail-sent-ng { + border: 2px solid #ff0000; +} + +div.wpcf7-spam-blocked { + border: 2px solid #ffa500; +} + +div.wpcf7-validation-errors { + border: 2px solid #f7e700; +} + +span.wpcf7-form-control-wrap { + position: relative; +} + +span.wpcf7-not-valid-tip { + color: #f00; + font-size: 1em; + display: block; +} + +.use-floating-validation-tip span.wpcf7-not-valid-tip { + position: absolute; + top: 20%; + left: 20%; + z-index: 100; + border: 1px solid #ff0000; + background: #fff; + padding: .2em .8em; +} + +span.wpcf7-list-item { + margin-left: 0.5em; +} + +.wpcf7-display-none { + display: none; +} + +div.wpcf7 img.ajax-loader { + border: none; + vertical-align: middle; + margin-left: 4px; +} + +div.wpcf7 div.ajax-error { + display: none; +} + +div.wpcf7 .placeheld { + color: #888; +} \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/formatting.php b/wp-content/plugins/contact-form-7/includes/formatting.php new file mode 100644 index 0000000..c3bb64d --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/formatting.php @@ -0,0 +1,198 @@ +\s*
|', "\n\n", $pee ); + // Space things out a little + /* wpcf7: remove select and input */ + $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; + $pee = preg_replace( '!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee ); + $pee = preg_replace( '!()!', "$1\n\n", $pee ); + + /* wpcf7: take care of [response] tag */ + $pee = preg_replace( '!(\[response[^]]*\])!', "\n$1\n\n", $pee ); + + $pee = str_replace( array( "\r\n", "\r" ), "\n", $pee ); // cross-platform newlines + + if ( strpos( $pee, ']*)>\s*|', "", $pee ); // no pee inside object/embed + $pee = preg_replace( '|\s*\s*|', '', $pee ); + } + + $pee = preg_replace( "/\n\n+/", "\n\n", $pee ); // take care of duplicates + // make paragraphs, including one at the end + $pees = preg_split( '/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY ); + $pee = ''; + + foreach ( $pees as $tinkle ) { + $pee .= '

' . trim( $tinkle, "\n" ) . "

\n"; + } + + $pee = preg_replace( '|

\s*

|', '', $pee ); // under certain strange conditions it could create a P of entirely whitespace + $pee = preg_replace( '!

([^<]+)!', "

$1

", $pee ); + $pee = preg_replace( '!

\s*(]*>)\s*

!', "$1", $pee ); // don't pee all over a tag + $pee = preg_replace( "|

(|", "$1", $pee ); // problem with nested lists + $pee = preg_replace( '|

]*)>|i', "

", $pee ); + $pee = str_replace( '

', '

', $pee ); + $pee = preg_replace( '!

\s*(]*>)!', "$1", $pee ); + $pee = preg_replace( '!(]*>)\s*

!', "$1", $pee ); + + /* wpcf7: take care of [response] tag */ + $pee = preg_replace( '!

\s*(\[response[^]]*\])!', "$1", $pee ); + $pee = preg_replace( '!(\[response[^]]*\])\s*

!', "$1", $pee ); + + if ( $br ) { + /* wpcf7: add textarea */ + $pee = preg_replace_callback( '/<(script|style|textarea).*?<\/\\1>/s', create_function( '$matches', 'return str_replace("\n", "", $matches[0]);' ), $pee ); + $pee = preg_replace( '|(?)\s*\n|', "
\n", $pee ); // optionally make line breaks + $pee = str_replace( '', "\n", $pee ); + } + $pee = preg_replace( '!(]*>)\s*
!', "$1", $pee ); + $pee = preg_replace( '!
(\s*]*>)!', '$1', $pee ); + if ( strpos( $pee, ']*>)(.*?)!is', 'clean_pre', $pee ); + $pee = preg_replace( "|\n

$|", '

', $pee ); + + return $pee; +} + +function wpcf7_strip_quote( $text ) { + $text = trim( $text ); + + if ( preg_match( '/^"(.*)"$/', $text, $matches ) ) + $text = $matches[1]; + elseif ( preg_match( "/^'(.*)'$/", $text, $matches ) ) + $text = $matches[1]; + + return $text; +} + +function wpcf7_strip_quote_deep( $arr ) { + if ( is_string( $arr ) ) + return wpcf7_strip_quote( $arr ); + + if ( is_array( $arr ) ) { + $result = array(); + + foreach ( $arr as $key => $text ) + $result[$key] = wpcf7_strip_quote_deep( $text ); + + return $result; + } +} + +function wpcf7_normalize_newline( $text, $to = "\n" ) { + if ( ! is_string( $text ) ) + return $text; + + $nls = array( "\r\n", "\r", "\n" ); + + if ( ! in_array( $to, $nls ) ) + return $text; + + return str_replace( $nls, $to, $text ); +} + +function wpcf7_normalize_newline_deep( $arr, $to = "\n" ) { + if ( is_array( $arr ) ) { + $result = array(); + + foreach ( $arr as $key => $text ) + $result[$key] = wpcf7_normalize_newline_deep( $text, $to ); + + return $result; + } + + return wpcf7_normalize_newline( $arr, $to ); +} + +function wpcf7_strip_newline( $str ) { + $str = (string) $str; + $str = str_replace( array( "\r", "\n" ), '', $str ); + return trim( $str ); +} + +function wpcf7_canonicalize( $text ) { + if ( function_exists( 'mb_convert_kana' ) && 'UTF-8' == get_option( 'blog_charset' ) ) + $text = mb_convert_kana( $text, 'asKV', 'UTF-8' ); + + $text = strtolower( $text ); + $text = trim( $text ); + return $text; +} + +function wpcf7_is_name( $string ) { + // See http://www.w3.org/TR/html401/types.html#h-6.2 + // ID and NAME tokens must begin with a letter ([A-Za-z]) + // and may be followed by any number of letters, digits ([0-9]), + // hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). + + return preg_match( '/^[A-Za-z][-A-Za-z0-9_:.]*$/', $string ); +} + +function wpcf7_sanitize_unit_tag( $tag ) { + $tag = preg_replace( '/[^A-Za-z0-9_-]/', '', $tag ); + return $tag; +} + +function wpcf7_is_email( $email ) { + $result = is_email( $email ); + return apply_filters( 'wpcf7_is_email', $result, $email ); +} + +function wpcf7_is_url( $url ) { + $result = ( false !== filter_var( $url, FILTER_VALIDATE_URL ) ); + return apply_filters( 'wpcf7_is_url', $result, $url ); +} + +function wpcf7_is_tel( $tel ) { + $result = preg_match( '/^[+]?[0-9() -]*$/', $tel ); + return apply_filters( 'wpcf7_is_tel', $result, $tel ); +} + +function wpcf7_is_number( $number ) { + $result = is_numeric( $number ); + return apply_filters( 'wpcf7_is_number', $result, $number ); +} + +function wpcf7_is_date( $date ) { + $result = preg_match( '/^([0-9]{4,})-([0-9]{2})-([0-9]{2})$/', $date, $matches ); + + if ( $result ) + $result = checkdate( $matches[2], $matches[3], $matches[1] ); + + return apply_filters( 'wpcf7_is_date', $result, $date ); +} + +function wpcf7_antiscript_file_name( $filename ) { + $filename = basename( $filename ); + $parts = explode( '.', $filename ); + + if ( count( $parts ) < 2 ) + return $filename; + + $script_pattern = '/^(php|phtml|pl|py|rb|cgi|asp|aspx)\d?$/i'; + + $filename = array_shift( $parts ); + $extension = array_pop( $parts ); + + foreach ( (array) $parts as $part ) { + if ( preg_match( $script_pattern, $part ) ) + $filename .= '.' . $part . '_'; + else + $filename .= '.' . $part; + } + + if ( preg_match( $script_pattern, $extension ) ) + $filename .= '.' . $extension . '_.txt'; + else + $filename .= '.' . $extension; + + return $filename; +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/functions.php b/wp-content/plugins/contact-form-7/includes/functions.php new file mode 100644 index 0000000..e946d5d --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/functions.php @@ -0,0 +1,392 @@ + $uploads['basedir'], + 'url' => $uploads['baseurl'] ) ); + + if ( 'dir' == $type ) + return $uploads['dir']; + if ( 'url' == $type ) + return $uploads['url']; + + return $uploads; +} + +function wpcf7_l10n() { + static $l10n = array(); + + if ( ! empty( $l10n ) ) { + return $l10n; + } + + $l10n = array( + 'af' => __( 'Afrikaans', 'contact-form-7' ), + 'sq' => __( 'Albanian', 'contact-form-7' ), + 'ar' => __( 'Arabic', 'contact-form-7' ), + 'hy_AM' => __( 'Armenian', 'contact-form-7' ), + 'az_AZ' => __( 'Azerbaijani', 'contact-form-7' ), + 'bn_BD' => __( 'Bangla', 'contact-form-7' ), + 'eu' => __( 'Basque', 'contact-form-7' ), + 'be_BY' => __( 'Belarusian', 'contact-form-7' ), + 'bs' => __( 'Bosnian', 'contact-form-7' ), + 'pt_BR' => __( 'Brazilian Portuguese', 'contact-form-7' ), + 'bg_BG' => __( 'Bulgarian', 'contact-form-7' ), + 'ca' => __( 'Catalan', 'contact-form-7' ), + 'ckb' => __( 'Central Kurdish', 'contact-form-7' ), + 'zh_CN' => __( 'Chinese (Simplified)', 'contact-form-7' ), + 'zh_TW' => __( 'Chinese (Traditional)', 'contact-form-7' ), + 'hr' => __( 'Croatian', 'contact-form-7' ), + 'cs_CZ' => __( 'Czech', 'contact-form-7' ), + 'da_DK' => __( 'Danish', 'contact-form-7' ), + 'nl_NL' => __( 'Dutch', 'contact-form-7' ), + 'en_US' => __( 'English', 'contact-form-7' ), + 'eo_EO' => __( 'Esperanto', 'contact-form-7' ), + 'et' => __( 'Estonian', 'contact-form-7' ), + 'fi' => __( 'Finnish', 'contact-form-7' ), + 'fr_FR' => __( 'French', 'contact-form-7' ), + 'gl_ES' => __( 'Galician', 'contact-form-7' ), + 'gu_IN' => __( 'Gujarati', 'contact-form-7' ), + 'ka_GE' => __( 'Georgian', 'contact-form-7' ), + 'de_DE' => __( 'German', 'contact-form-7' ), + 'el' => __( 'Greek', 'contact-form-7' ), + 'ht' => __( 'Haitian', 'contact-form-7' ), + 'he_IL' => __( 'Hebrew', 'contact-form-7' ), + 'hi_IN' => __( 'Hindi', 'contact-form-7' ), + 'hu_HU' => __( 'Hungarian', 'contact-form-7' ), + 'bn_IN' => __( 'Indian Bengali', 'contact-form-7' ), + 'id_ID' => __( 'Indonesian', 'contact-form-7' ), + 'ga_IE' => __( 'Irish', 'contact-form-7' ), + 'it_IT' => __( 'Italian', 'contact-form-7' ), + 'ja' => __( 'Japanese', 'contact-form-7' ), + 'ko_KR' => __( 'Korean', 'contact-form-7' ), + 'lv' => __( 'Latvian', 'contact-form-7' ), + 'lt_LT' => __( 'Lithuanian', 'contact-form-7' ), + 'mk_MK' => __( 'Macedonian', 'contact-form-7' ), + 'ms_MY' => __( 'Malay', 'contact-form-7' ), + 'ml_IN' => __( 'Malayalam', 'contact-form-7' ), + 'mt_MT' => __( 'Maltese', 'contact-form-7' ), + 'nb_NO' => __( 'Norwegian', 'contact-form-7' ), + 'fa_IR' => __( 'Persian', 'contact-form-7' ), + 'pl_PL' => __( 'Polish', 'contact-form-7' ), + 'pt_PT' => __( 'Portuguese', 'contact-form-7' ), + 'pa_IN' => __( 'Punjabi', 'contact-form-7' ), + 'ru_RU' => __( 'Russian', 'contact-form-7' ), + 'ro_RO' => __( 'Romanian', 'contact-form-7' ), + 'sr_RS' => __( 'Serbian', 'contact-form-7' ), + 'si_LK' => __( 'Sinhala', 'contact-form-7' ), + 'sk_SK' => __( 'Slovak', 'contact-form-7' ), + 'sl_SI' => __( 'Slovene', 'contact-form-7' ), + 'es_ES' => __( 'Spanish', 'contact-form-7' ), + 'sv_SE' => __( 'Swedish', 'contact-form-7' ), + 'ta' => __( 'Tamil', 'contact-form-7' ), + 'th' => __( 'Thai', 'contact-form-7' ), + 'tl' => __( 'Tagalog', 'contact-form-7' ), + 'tr_TR' => __( 'Turkish', 'contact-form-7' ), + 'uk' => __( 'Ukrainian', 'contact-form-7' ), + 'vi' => __( 'Vietnamese', 'contact-form-7' ) + ); + + return $l10n; +} + +function wpcf7_is_valid_locale( $locale ) { + $l10n = wpcf7_l10n(); + return isset( $l10n[$locale] ); +} + +function wpcf7_is_rtl( $locale = '' ) { + if ( empty( $locale ) ) { + return function_exists( 'is_rtl' ) ? is_rtl() : false; + } + + $rtl_locales = array( + 'ar' => 'Arabic', + 'he_IL' => 'Hebrew', + 'fa_IR' => 'Persian' ); + + return isset( $rtl_locales[$locale] ); +} + +function wpcf7_ajax_loader() { + $url = wpcf7_plugin_url( 'images/ajax-loader.gif' ); + + if ( is_ssl() && 'http:' == substr( $url, 0, 5 ) ) + $url = 'https:' . substr( $url, 5 ); + + return apply_filters( 'wpcf7_ajax_loader', $url ); +} + +function wpcf7_verify_nonce( $nonce, $action = -1 ) { + if ( substr( wp_hash( $action, 'nonce' ), -12, 10 ) == $nonce ) + return true; + + return false; +} + +function wpcf7_create_nonce( $action = -1 ) { + return substr( wp_hash( $action, 'nonce' ), -12, 10 ); +} + +function wpcf7_blacklist_check( $target ) { + $mod_keys = trim( get_option( 'blacklist_keys' ) ); + + if ( empty( $mod_keys ) ) + return false; + + $words = explode( "\n", $mod_keys ); + + foreach ( (array) $words as $word ) { + $word = trim( $word ); + + if ( empty( $word ) ) + continue; + + if ( preg_match( '#' . preg_quote( $word, '#' ) . '#', $target ) ) + return true; + } + + return false; +} + +function wpcf7_array_flatten( $input ) { + if ( ! is_array( $input ) ) + return array( $input ); + + $output = array(); + + foreach ( $input as $value ) + $output = array_merge( $output, wpcf7_array_flatten( $value ) ); + + return $output; +} + +function wpcf7_flat_join( $input ) { + $input = wpcf7_array_flatten( $input ); + $output = array(); + + foreach ( (array) $input as $value ) + $output[] = trim( (string) $value ); + + return implode( ', ', $output ); +} + +function wpcf7_support_html5() { + return (bool) apply_filters( 'wpcf7_support_html5', true ); +} + +function wpcf7_support_html5_fallback() { + return (bool) apply_filters( 'wpcf7_support_html5_fallback', false ); +} + +function wpcf7_load_js() { + return apply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS ); +} + +function wpcf7_load_css() { + return apply_filters( 'wpcf7_load_css', WPCF7_LOAD_CSS ); +} + +function wpcf7_format_atts( $atts ) { + $html = ''; + + $prioritized_atts = array( 'type', 'name', 'value' ); + + foreach ( $prioritized_atts as $att ) { + if ( isset( $atts[$att] ) ) { + $value = trim( $atts[$att] ); + $html .= sprintf( ' %s="%s"', $att, esc_attr( $value ) ); + unset( $atts[$att] ); + } + } + + foreach ( $atts as $key => $value ) { + $value = trim( $value ); + + if ( '' !== $value ) { + $html .= sprintf( ' %s="%s"', $key, esc_attr( $value ) ); + } + } + + $html = trim( $html ); + + return $html; +} + +function wpcf7_load_textdomain( $locale = null ) { + global $l10n; + + $domain = 'contact-form-7'; + + if ( get_locale() == $locale ) { + $locale = null; + } + + if ( empty( $locale ) ) { + if ( is_textdomain_loaded( $domain ) ) { + return true; + } else { + return load_plugin_textdomain( $domain, false, $domain . '/languages' ); + } + } else { + $mo_orig = $l10n[$domain]; + unload_textdomain( $domain ); + + $mofile = $domain . '-' . $locale . '.mo'; + $path = WP_PLUGIN_DIR . '/' . $domain . '/languages'; + + if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) ) { + return $loaded; + } else { + $mofile = WP_LANG_DIR . '/plugins/' . $mofile; + return load_textdomain( $domain, $mofile ); + } + + $l10n[$domain] = $mo_orig; + } + + return false; +} + +function wpcf7_load_modules() { + $dir = WPCF7_PLUGIN_MODULES_DIR; + + if ( empty( $dir ) || ! is_dir( $dir ) ) { + return false; + } + + $mods = array( + 'acceptance', 'flamingo', + 'akismet', 'jetpack', 'submit', 'captcha', 'number', + 'text', 'checkbox', 'quiz', 'textarea', 'date', + 'response', 'file', 'select', 'listo' ); + + foreach ( $mods as $mod ) { + $file = trailingslashit( $dir ) . $mod . '.php'; + + if ( file_exists( $file ) ) { + include_once $file; + } + } +} + +function wpcf7_get_request_uri() { + static $request_uri = ''; + + if ( empty( $request_uri ) ) { + $request_uri = add_query_arg( array() ); + } + + return esc_url_raw( $request_uri ); +} + +function wpcf7_register_post_types() { + if ( class_exists( 'WPCF7_ContactForm' ) ) { + WPCF7_ContactForm::register_post_type(); + return true; + } else { + return false; + } +} + +function wpcf7_version( $args = '' ) { + $defaults = array( + 'limit' => -1, + 'only_major' => false ); + + $args = wp_parse_args( $args, $defaults ); + + if ( $args['only_major'] ) { + $args['limit'] = 2; + } + + $args['limit'] = (int) $args['limit']; + + $ver = WPCF7_VERSION; + $ver = strtr( $ver, '_-+', '...' ); + $ver = preg_replace( '/[^0-9.]+/', ".$0.", $ver ); + $ver = preg_replace( '/[.]+/', ".", $ver ); + $ver = trim( $ver, '.' ); + $ver = explode( '.', $ver ); + + if ( -1 < $args['limit'] ) { + $ver = array_slice( $ver, 0, $args['limit'] ); + } + + $ver = implode( '.', $ver ); + + return $ver; +} + +function wpcf7_version_grep( $version, array $input ) { + $pattern = '/^' . preg_quote( (string) $version, '/' ) . '(?:\.|$)/'; + + return preg_grep( $pattern, $input ); +} + +function wpcf7_enctype_value( $enctype ) { + $enctype = trim( $enctype ); + + if ( empty( $enctype ) ) { + return ''; + } + + $valid_enctypes = array( + 'application/x-www-form-urlencoded', + 'multipart/form-data', + 'text/plain' ); + + if ( in_array( $enctype, $valid_enctypes ) ) { + return $enctype; + } + + $pattern = '%^enctype="(' . implode( '|', $valid_enctypes ) . ')"$%'; + + if ( preg_match( $pattern, $enctype, $matches ) ) { + return $matches[1]; // for back-compat + } + + return ''; +} + +function wpcf7_rmdir_p( $dir ) { + if ( is_file( $dir ) ) { + @unlink( $dir ); + return true; + } + + if ( ! is_dir( $dir ) ) { + return false; + } + + if ( $handle = @opendir( $dir ) ) { + while ( false !== ( $file = readdir( $handle ) ) ) { + if ( $file == "." || $file == ".." ) { + continue; + } + + wpcf7_rmdir_p( path_join( $dir, $file ) ); + } + + closedir( $handle ); + } + + return @rmdir( $dir ); +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/animated-overlay.gif b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/animated-overlay.gif new file mode 100644 index 0000000..d441f75 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/animated-overlay.gif differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..4743d09 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..ca779e3 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..6640381 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..d3277b5 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..7eda20a Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..f4d86b9 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..8500938 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..4795f69 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..c7dab31 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..e04e87a Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..825ce7b Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..e2d9f90 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..b132999 Binary files /dev/null and b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png differ diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.css b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.css new file mode 100644 index 0000000..572ed8a --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.css @@ -0,0 +1,1177 @@ +/*! jQuery UI - v1.10.3 - 2013-05-03 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-noicons { + padding-left: .7em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month-year { + width: 100%; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 49%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 21px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("images/animated-overlay.gif"); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); + border-radius: 8px; +} diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css new file mode 100644 index 0000000..b8b6f0a --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.10.3 - 2013-05-03 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery.ui.theme.css b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery.ui.theme.css new file mode 100644 index 0000000..19e5839 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery.ui.theme.css @@ -0,0 +1,406 @@ +/*! + * jQuery UI CSS Framework 1.10.3 + * http://jqueryui.com + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); + border-radius: 8px; +} diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery.form.js b/wp-content/plugins/contact-form-7/includes/js/jquery.form.js new file mode 100644 index 0000000..591ad6f --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/js/jquery.form.js @@ -0,0 +1,1277 @@ +/*! + * jQuery Form Plugin + * version: 3.51.0-2014.06.20 + * Requires jQuery v1.5 or later + * Copyright (c) 2014 M. Alsup + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses. + * https://github.com/malsup/form#copyright-and-license + */ +/*global ActiveXObject */ + +// AMD support +(function (factory) { + "use strict"; + if (typeof define === 'function' && define.amd) { + // using AMD; register as anon module + define(['jquery'], factory); + } else { + // no AMD; invoke directly + factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto ); + } +} + +(function($) { +"use strict"; + +/* + Usage Note: + ----------- + Do not use both ajaxSubmit and ajaxForm on the same form. These + functions are mutually exclusive. Use ajaxSubmit if you want + to bind your own submit handler to the form. For example, + + $(document).ready(function() { + $('#myForm').on('submit', function(e) { + e.preventDefault(); // <-- important + $(this).ajaxSubmit({ + target: '#output' + }); + }); + }); + + Use ajaxForm when you want the plugin to manage all the event binding + for you. For example, + + $(document).ready(function() { + $('#myForm').ajaxForm({ + target: '#output' + }); + }); + + You can also use ajaxForm with delegation (requires jQuery v1.7+), so the + form does not have to exist when you invoke ajaxForm: + + $('#myForm').ajaxForm({ + delegation: true, + target: '#output' + }); + + When using ajaxForm, the ajaxSubmit function will be invoked for you + at the appropriate time. +*/ + +/** + * Feature detection + */ +var feature = {}; +feature.fileapi = $("").get(0).files !== undefined; +feature.formdata = window.FormData !== undefined; + +var hasProp = !!$.fn.prop; + +// attr2 uses prop when it can but checks the return type for +// an expected string. this accounts for the case where a form +// contains inputs with names like "action" or "method"; in those +// cases "prop" returns the element +$.fn.attr2 = function() { + if ( ! hasProp ) { + return this.attr.apply(this, arguments); + } + var val = this.prop.apply(this, arguments); + if ( ( val && val.jquery ) || typeof val === 'string' ) { + return val; + } + return this.attr.apply(this, arguments); +}; + +/** + * ajaxSubmit() provides a mechanism for immediately submitting + * an HTML form using AJAX. + */ +$.fn.ajaxSubmit = function(options) { + /*jshint scripturl:true */ + + // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) + if (!this.length) { + log('ajaxSubmit: skipping submit process - no element selected'); + return this; + } + + var method, action, url, $form = this; + + if (typeof options == 'function') { + options = { success: options }; + } + else if ( options === undefined ) { + options = {}; + } + + method = options.type || this.attr2('method'); + action = options.url || this.attr2('action'); + + url = (typeof action === 'string') ? $.trim(action) : ''; + url = url || window.location.href || ''; + if (url) { + // clean url (don't include hash vaue) + url = (url.match(/^([^#]+)/)||[])[1]; + } + + options = $.extend(true, { + url: url, + success: $.ajaxSettings.success, + type: method || $.ajaxSettings.type, + iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' + }, options); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + this.trigger('form-pre-serialize', [this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); + return this; + } + + // provide opportunity to alter form data before it is serialized + if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSerialize callback'); + return this; + } + + var traditional = options.traditional; + if ( traditional === undefined ) { + traditional = $.ajaxSettings.traditional; + } + + var elements = []; + var qx, a = this.formToArray(options.semantic, elements); + if (options.data) { + options.extraData = options.data; + qx = $.param(options.data, traditional); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { + log('ajaxSubmit: submit aborted via beforeSubmit callback'); + return this; + } + + // fire vetoable 'validate' event + this.trigger('form-submit-validate', [a, this, options, veto]); + if (veto.veto) { + log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); + return this; + } + + var q = $.param(a, traditional); + if (qx) { + q = ( q ? (q + '&' + qx) : qx ); + } + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else { + options.data = q; // data is the query string for 'post' + } + + var callbacks = []; + if (options.resetForm) { + callbacks.push(function() { $form.resetForm(); }); + } + if (options.clearForm) { + callbacks.push(function() { $form.clearForm(options.includeHidden); }); + } + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data) { + var fn = options.replaceTarget ? 'replaceWith' : 'html'; + $(options.target)[fn](data).each(oldSuccess, arguments); + }); + } + else if (options.success) { + callbacks.push(options.success); + } + + options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg + var context = options.context || this ; // jQuery 1.4+ supports scope context + for (var i=0, max=callbacks.length; i < max; i++) { + callbacks[i].apply(context, [data, status, xhr || $form, $form]); + } + }; + + if (options.error) { + var oldError = options.error; + options.error = function(xhr, status, error) { + var context = options.context || this; + oldError.apply(context, [xhr, status, error, $form]); + }; + } + + if (options.complete) { + var oldComplete = options.complete; + options.complete = function(xhr, status) { + var context = options.context || this; + oldComplete.apply(context, [xhr, status, $form]); + }; + } + + // are there files to upload? + + // [value] (issue #113), also see comment: + // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219 + var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() !== ''; }); + + var hasFileInputs = fileInputs.length > 0; + var mp = 'multipart/form-data'; + var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); + + var fileAPI = feature.fileapi && feature.formdata; + log("fileAPI :" + fileAPI); + var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI; + + var jqxhr; + + // options.iframe allows user to force iframe mode + // 06-NOV-09: now defaulting to iframe mode if file input is detected + if (options.iframe !== false && (options.iframe || shouldUseFrame)) { + // hack to fix Safari hang (thanks to Tim Molendijk for this) + // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d + if (options.closeKeepAlive) { + $.get(options.closeKeepAlive, function() { + jqxhr = fileUploadIframe(a); + }); + } + else { + jqxhr = fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + jqxhr = fileUploadXhr(a); + } + else { + jqxhr = $.ajax(options); + } + + $form.removeData('jqxhr').data('jqxhr', jqxhr); + + // clear element array + for (var k=0; k < elements.length; k++) { + elements[k] = null; + } + + // fire 'notify' event + this.trigger('form-submit-notify', [this, options]); + return this; + + // utility fn for deep serialization + function deepSerialize(extraData){ + var serialized = $.param(extraData, options.traditional).split('&'); + var len = serialized.length; + var result = []; + var i, part; + for (i=0; i < len; i++) { + // #252; undo param space replacement + serialized[i] = serialized[i].replace(/\+/g,' '); + part = serialized[i].split('='); + // #278; use array instead of object storage, favoring array serializations + result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]); + } + return result; + } + + // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz) + function fileUploadXhr(a) { + var formdata = new FormData(); + + for (var i=0; i < a.length; i++) { + formdata.append(a[i].name, a[i].value); + } + + if (options.extraData) { + var serializedData = deepSerialize(options.extraData); + for (i=0; i < serializedData.length; i++) { + if (serializedData[i]) { + formdata.append(serializedData[i][0], serializedData[i][1]); + } + } + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: method || 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = $.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.addEventListener('progress', function(event) { + var percent = 0; + var position = event.loaded || event.position; /*event.position is deprecated*/ + var total = event.total; + if (event.lengthComputable) { + percent = Math.ceil(position / total * 100); + } + options.uploadProgress(event, position, total, percent); + }, false); + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + //Send FormData() provided by user + if (options.formData) { + o.data = options.formData; + } + else { + o.data = formdata; + } + if(beforeSend) { + beforeSend.call(this, xhr, o); + } + }; + return $.ajax(s); + } + + // private function for handling file uploads (hat tip to YAHOO!) + function fileUploadIframe(a) { + var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle; + var deferred = $.Deferred(); + + // #341 + deferred.abort = function(status) { + xhr.abort(status); + }; + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( hasProp ) { + el.prop('disabled', false); + } + else { + el.removeAttr('disabled'); + } + } + } + + s = $.extend(true, {}, $.ajaxSettings, options); + s.context = s.context || s; + id = 'jqFormIO' + (new Date().getTime()); + if (s.iframeTarget) { + $io = $(s.iframeTarget); + n = $io.attr2('name'); + if (!n) { + $io.attr2('name', id); + } + else { + id = n; + } + } + else { + $io = $(' + + + + + + + + + + + + + ' . + __( "Add slider", "metaslider" ) . ''; + } + + return $context; + + } + + + /** + * Append the 'Choose Meta Slider' thickbox content to the bottom of selected admin pages + */ + public function admin_footer() { + + global $pagenow; + + // Only run in post/page creation and edit screens + if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) { + $sliders = $this->all_meta_sliders( 'title' ); + ?> + + + + + + ' . __( "Go Pro", "metaslider" ) . ''; + } + + return $links; + + } + + + /** + * Return the meta slider pro upgrade iFrame + */ + public function upgrade_to_pro_tab() { + + if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) { + return wp_iframe( array( $this, 'upgrade_to_pro_iframe' ) ); + } + + } + + + /** + * Media Manager iframe HTML + */ + public function upgrade_to_pro_iframe() { + + wp_enqueue_style( 'metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION ); + wp_enqueue_script( 'google-font-api', 'http://fonts.googleapis.com/css?family=PT+Sans:400,700' ); + + $link = apply_filters( 'metaslider_hoplink', 'http://www.metaslider.com/upgrade/' ); + $link .= '?utm_source=lite&utm_medium=more-slide-types&utm_campaign=pro'; + + echo implode("", array( + "
", + "

Get the Pro Addon pack to add support for: Post Feed Slides, YouTube Slides, HTML Slides & Vimeo Slides

", + "

NEW: Animated HTML Layer Slides (with an awesome Drag & Drop editor!)

", + "

Live Theme Editor!

", + "

NEW: Thumbnail Navigation for Flex & Nivo Slider!

", + "Get Pro", + "Opens in a new window", + "
" + )); + + } + + + /** + * Upgrade CTA. + */ + public function upgrade_to_pro_cta() { + + if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) { + $link = apply_filters( 'metaslider_hoplink', 'http://www.metaslider.com/upgrade/' ); + + $link .= '?utm_source=lite&utm_medium=nag&utm_campaign=pro'; + + $goPro = ""; + + echo $goPro; + } + + } + + + /** + * Start output buffering. + * + * Note: wp_ob_end_flush_all is called by default + * - see shutdown action in default-filters.php + */ + public function start_resource_manager() { + + ob_start( array( $this, 'resource_manager' ) ); + + } + + /** + * Process the whole page output. Move link tags with an ID starting + * with 'metaslider' into the of the page. + */ + public function resource_manager( $buffer ) { + + // create dom document from buffer + $html = new simple_html_dom(); + + // Load from a string + $html->load( $buffer, true, false ); + + if ( ! $html->find( 'body link[id^="metaslider"]' ) ) + return $buffer; + + // selectors to find Meta Slider links + $selectors = array( + 'body link[id^="metaslider"]', + ); + + $selectors = apply_filters( "metaslider_resource_manager_selectors", $selectors ); + + if ( $head = $html->find( 'head', 0 ) ) { + + // move meta slider elemends to + foreach ( $selectors as $selector ) { + + foreach ( $html->find( $selector ) as $element ) { + + $head->innertext .= "\t" . $element->outertext . "\n"; + $element->outertext = ''; + + } + + } + + } + + return $html->save(); + + } + +} + +endif; + +add_action( 'plugins_loaded', array( 'MetaSliderPlugin', 'init' ), 10 ); \ No newline at end of file diff --git a/wp-content/plugins/ml-slider/readme.txt b/wp-content/plugins/ml-slider/readme.txt new file mode 100644 index 0000000..7e73471 --- /dev/null +++ b/wp-content/plugins/ml-slider/readme.txt @@ -0,0 +1,465 @@ +=== Plugin Name === +Contributors: matchalabs +Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ84KC4X8YKW8 +Requires at least: 3.5 +Tested up to: 3.9 +Stable tag: 3.0 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Easy to use WordPress slider plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides. + +== Description == + +http://www.youtube.com/watch?v=o0f3uAvL6Ic + +The most popular WordPress slider plugin. Creating slideshows with [Meta Slider](http://www.metaslider.com/) is fast and easy. Simply select images from your WordPress Media Library, drag and drop them into place, set slide captions, links and SEO fields all from one page. You can choose from 4 different slideshow types (Flex Slider, Nivo Slider, Responsive Slides & Coin Slider) and use the provided shortcode or template include to easily embed slideshows in your blog. + +**Includes** + +* **Flex Slider 2** - Responsive, 2 transition effects, carousel mode +* **Nivo Slider** - Responsive, 16 transition effects, 4 themes +* **Responsive Slides** - Responsive & incredibly light weight +* **Coin Slider** - 4 transition effects + +**Features** + +* Simple, easy to use interface - perfect for individual users, developers & clients! +* Create Responsive, SEO optimised slideshows in seconds +* Unrestricted support for Image slides (supports caption, link, title text, alt text) +* Full width slideshow support +* Drag and drop slide reordering +* Admin preview +* Intelligent image cropping +* Set image crop position +* Built in Widget and Shortcode +* Loads of slideshow configuration options - transition effect, speed etc (per slideshow) +* Fully localised +* WordPress Multi Site compatible +* Compatible with translation plugins (WPML, PolyLang & qTranslate) +* Extensive Developer API (hooks & filters) +* Fast - only the minimum JavaScript/CSS is included on your page +* Free basic support (covering installation issues and theme/plugin conflicts) +* Lightbox support with the [Meta Slider Lightbox](http://wordpress.org/plugins/ml-slider-lightbox/) addon + +Upgrade to [Meta Slider Pro](http://www.metaslider.com/upgrade) to add support for: + +* YouTube & Vimeo slides +* HTML slides +* Layer slides with CSS3 animations +* Dynamic Post Feed/Featured Image Slides (content slider) +* Custom Themes +* Thumbnail Navigation +* Premium Support + +**Translations** + +* French (thanks to fb-graphiklab) +* Spanish (thanks to eltipografico) +* German (thanks to Rewolve44) +* Polish (thanks to gordon34) +* Chinese (thanks to 断青丝) +* Taiwanese (thanks to 断青丝) +* Norwegian (thanks to Dreamsoft) +* Romanian (thanks to Octav Madalin Stanoaia) +* Japanese (thanks to Dorrie) +* Persian (thanks to aliamini) +* Hungarian (thanks to szripio) +* Croatian +* Hebrew (thanks to Ahrale) + +Read more and thanks to: + +* [Flex Slider](http://flexslider.woothemes.com/) +* [Responsive Slides](http://responsive-slides.viljamis.com/) +* [Coin Slider](http://workshop.rs/projects/coin-slider/) +* [Nivo Slider](http://dev7studios.com/nivo-slider/) + +Find out more at http://www.metaslider.com + +Follow us on Twitter: [@wpmetaslider](https://twitter.com/wpmetaslider) + +== Installation == + +The easy way: + +1. Go to the Plugins Menu in WordPress +1. Search for "Meta Slider" +1. Click "Install" + +The not so easy way: + +1. Upload the `ml-slider` folder to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Manage your slideshows using the 'Meta Slider' menu option + +== Frequently Asked Questions == + +http://www.metaslider.com/documentation/ + += How do I include a slideshow in the header of my site? = + +Video Guide: + +http://www.youtube.com/watch?v=gSsWgd66Jjk + +Text Guide: + +You will need to paste the "Template Include" code into your theme (you can find this in the 'Usage' section underneath the slideshow settings) + +* Go to Appearance > Editor in WordPress +* Edit a file called 'header.php' (or similar) +* Find the correct place to add it (for example above or below the logo) +* Paste in the code and save. + += I only want to show the slideshow on my homepage, how can I do that? = + +Add the 'restrict_to' parameter to the shortcode, eg: + +`[metaslider id=XXX restrict_to=home]");` + +Theme specific instructions: + +http://www.metaslider.com/documentation/theme-integration/ + += It's not working - what can I do? = + +Check out the troubleshooting page here: + +http://www.metaslider.com/documentation/troubleshooting/ + += Meta Slider is cropping my images in the wrong place - what can I do? = + +See www.metaslider.com/documentation/image-cropping/ + +== Screenshots == + +1. Meta Slider - for live demos see http://www.metaslider.com/examples/ +2. Nivo Slider example +3. Coin Slider example +4. Flex Slider example +5. Carousel Example +6. Administration panel - selecting slides + +== Changelog == + += 3.0.1 [19/08/14] = + +* Fix: Escape admin setting text fields +* Fix: Escape admin tab names (thanks to Dylan Irzi for spotting and reporting this!) +* Change: Allow shortcode parameters to be filtered + += 3.0 [30/07/14] = + +**This is not a major update. We're just following the WordPress versioning conventions (3.0 comes after 2.9)** + +* New feature: Set crop position for slides (requires WP 3.9+) +* New feature: Disable cropping setting +* Fix: Use get_posts instead of WP_Query to extract slideshows (fix conflicts with plugins using get_post_type in admin_footer hooks) +* Change: Add filter for capability required to use meta slider + += 2.9.1 [15/07/14] = + +* New feature: Hungarian Language Pack added +* Fix: Escape attributes and JS in slideshow output (credit to jwenerd!) +* Fix: Escape attributes and text fields in admin +* New feature: Admin slide tabs can be modified with filters + += 2.9 [25/06/14] = + +* New feature: Japanese Language Pack added +* New feature: Persian Language Pack added +* New feature: Switch between tab and list view +* New feature: Added ms-left and ms-right css classes to align slideshow to left or right +* Improvement: Flex Slider updated to 2.3.0-bleeding (fix initial image fade) +* Fix: reference to window.parent in media library +* Fix: Thumbnail outline in firefox + += 2.8.1 [28/04/14] = + +* Fix: All in One Events Calendar conflict fix (Advanced Settings not toggling) +* Fix: CSS resets to avoid theme conflicts +* Fix: Autoload visibility conflict (http://wordpress.org/support/topic/autoload-visibillity-conflict) +* Fix: Layer Editor in IE11 - text fields not accessible in modal windows +* Fix: FlexSlider IE11 Fade transition + += 2.8 [28/04/14] = + +* New feature: Russian Language Pack added +* Fix: Carousel image scaling in FireFox +* Fix: wpautop issue with double ampersand +* New feature: Shortcode parameter added to restrict slideshow to displaying on homepage only (see FAQ) +* Improvement: Save slideshow after reordering slides +* Fix: PHP Warning when no slideshows have been created + += 2.8-beta [16/04/14] = + +* Improvement: Preview now uses admin-post action +* Improvement: Classes are now auto loaded to reduce memory footprint +(Thanks to Viktor Szépe for the above suggestions!) +* Improvement: Slideshow initilisation time reduced +* Improvement: HTML5 Compatibility: Alt tags always present on image tag - even if empty. +* Improvement: Flex Slider slideshows should now 'reserve' a space for themselves while they fully load +* Update: Flex Slider updated to v2.2.2 +* New feature: Romanian Language Pack added (Thanks to Octav Madalin Stanoaia) +* New feature: Dutch Language Pack added +* New feature: WP Super Cache compatibility - cache is cleared when saving slideshow +* New feature: HTML5 Compatibility (Experimental). Set `define('METASLIDER_ENABLE_RESOURCE_MANAGER', true);` in wp-config.php to move Meta Slider link tags head of the page. + += 2.7.2 [25/03/14] = + +* Fix: Only apply carousel margin to slides +* Fix: Enqueue Easing library when carousel mode is enabled, regardless of effect selection +* Fix: Thumbnail margin when theme has #content div + += 2.7.1 [19/03/14] = + +* Fix: Remove easing parameter when effect is set to fade +* Fix: Navigation options greyed out in IE +* Fix: qTranslate captions not being processed (typo) + += 2.7 [18/03/14] = + +* New feature: Crotatian Lang pack added +* New feature: Carousel margin option added +* New feature: Process shortcodes in captions +* Improvement: Tab rename UX +* Improvement: Admin save spinner functionality improved +* Improvement: CSS Resets updated +* Improvement: Use plugins_loaded action to initialise plugin +* Fix: PHP Warnings when one slideshow exists +* Fix: Smart Cropping sometimes not returning smart cropped image +* Fix: Add z-index to meta slider, attempted conflict fix for themes with drop down menus. +* Fix: Only include the easing library when transition effect is set to slide +* Fix: White Label Branding plugin compatibility. +* Change: "Responsive" option renamed to "R. Slides". The (old) "Responsive" option refers to the "Responsive Slides" jQuery library, but users were getting confused as the naming suggested it was the only responsive option. Flex Slider & Nivo Slider are also responsive. + += 2.6.3 [23/01/14] = + +* Improvement: Various admin screen styling improvements +* Fix: Add 'ms-' prefix to Advanced settings toggle boxes and Preview button (avoid theme conflicts) +* Fix: RTL fixes +* Improvement: Filters added for complete slideshow output +* Improvement: Filter added for slide image label +* Improvement: 'No Conflict' mode refactored +* Improvement: 'slider' parameter added to flexslider before/start/after etc callbacks +* Change: Renamed in admin menu from "Meta Slider Lite" to "Meta Slider" + += 2.6.2 [02/01/14] = + +* Fix: Vantage background image tiling + += 2.6.1 [31/12/13] = + +* Fix: Advanced settings arrow toggle +* Fix: All in one SEO / Page builder / Meta Slider conflict +* Fix: NextGen "Insert Gallery" conflict +* New feature: Norwegian language pack added + += 2.6 [19/12/13] = + +* Fix: Typo in metaslider_responsive_slide_image_attributes filter +* Fix: Caption not working in Nivo Slider +* Fix: Tab styling improved +* Fix: New window styling improved in WP3.7 and below + +More info/Comments: http://www.metaslider.com/coming-soon-meta-slider-2-6-free/ + += 2.6-beta [15/12/13] = + +* New feature: Interface update for WordPress 3.8 admin redesign +* New feature: 'Stretch' setting for full width slideshows +* New feature: No conflict mode +* New feature: 'Add slider' button for posts and pages +* New feature: SEO options (add title & alt text to slides) +* Change: CSS is now enqueued using wp_enqueue_style (Use a minification plugin or caching plugin to move styles to the if HTML5 validity is required - eg W3 Total Cache) + +More info/Comments: http://www.metaslider.com/coming-soon-meta-slider-2-6-free/ + += 2.5 [25/11/13] = +* Fix: JetPack Photon conflict +* Improvement: German Language pack added (thanks to gordon34) +* Improvement: Chinese language pack updated (thanks to 断青丝) +* Improvement: MP6 styling fixes + += 2.5-beta2 [14/11/13] = +* Fix: Vantage theme backwards compatibility +* Fix: Flexslider anchor attributes filter + += 2.5-beta1 [12/11/13] = +* Fix: Center align slideshow + += 2.5-beta [12/11/13] = +* New Feature: 'percentwidth' parameter added to shortcode to allow for 100% wide slideshows +* Improvement: Generate resized images through multiple Ajax requests on save (blank screen fix) +* Improvement: IE9 admin styling tidied up +* Improvement: Filters added to add/change attributes in and tags +* Improvement: Security - nonce checking added +* Change: Remove bottom margin from flex slider when navigation is hidden (add a CSS Class of 'add-margin' if you need the margin) +* Fix: Add slides to slideshow in the same order they're selected in the Media Library +* Fix: Symlink path resolution +* Fix: Do not try to resize/open images that are corrupt (missing metadata) (blank screen fix) + += 2.4.2 [17/10/13] = +* Fix: qTranslate caption & URL parsing for image slides + += 2.4.1 [17/10/13] = +* Fix: PHP Warning (reported by & thanks to: fgirardey) + += 2.4 [16/10/13] = +* Fix: FlexSlider styling in twenty twelve theme +* Fix: IE10 - "Caption" placeholder text being saved as actual caption +* Improvement: Settings table tidied up +* Improvement: New slides are resized during addition to the slideshow +* Improvement: Default slideshow size increased to 700x300 +* Improvement: Image filename now displayed for each slide (instead of image dimensions) +* Improvement: Replace deprecated 'live()' jQuery call with 'on()' +* Improvement: Polish Language pack added (thanks to gordon34) +* Improvement: Chinese language pack added (thanks to 断青丝) +* Improvement: 'metaslider_resized_image_url' filter added (could be used to disable cropping) +* Change: qTranslate support for slide URLs (see: http://screencast.com/t/FrsrptyhoT) +* Change: PolyLang fix to ensure slides are extracted for all languages (set up a new slideshow for each language) +* Change: WPML fix to ensure slides are extracted for all languages (set up a new slideshow for each language) + + += 2.3 [18/09/13] = +* Improvement: Flex Slider upgraded to v2.2 +* Improvement: Responsive Slides upgraded to v1.54 +* Improvement: 'Create first slideshow' prompt added for new users +* Change: 'scoped' attribute removed from inline CSS tag until browsers catch up with supporting it properly. A new filter has been added: "metaslider_style_attributes" if you wish to add the scoped attribute back in. +* Change: wp_footer check removed due to confusion +* New Feature: 'metaslider_max_tabs' filter added to convert tab list to ordered drop down menu +* Fix: Remove 'Insert Media' tab from 'Add Slide' modal (WP 3.6 only) +* New Feature: Filters added to allow modification of image slide HTML +* Improvement: Settings area tidied up +* Improvement: Image URL Field less restrictive +* Improvement: HTML Output tidied up + += 2.2.2 [21/08/13] = +* Improvement: System check added with option to dismiss messages. Checks made for: role scoper plugin, wp_footer, wordpress version & GD/ImageMagick. + += 2.2.1 [08/08/13] = +* Fix: Responsive slides styling in FireFox (reported by and thanks to: dznr418) +* Fix: Flex Slider carousel causing browser to crash in some circumstances + += 2.2 [01/08/13] = +* Fix: Paragraph tags being added to output using Nivo Slider + += 2.1.6 [22/07/2013] = +* Fix: Use the original image file if the slideshow size is the same size as the image file +* Fix: Conflict with Advanced Post Types Order plugin +* Fix: Colorbox conflict when using resizable elements in lightbox +* Improvement: Refresh slides after clicking 'save' +* Improvement: Ensure taxonomy category exists before tagging slide to slideshow +* Fix: Only submit form when submit button is clicked (not all buttons) +* Fix: Coin slider caption width in FireFox +* Improvement: Added hook to adjust carousel image margin + += 2.1.5 [24/05/13] = +* Fix: HTML 5 Validation + += 2.1.4 [21/05/13] = +* Fix: Widget markup invalid (reported by and thanks to: CarlosCanvas) + += 2.1.3 [21/05/13] = +* Fix: User Access Manager Plugin incompatibility issues (reported by and thanks to: eltipografico) + += 2.1.2 [21/05/13] = +* Fix: Nivo Slider theme select dropdown (reported by and thanks to: macks) +* Fix: HTML5 Validation fix for inline styles +* Improvement: Title field added to widget (suggested by and thanks to: pa_esp) +* New feature: Spanish language pack (thanks to eltipografico) + += 2.1.1 [13/05/13] = +* Fix: PHP version compatibility + += 2.1 [12/05/13] = +* New feature: Widget added +* New feature: System check added (checks for required image libraries and WordPress version) +* Fix: Multiple CSS fixes added for popular themes +* Fix: Flex slider shows first slide when JS is disabled +* Improvement: Display warning message when unchecking Print JS and Print CSS options +* Improvement: Coinslider navigation centered + += 2.0.2 [02/05/13] = +* Fix: PHP Error when using slides the same size as the slideshow + += 2.0.1 [28/04/13] = +* New feature: French language pack (thanks to: fb-graphiklab) +* Fix: Use transparent background on default flexslider theme +* Fix: Set direction to LTR for flexslider viewport (fix for RTL languages) +* Fix: Nivoslider HTML Captions +* Fix: Responsive slides navigation positioning + += 2.0 [21/04/13] = +* Fix: Responsive slides navigation styling +* Fix: Update slide order on save +* Fix: Smart crop edge cases +* Fix: Flexslider navigation overflow + += 2.0-betaX [17/04/13] = +* Improvement: Error messages exposed in admin is Meta Slider cannot load the slides +* Improvement: Load default settings if original settings are corrupt/incomplete +* Fix: Smart Crop ratio +* Fix: UTF-8 characters in captions (reported by and thanks to: javitopo) +* Fix: JetPack Photo not loading images (reported by and thanks to: Jason) +* Fix: Double slash on jQuery easing path +* Fix: Paragraph tags outputted in JavaScript (reported by and thanks to: CrimsonRaddish) + += 2.0-beta = +* New feature: Preview slideshows in admin control panel +* New feature: 'Easing' options added to flex slider +* New feature: 'Carousel mode' option added for flex slider +* New feature: 'Auto play' option added +* New feature: 'Smart Crop' setting ensures your slideshow size remains consitent regardless of image dimensions +* New feature: 'Center align slideshow' option added for all sliders +* New feature: Coin Slider upgraded to latest version, new options now exposed in Meta Slider +* New feature: Captions now supported by responsive slides +* Improvement: Responsive AJAX powered administration screen +* Improvement: Code refactored +* Improvement: Flex Slider captions now sit over the slide +* Fix: Nivo slider invalid markup (reported by and thanks to: nellyshark) +* Fix: JS && encoding error (reported by and thanks to: neefje) + += 1.3 [28/02/13] = +* Renamed to Meta Slider (previously ML Slider) +* Improvement: Admin styling cleaned up +* Improvement: Code refactored +* Improvement: Plugin localised +* Improvement: Template include PHP code now displayed on slider edit page +* Improvement: jQuery tablednd replaced with jQuery sortable for reordering slides +* New feature: Open URL in new window option added +* Improvement: max-width css rule added to slider wrapper +* Fix: UTF-8 support in captions (reported by and thanks to: petergluk) +* Fix: JS && encoding error (reported by and thanks to: neefje) +* Fix: Editors now have permission to use MetaSlider (reported by and thanks to: rritsud) + += 1.2.1 [20/02/13] = +* Fix: Number of slides per slideshow limited to WordPress 'blog pages show at most' setting (reported by and thanks to: Kenny) +* Fix: Add warning when BMP file is added to slider (reported by and thanks to: MadBong) +* Fix: Allow images smaller than default thumbnail size to be added to slider (reported by and thanks to: MadBong) + += 1.2 [19/02/13] = +* Improvement: Code refactored +* Fix: Unable to assign the same image to more than one slider +* Fix: JavaScript error when jQuery is loaded in page footer +* Improvement: Warning notice when the slider has unsaved changes +* Fix: Captions not being escaped (reported by and thanks to: papabeers) +* Improvement: Add multiple files to slider from Media Browser + += 1.1 [18/02/13] = +* Improvement: Code refactored +* Fix: hitting [enter] brings up Media Library +* Improvement: Settings for new sliders now based on the last edited slider +* Improvement: More screenshots added + += 1.0.1 [17/02/13] = +* Fix: min version incorrect (should be 3.5) + += 1.0 [15/02/13] = +* Initial version + +== Upgrade Notice == + + diff --git a/wp-content/plugins/really-simple-captcha/gentium/FONTLOG.txt b/wp-content/plugins/really-simple-captcha/gentium/FONTLOG.txt new file mode 100644 index 0000000..354e4b9 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/gentium/FONTLOG.txt @@ -0,0 +1,153 @@ +FONTLOG +Gentium Basic and Gentium Book Basic v1.1 +========================================================== + + +This file provides detailed information on the Gentium Basic and Gentium Book Basic font families. This information should be distributed along with the Gentium Basic and Gentium Book Basic fonts and any derivative works. + + +Basic Font Information +---------------------- + +Gentium ("belonging to the nations" in Latin) is a Unicode typeface family designed to enable the many diverse ethnic groups around the world who use the Latin script to produce readable, high-quality publications. The design is intended to be highly readable, reasonably compact, and visually attractive. Gentium has won a "Certificate of Excellence in Typeface Design" in two major international typeface design competitions: bukva:raz! (2001), TDC2003 (2003). + +The Gentium Basic and Gentium Book Basic font famililes are based on the original design, but with additional weights. The "Book" family is slightly heavier. Both families come with a complete regular, bold, italic and bold italic set of fonts. + +The supported character set, however, is much smaller than for the main Gentium fonts. These "Basic" fonts support only the Basic Latin and Latin-1 Supplement Unicode ranges, plus a selection of the more commonly used extended Latin characters, with miscellaneous diacritical marks, symbols and punctuation. For a complete list of supported characters see the list at the end of this document. + +In particular, these fonts do not support: + +- Full extended Latin IPA +- Complete support for Central European languages +- Greek +- Cyrillic + +A much more complete character set will be supported in a future version of the complete Gentium fonts. These "Basic" fonts are intended as a way to provide additional weights for basic font users without waiting until the complete Gentium character set is finished. So please don't request additional glyphs or characters to be supported in the Basic fonts - such support will become available in the main Gentium family in the future. + +There are also some other limitations of the Basic fonts: + +- They are not completely metric-compatible with the full Gentium family + (some glyphs may have different widths, although changes have been minimal) +- There is no kerning +- There are no "Alt" versions, or ones with low-profile diacritics +- The default stacking style for some diacritic combinations does not match Vietnamese-style conventions (although this is available through a OpenType/Graphite feature) +- No support for TypeTuner + +There are, however, some wonderful new features that are still missing from the main Gentium family: + +- Bold! +- Bold Italic! +- The slightly-heavier Book family! +- OpenType and Graphite smart code for diacritic placement! +- A few useful OpenType and Graphite features +- Support for a few more recent additions to Unicode and the SIL PUA (http://scripts.sil.org/UnicodePUA) +- Character assignments are updated to conform to Unicode 5.1 + +In particular, the Basic fonts support a subset of the smart font features that the Doulos SIL font supports. Those features are: + +- Capital Eng alternates +- Literacy alternates +- Capital Y-hook alternate +- Capital N-left-hook alternate +- Modifier apostrophe alternate +- Modifier colon alternate +- Open o alternate +- Vietnamese-style diacritics + +More detail on the features can be seen in the Doulos SIL Technical Documentation (http://scripts.sil.org/DoulosSIL_Technical). + + +Known Problems +-------------- + +We know of the following problems. Please report any other problems you encounter. + +- logicalnot (U+00AC) appears distorted in Bold Italic and Book Italic. +- Opening the fonts with FontLab 5.0.x, then closing them, crashes FontLab. We are working to get this bug fixed in the next version of FontLab. A workaround is to open the font, save as a .vfb file, close (which still causes a crash). Then restart FontLab and open the .vfb file. + + +ChangeLog +--------- +(This should list both major and minor changes, most recent first.) + +4 Apr 2008 (Victor Gaultney) Gentium Basic/Gentium Book Basic version 1.1 +- Final release + +12 Nov 2007 (Victor Gaultney) Gentium Basic/Gentium Book Basic version 1.1b1 +- trimmed character set down to Basic +- added additional weights +- no FontLab source files + +28 Nov 2005 (Victor Gaultney) Gentium version 1.02 +- Changed licensing to the SIL Open Font License +- Included FontLab source files +- Fixed some duplicate PostScript glyphs names +- Fixed italic angle + +19 Sep 2003 (Victor Gaultney) Gentium version 1.01 +- Maintenance release focused on changing internal font +- Information to reflect the changeover to an SIL project +- There is only one bug fix - the Greek mu PS name was changed to try and fix a display/printing problem. There is still no manual hinting + +16 Sep 2002 (Victor Gaultney) Gentium version 1.00 +- First public release +- No manual hinting is included in this version. Some has been done - with good results - but is not yet complete enough. + + +Information for Developers/Contributors +--------------------------------------- + +The source release contains FontLab source files for the eight fonts, but those files do not include the OpenType and Graphite code, as those are inserted after the fonts are generated from FontLab. The files are included as a source for the PostScript-style cubic curves. You are welcome, however, to open the font files themselves to gain access to the smart font code, although most editors will not let you edit that code directly. We will provide a richer set of sources for the full Gentium fonts at a later time. + +SIL will remain as maintainers of this font project, but we do not intend any further major releases. Our primary efforts will be going into the full Gentium package. Any contributions should be directed toward that project. + + +Acknowledgements +---------------- +(Here is where contributors can be acknowledged. If you make modifications be sure to add your name (N), email (E), web-address (W) and description (D). This list is sorted by last name in alphabetical order.) + +N: Victor Gaultney +E: victor_gaultney@sil.org +W: http://www.sil.org/~gaultney/ +D: Original Designer + +N: Annie Olsen +E: nrsi@sil.org +W: http://scripts.sil.org/ +D: Contributed some extended Latin glyphs + +N: SIL font engineers +E: nrsi@sil.org +W: http://scripts.sil.org/ +D: OpenType code and build support + +The Gentium project, and the Gentium Basic and Gentium Book Basic fonts, are maintained by SIL International. + +For more information please visit the Gentium page on SIL International's Computers and Writing systems website: +http://scripts.sil.org/gentium + +Or send an email to + + +Character Range Coverage +------------------------ + +C0 Controls and Basic Latin (U+0020..U+007E) +C1 Controls and Latin-1 Supplement (U+00A0..U+00FF) +Latin Extended-A (U+0100..U+0103, U+0106..U+010E, U+011A..U+0121, U+0124..U+0125, U+0128..U+012D, U+0130..U+0133, U+0139..U+013A, U+0141..U+0144, U+0147..U+0148, U+014A..U+0155, U+0158..U+015D, U+0160..U+0161, U+0164, U+0168..U+0171, U+00174..U+017E) +Latin Extended-B (U+0181, U+0186, U+0189..U+018A, U+018E, U+0190, U+0192, U+0197..U+019A, U+019D, U+019F..U+01A1, U+01A9..U+01AA, U+01AF..U+01B0, U+01B3..U+01B4, U+01B7, U+01CD..U+01E3, U+01E6..U+01E9, U+01EE..U+01EF, U+01F4..U+01F5, U+01F8..U+01FF, U+021E..U+021F, U+0226..U+0233, U+0237, U+023D, U+0241..U+0242, U+0244..U+0245, U+024A..U+024B) +IPA Extensions (U+0251, U+0253..U+0254, U+0256..U+0257, U+0259, U+025B, U+0263, U+0268..U+0269, U+026B, U+0272, U+0275, U+0283, U+0289..U+028A, U+028C, U+0292, U+0294, U+02A0) +Spacing Modifier Letters (U+02BC, U+02C0, U+02C6..U+02C7, U+02C9..U+02CB, U+02CD, U+02D7..U+02DD) +Combining Diacritical Marks (U+0300..U+0304,U+0306..U+030C, U+031B, U+0323, U+0327..U+0328, U+0331, U+033F, U+035F) +Greek and Coptic (U+03A0, U+03A9, U+03C0) +Latin Extended Additional (U+1E02..U+1E0F, U+1E14..U+1E17, U+1E1C..U+1E27, U+1E2E..U+1E3B, U+1E3E..U+1E49, U+1E4C..U+1E6F, U+1E78..U+1E99, U+1EA0..U+1EF9) +General Punctuation (U+2011, U+2013..U+2014, U+2018..U+201A, U+201C..U+201E, U+2020..U+2022, U+2026, U+2030, U+2039..U+203A, U+2044) +Currency Symbols (U+20AC) +Letterlike Symbols (U+2122..U+2123, U+2126) +Mathematical Operators (U+2202, U+2205..U+2206, U+220F, U+2211..U+2212, U+2219..U+221A, U+221E, U+222B, U+2248, U+2260, U+2264..U+2265) +Geometric Shapes (U+25CA, U+25CC) +Latin Extended-C (U+2C60..U+2C62) +Modifier Tone Letters (U+A700..U+A71A) +Latin Extended-D (U+A789..U+A78C) +Alphabetic Presentation Forms (U+FB01..U+FB02) +SIL PUA (U+F130..U+F131, U+F195, U+F197, U+F1C8, U+F1E9..U+F1EA, U+F20E..U+F20F, U+F211..U+F212, U+F218..U+F219, U+F21D..U+F21F, U+F242, U+F26A) diff --git a/wp-content/plugins/really-simple-captcha/gentium/GENTIUM-FAQ.txt b/wp-content/plugins/really-simple-captcha/gentium/GENTIUM-FAQ.txt new file mode 100644 index 0000000..ec803d5 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/gentium/GENTIUM-FAQ.txt @@ -0,0 +1,249 @@ +GENTIUM-FAQ +Gentium Basic Release 1.1 +4 April 2008 +======================== + +Here are some answers to frequently asked questions about the Gentium fonts: + + +General +======== + +How do you pronounce Gentium? + + The preferred pronunciation is with a soft G as in 'general', not a + hard one as in 'gold': JEN-tee-oom. + +What is GentiumAlt? + + It is a version of the font with redesigned diacritics (flatter + ones) to make it more suitable for use with stacking diacritics, and + for languages such as Vietnamese. The Greek glyphs also use the + Porsonic (single-curve) design for the circumflex. Since the main + Gentium fonts do not currently include any 'smart' rendering routines, + there is no easy way to access these alternate diacritic shapes from + within the regular Gentium font. The encoding of the fonts are the same, + so the same text can be viewed with either one. There is also no + problem with having both font families installed at the same time. + + +Licensing +========= + +I want to use Gentium in my publication - can I? + + Gentium is released under the SIL Open Font License, which permits use + for any publication, whether electronic or printed. For more answers + to use questions see the OFL-FAQ. The license, alongside information + specific to Gentium, is in the release package. + +I would like to bundle Gentium with my application - can I? + + This is our most common question. The SIL Open Font License allows + bundling with applications, even commercial ones, with some restrictions. + See the OFL file. + +Can I use the font on my web site? + + You can certainly create web pages that request that Gentium be used to + display them (if that font is available on the user's system). According + to the license, you are even allowed to place the font on your site for + people to download it. We would strongly recommend, however, that you + direct users to our site to download the font. This ensures that they + are always using the most recent version with bug fixes, etc. To make + this easier, we've simplified the URL for Gentium: + http://scripts.sil.org/gentium + +Is Gentium going to stay free? + + There is no intention to ever charge users for using Gentium. The + current version is licensed under a free/open license and future + versions will be similar. + + +Modification +============ + +I would like to modify Gentium to add a couple of characters I need. Can I? + + Yes - that is allowed as long as you abide by the conditions of the + SIL Open Font License. + +So will you add glyphs upon request? + + If you have a special symbol that you need (say, for a particular + transcription system), the best means of doing so will be to ensure + that the symbol makes it into the Unicode Standard. It is impossible + for us to add every glyph that every person desires, but we do place + a high priority on adding pretty much anything that falls in certain + Unicode ranges (extended Latin, Greek, Cyrillic). You can send us your + requests, but please understand that we are unlikely to add symbols + where the user base is very small, unless they have been accepted + into Unicode. + +Can I send you work I've done to be incorporated into Gentium? + + Yes! See the FONTLOG for information on becoming a contributor. + + +Technical +========= + +Can you help me get Gentium working on my system? + + We cannot afford to offer individual technical support. The best + resource is this website, where we hope to offer some limited help. + However, we do want to hear of any problems you encounter, so that + we can add them to the list of bugs to fix in later releases. + + Our contact address is . Please understand + that we cannot guarantee a personal response. + +I can't find all the extended Latin letters in the font. How do I type them? + + Gentium is Unicode-encoded, which means that the computer stores a + special, unique code for each letter in your document. Since most + keyboards do not have hundreds of keys, special software is needed + in order to type the hundreds of special characters supported by the + font. + +I can't find the 'o with right hook' in the font. Where is it? + + Combinations of base letters with diacritics are often called + composite, or pre-composed glyphs. Gentium has hundreds of these + (the ones that are included in Unicode). There are, however, many + common combinations that are not represented by a single composite. + It is possible to enter these into a document, but only as + individual components. So 'o with right hook' would be entered as + 'o', then 'right hook'. Although this may not look very good in some + cases, we're not able to anticipate every possible combination. + Future versions of Gentium will include 'smart font' support for + technologies such as OpenType and SIL's Graphite. This will make + diacritic positioning much better. The Gentium Basic fonts do, + however, include limited support for both OpenType and Graphite, + and demonstrate the type of support that will eventually be provided. + +Some diacritics are not aligning well with base glyphs, and if I type more +than one diacritic, they run into each other. Why is that? + + Gentium currently has no 'smart font' code for automatic diacritic + positioning, but the Gentium Basic fonts do, and similar support will + appear in the main fonts in the near future. + +How do I type the Greek letters? + + You need a Unicode-compatible keyboarding system, which is not + included in the distribution package. + +I'm having problems making PDFs -- why won't my document distill? + + Gentium is a large font, with lots of glyphs. As a result, some + printers can balk at PDFs that have the complete font embedded. The + easiest way to avoid this is to have Acrobat/Distiller subset the + font. This is generally a good idea anyway (with any font) and can + reduce the size of your files. + + +Basic +===== + +How are the Basic fonts (Gentium Basic, Gentium Book Basic) different +from Gentium? + + These font families are based on the original Gentium design, but with + additional weights. Both families come with a complete regular, bold, + italic and bold italic set of fonts. The supported character set, + however, is much smaller than for the main Gentium fonts. These + 'Basic' fonts support only the Basic Latin and Latin-1 Supplement + Unicode ranges, plus a selection of the more commonly used extended + Latin characters, with miscellaneous diacritical marks, symbols and + punctuation. In particular, these fonts do not support full extended + Latin IPA, complete support for Central European languages, Greek and + Cyrillic. + +What is the Book weight? + + It is a complete second font family that is slightly heavier overall, + and more useful for some purposes. The main Gentium family will + eventually have a complete matching Book weight, along with matching + italics. + +Why is the line spacing greater for the Basic fonts? + + In some environments, stacked diacritics in Gentium could display as + 'chopped-off'. Gentium Basic has slightly wider default line spacing + in order to avoid this problem. Most applications do, however, let you + set the line spacing explicitly, so you can have the lines spaced + precisely as you wish. + +Will you be accepting requests for additions to the Basic character set? + + No. We are now focusing our development efforts on the main Gentium + fonts, which already provide richer character set support. + +Is there an Alt version of the Basic fonts? + + No, although you may notice that capitals and some tall lowercase + letters do use 'low-profile' versions. + + +Future +====== + +Now that SIL International has taken over Gentium, who will be the next +designer? + + Victor Gaultney will remain as primary designer, but Annie Olsen, a + fellow type designer from the SIL Non-Roman Script Initiative, has + joined the project team. She is a former calligraphy teacher, and is + well suited for the task. Other members of the NRSI team will also + add their expertise in technical matters. + +Do you plan to include other typographic enhancements (small caps, old style +figures, etc.)? + + Those would be nice, wouldn't they? From a design point of view, + it would be great to have these refinements, and we haven't ruled + them out. But there are other needs that are much higher priority + (Bold, Cyrillic, etc.). If you think you could contribute some of + your time and effort to these enhancements, see the FONTLOG file for + information on becoming a contributor. + +What about bold? + + The Gentium Basic fonts include Bold and Bold Italic versions. The + main Gentium fonts will also include them in the future. + +Sans-serif? + + There is a definite need for a sans-serif font that shares some of + Gentium’s strengths -- high readability, economy of space, etc. It + would also be great if that font also harmonized well with Gentium. + We don't currently have any plans for a companion face, although one + of our other projects - Andika - may be useful. Andika is a sans-serif + font designed specifically for use in literacy programs around the + world, and is available from our web site. + +Will you be extending Gentium to cover other scripts, and Hebrew in +particular? + + It is very unlikely that we would do this, as there are so many + pressing needs in Latin, Greek and Cyrillic scripts. But you could + contribute to the project. + +When will Cyrillic be completed? + + As soon as we can get it done, but it is still a few months away. + +I need a couple of ancient Greek glyphs, such as the digamma. When will +those be ready? + + These have already been designed and will be in the next main release. + +Will there be a Type 1 version? What about OpenType? + + The next generation of Gentium will have OpenType, Graphite and AAT + support. We do not plan to produce Type 1 versions at this time, but + please write us if this is important (and tell us why). We are, however, + considering releasing a version in OT-CFF format, but it will not go + through the same careful testing as the standard OT/Graphite/AAT version. \ No newline at end of file diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBasB.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBasB.ttf new file mode 100644 index 0000000..0538a00 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBasB.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBasBI.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBasBI.ttf new file mode 100644 index 0000000..786c627 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBasBI.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBasI.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBasI.ttf new file mode 100644 index 0000000..e326cd7 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBasI.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBasR.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBasR.ttf new file mode 100644 index 0000000..6f37980 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBasR.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBkBasB.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasB.ttf new file mode 100644 index 0000000..0677a11 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasB.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBkBasBI.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasBI.ttf new file mode 100644 index 0000000..cf89857 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasBI.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBkBasI.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasI.ttf new file mode 100644 index 0000000..c62506b Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasI.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/GenBkBasR.ttf b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasR.ttf new file mode 100644 index 0000000..9c76a38 Binary files /dev/null and b/wp-content/plugins/really-simple-captcha/gentium/GenBkBasR.ttf differ diff --git a/wp-content/plugins/really-simple-captcha/gentium/OFL-FAQ.txt b/wp-content/plugins/really-simple-captcha/gentium/OFL-FAQ.txt new file mode 100644 index 0000000..cc9e6c2 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/gentium/OFL-FAQ.txt @@ -0,0 +1,216 @@ +OFL FAQ - Frequently Asked Questions about the SIL Open Font License (OFL) +Version 1.1 - 1 February 2007 +(See http://scripts.sil.org/OFL for updates) + + +1 ABOUT USING AND DISTRIBUTING FONTS LICENSED UNDER THE OFL + +1.1 Can I use the fonts in any publication, even embedded in the file? +Yes. You may use them like most other fonts, but unlike some fonts you may include an embedded subset of the fonts in your document. Such use does not require you to include this license or other files (listed in OFL condition 2), nor does it require any type of acknowledgement within the publication. Some mention of the font name within the publication information (such as in a colophon) is usually appreciated. If you wish to include the complete font as a separate file, you should distribute the full font package, including all existing acknowledgements, and comply with the OFL conditions. Of course, referencing or embedding an OFL font in any document does not change the license of the document itself. The requirement for fonts to remain under the OFL does not apply to any document created using the fonts and their derivatives. Similarly, creating any kind of graphic using a font under OFL does not make the resulting artwork subject to the OFL. + +1.2 Can I make web pages using these fonts? +Yes! Go ahead! Using CSS (Cascading Style Sheets) is recommended. + +1.3 Can I make the fonts available to others from my web site? +Yes, as long as you meet the conditions of the license (do not sell by itself, include the necessary files, rename Modified Versions, do not abuse the Author(s)' name(s) and do not sublicense). + +1.4 Can the fonts be included with Free/Libre and Open Source Software collections such as GNU/Linux and BSD distributions? +Yes! Fonts licensed under the OFL can be freely agreggated with software under FLOSS (Free/Libre and Open Source Software) licenses. Since fonts are much more useful aggregated to than merged with existing software, possible incompatibility with existing software licenses is not a problem. You can also repackage the fonts and the accompanying components in a .rpm or .deb package and include them in distro CD/DVDs and online repositories. + +1.5 I want to distribute the fonts with my program. Does this mean my program also has to be free and open source software? +No. Only the portions based on the font software are required to be released under the OFL. The intent of the license is to allow aggregation or bundling with software under restricted licensing as well. + +1.6 Can I include the fonts on a CD of freeware or commercial fonts? +Yes, as long some other font or software is also on the disk, so the OFL font is not sold by itself. + +1.7 Can I sell a software package that includes these fonts? +Yes, you can do this with both the Original Version and a Modified Version. Examples of bundling made possible by the OFL would include: word processors, design and publishing applications, training and educational software, edutainment software, etc. + +1.8 Why won't the OFL let me sell the fonts alone? +The intent is to keep people from making money by simply redistributing the fonts. The only people who ought to profit directly from the fonts should be the original authors, and those authors have kindly given up potential direct income to distribute their fonts under the OFL. Please honor and respect their contribution! + +1.9 I've come across a font released under the OFL. How can I easily get more information about the Original Version? How can I know where it stands compared to the Original Version or other Modified Versions? +Consult the copyright statement in the license for ways to contact the original authors. Consult the FONTLOG for information on how the font differs from the Original Version, and get in touch with the various contributors via the information in the acknowledgment section. Please consider using the Original Versions of the fonts whenever possible. + +1.10 What do you mean in condition 4? Can you provide examples of abusive promotion / endorsement / advertisement vs. normal acknowledgement? +The intent is that the goodwill and reputation of the author(s) should not be used in a way that makes it sound like the original author(s) endorse or approve of a specific Modified Version or software bundle. For example, it would not be right to advertise a word processor by naming the author(s) in a listing of software features, or to promote a Modified Version on a web site by saying "designed by ...". However, it would be appropriate to acknowledge the author(s) if your software package has a list of people who deserve thanks. We realize that this can seem to be a gray area, but the standard used to judge an acknowledgement is that if the acknowledgement benefits the author(s) it is allowed, but if it primarily benefits other parties, or could reflect poorly on the author(s), then it is not. + + +2 ABOUT MODIFYING OFL LICENSED FONTS + +2.1 Can I change the fonts? Are there any limitations to what things I can and cannot change? +You are allowed to change anything, as long as such changes do not violate the terms of the license. In other words, you are not allowed to remove the copyright statement(s) from the font, but you could add additional information into it that covers your contribution. + +2.2 I have a font that needs a few extra glyphs - can I take them from an OFL licensed font and copy them into mine? +Yes, but if you distribute that font to others it must be under the OFL, and include the information mentioned in condition 2 of the license. + +2.3 Can I charge people for my additional work? In other words, if I add a bunch of special glyphs and/or OpenType/Graphite code, can I sell the enhanced font? +Not by itself. Derivative fonts must be released under the OFL and cannot be sold by themselves. It is permitted, however, to include them in a larger software package (such as text editors, office suites or operating systems), even if the larger package is sold. In that case, you are strongly encouraged, but not required, to also make that derived font easily and freely available outside of the larger package. + +2.4 Can I pay someone to enhance the fonts for my use and distribution? +Yes. This is a good way to fund the further development of the fonts. Keep in mind, however, that if the font is distributed to others it must be under the OFL. You won't be able to recover your investment by exclusively selling the font, but you will be making a valuable contribution to the community. Please remember how you have benefitted from the contributions of others. + +2.5 I need to make substantial revisions to the font to make it work with my program. It will be a lot of work, and a big investment, and I want to be sure that it can only be distributed with my program. Can I restrict its use? +No. If you redistribute a Modified Version of the font it must be under the OFL. You may not restrict it in any way. This is intended to ensure that all released improvements to the fonts become available to everyone. But you will likely get an edge over competitors by being the first to distribute a bundle with the enhancements. Again, please remember how you have benefitted from the contributions of others. + +2.6 Do I have to make any derivative fonts (including source files, build scripts, documentation, etc.) publicly available? +No, but please do share your improvements with others. You may find that you receive more than what you gave in return. + +2.7 Why can't I use the Reserved Font Name(s) in my derivative font names? I'd like people to know where the design came from. +The best way to acknowledge the source of the design is to thank the original authors and any other contributors in the files that are distributed with your revised font (although no acknowledgement is required). The FONTLOG is a natural place to do this. Reserved Font Name(s) ensure that the only fonts that have the original names are the unmodified Original Versions. This allows designers to maintain artistic integrity while allowing collaboration to happen. It eliminates potential confusion and name conflicts. When choosing a name be creative and avoid names that reuse almost all the same letters in the same order or sound like the original. Keep in mind that the Copyright Holder(s) can allow a specific trusted partner to use Reserved Font Name(s) through a separate written agreement. + +2.8 What do you mean by "primary name as presented to the user"? Are you are referring to the font menu name? +Yes, the requirement to change the visible name used to differentiate the font from others applies to the font menu name and other mechanisms to specify a font in a document. It would be fine, for example, to keep a text reference to the original fonts in the description field, in your modified source file or in documentation provided alongside your derivative as long as no one could be confused that your modified source is the original. But you cannot use the Reserved Font Names in any way to identify the font to the user (unless the Copyright Holder(s) allow(s) it through a separate agreement, see section 2.7). Users who install derivatives ("Modified Versions") on their systems should not see any of the original names ("Reserved Font Names") in their font menus, for example. Again, this is to ensure that users are not confused and do not mistake a font for another and so expect features only another derivative or the Original Version can actually offer. Ultimately, creating name conflicts will cause many problems for the users as well as for the designer of both the Original and Modified versions, so please think ahead and find a good name for your own derivative. Font substitution systems like fontconfig, or application-level font fallback configuration within OpenOffice.org or Scribus, will also get very confused if the name of the font they are configured to substitute to actually refers to another physical font on the user's hard drive. It will help everyone if Original Versions and Modified Versions can easily be distinguished from one another and from other derivatives. The substitution mechanism itself is outside the scope of the license. Users can always manually change a font reference in a document or set up some kind of substitution at a higher level but at the lower level the fonts themselves have to respect the Reserved Font Name(s) requirement to prevent ambiguity. If a substitution is currently active the user should be aware of it. + +2.9 Am I not allowed to use any part of the Reserved Font Names? +You may not use the words of the font names, but you would be allowed to use parts of words, as long as you do not use any word from the Reserved Font Names entirely. We do not recommend using parts of words because of potential confusion, but it is allowed. For example, if "Foobar" was a Reserved Font Name, you would be allowed to use "Foo" or "bar", although we would not recommend it. Such an unfortunate choice would confuse the users of your fonts as well as make it harder for other designers to contribute. + +2.10 So what should I, as an author, identify as Reserved Font Names? +Original authors are encouraged to name their fonts using clear, distinct names, and only declare the unique parts of the name as Reserved Font Names. For example, the author of a font called "Foobar Sans" would declare "Foobar" as a Reserved Font Name, but not "Sans", as that is a common typographical term, and may be a useful word to use in a derivative font name. Reserved Font Names should also be single words. A font called "Flowing River" should have Reserved Font Names "Flowing" and "River", not "Flowing River". + +2.11 Do I, as an author, have to identify and Reserved Font Names? +No, but we strongly encourage you to do so. This is to avoid confusion between your work and Modified versions. You may, however, give certain trusted parties the right to use any of your Reserved Font Names through separate written agreements. For example, even if "Foobar" is a RFN, you could write up an agreement to give company "XYZ" the right to distribute a modified version with a name that includes "Foobar". This allows for freedom without confusion. + +2.12 Are any names (such as the main font name) reserved by default? +No. That is a change to the license as of version 1.1. If you want any names to be Reserved Font Names, they must be specified after the copyright statement. + +2.13 What is this FONTLOG thing exactly? +It has three purposes: 1) to provide basic information on the font to users and other developers, 2) to document changes that have been made to the font or accompanying files, either by the original authors or others, and 3) to provide a place to acknowledge the authors and other contributors. Please use it! See below for details on how changes should be noted. + +2.14 Am I required to update the FONTLOG? +No, but users, designers and other developers might get very frustrated at you if you don't! People need to know how derivative fonts differ from the originals, and how to take advantage of the changes, or build on them. + + +3 ABOUT THE FONTLOG + +The FONTLOG can take a variety of formats, but should include these four sections: + +3.1 FONTLOG for +This file provides detailed information on the font software. This information should be distributed along with the fonts and any derivative works. + +3.2 Basic Font Information +(Here is where you would describe the purpose and brief specifications for the font project, and where users can find more detailed documentation. It can also include references to how changes can be contributed back to the Original Version. You may also wish to include a short guide to the design, or a reference to such a document.) + +3.3 ChangeLog +(This should list both major and minor changes, most recent first. Here are some examples:) + +1 Feb 2005 (Jane Doe) Version 1.1 +- Improved build script performance and verbosity +- Extended the smart code documentation +- Corrected minor typos in the documentation +- Fixed position of combining inverted breve below (U+032F) +- Added OpenType/Graphite smart code for Armenian +- Added Armenian glyphs (U+0531 -> U+0587) +- Released as "" + +1 Jan 2005 (Joe Smith) Version 1.0 +- Initial release of font "" + +3.4 Acknowledgements +(Here is where contributors can be acknowledged. + +If you make modifications be sure to add your name (N), email (E), web-address (W) and description (D). This list is sorted by last name in alphabetical order.) + +N: Jane Doe +E: jane@university.edu +W: http://art.university.edu/projects/fonts +D: Contributor - Armenian glyphs and code + +N: Fred Foobar +E: fred@foobar.org +W: http://foobar.org +D: Contributor - misc Graphite fixes + +N: Pat Johnson +E: pat@fontstudio.org +W: http://pat.fontstudio.org +D: Designer - Greek & Cyrillic glyphs based on Roman design + +N: Tom Parker +E: tom@company.com +W: http://www.company.com/tom/projects/fonts +D: Engineer - original smart font code + +N: Joe Smith +E: joe@fontstudio.org +W: http://joe.fontstudio.org +D: Designer - original Roman glyphs + +(Original authors can also include information here about their organization.) + + +4 ABOUT MAKING CONTRIBUTIONS + +4.1 Why should I contribute my changes back to the original authors? +It would benefit many people if you contributed back to what you've received. Providing your contributions and improvements to the fonts and other components (data files, source code, build scripts, documentation, etc.) could be a tremendous help and would encourage others to contribute as well and 'give back', which means you will have an opportunity to benefit from other people's contributions as well. Sometimes maintaining your own separate version takes more effort than merging back with the original. Be aware that any contributions, however, must be either your own original creation or work that you own, and you may be asked to affirm that clearly when you contribute. + +4.2 I've made some very nice improvements to the font, will you consider adopting them and putting them into future Original Versions? +Most authors would be very happy to receive such contributions. Keep in mind that it is unlikely that they would want to incorporate major changes that would require additional work on their end. Any contributions would likely need to be made for all the fonts in a family and match the overall design and style. Authors are encouraged to include a guide to the design with the fonts. It would also help to have contributions submitted as patches or clearly marked changes (the use of smart source revision control systems like subversion, svk or bzr is a good idea). Examples of useful contributions are bug fixes, additional glyphs, stylistic alternates (and the smart font code to access them) or improved hinting. + +4.3 How can I financially support the development of OFL fonts? +It is likely that most authors of OFL fonts would accept financial contributions - contact them for instructions on how to do this. Such contributions would support future development. You can also pay for others to enhance the fonts and contribute the results back to the original authors for inclusion in the Original Version. + + +5 ABOUT THE LICENSE + +5.1 I see that this is version 1.1 of the license. Will there be later changes? +Version 1.1 is the first minor revision of the OFL. We are confident that version 1.1 will meet most needs, but are open to future improvements. Any revisions would be for future font releases, and previously existing licenses would remain in effect. No retroactive changes are possible, although the Copyright Holder(s) can re-release the font under a revised OFL. All versions will be available on our web site: http://scripts.sil.org/OFL. + +5.2 Can I use the SIL Open Font License for my own fonts? +Yes! We heartily encourage anyone to use the OFL to distribute their own original fonts. It is a carefully constructed license that allows great freedom along with enough artistic integrity protection for the work of the authors as well as clear rules for other contributors and those who redistribute the fonts. Some additional information about using the OFL is included at the end of this FAQ. + +5.3 Does this license restrict the rights of the Copyright Holder(s)? +No. The Copyright Holder(s) still retains all the rights to their creation; they are only releasing a portion of it for use in a specific way. For example, the Copyright Holder(s) may choose to release a 'basic' version of their font under the OFL, but sell a restricted 'enhanced' version. Only the Copyright Holder(s) can do this. + +5.4 Is the OFL a contract or a license? +The OFL is a license and not a contract and so does not require you to sign it to have legal validity. By using, modifying and redistributing components under the OFL you indicate that you accept the license. + +5.5 How about translating the license and the FAQ into other languages? +SIL certainly recognises the need for people who are not familiar with English to be able to understand the OFL and this FAQ better in their own language. Making the license very clear and readable is a key goal of the OFL. + +If you are an experienced translator, you are very welcome to help translating the OFL and its FAQ so that designers and users in your language community can understand the license better. But only the original English version of the license has legal value and has been approved by the community. Translations do not count as legal substitutes and should only serve as a way to explain the original license. SIL - as the author and steward of the license for the community at large - does not approve any translation of the OFL as legally valid because even small translations ambiguities could be abused and create problems. + +We give permission to publish unofficial translations into other languages provided that they comply with the following guidelines: + +- put the following disclaimer in both English and the target language stating clearly that the translation is unofficial: + +"This is an unofficial translation of the SIL Open Font License into $language. It was not published by SIL International, and does not legally state the distribution terms for fonts that use the OFL. A release under the OFL is only valid when using the original English text. + +However, we recognize that this unofficial translation will help users and designers not familiar with English to understand the SIL OFL better and make it easier to use and release font families under this collaborative font design model. We encourage designers who consider releasing their creation under the OFL to read the FAQ in their own language if it is available. + +Please go to http://scripts.sil.org/OFL for the official version of the license and the accompanying FAQ." +" + +- keep your unofficial translation current and update it at our request if needed, for example if there is any ambiguity which could lead to confusion. + +If you start such a unofficial translation effort of the OFL and its accompanying FAQ please let us know, thank you. + + +6 ABOUT SIL INTERNATIONAL + +6.1 Who is SIL International and what does it do? +SIL International is a worldwide faith-based education and development organization (NGO) that studies, documents, and assists in developing the world's lesser-known languages through literacy, linguistics, translation, and other academic disciplines. SIL makes its services available to all without regard to religious belief, political ideology, gender, race, or ethnic background. SIL's members and volunteers share a Christian commitment. + +6.2 What does this have to do with font licensing? +The ability to read, write, type and publish in one's own language is one of the most critical needs for millions of people around the world. This requires fonts that are widely available and support lesser-known languages. SIL develops - and encourages others to develop - a complete stack of writing systems implementation components available under open licenses. This open stack includes input methods, smart fonts, smart rendering libraries and smart applications. There has been a need for a common open license that is specifically applicable to fonts and related software (a crucial component of this stack) so SIL developed the SIL Open Font License with the help of the FLOSS community. + +6.3 How can I contact SIL? +Our main web site is: http://www.sil.org/ +Our site about complex scripts is: http://scripts.sil.org/ +Information about this license (including contact email information) is at: http://scripts.sil.org/OFL + + +7 ABOUT USING THE OFL FOR YOUR ORIGINAL FONTS + +If you want to release your fonts under the OFL, you only need to do the following: + +7.1 Put your copyright and reserved font names information in the beginning of the main OFL file. +7.2 Put your copyright and the OFL references in your various font files (such as in the copyright, license and description fields) and in your other components (build scripts, glyph databases, documentation, rendering samples, etc). +7.3 Write an initial FONTLOG for your font and include it in the release package. +7.4 Include the OFL in your release package. +7.5 We also highly recommend you include the relevant practical documentation on the license by putting the OFL-FAQ in your package. + + +That's all. If you have any more questions please get in touch with us. + + diff --git a/wp-content/plugins/really-simple-captcha/gentium/OFL.txt b/wp-content/plugins/really-simple-captcha/gentium/OFL.txt new file mode 100644 index 0000000..2c09f25 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/gentium/OFL.txt @@ -0,0 +1,94 @@ +Copyright (c) 2003-2008 SIL International (http://www.sil.org/), +with Reserved Font Names "Gentium" and "SIL". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 1 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that the font +names of derivative works are changed. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/wp-content/plugins/really-simple-captcha/license.txt b/wp-content/plugins/really-simple-captcha/license.txt new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/license.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/wp-content/plugins/really-simple-captcha/readme.txt b/wp-content/plugins/really-simple-captcha/readme.txt new file mode 100644 index 0000000..cc96206 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/readme.txt @@ -0,0 +1,113 @@ +=== Really Simple CAPTCHA === +Contributors: takayukister +Donate link: http://contactform7.com/donate/ +Tags: captcha +Requires at least: 3.7 +Tested up to: 3.8.1 +Stable tag: 1.8 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Really Simple CAPTCHA is a CAPTCHA module intended to be called from other plugins. It is originally created for my Contact Form 7 plugin. + +== Description == + +Really Simple CAPTCHA does not work alone and is intended to work with other plugins. It is originally created for [Contact Form 7](http://contactform7.com/), however, you can use it with your own plugin. + +Note: This product is "really simple" as its name suggests, i.e., it is not strongly secure. If you need perfect security, you should try other solutions. + += How does it work? = + +Really Simple CAPTCHA does not use PHP "Sessions" for storing states, unlike many other PHP CAPTCHA solutions, but stores them as temporary files. This allows you to embed it into WordPress without worrying about conflicts. + +When you generate a CAPTCHA, Really Simple CAPTCHA creates two files for it; one is an image file of CAPTCHA, and the other is a text file which stores the correct answer to the CAPTCHA. + +The two files have the same (random) prefix in their file names, for example, "a7hk3ux8p.png" and "a7hk3ux8p.txt." In this case, for example, when the respondent answers "K5GF" as an answer to the "a7hk3ux8p.png" image, then Really Simple CAPTCHA calculates hash of "K5GF" and tests it against the hash stored in the "a7hk3ux8p.txt" file. If the two match, the answer is confirmed as correct. + += How to use with your plugin = + +Note: Below are instructions for plugin developers. + +First, create an instance of ReallySimpleCaptcha class: + + $captcha_instance = new ReallySimpleCaptcha(); + +You can change the instance variables as you wish. + + // Change the background color of CAPTCHA image to black + $captcha_instance->bg = array( 0, 0, 0 ); + +See really-simple-captcha.php if you are interested in other variables. + +Generate a random word for CAPTCHA. + + $word = $captcha_instance->generate_random_word(); + +Generate an image file and a corresponding text file in the temporary directory. + + $prefix = mt_rand(); + $captcha_instance->generate_image( $prefix, $word ); + +Then, show the image and get an answer from respondent. + +Check the correctness of the answer. + + $correct = $captcha_instance->check( $prefix, $the_answer_from_respondent ); + +If the $correct is true, go ahead. Otherwise, block the respondent -- as it would appear not to be human. + +And last, remove the temporary image and text files, as they are no longer in use. + + $captcha_instance->remove( $prefix ); + +That's all. + +If you wish to see a live sample of this, you can try [Contact Form 7](http://contactform7.com/). + +== Installation == + +In most cases you can install automatically from WordPress. + +However, if you install this manually, follow these steps: + +1. Upload the entire `really-simple-captcha` folder to the `/wp-content/plugins/` directory. +1. Activate the plugin through the 'Plugins' menu in WordPress. + +FYI: There is no "control panel" for this plugin. + +== Frequently Asked Questions == + += CAPTCHA does not work; the image does not show up. = + +Really Simple CAPTCHA needs GD and FreeType library installed on your server. Ask your server administrator if they are installed. + +Also, make the temporary file folder writable. The location of the temporary file folder is managed by the instance variable `tmp_dir` of ReallySimpleCaptcha class. Note that the setting varies depending on the calling plugin. For example, Contact Form 7 uses `wp-contents/uploads/wpcf7_captcha` as the temporary folder basically, but it can use different folder depending on your settings. + +If you have any further questions, please submit them [to the support forum](http://wordpress.org/support/plugin/really-simple-captcha). + +== Screenshots == + +1. screenshot-1.png + +== Changelog == + += 1.8 = + +* The required WordPress version changed to 3.7 and higher. +* Introduce normalize_path() to normalize file paths on different file systems. + += 1.7 = + +* The required WordPress version changed to 3.5 and higher. +* Remove spaces from response automatically as some users misthink there are spaces between letters. + += 1.6 = + +* Bundled font changed to Gentium Basic 1.1. +* Some workarounds for infrequently reported problems on Windows server. +* Do temp file cleanup every time before generating CAPTCHA image. + += 1.5 = + +* The required WordPress version changed to 3.2 and higher. +* Use plain text file as answer file (again). This time, hash value generated with hash_hmac() is stored in the file. diff --git a/wp-content/plugins/really-simple-captcha/really-simple-captcha.php b/wp-content/plugins/really-simple-captcha/really-simple-captcha.php new file mode 100644 index 0000000..daef6e0 --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/really-simple-captcha.php @@ -0,0 +1,315 @@ +chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789'; + + /* Length of a word in an image */ + $this->char_length = 4; + + /* Array of fonts. Randomly picked up per character */ + $this->fonts = array( + dirname( __FILE__ ) . '/gentium/GenBkBasR.ttf', + dirname( __FILE__ ) . '/gentium/GenBkBasI.ttf', + dirname( __FILE__ ) . '/gentium/GenBkBasBI.ttf', + dirname( __FILE__ ) . '/gentium/GenBkBasB.ttf' ); + + /* Directory temporary keeping CAPTCHA images and corresponding text files */ + $this->tmp_dir = path_join( dirname( __FILE__ ), 'tmp' ); + + /* Array of CAPTCHA image size. Width and height */ + $this->img_size = array( 72, 24 ); + + /* Background color of CAPTCHA image. RGB color 0-255 */ + $this->bg = array( 255, 255, 255 ); + + /* Foreground (character) color of CAPTCHA image. RGB color 0-255 */ + $this->fg = array( 0, 0, 0 ); + + /* Coordinates for a text in an image. I don't know the meaning. Just adjust. */ + $this->base = array( 6, 18 ); + + /* Font size */ + $this->font_size = 14; + + /* Width of a character */ + $this->font_char_width = 15; + + /* Image type. 'png', 'gif' or 'jpeg' */ + $this->img_type = 'png'; + + /* Mode of temporary image files */ + $this->file_mode = 0444; + + /* Mode of temporary answer text files */ + $this->answer_file_mode = 0440; + } + + /** + * Generate and return a random word. + * + * @return string Random word with $chars characters x $char_length length + */ + public function generate_random_word() { + $word = ''; + + for ( $i = 0; $i < $this->char_length; $i++ ) { + $pos = mt_rand( 0, strlen( $this->chars ) - 1 ); + $char = $this->chars[$pos]; + $word .= $char; + } + + return $word; + } + + /** + * Generate CAPTCHA image and corresponding answer file. + * + * @param string $prefix File prefix used for both files + * @param string $word Random word generated by generate_random_word() + * @return string|bool The file name of the CAPTCHA image. Return false if temp directory is not available. + */ + public function generate_image( $prefix, $word ) { + if ( ! $this->make_tmp_dir() ) + return false; + + $this->cleanup(); + + $dir = trailingslashit( $this->tmp_dir ); + $filename = null; + + if ( $im = imagecreatetruecolor( $this->img_size[0], $this->img_size[1] ) ) { + $bg = imagecolorallocate( $im, $this->bg[0], $this->bg[1], $this->bg[2] ); + $fg = imagecolorallocate( $im, $this->fg[0], $this->fg[1], $this->fg[2] ); + + imagefill( $im, 0, 0, $bg ); + + $x = $this->base[0] + mt_rand( -2, 2 ); + + for ( $i = 0; $i < strlen( $word ); $i++ ) { + $font = $this->fonts[array_rand( $this->fonts )]; + $font = $this->normalize_path( $font ); + + imagettftext( $im, $this->font_size, mt_rand( -12, 12 ), $x, + $this->base[1] + mt_rand( -2, 2 ), $fg, $font, $word[$i] ); + $x += $this->font_char_width; + } + + switch ( $this->img_type ) { + case 'jpeg': + $filename = sanitize_file_name( $prefix . '.jpeg' ); + $file = $this->normalize_path( $dir . $filename ); + imagejpeg( $im, $file ); + break; + case 'gif': + $filename = sanitize_file_name( $prefix . '.gif' ); + $file = $this->normalize_path( $dir . $filename ); + imagegif( $im, $file ); + break; + case 'png': + default: + $filename = sanitize_file_name( $prefix . '.png' ); + $file = $this->normalize_path( $dir . $filename ); + imagepng( $im, $file ); + } + + imagedestroy( $im ); + @chmod( $file, $this->file_mode ); + } + + $this->generate_answer_file( $prefix, $word ); + + return $filename; + } + + /** + * Generate answer file corresponding to CAPTCHA image. + * + * @param string $prefix File prefix used for answer file + * @param string $word Random word generated by generate_random_word() + */ + public function generate_answer_file( $prefix, $word ) { + $dir = trailingslashit( $this->tmp_dir ); + $answer_file = $dir . sanitize_file_name( $prefix . '.txt' ); + $answer_file = $this->normalize_path( $answer_file ); + + if ( $fh = @fopen( $answer_file, 'w' ) ) { + $word = strtoupper( $word ); + $salt = wp_generate_password( 64 ); + $hash = hash_hmac( 'md5', $word, $salt ); + + $code = $salt . '|' . $hash; + + fwrite( $fh, $code ); + fclose( $fh ); + } + + @chmod( $answer_file, $this->answer_file_mode ); + } + + /** + * Check a response against the code kept in the temporary file. + * + * @param string $prefix File prefix used for both files + * @param string $response CAPTCHA response + * @return bool Return true if the two match, otherwise return false. + */ + public function check( $prefix, $response ) { + if ( 0 == strlen( $prefix ) ) { + return false; + } + + $response = str_replace( array( " ", "\t" ), '', $response ); + $response = strtoupper( $response ); + + $dir = trailingslashit( $this->tmp_dir ); + $filename = sanitize_file_name( $prefix . '.txt' ); + $file = $this->normalize_path( $dir . $filename ); + + if ( @is_readable( $file ) && ( $code = file_get_contents( $file ) ) ) { + $code = explode( '|', $code, 2 ); + + $salt = $code[0]; + $hash = $code[1]; + + if ( hash_hmac( 'md5', $response, $salt ) == $hash ) + return true; + } + + return false; + } + + /** + * Remove temporary files with given prefix. + * + * @param string $prefix File prefix + */ + public function remove( $prefix ) { + $suffixes = array( '.jpeg', '.gif', '.png', '.php', '.txt' ); + + foreach ( $suffixes as $suffix ) { + $dir = trailingslashit( $this->tmp_dir ); + $filename = sanitize_file_name( $prefix . $suffix ); + $file = $this->normalize_path( $dir . $filename ); + + if ( @is_file( $file ) ) { + unlink( $file ); + } + } + } + + /** + * Clean up dead files older than given length of time. + * + * @param int $minutes Consider older files than this time as dead files + * @return int|bool The number of removed files. Return false if error occurred. + */ + public function cleanup( $minutes = 60 ) { + $dir = trailingslashit( $this->tmp_dir ); + $dir = $this->normalize_path( $dir ); + + if ( ! @is_dir( $dir ) || ! @is_readable( $dir ) ) + return false; + + $is_win = ( 'WIN' === strtoupper( substr( PHP_OS, 0, 3 ) ) ); + + if ( ! ( $is_win ? win_is_writable( $dir ) : @is_writable( $dir ) ) ) + return false; + + $count = 0; + + if ( $handle = @opendir( $dir ) ) { + while ( false !== ( $filename = readdir( $handle ) ) ) { + if ( ! preg_match( '/^[0-9]+\.(php|txt|png|gif|jpeg)$/', $filename ) ) + continue; + + $file = $this->normalize_path( $dir . $filename ); + + $stat = @stat( $file ); + if ( ( $stat['mtime'] + $minutes * 60 ) < time() ) { + @unlink( $file ); + $count += 1; + } + } + + closedir( $handle ); + } + + return $count; + } + + /** + * Make a temporary directory and generate .htaccess file in it. + * + * @return bool True on successful create, false on failure. + */ + public function make_tmp_dir() { + $dir = trailingslashit( $this->tmp_dir ); + $dir = $this->normalize_path( $dir ); + + if ( ! wp_mkdir_p( $dir ) ) + return false; + + $htaccess_file = $this->normalize_path( $dir . '.htaccess' ); + + if ( file_exists( $htaccess_file ) ) + return true; + + if ( $handle = @fopen( $htaccess_file, 'w' ) ) { + fwrite( $handle, 'Order deny,allow' . "\n" ); + fwrite( $handle, 'Deny from all' . "\n" ); + fwrite( $handle, '' . "\n" ); + fwrite( $handle, ' Allow from all' . "\n" ); + fwrite( $handle, '' . "\n" ); + fclose( $handle ); + } + + return true; + } + + /** + * Normalize a filesystem path. + * + * This should be replaced by wp_normalize_path when the plugin's + * minimum requirement becomes WordPress 3.9 or higher. + * + * @param string $path Path to normalize. + * @return string Normalized path. + */ + private function normalize_path( $path ) { + $path = str_replace( '\\', '/', $path ); + $path = preg_replace( '|/+|', '/', $path ); + return $path; + } +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/really-simple-captcha/tmp/index.php b/wp-content/plugins/really-simple-captcha/tmp/index.php new file mode 100644 index 0000000..4e6c07c --- /dev/null +++ b/wp-content/plugins/really-simple-captcha/tmp/index.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/wp-content/plugins/wordfence/css/colorbox.css b/wp-content/plugins/wordfence/css/colorbox.css new file mode 100644 index 0000000..ed2ef06 --- /dev/null +++ b/wp-content/plugins/wordfence/css/colorbox.css @@ -0,0 +1,64 @@ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{ + background: #777; + background: -webkit-radial-gradient(rgba(120, 120, 120, 0.8), rgba(100, 100, 100, 0.8) 50%, rgba(70, 70, 70, 1)); + background: -moz-radial-gradient(rgba(120, 120, 120, 0.6), rgba(100, 100, 100, 0.8) 20%, rgba(70, 70, 70, 1)); +} +#colorbox { } + #cboxContent { background:#fff; overflow:hidden; padding: 0 0 8px; margin: 20px; + -webkit-border-radius: 3px 3px 2px 2px; -moz-border-radius: 3px 3px 2px 2px; border-radius: 3px 3px 2px 2px; /* border radius */ + -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.4); -moz-box-shadow: 0 2px 4px rgba(0,0,0,.4); box-shadow: 0 2px 4px rgba(0,0,0,.4); /* box shadow */ + -webkit-background-clip: padding-box; /* smoother borders with webkit */ } + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent { + /* margin-bottom:28px; */ + /* MDM added: */ margin: 10px 20px 28px 20px; font-family: Arial; color: #333; + -webkit-border-radius: 2px 2px 0 0; -moz-border-radius: 2px 2px 0 0; border-radius: 2px 2px 0 0; /* border radius */ + } + #cboxTitle{position:absolute; bottom:8px; left:5px; text-align:center; width:100%; color:#949494;} + #cboxCurrent{position:absolute; bottom:8px; left:63px; color:#949494; text-indent: -9999px;} + #cboxSlideshow{position:absolute; bottom:8px; right:35px; color:#0092ef;} + #cboxPrevious{position:absolute; bottom:5px; left:5px; background:url(../images/lightbox-controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxPrevious.hover{background-position:-75px -25px;} + #cboxNext{position:absolute; bottom:5px; left:32px; background:url(../images/lightbox-controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxNext.hover{background-position:-50px -25px;} + #cboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center;} + #cboxClose{position:absolute; bottom:5px; right:5px; background:url(../images/lightbox-controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;} + #cboxClose.hover{background-position:-25px -25px;} + +/* + The following fixes a problem where IE7+ replaces a PNG's alpha transparency with a black fill + when an alpha filter (opacity change) is set on the element or ancestor element. +*/ +.cboxIE #cboxTopLeft, +.cboxIE #cboxTopCenter, +.cboxIE #cboxTopRight, +.cboxIE #cboxBottomLeft, +.cboxIE #cboxBottomCenter, +.cboxIE #cboxBottomRight, +.cboxIE #cboxMiddleLeft, +.cboxIE #cboxMiddleRight { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF); +} + + diff --git a/wp-content/plugins/wordfence/css/diff.css b/wp-content/plugins/wordfence/css/diff.css new file mode 100644 index 0000000..4d9bbc2 --- /dev/null +++ b/wp-content/plugins/wordfence/css/diff.css @@ -0,0 +1,118 @@ +body { + background: #fff; + font-family: Arial; + font-size: 12px; +} +.Differences { + width: 100%; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; +} + +.Differences thead th { + text-align: left; + border-bottom: 1px solid #000; + background: #aaa; + color: #000; + padding: 4px; +} +.Differences tbody th { + text-align: right; + background: #ccc; + width: 4em; + padding: 1px 2px; + border-right: 1px solid #000; + vertical-align: top; + font-size: 13px; +} + +.Differences td { + padding: 1px 2px; + font-family: Consolas, monospace; + font-size: 13px; +} + +.DifferencesSideBySide .ChangeInsert td.Left { + background: #dfd; +} + +.DifferencesSideBySide .ChangeInsert td.Right { + background: #cfc; +} + +.DifferencesSideBySide .ChangeDelete td.Left { + background: #f88; +} + +.DifferencesSideBySide .ChangeDelete td.Right { + background: #faa; +} + +.DifferencesSideBySide .ChangeReplace .Left { + background: #fe9; +} + +.DifferencesSideBySide .ChangeReplace .Right { + background: #fd8; +} + +.Differences ins, .Differences del { + text-decoration: none; +} + +.DifferencesSideBySide .ChangeReplace ins, .DifferencesSideBySide .ChangeReplace del { + background: #fc0; +} + +.Differences .Skipped { + background: #f7f7f7; +} + +.DifferencesInline .ChangeReplace .Left, +.DifferencesInline .ChangeDelete .Left { + background: #fdd; +} + +.DifferencesInline .ChangeReplace .Right, +.DifferencesInline .ChangeInsert .Right { + background: #dfd; +} + +.DifferencesInline .ChangeReplace ins { + background: #9e9; +} + +.DifferencesInline .ChangeReplace del { + background: #e99; +} + +pre { + width: 100%; + overflow: auto; +} +h1 { + background: url(../images/wordfence-logo-64x64.png); + background-position: 0 0; + background-repeat: no-repeat; + height: 64px; + vertical-align: middle; + padding: 10px 0 0 70px; + margin: 20px 0 10px 0; + font-size: 34px; + color: #777; +} +table.summary { + font-weight: bold; +} +.diffFooter { + text-align: center; + font-size: 16px; + color: #999; + font-family: Verdana; + margin: 50px auto 50px auto; +} +.diffFooter a { + color: #999; +} + diff --git a/wp-content/plugins/wordfence/css/dt_table.css b/wp-content/plugins/wordfence/css/dt_table.css new file mode 100644 index 0000000..9ec00c1 --- /dev/null +++ b/wp-content/plugins/wordfence/css/dt_table.css @@ -0,0 +1,54 @@ +.paging_two_button .ui-button{float:left;cursor:hand} +.paging_full_numbers .ui-button{cursor:hand;margin:0;padding:2px 6px} +.dataTables_paginate .ui-button{margin-right:-.1em!important} +.dataTables_wrapper .ui-toolbar{padding:5px} +.dataTables_paginate{width:auto;float:right;text-align:right} +.dataTables_info{float:left} +table.display thead th{cursor:pointer;text-align:left;font-size:11px;border:1px solid #ccc;padding-right:4px;text-transform:uppercase} +table.display thead th .th_wrapp{padding:8px 4px 5px 9px} +table.display thead th.sorting_disabled{cursor:default} +div.dataTables_wrapper .ui-widget-header{font-weight:400} +table.display thead th div.DataTables_sort_wrapper{position:relative;padding-right:20px} +table.display thead th div.DataTables_sort_wrapper span{position:absolute;top:50%;margin-top:-8px;right:0} +.dataTables_wrapper{position:relative;_height:302px;clear:both;overflow:hidden} +.dataTables_processing{position:absolute;top:0;left:50%;width:250px;margin-left:-125px;border:1px solid #ddd;text-align:center;color:#999;padding:2px 0} +.dataTables_length{width:40%;float:left} +.dataTables_filter{width:50%;float:right;text-align:right} +.dataTables_filter input {border:1px;border-color:#b8b8b8 #e2e2e2 #e2e2e2 #b8b8b8;border-style:solid;padding:2px} +.paginate_disabled_previous,.paginate_enabled_previous,.paginate_disabled_next,.paginate_enabled_next{height:19px;width:19px;margin-left:3px;float:left} +.paginate_enabled_previous,.paginate_enabled_next{cursor:pointer} +.paginate_disabled_previous{background-image:url(../images/back_disabled.jpg)} +.paginate_enabled_previous{background-image:url(../images/back_enabled.jpg)} +.paginate_disabled_next{background-image:url(../images/forward_disabled.jpg)} +.paginate_enabled_next{background-image:url(../images/forward_enabled.jpg)} +table.display{width:800px;clear:both;border-collapse:collapse;margin:0 0 24px;background:#fff;position:relative;top:12px} +table.display tfoot th{font-weight:400;padding:3px 8px 3px 8px} +table.display tr.heading2 td{border-bottom:1px solid #aaa} +table.display td{padding:5px 8px;border:1px solid #ccc} +.sorting_asc div.th_wrapp{background:url(../images/sort_asc.gif) no-repeat right center} +.sorting_desc div.th_wrapp{background:url(../images/sort_desc.gif) no-repeat right center} +.sorting_asc_disabled div.th_wrapp{background: url('../images/sort_asc_disabled.gif') no-repeat center right} +.sorting_desc_disabled div.th_wrapp{background: url('../images/sort_desc_disabled.gif') no-repeat center right} +.sorting div.th_wrapp{background:url(../images/sort_both.gif) no-repeat right center} +tr.odd{background-color:#f5f5f5} +tr.even{background-color:#fff} +.top,.bottom{background-color:#F5F5F5;border:1px solid #CCC;padding:15px} +.top .dataTables_info{float:none} +tfoot input{width:100%;color:#444;margin:.5em 0} +tfoot input.search_init{color:#999} +td.group{background-color:#d1cfd0;border-bottom:2px solid #A19B9E;border-top:2px solid #A19B9E} +td.details{background-color:#d1cfd0;border:2px solid #A19B9E} +.example_alt_pagination div.dataTables_info{width:40%} +.paging_full_numbers span.paginate_button,.paging_full_numbers span.paginate_active{border:1px solid #ccc;cursor:pointer;margin:0 0 0 5px;padding:2px 5px} +.paging_full_numbers span.paginate_button:hover{background-color:#e5e5e5} +.paging_full_numbers span.paginate_active{background-color:#e5e5e5} +.paging_full_numbers span.paginate_button_disabled {color:#ccc;cursor:default} +.paging_full_numbers span.paginate_button_disabled:hover {background:#fff} +table.display tr.even.row_selected td{background-color:#B0BED9} +table.display tr.odd.row_selected td{background-color:#9FAFD1} +.sorting_1 {background:#f5f5f5} +table.display td.center,.dataTables_empty{text-align:center} +.dataTables_empty{background:#fff} +.paging_full_numbers span.paginate_button{background-color:#fff} +.dataTables_scroll,.clear{clear:both} +.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_processing,.paging_full_numbers span.paginate_button,.paging_full_numbers span.paginate_active {font-size:11px} diff --git a/wp-content/plugins/wordfence/css/fullLog.css b/wp-content/plugins/wordfence/css/fullLog.css new file mode 100644 index 0000000..76a5284 --- /dev/null +++ b/wp-content/plugins/wordfence/css/fullLog.css @@ -0,0 +1,21 @@ +body { + background: #fff; + font-family: Arial; + font-size: 12px; +} +h1 { + background: url(../images/wordfence-logo-64x64.png); + background-position: 0 0; + background-repeat: no-repeat; + height: 64px; + vertical-align: middle; + padding: 10px 0 0 70px; + margin: 20px 0 10px 0; + font-size: 34px; + color: #777; +} +.error { + color: #F00; + font-weight: bold; + margin: 20px 0 20px 0; +} diff --git a/wp-content/plugins/wordfence/css/iptraf.css b/wp-content/plugins/wordfence/css/iptraf.css new file mode 100644 index 0000000..3381e77 --- /dev/null +++ b/wp-content/plugins/wordfence/css/iptraf.css @@ -0,0 +1,49 @@ +body { + background: #fff; + font-family: Arial; + font-size: 12px; +} + + +pre { + width: 100%; + overflow: auto; +} +h1 { + background: url(../images/wordfence-logo-64x64.png); + background-position: 0 0; + background-repeat: no-repeat; + height: 64px; + vertical-align: middle; + padding: 10px 0 0 70px; + margin: 20px 0 10px 0; + font-size: 34px; + color: #777; +} + +.footer { + text-align: center; + font-size: 16px; + color: #999; + font-family: Verdana; + margin: 50px auto 50px auto; +} +.footer a { + color: #999; +} +td, th { + vertical-align: top; +} +th, td { + text-align: left; + padding-bottom: 5px; +} +th { + white-space:nowrap; +} +th.HTTP, td.HTTP { + padding: 0; + font-weight: normal; + font-size: 10px; +} +th.HTTP { padding-right: 5px; } diff --git a/wp-content/plugins/wordfence/css/main.css b/wp-content/plugins/wordfence/css/main.css new file mode 100644 index 0000000..0aaa7e3 --- /dev/null +++ b/wp-content/plugins/wordfence/css/main.css @@ -0,0 +1,422 @@ +.wordfenceWrap { + margin: 20px 0 0 20px; +} +div.wordfenceLive { + height: 29px; + white-space: nowrap; + overflow: hidden; + border-width: 1px 0 1px 0; + background-color: #FFFCEF; + border-color: #666; + border-style: solid; + margin: 20px 0 10px 0; + padding: 3px 3px 3px 10px; + font-family: Arial; + font-size: 14px; + -webkit-font-smoothing: antialiased; +} +div.wordfenceLive h2 { + font-weight: bold; + color: #888; + margin: 0 10px 0 0; + padding: 0; + display: inline; + font-size: 14px; + font-family: Georgia, serif; + font-style: italic; + -webkit-font-smoothing: antialiased; +} +div.wordfenceLive p { + color: #000; + font-weight: normal; + display: inline; +} +.wordfence-icon32 { + width: 32px; + height: 32px; + background-position: 0 0; + background-repeat: no-repeat; + padding: 0; + margin: 7px 5px 0 0; + float: left; +} +#wfHeading { + white-space: nowrap; +} +div.wordfence-lock-icon { + background-image: url(../images/wordfence-logo-32x32.png); +} + +.wordfence .resulticon { + display: block; + float: left; + width: 16px; + height: 16px; + background-position: 0 0; + background-repeat: no-repeat; + border-width: 0; + padding: 0; + margin: 0 3px 0 0; + background-image: url(../images/icons/bullet_yellow.png); +} + +.wordfence .wordfenceScanButton { margin: 20px 0 20px 0; } + +.wordfenceBoldTD { + font-weight: bold; +} + +.wfAjax24 { + display: none; + width: 24px; + height: 24px; + background-image: url(../images/icons/ajax24.gif); + margin: 0; + padding: 0; +} + + +div.wfLoadingWhite32 { + width: 32px; + height: 32px; + background-image: url(../images/icons/ajaxWhite32x32.gif); + margin: 0; + padding: 0; +} + +div.wordfenceScanButton input.button-wf-grey { + background: #EFEFEF url(../images/button-grad-grey.png) repeat-x scroll left top; + border-color: #EFEFEF; +} +.wordfenceScanButton table td { vertical-align: top; } + +.wfTabsContainer { + background-color: #FFF; + overflow: hidden; + border: 1px solid #CCC; + max-width: 900px; + padding: 15px; + min-height: 200px; + -webkit-font-smoothing: antialiased; +} +#wfTabs::after { + content: "."; + display: block; + height: 0; + width: 0; + line-height: 0; + clear: both; + visibility: hidden; +} +#wfTabs a { + float: left; + z-index: 10; + height: 18px; + margin: 0 5px -1px 0; + padding: 5px 8px; + border: 1px solid #CCC; + text-decoration: none; + background-color: #EFEFEF; + color: #21759B; + -moz-border-radius-topright: 3px; + -moz-border-radius-topleft: 3px; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +#wfTabs a.selected { + border-bottom: 1px solid #FFF; + background-color: #FFF; + color: #777; +} +table.wfSummaryParent { font-family: sans-serif; font-size: 14px; color: #000; z-index: 9;} +table.wfSummaryParent td { vertical-align: top; padding: 0; margin: 0; } +table.wfSummaryParent table.wfSummaryChild th { font-weight: bold; text-align: right; font-family: Georgia, serif; color: #000; padding: 5px 10px 5px 0; border-top: 1px solid #CCC; } +table.wfSummaryParent table.wfSummaryChild td { font-weight: normal; text-align: left; padding: 5px 0 5px 0; border-top: 1px solid #CCC; } +table.wfSummaryParent table.wfSC1 td { width: 300px; padding: 0px 25px 10px 0; } +table.wfSummaryParent table.wfSC2 th { width: 80px; } +table.wfSummaryParent table.wfSC2 td { width: 100px; } +table.wfSummaryParent table.wfSC3 th { width: 80px; } +table.wfSummaryParent table.wfSC3 td { width: 250px; } +table.wfSummaryParent th.wfHead { font-size: 22px; font-family: Georgia, serif; font-style: italic; color: #555; font-weight: bold; text-align: left; padding: 20px 0 20px 0px; -webkit-font-smoothing: antialiased; } + +div.wfIssue table.wfIssue td { padding: 2px; margin: 0; border-width: 0px; text-align: left; } +div.wfIssue table.wfIssue th { padding: 2px; margin: 0; font-weight: bold; text-align: left; color: #777; } +div.wfIssue h2 { margin: 0px 0 5px 0; padding: 0; } +div.wfIssue table.wfIssueLinks td { border-width: 0px; text-align: left; padding-right: 10px; } +.wfIssueOptions { + border-top: 1px solid #CCC; + padding: 10px; +} +.wfIssueOptions a { + margin-left: 10px; +} +.wfIssueOptions strong { + float: left; + display: block; + width: 60px; +} +.wfProbSev1, .wfProbSev2, .wfAjaxLight128, .wfResolved { + width: 128px; + height: 128px; + border: 0; + margin: 0 auto; + background-repeat: no-repeat; background-position: 0 0; + text-decoration: none; + display: block; +} +.wfProbSev1 { background-image: url(../images/icons/error128.png); } +.wfProbSev2 { background-image: url(../images/icons/warning128.png); } +.wfResolved { background-image: url(../images/icons/tick128.png); } +.wfAjaxLight128 { background-image: url(../images/icons/ajax3.gif); } +.wfStrong { font-weight: bold; } +.wordfenceModeElem { display: none; } +.wfIssuesContainer { width: 800px; display: none; } +.wfIssuesContainer p { width: 550px; } +.wfWarn { color: #F00; } +img.wfFlag { vertical-align: middle; margin: -3px 4px 0 0; } +.wfHitTime { font-style: italic; } +.wfAvatar img { vertical-align: middle; } +.wfActEvent { border-bottom: 1px solid #CCC; margin: 0 0 10px 0; padding: 0 0 10px 0; } +.wfTimeAgo { font-family: Georgia, times; color: #999; font-weight: bold; font-style: italic; } +table.wfConfigForm th { + font-weight: normal; + text-align: left; + padding: 2px 3px 1px 0; + vertical-align: middle; +} +table.wfConfigForm td { + vertical-align: middle; +} +table th.wfConfigEnable { font-weight: bold; } +.wfSavedMsg { display: none; color: #A00; } +table th.wfSubheading { font-weight: bold; padding-top: 10px; } +.wfALogTime { color: #999; } +.wfALogEntry { } +.wfALogMailLink, .wfALogViewLink { + display: block; + position: absolute; + padding: 0 0 0 18px; + margin: 0; + right: 10px; + top: 0px; + background-repeat: no-repeat; + font-weight: normal; +} +.wfALogMailLink { + background-image: url(../images/icons/email_go.png); +} +.wfALogViewLink { + background-image: url(../images/icons/magnifier.png); +} +#wfActivity { position: relative; } +h3.wfConfigHeading { + font-size: 22px; + color: #777; + font-family: Georgia; + font-style: italic; + font-weight: normal +} +.wfTipText { + color: #777; + font-family: Georgia; + font-style: italic; +} + +.consoleHead { + position: relative; + padding: 0 0 0 3px; + font-weight: bold; + width: 800px; +} +.consoleHeadText { + font-size: 18px; + font-family: Georgia, serif; + font-style: italic; + color: #555; + font-weight: bold; + -webkit-font-smoothing: antialiased; + +} +.consoleOuter { width: 800px; } +.consoleInner { height: 116px; overflow: auto; z-index: 1; } +.bevelDiv1 { border: 1px solid #EFEFEF; } +.bevelDiv2 { border: 1px solid #AAA; } +.bevelDiv3 { border: 1px solid #555; + background-color: #FFFFE0; /* #FFFFF0; /* #FFEBCD; #FFFACD; */ + color: #000; padding: 5px; font-family: Arial; -webkit-font-smoothing: none; } + +.wfBlackCursor{ color: #FFF; } +.wfSecure { color: #0A0; font-weight: bold; } +.wfActivityLine { +} +.wfSummaryDate { float: left; margin-left: 3px; } +.wfSummaryMsg { float: left; margin-left: 3px; } +.wfSummaryResult { float: right; text-align: left; width: 280px; } +.wfSummaryLoading { width: 16px; height: 11px; background-image: url('../images/icons/ajaxScan.gif'); } +.wfSummaryBad, .wfSummaryErr { color: #A00; } +.wfSummaryOK { color: #0A0; } +.wfClear { + content: "."; + display: block; + height: 0; + width: 0; + line-height: 0; + clear: both; + visibility: hidden; +} +.wfSummaryFinal { + -webkit-font-smoothing: antialiased; + font-weight: bold; + color: #555; +} +input.wfStartScanButton { width: 160px; text-align: left; padding-left: 20px; } +.wferror { + color: #F00; +} +#wordfenceWorking { + padding: 2px 8px 2px 24px; + z-index: 100000; + position: fixed; + right: 2px; + bottom: 2px; + border: 1px solid #000; + background-color: #F00; + color: #FFF; + font-size: 12px; + font-weight: bold; + font-family: Arial; + text-align: center; + background-image: url('../images/icons/ajaxRed16.gif'); + background-position: 2px 2px; + background-repeat: no-repeat; +} +#paidWrap { + position: relative; +} +#paidCover { +} +.paidInnerMsg { + width: 500px; + margin: 150px auto 0 auto; + color: #000; + font-size: 18px; + font-family: Georgia, Times; + line-height: 1.8em; + text-align: center; + -webkit-font-smoothing: antialiased; +} +.wfMarker { + height: 1px; + width: 1px; +} +.wfPaidOnlyNotice { + width: 500px; + background-color: #FFFFE0; + border: 1px solid #000; + padding: 10px; + margin: 20px; +} +.wfFalconNotice { + width: 500px; + background-color: #FFD7CE; + border: 1px solid #000; + padding: 10px; + margin: 20px; +} +.wfFalcon { + width: 63px; + height: 63px; + border-width: 0px; + background-color: transparent; + background-image: url(../images/wordfenceFalcon.png); + background-position: 0 0; + background-repeat: no-repeat; + position: absolute; + right: 2px; + top: 3px; +} +.wfFalconImage { + width: 63px; + height: 63px; + border-width: 0px; + background-color: transparent; + background-image: url(../images/wordfenceFalcon.png); + background-position: 0 0; + background-repeat: no-repeat; + margin: 5px auto 15px auto; +} +.wfSmallFalcon { + width: 33px; + height: 16px; + border-width: 0px; + background-color: transparent; + background-image: url(../images/wordfenceFalconSmall.png); + background-position: 0 0; + background-repeat: no-repeat; + margin: 0px; + padding: 0px; + display: inline; + float: right; +} + + + +.wfOnOffSwitch { + position: relative !important ; width: 69px !important ; + -webkit-user-select:none !important ; -moz-user-select:none !important ; -ms-user-select: none !important ; +} +.wfOnOffSwitch-checkbox { + display: none !important ; +} +.wfOnOffSwitch-label { + display: block !important ; overflow: hidden !important ; cursor: pointer !important ; + border: 2px solid #999999 !important ; border-radius: 19px !important ; +} +.wfOnOffSwitch-inner { + width: 200% !important ; margin-left: -100% !important ; + -moz-transition: margin 0.3s ease-in 0s !important ; -webkit-transition: margin 0.3s ease-in 0s !important ; + -o-transition: margin 0.3s ease-in 0s !important ; transition: margin 0.3s ease-in 0s !important ; +} +.wfOnOffSwitch-inner:before, .wfOnOffSwitch-inner:after { + float: left !important ; width: 50% !important ; height: 19px !important ; padding: 0 !important ; line-height: 19px !important ; + font-size: 14px !important ; color: white !important ; font-family: Trebuchet, Arial, sans-serif !important ; font-weight: bold !important ; + -moz-box-sizing: border-box !important ; -webkit-box-sizing: border-box !important ; box-sizing: border-box !important ; + border-radius: 19px !important ; + box-shadow: 0px 9.5px 0px rgba(0,0,0,0.08) inset !important ; +} +.wfOnOffSwitch-inner:before { + content: "ON" !important ; + padding-left: 10px !important ; + background-color: #30D965 !important ; color: #FFFFFF !important ; + border-radius: 19px 0 0 19px !important ; +} +.wfOnOffSwitch-inner:after { + content: "OFF" !important ; + padding-right: 10px !important ; + background-color: #EEEEEE !important ; color: #999999 !important ; + text-align: right !important ; + border-radius: 0 19px 19px 0 !important ; +} +.wfOnOffSwitch-switch { + width: 19px !important ; margin: 0px !important ; + background: #FFFFFF !important ; + border: 2px solid #999999 !important ; border-radius: 19px !important ; + position: absolute !important ; top: 0 !important ; bottom: 0 !important ; right: 46px !important ; + -moz-transition: all 0.3s ease-in 0s !important ; -webkit-transition: all 0.3s ease-in 0s !important ; + -o-transition: all 0.3s ease-in 0s !important ; transition: all 0.3s ease-in 0s !important ; + background-image: -moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 80%) !important ; + background-image: -webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 80%) !important ; + background-image: -o-linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 80%) !important ; + background-image: linear-gradient(center top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 80%) !important ; + box-shadow: 0 1px 1px white inset !important ; +} +.wfOnOffSwitch-checkbox:checked + .wfOnOffSwitch-label .wfOnOffSwitch-inner { + margin-left: 0 !important ; +} +.wfOnOffSwitch-checkbox:checked + .wfOnOffSwitch-label .wfOnOffSwitch-switch { + right: 0px !important ; +} +#wordfenceConfigWarning { + clear: left; + margin-top: 5px; +} diff --git a/wp-content/plugins/wordfence/css/phpinfo.css b/wp-content/plugins/wordfence/css/phpinfo.css new file mode 100644 index 0000000..41e8385 --- /dev/null +++ b/wp-content/plugins/wordfence/css/phpinfo.css @@ -0,0 +1,30 @@ + + +h1.p { + background: url(../images/wordfence-logo-64x64.png); + background-position: 0 0; + background-repeat: no-repeat; + height: 64px; + vertical-align: middle; + padding: 10px 0 0 70px; + margin: 20px 0 10px 0; + font-family: Arial; + font-weight: normal; + font-size: 26px; +} +h1.p:before { + content: "Wordfence System Info for "; +} +td img { display: none; } + +.diffFooter { + text-align: center; + font-size: 16px; + color: #999; + font-family: Verdana; + margin: 50px auto 50px auto; +} +.diffFooter a { + color: #999; +} + diff --git a/wp-content/plugins/wordfence/images/back_disabled.jpg b/wp-content/plugins/wordfence/images/back_disabled.jpg new file mode 100644 index 0000000..3cc8fa5 Binary files /dev/null and b/wp-content/plugins/wordfence/images/back_disabled.jpg differ diff --git a/wp-content/plugins/wordfence/images/back_enabled.jpg b/wp-content/plugins/wordfence/images/back_enabled.jpg new file mode 100644 index 0000000..2298da9 Binary files /dev/null and b/wp-content/plugins/wordfence/images/back_enabled.jpg differ diff --git a/wp-content/plugins/wordfence/images/button-grad-grey.png b/wp-content/plugins/wordfence/images/button-grad-grey.png new file mode 100644 index 0000000..b3c4996 Binary files /dev/null and b/wp-content/plugins/wordfence/images/button-grad-grey.png differ diff --git a/wp-content/plugins/wordfence/images/forward_disabled.jpg b/wp-content/plugins/wordfence/images/forward_disabled.jpg new file mode 100644 index 0000000..f213fb2 Binary files /dev/null and b/wp-content/plugins/wordfence/images/forward_disabled.jpg differ diff --git a/wp-content/plugins/wordfence/images/forward_enabled.jpg b/wp-content/plugins/wordfence/images/forward_enabled.jpg new file mode 100644 index 0000000..4295e3c Binary files /dev/null and b/wp-content/plugins/wordfence/images/forward_enabled.jpg differ diff --git a/wp-content/plugins/wordfence/images/icons/ajax24.gif b/wp-content/plugins/wordfence/images/icons/ajax24.gif new file mode 100644 index 0000000..53dd589 Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/ajax24.gif differ diff --git a/wp-content/plugins/wordfence/images/icons/ajax3.gif b/wp-content/plugins/wordfence/images/icons/ajax3.gif new file mode 100644 index 0000000..e907ecc Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/ajax3.gif differ diff --git a/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif b/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif new file mode 100644 index 0000000..dd8511b Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/ajaxRed16.gif differ diff --git a/wp-content/plugins/wordfence/images/icons/ajaxScan.gif b/wp-content/plugins/wordfence/images/icons/ajaxScan.gif new file mode 100644 index 0000000..896b49e Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/ajaxScan.gif differ diff --git a/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif b/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif new file mode 100644 index 0000000..3c2f7c0 Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/ajaxWhite32x32.gif differ diff --git a/wp-content/plugins/wordfence/images/icons/arrow_refresh.png b/wp-content/plugins/wordfence/images/icons/arrow_refresh.png new file mode 100644 index 0000000..0de2656 Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/arrow_refresh.png differ diff --git a/wp-content/plugins/wordfence/images/icons/bullet_yellow.png b/wp-content/plugins/wordfence/images/icons/bullet_yellow.png new file mode 100644 index 0000000..6469cea Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/bullet_yellow.png differ diff --git a/wp-content/plugins/wordfence/images/icons/email_go.png b/wp-content/plugins/wordfence/images/icons/email_go.png new file mode 100644 index 0000000..4a6c5d3 Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/email_go.png differ diff --git a/wp-content/plugins/wordfence/images/icons/error128.png b/wp-content/plugins/wordfence/images/icons/error128.png new file mode 100644 index 0000000..122a09c Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/error128.png differ diff --git a/wp-content/plugins/wordfence/images/icons/magnifier.png b/wp-content/plugins/wordfence/images/icons/magnifier.png new file mode 100644 index 0000000..cf3d97f Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/magnifier.png differ diff --git a/wp-content/plugins/wordfence/images/icons/tick128.png b/wp-content/plugins/wordfence/images/icons/tick128.png new file mode 100644 index 0000000..dd4ad0e Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/tick128.png differ diff --git a/wp-content/plugins/wordfence/images/icons/warning128.png b/wp-content/plugins/wordfence/images/icons/warning128.png new file mode 100644 index 0000000..79c6d8a Binary files /dev/null and b/wp-content/plugins/wordfence/images/icons/warning128.png differ diff --git a/wp-content/plugins/wordfence/images/lightbox-controls.png b/wp-content/plugins/wordfence/images/lightbox-controls.png new file mode 100644 index 0000000..f1ee226 Binary files /dev/null and b/wp-content/plugins/wordfence/images/lightbox-controls.png differ diff --git a/wp-content/plugins/wordfence/images/loading.gif b/wp-content/plugins/wordfence/images/loading.gif new file mode 100644 index 0000000..53dd589 Binary files /dev/null and b/wp-content/plugins/wordfence/images/loading.gif differ diff --git a/wp-content/plugins/wordfence/images/loading_background.png b/wp-content/plugins/wordfence/images/loading_background.png new file mode 100644 index 0000000..6ae83e6 Binary files /dev/null and b/wp-content/plugins/wordfence/images/loading_background.png differ diff --git a/wp-content/plugins/wordfence/images/sort_asc.gif b/wp-content/plugins/wordfence/images/sort_asc.gif new file mode 100644 index 0000000..12078b3 Binary files /dev/null and b/wp-content/plugins/wordfence/images/sort_asc.gif differ diff --git a/wp-content/plugins/wordfence/images/sort_asc_disabled.gif b/wp-content/plugins/wordfence/images/sort_asc_disabled.gif new file mode 100644 index 0000000..34132c3 Binary files /dev/null and b/wp-content/plugins/wordfence/images/sort_asc_disabled.gif differ diff --git a/wp-content/plugins/wordfence/images/sort_both.gif b/wp-content/plugins/wordfence/images/sort_both.gif new file mode 100644 index 0000000..bd16873 Binary files /dev/null and b/wp-content/plugins/wordfence/images/sort_both.gif differ diff --git a/wp-content/plugins/wordfence/images/sort_desc.gif b/wp-content/plugins/wordfence/images/sort_desc.gif new file mode 100644 index 0000000..03dddb1 Binary files /dev/null and b/wp-content/plugins/wordfence/images/sort_desc.gif differ diff --git a/wp-content/plugins/wordfence/images/sort_desc_disabled.gif b/wp-content/plugins/wordfence/images/sort_desc_disabled.gif new file mode 100644 index 0000000..3a4ee98 Binary files /dev/null and b/wp-content/plugins/wordfence/images/sort_desc_disabled.gif differ diff --git a/wp-content/plugins/wordfence/images/wordfence-logo-16x16.png b/wp-content/plugins/wordfence/images/wordfence-logo-16x16.png new file mode 100644 index 0000000..7027d79 Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfence-logo-16x16.png differ diff --git a/wp-content/plugins/wordfence/images/wordfence-logo-32x32.png b/wp-content/plugins/wordfence/images/wordfence-logo-32x32.png new file mode 100644 index 0000000..c9e858e Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfence-logo-32x32.png differ diff --git a/wp-content/plugins/wordfence/images/wordfence-logo-64x64.png b/wp-content/plugins/wordfence/images/wordfence-logo-64x64.png new file mode 100644 index 0000000..bb062a1 Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfence-logo-64x64.png differ diff --git a/wp-content/plugins/wordfence/images/wordfenceFalcon.png b/wp-content/plugins/wordfence/images/wordfenceFalcon.png new file mode 100644 index 0000000..4d2067f Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfenceFalcon.png differ diff --git a/wp-content/plugins/wordfence/images/wordfenceFalconEngineSmall.png b/wp-content/plugins/wordfence/images/wordfenceFalconEngineSmall.png new file mode 100644 index 0000000..9f0c5a0 Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfenceFalconEngineSmall.png differ diff --git a/wp-content/plugins/wordfence/images/wordfenceFalconSmall.png b/wp-content/plugins/wordfence/images/wordfenceFalconSmall.png new file mode 100644 index 0000000..6658623 Binary files /dev/null and b/wp-content/plugins/wordfence/images/wordfenceFalconSmall.png differ diff --git a/wp-content/plugins/wordfence/index.php b/wp-content/plugins/wordfence/index.php new file mode 100644 index 0000000..1580272 --- /dev/null +++ b/wp-content/plugins/wordfence/index.php @@ -0,0 +1,3 @@ + diff --git a/wp-content/plugins/wordfence/js/admin.js b/wp-content/plugins/wordfence/js/admin.js new file mode 100644 index 0000000..23a76a4 --- /dev/null +++ b/wp-content/plugins/wordfence/js/admin.js @@ -0,0 +1,1619 @@ +if(! window['wordfenceAdmin']){ //To compile for checking: java -jar /usr/local/bin/closure.jar --js=admin.js --js_output_file=test.js +window['wordfenceAdmin'] = { + loading16: '
', + loadingCount: 0, + dbCheckTables: [], + dbCheckCount_ok: 0, + dbCheckCount_skipped: 0, + dbCheckCount_errors: 0, + issues: [], + ignoreData: false, + iconErrorMsgs: [], + scanIDLoaded: 0, + colorboxQueue: [], + colorboxOpen: false, + mode: '', + visibleIssuesPanel: 'new', + preFirstScanMsgsLoaded: false, + newestActivityTime: 0, //must be 0 to force loading of all initially + elementGeneratorIter: 1, + reloadConfigPage: false, + nonce: false, + tickerUpdatePending: false, + activityLogUpdatePending: false, + lastALogCtime: 0, + activityQueue: [], + totalActAdded: 0, + maxActivityLogItems: 1000, + scanReqAnimation: false, + debugOn: false, + blockedCountriesPending: [], + ownCountry: "", + schedStartHour: false, + currentPointer: false, + countryMap: false, + countryCodesToSave: "", + performanceScale: 3, + performanceMinWidth: 20, + init: function(){ + this.nonce = WordfenceAdminVars.firstNonce; + this.debugOn = WordfenceAdminVars.debugOn == '1' ? true : false; + this.tourClosed = WordfenceAdminVars.tourClosed == '1' ? true : false; + var startTicker = false; + if(jQuery('#wordfenceMode_scan').length > 0){ + this.mode = 'scan'; + jQuery('#wfALogViewLink').prop('href', WordfenceAdminVars.siteBaseURL + '?_wfsf=viewActivityLog&nonce=' + this.nonce); + jQuery('#consoleActivity').scrollTop(jQuery('#consoleActivity').prop('scrollHeight')); + jQuery('#consoleScan').scrollTop(jQuery('#consoleScan').prop('scrollHeight')); + this.noScanHTML = jQuery('#wfNoScanYetTmpl').tmpl().html(); + this.loadIssues(); + this.startActivityLogUpdates(); + if(! this.tourClosed){ + this.scanTourStart(); + } + } else if(jQuery('#wordfenceMode_activity').length > 0){ + this.mode = 'activity'; + var self = this; + this.setupSwitches('wfLiveTrafficOnOff', 'liveTrafficEnabled', function(){}); + jQuery('#wfLiveTrafficOnOff').change(function(){ + if(/^(?:falcon|php)$/.test(WordfenceAdminVars.cacheType) ){ + jQuery('#wfLiveTrafficOnOff').attr('checked', false); + self.colorbox('400px', "Live Traffic not available in high performance mode", "Please note that you can't enable live traffic when Falcon Engine or basic caching is enabled. This is done for performance reasons. If you want live traffic, go to the 'Performance Setup' menu and disable caching."); + } else { + self.updateSwitch('wfLiveTrafficOnOff', 'liveTrafficEnabled', function(){ window.location.reload(true); }); + } + }); + + if(WordfenceAdminVars.liveTrafficEnabled){ + this.activityMode = 'hit'; + } else { + this.activityMode = 'loginLogout'; + this.switchTab(jQuery('#wfLoginLogoutTab'), 'wfTab1', 'wfDataPanel', 'wfActivity_loginLogout', function(){ WFAD.activityTabChanged(); }); + } + startTicker = true; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContent3', 'wfHeading', 'top', 'left', "Learn about Site Performance", function(){ self.tourRedir('WordfenceSitePerf'); }); + } + } else if(jQuery('#wordfenceMode_options').length > 0){ + this.mode = 'options'; + jQuery('.wfConfigElem').change(function(){ jQuery('#securityLevel').val('CUSTOM'); }); + this.updateTicker(true); + startTicker = true; + if(! this.tourClosed){ + var self = this; + this.tour('wfContentBasicOptions', 'wfMarkerBasicOptions', 'top', 'left', "Learn about Live Traffic Options", function(){ + self.tour('wfContentLiveTrafficOptions', 'wfMarkerLiveTrafficOptions', 'bottom', 'left', "Learn about Scanning Options", function(){ + self.tour('wfContentScansToInclude', 'wfMarkerScansToInclude', 'bottom', 'left', "Learn about Firewall Rules", function(){ + self.tour('wfContentFirewallRules', 'wfMarkerFirewallRules', 'bottom', 'left', "Learn about Login Security", function(){ + self.tour('wfContentLoginSecurity', 'wfMarkerLoginSecurity', 'bottom', 'left', "Learn about Other Options", function(){ + self.tour('wfContentOtherOptions', 'wfMarkerOtherOptions', 'bottom', 'left', false, false); + }); + }); + }); + }); + }); + } + } else if(jQuery('#wordfenceMode_blockedIPs').length > 0){ + this.mode = 'blocked'; + this.staticTabChanged(); + this.updateTicker(true); + startTicker = true; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContent4', 'wfHeading', 'top', 'left', "Learn about Cellphone Sign-in", function(){ self.tourRedir('WordfenceTwoFactor'); }); + } + } else if(jQuery('#wordfenceMode_twoFactor').length > 0){ + this.mode = 'twoFactor'; + startTicker = false; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeTwoFactor', 'wfHeading', 'top', 'left', "Learn how to Block Countries", function(){ self.tourRedir('WordfenceCountryBlocking'); }); + } + this.loadTwoFactor(); + + } else if(jQuery('#wordfenceMode_countryBlocking').length > 0){ + this.mode = 'countryBlocking'; + startTicker = false; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContentCntBlk', 'wfHeading', 'top', 'left', "Learn how to Schedule Scans", function(){ self.tourRedir('WordfenceScanSchedule'); }); + } + } else if(jQuery('#wordfenceMode_rangeBlocking').length > 0){ + this.mode = 'rangeBlocking'; + startTicker = false; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContentRangeBlocking', 'wfHeading', 'top', 'left', "Learn how to Customize Wordfence", function(){ self.tourRedir('WordfenceSecOpt'); }); + } + this.calcRangeTotal(); + this.loadBlockRanges(); + } else if(jQuery('#wordfenceMode_whois').length > 0){ + this.mode = 'whois'; + startTicker = false; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContentWhois', 'wfHeading', 'top', 'left', "Learn how to use Advanced Blocking", function(){ self.tourRedir('WordfenceRangeBlocking'); }); + } + this.calcRangeTotal(); + this.loadBlockRanges(); + + } else if(jQuery('#wordfenceMode_scanScheduling').length > 0){ + this.mode = 'scanScheduling'; + startTicker = false; + this.sched_modeChange(); + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContentScanSched', 'wfHeading', 'top', 'left', "Learn about WHOIS", function(){ self.tourRedir('WordfenceWhois'); }); + } + } else if(jQuery('#wordfenceMode_caching').length > 0){ + this.mode = 'caching'; + startTicker = false; + if(! this.tourClosed){ + var self = this; + this.tour('wfWelcomeContentCaching', 'wfHeading', 'top', 'left', "Learn about IP Blocking", function(){ self.tourRedir('WordfenceBlockedIPs'); }); + } + this.loadCacheExclusions(); +// } else if(jQuery('#wordfenceMode_perfStats').length > 0){ +// var self = this; +// this.loadAvgSitePerf(); +// this.setupSwitches('wfPerfOnOff', 'perfLoggingEnabled', function(){}); +// jQuery('#wfPerfOnOff').change(function(){ self.updateSwitch('wfPerfOnOff', 'perfLoggingEnabled', function(){}); }); +// this.mode = 'perfStats'; +// startTicker = true; +// if(! this.tourClosed){ +// var self = this; +// this.tour('wfWelcomeContentCaching', 'wfHeading', 'top', 'left', "Learn about IP Blocking", function(){ self.tourRedir('WordfenceBlockedIPs'); }); +// } + } else { + this.mode = false; + } + if(this.mode){ //We are in a Wordfence page + var self = this; + if(startTicker){ + this.updateTicker(); + this.liveInt = setInterval(function(){ self.updateTicker(); }, WordfenceAdminVars.actUpdateInterval); + } + jQuery(document).bind('cbox_closed', function(){ self.colorboxIsOpen = false; self.colorboxServiceQueue(); }); + } + }, + loadAvgSitePerf: function(){ + var self = this; + this.ajax('wordfence_loadAvgSitePerf', { limit: jQuery('#wfAvgPerfNum').val() }, function(res){ + res['scale'] = self.performanceScale; + res['min'] = self.performanceMinWidth; + jQuery('#wfAvgSitePerfContent').empty(); + var newElem = jQuery('#wfAvgPerfTmpl').tmpl(res); + newElem.prependTo('#wfAvgSitePerfContent').fadeIn(); + }); + }, + updateSwitch: function(elemID, configItem, cb){ + var setting = jQuery('#' + elemID).is(':checked'); + this.updateConfig(configItem, jQuery('#' + elemID).is(':checked') ? 1 : 0, cb); + }, + setupSwitches: function(elemID, configItem, cb){ + jQuery('.wfOnOffSwitch-checkbox').change(function(){ + jQuery.data(this, 'lastSwitchChange', (new Date()).getTime()); + }); + var self = this; + jQuery('div.wfOnOffSwitch').mouseup( function(){ + var elem = jQuery(this); + setTimeout(function(){ + var checkedElem = elem.find('.wfOnOffSwitch-checkbox'); + if((new Date()).getTime() - jQuery.data(checkedElem[0], 'lastSwitchChange') > 300){ + checkedElem.prop('checked', ! checkedElem.is(':checked') ); + self.updateSwitch(elemID, configItem, cb); + } + }, 50); + }); + }, + scanTourStart: function(){ + var self = this; + this.tour('wfWelcomeContent1', 'wfHeading', 'top', 'left', "Continue the Tour", function(){ + self.tour('wfWelcomeContent2', 'wfHeading', 'top', 'left', "Learn how to use Wordfence", function(){ + self.tour('wfWelcomeContent3', 'wfHeading', 'top', 'left', "Learn about Live Traffic", function(){ self.tourRedir('WordfenceActivity'); }); + }); + }); + }, + tourRedir: function(menuItem){ + window.location.href = 'admin.php?page=' + menuItem; + }, + updateConfig: function(key, val, cb){ + this.ajax('wordfence_updateConfig', { key: key, val: val }, function(){ cb(); }); + }, + tourFinish: function(){ + this.ajax('wordfence_tourClosed', {}, function(res){}); + }, + downgradeLicense: function(){ + this.colorbox('400px', "Confirm Downgrade", "Are you sure you want to downgrade your Wordfence Premium License? This will disable all Premium features and return you to the free version of Wordfence.
Click here to renew your paid membership or click the button below to confirm you want to downgrade.


"); + }, + downgradeLicenseConfirm: function(){ + jQuery.colorbox.close(); + this.ajax('wordfence_downgradeLicense', {}, function(res){ location.reload(true); }); + }, + tour: function(contentID, elemID, edge, align, buttonLabel, buttonCallback){ + var self = this; + if(this.currentPointer){ + this.currentPointer.pointer('destroy'); + this.currentPointer = false; + } + var options = { + buttons: function(event, t){ + var buttonElem = jQuery(''); + buttonElem.find('#pointer-close').bind('click.pointer', function (evtObj) { + var evtSourceElem = evtObj.srcElement ? evtObj.srcElement : evtObj.target; + if(evtSourceElem.id == 'wfRateLink'){ + return true; + } + self.tourFinish(); + t.element.pointer('close'); + return false; + }); + return buttonElem; + }, + close: function(){}, + content: jQuery('#' + contentID).tmpl().html(), + pointerWidth: 400, + position: { + edge: edge, + align: align + } + }; + this.currentPointer = jQuery('#' + elemID).pointer(options).pointer('open'); + if(buttonLabel && buttonCallback){ + jQuery('#pointer-close').after('' + buttonLabel + ''); + jQuery('#pointer-primary').click(buttonCallback); + } + }, + startTourAgain: function(){ + this.ajax('wordfence_startTourAgain', {}, function(res){}); + this.tourClosed = false; + this.scanTourStart(); + }, + showLoading: function(){ + this.loadingCount++; + if(this.loadingCount == 1){ + jQuery('
Wordfence is working...
').appendTo('body'); + } + }, + removeLoading: function(){ + this.loadingCount--; + if(this.loadingCount == 0){ + jQuery('#wordfenceWorking').remove(); + } + }, + startActivityLogUpdates: function(){ + var self = this; + setInterval(function(){ + self.updateActivityLog(); + }, parseInt(WordfenceAdminVars.actUpdateInterval)); + }, + updateActivityLog: function(){ + if(this.activityLogUpdatePending){ + return; + } + this.activityLogUpdatePending = true; + var self = this; + this.ajax('wordfence_activityLogUpdate', { + lastctime: this.lastALogCtime + }, function(res){ self.doneUpdateActivityLog(res); }, function(){ self.activityLogUpdatePending = false; }, true); + + }, + doneUpdateActivityLog: function(res){ + this.actNextUpdateAt = (new Date()).getTime() + parseInt(WordfenceAdminVars.actUpdateInterval); + if(res.ok){ + if(res.items.length > 0){ + this.activityQueue.push.apply(this.activityQueue, res.items); + this.lastALogCtime = res.items[res.items.length - 1].ctime; + this.processActQueue(res.currentScanID); + } + } + this.activityLogUpdatePending = false; + }, + processActQueue: function(currentScanID){ + if(this.activityQueue.length > 0){ + this.addActItem(this.activityQueue.shift()); + this.totalActAdded++; + if(this.totalActAdded > this.maxActivityLogItems){ + jQuery('#consoleActivity div:first').remove(); + this.totalActAdded--; + } + var timeTillNextUpdate = this.actNextUpdateAt - (new Date()).getTime(); + var maxRate = 50 / 1000; //Rate per millisecond + var bulkTotal = 0; + while(this.activityQueue.length > 0 && this.activityQueue.length / timeTillNextUpdate > maxRate ){ + var item = this.activityQueue.shift(); + if(item){ + bulkTotal++; + this.addActItem(item); + } + } + this.totalActAdded += bulkTotal; + if(this.totalActAdded > this.maxActivityLogItems){ + jQuery('#consoleActivity div:lt(' + bulkTotal + ')').remove(); + this.totalActAdded -= bulkTotal; + } + var minDelay = 100; + var delay = minDelay; + if(timeTillNextUpdate < 1){ + delay = minDelay; + } else { + delay = Math.round(timeTillNextUpdate / this.activityQueue.length); + if(delay < minDelay){ delay = minDelay; } + } + var self = this; + setTimeout(function(){ self.processActQueue(); }, delay); + } + jQuery('#consoleActivity').scrollTop(jQuery('#consoleActivity').prop('scrollHeight')); + }, + processActArray: function(arr){ + for(var i = 0; i < arr.length; i++){ + this.addActItem(arr[i]); + } + }, + addActItem: function(item){ + if(! item){ return; } + if(! item.msg){ return; } + if(item.msg.indexOf('SUM_') == 0){ + this.processSummaryLine(item); + jQuery('#consoleSummary').scrollTop(jQuery('#consoleSummary').prop('scrollHeight')); + jQuery('#wfStartingScan').addClass('wfSummaryOK').html('Done.'); + } else if(this.debugOn || item.level < 4){ + + var html = '
[' + item.date + '] ' + item.msg + '
'; + jQuery('#consoleActivity').append(html); + if(/Scan complete\./i.test(item.msg)){ + this.loadIssues(); + } + } + }, + processSummaryLine: function(item){ + if(item.msg.indexOf('SUM_START:') != -1){ + var msg = item.msg.replace('SUM_START:', ''); + jQuery('#consoleSummary').append('
[' + item.date + ']
' + msg + '
'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_ENDBAD') != -1){ + var msg = item.msg.replace('SUM_ENDBAD:', ''); + jQuery('div.wfSummaryMsg:contains("' + msg + '")').next().addClass('wfSummaryBad').html('Problems found.'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_ENDFAILED') != -1){ + var msg = item.msg.replace('SUM_ENDFAILED:', ''); + jQuery('div.wfSummaryMsg:contains("' + msg + '")').next().addClass('wfSummaryBad').html('Failed.'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_ENDOK') != -1){ + var msg = item.msg.replace('SUM_ENDOK:', ''); + jQuery('div.wfSummaryMsg:contains("' + msg + '")').next().addClass('wfSummaryOK').html('Secure.'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_ENDSUCCESS') != -1){ + var msg = item.msg.replace('SUM_ENDSUCCESS:', ''); + jQuery('div.wfSummaryMsg:contains("' + msg + '")').next().addClass('wfSummaryOK').html('Success.'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_ENDERR') != -1){ + var msg = item.msg.replace('SUM_ENDERR:', ''); + jQuery('div.wfSummaryMsg:contains("' + msg + '")').next().addClass('wfSummaryErr').html('An error occurred.'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_DISABLED:') != -1){ + var msg = item.msg.replace('SUM_DISABLED:', ''); + jQuery('#consoleSummary').append('
[' + item.date + ']
' + msg + '
'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_PAIDONLY:') != -1){ + var msg = item.msg.replace('SUM_PAIDONLY:', ''); + jQuery('#consoleSummary').append('
[' + item.date + ']
' + msg + '
'); + summaryUpdated = true; + } else if(item.msg.indexOf('SUM_FINAL:') != -1){ + var msg = item.msg.replace('SUM_FINAL:', ''); + jQuery('#consoleSummary').append('
[' + item.date + ']
' + msg + '
Scan Complete.
'); + } else if(item.msg.indexOf('SUM_PREP:') != -1){ + var msg = item.msg.replace('SUM_PREP:', ''); + jQuery('#consoleSummary').empty().html('
[' + item.date + ']
' + msg + '
'); + } else if(item.msg.indexOf('SUM_KILLED:') != -1){ + var msg = item.msg.replace('SUM_KILLED:', ''); + jQuery('#consoleSummary').empty().html('
[' + item.date + ']
' + msg + '
Scan Complete.
'); + } + }, + processActQueueItem: function(){ + var item = this.activityQueue.shift(); + if(item){ + jQuery('#consoleActivity').append('
[' + item.date + '] ' + item.msg + '
'); + this.totalActAdded++; + if(this.totalActAdded > this.maxActivityLogItems){ + jQuery('#consoleActivity div:first').remove(); + this.totalActAdded--; + } + if(item.msg == 'Scan complete.'){ + this.loadIssues(); + } + } + }, + updateTicker: function(forceUpdate){ + if( (! forceUpdate) && this.tickerUpdatePending){ + return; + } + this.tickerUpdatePending = true; + var self = this; + var alsoGet = ''; + var otherParams = ''; + if(this.mode == 'activity' && /^(?:404|hit|human|ruser|gCrawler|crawler|loginLogout)$/.test(this.activityMode)){ + alsoGet = 'logList_' + this.activityMode; + otherParams = this.newestActivityTime; + } else if(this.mode == 'perfStats'){ + alsoGet = 'perfStats'; + otherParams = this.newestActivityTime; + } + this.ajax('wordfence_ticker', { + alsoGet: alsoGet, + otherParams: otherParams + }, function(res){ self.handleTickerReturn(res); }, function(){ self.tickerUpdatePending = false; }, true); + }, + handleTickerReturn: function(res){ + this.tickerUpdatePending = false; + var newMsg = ""; + var oldMsg = jQuery('#wfLiveStatus').text(); + if( res.msg ){ + newMsg = res.msg; + } else { + newMsg = "Idle"; + } + if(newMsg && newMsg != oldMsg){ + jQuery('#wfLiveStatus').hide().html(newMsg).fadeIn(200); + } + + if(this.mode == 'activity'){ + if(res.alsoGet != 'logList_' + this.activityMode){ return; } //user switched panels since ajax request started + if(res.events.length > 0){ + this.newestActivityTime = res.events[0]['ctime']; + } + var haveEvents = false; + if(jQuery('#wfActivity_' + this.activityMode + ' .wfActEvent').length > 0){ + haveEvents = true; + } + if(res.events.length > 0){ + if(! haveEvents){ + jQuery('#wfActivity_' + this.activityMode).empty(); + } + for(i = res.events.length - 1; i >= 0; i--){ + var elemID = '#wfActEvent_' + res.events[i].id; + if(jQuery(elemID).length < 1){ + res.events[i]['activityMode'] = this.activityMode; + var newElem; + if(this.activityMode == 'loginLogout'){ + newElem = jQuery('#wfLoginLogoutEventTmpl').tmpl(res.events[i]); + } else { + newElem = jQuery('#wfHitsEventTmpl').tmpl(res.events[i]); + } + jQuery(newElem).find('.wfTimeAgo').data('wfctime', res.events[i].ctime); + newElem.prependTo('#wfActivity_' + this.activityMode).fadeIn(); + } + } + this.reverseLookupIPs(); + } else { + if(! haveEvents){ + jQuery('#wfActivity_' + this.activityMode).html('
No events to report yet.
'); + } + } + var self = this; + jQuery('.wfTimeAgo').each(function(idx, elem){ + jQuery(elem).html(self.makeTimeAgo(res.serverTime - jQuery(elem).data('wfctime')) + ' ago'); + }); + } else if(this.mode == 'perfStats'){ + var haveEvents = false; + if(jQuery('#wfPerfStats .wfPerfEvent').length > 0){ + haveEvents = true; + } + if(res.events.length > 0){ + if(! haveEvents){ + jQuery('#wfPerfStats').empty(); + } + var curLength = parseInt(jQuery('#wfPerfStats').css('width')); + if(res.longestLine > curLength){ + jQuery('#wfPerfStats').css('width', (res.longestLine + 200) + 'px'); + } + this.newestActivityTime = res.events[0]['ctime']; + for(var i = res.events.length - 1; i >= 0; i--){ + res.events[i]['scale'] = this.performanceScale; + res.events[i]['min'] = this.performanceMinWidth; + var newElem = jQuery('#wfPerfStatTmpl').tmpl(res.events[i]); + jQuery(newElem).find('.wfTimeAgo').data('wfctime', res.events[i].ctime); + newElem.prependTo('#wfPerfStats').fadeIn(); + } + } else { + if(! haveEvents){ + jQuery('#wfPerfStats').html('

No events to report yet.

'); + } + } + var self = this; + jQuery('.wfTimeAgo').each(function(idx, elem){ + jQuery(elem).html(self.makeTimeAgo(res.serverTime - jQuery(elem).data('wfctime')) + ' ago'); + }); + } + }, + reverseLookupIPs: function(){ + var ips = []; + jQuery('.wfReverseLookup').each(function(idx, elem){ + var txt = jQuery(elem).text(); + if(/^\d+\.\d+\.\d+\.\d+$/.test(txt) && (! jQuery(elem).data('wfReverseDone'))){ + jQuery(elem).data('wfReverseDone', true); + ips.push(jQuery(elem).text()); + } + }); + if(ips.length < 1){ return; } + var uni = {}; + var uniqueIPs = []; + for(var i = 0; i < ips.length; i++){ + if(! uni[ips[i]]){ + uni[ips[i]] = true; + uniqueIPs.push(ips[i]); + } + } + this.ajax('wordfence_reverseLookup', { + ips: uniqueIPs.join(',') + }, + function(res){ + if(res.ok){ + jQuery('.wfReverseLookup').each(function(idx, elem){ + var txt = jQuery(elem).text(); + for(ip in res.ips){ + if(txt == ip){ + if(res.ips[ip]){ + jQuery(elem).html('Hostname: ' + res.ips[ip]); + } else { + jQuery(elem).html(''); + } + } + } + }); + } + }, false, false); + }, + killScan: function(){ + var self = this; + this.ajax('wordfence_killScan', {}, function(res){ + if(res.ok){ + self.colorbox('400px', "Kill requested", "A termination request has been sent to any running scans."); + } else { + self.colorbox('400px', "Kill failed", "We failed to send a termination request."); + } + }); + }, + startScan: function(){ + var scanReqAnimation = setInterval(function(){ + var str = jQuery('#wfStartScanButton1').prop('value'); + ch = str.charAt(str.length - 1); + if(ch == '/'){ ch = '-'; } + else if(ch == '-'){ ch = '\\'; } + else if(ch == '\\'){ ch = '|'; } + else if(ch == '|'){ ch = '/'; } + else {ch = '/'; } + jQuery('#wfStartScanButton1,#wfStartScanButton2').prop('value', "Requesting a New Scan " + ch); + }, 100); + setTimeout(function(res){ + clearInterval(scanReqAnimation); + jQuery('#wfStartScanButton1,#wfStartScanButton2').prop('value', "Start a Wordfence Scan"); + }, 3000); + this.ajax('wordfence_scan', {}, function(res){ } ); + }, + loadIssues: function(callback){ + if(this.mode != 'scan'){ + return; + } + var self = this; + this.ajax('wordfence_loadIssues', { }, function(res){ + self.displayIssues(res, callback); + }); + }, + sev2num: function(str){ + if(/wfProbSev1/.test(str)){ + return 1; + } else if(/wfProbSev2/.test(str)){ + return 2; + } else { + return 0; + } + }, + displayIssues: function(res, callback){ + var self = this; + try { + res.summary['lastScanCompleted'] = res['lastScanCompleted']; + } catch(err){ + res.summary['lastScanCompleted'] = 'Never'; + } + jQuery('.wfIssuesContainer').hide(); + for(issueStatus in res.issuesLists){ + var containerID = 'wfIssues_dataTable_' + issueStatus; + var tableID = 'wfIssuesTable_' + issueStatus; + if(jQuery('#' + containerID).length < 1){ + //Invalid issue status + continue; + } + if(res.issuesLists[issueStatus].length < 1){ + if(issueStatus == 'new'){ + if(res.lastScanCompleted == 'ok'){ + jQuery('#' + containerID).html('

Congratulations! You have no security issues on your site.

'); + } else if(res['lastScanCompleted']){ + //jQuery('#' + containerID).html('

The latest scan failed: ' + res.lastScanCompleted + '

'); + } else { + jQuery('#' + containerID).html(); + } + + } else { + jQuery('#' + containerID).html('

There are currently no issues being ignored on this site.

'); + } + continue; + } + jQuery('#' + containerID).html('
'); + + jQuery.fn.dataTableExt.oSort['severity-asc'] = function(y,x){ x = WFAD.sev2num(x); y = WFAD.sev2num(y); if(x < y){ return 1; } if(x > y){ return -1; } return 0; }; + jQuery.fn.dataTableExt.oSort['severity-desc'] = function(y,x){ x = WFAD.sev2num(x); y = WFAD.sev2num(y); if(x > y){ return 1; } if(x < y){ return -1; } return 0; }; + + jQuery('#' + tableID).dataTable({ + "bFilter": false, + "bInfo": false, + "bPaginate": false, + "bLengthChange": false, + "bAutoWidth": false, + "aaData": res.issuesLists[issueStatus], + "aoColumns": [ + { + "sTitle": '
Severity
', + "sWidth": '128px', + "sClass": "center", + "sType": 'severity', + "fnRender": function(obj) { + var cls = ""; + cls = 'wfProbSev' + obj.aData.severity; + return ''; + } + }, + { + "sTitle": '
Issue
', + "bSortable": false, + "sWidth": '400px', + "sType": 'html', + fnRender: function(obj){ + var tmplName = 'issueTmpl_' + obj.aData.type; + return jQuery('#' + tmplName).tmpl(obj.aData).html(); + } + } + ] + }); + } + if(callback){ + jQuery('#wfIssues_' + this.visibleIssuesPanel).fadeIn(500, function(){ callback(); }); + } else { + jQuery('#wfIssues_' + this.visibleIssuesPanel).fadeIn(500); + } + return true; + }, + ajax: function(action, data, cb, cbErr, noLoading){ + if(typeof(data) == 'string'){ + if(data.length > 0){ + data += '&'; + } + data += 'action=' + action + '&nonce=' + this.nonce; + } else if(typeof(data) == 'object'){ + data['action'] = action; + data['nonce'] = this.nonce; + } + if(! cbErr){ + cbErr = function(){}; + } + var self = this; + if(! noLoading){ + this.showLoading(); + } + jQuery.ajax({ + type: 'POST', + url: WordfenceAdminVars.ajaxURL, + dataType: "json", + data: data, + success: function(json){ + if(! noLoading){ + self.removeLoading(); + } + if(json && json.nonce){ + self.nonce = json.nonce; + } + if(json && json.errorMsg){ + self.colorbox('400px', 'An error occurred', json.errorMsg); + } + cb(json); + }, + error: function(){ + if(! noLoading){ + self.removeLoading(); + } + cbErr(); + } + }); + }, + colorbox: function(width, heading, body){ + this.colorboxQueue.push([width, heading, body]); + this.colorboxServiceQueue(); + }, + colorboxServiceQueue: function(){ + if(this.colorboxIsOpen){ return; } + if(this.colorboxQueue.length < 1){ return; } + var elem = this.colorboxQueue.shift(); + this.colorboxOpen(elem[0], elem[1], elem[2]); + }, + colorboxOpen: function(width, heading, body){ + this.colorboxIsOpen = true; + jQuery.colorbox({ width: width, html: "

" + heading + "

" + body + "

"}); + }, + scanRunningMsg: function(){ this.colorbox('400px', "A scan is running", "A scan is currently in progress. Please wait until it finishes before starting another scan."); }, + errorMsg: function(msg){ this.colorbox('400px', "An error occurred:", msg); }, + bulkOperation: function(op){ + var self = this; + if(op == 'del' || op == 'repair'){ + var ids = jQuery('input.wf' + op + 'Checkbox:checked').map(function(){ return jQuery(this).val(); }).get(); + if(ids.length < 1){ + this.colorbox('400px', "No files were selected", "You need to select files to perform a bulk operation. There is a checkbox in each issue that lets you select that file. You can then select a bulk operation and hit the button to perform that bulk operation."); + return; + } + if(op == 'del'){ + this.colorbox('400px', "Are you sure you want to delete?", "Are you sure you want to delete a total of " + ids.length + " files? Do not delete files on your system unless you're ABSOLUTELY sure you know what you're doing. If you delete the wrong file it could cause your WordPress website to stop functioning and you will probably have to restore from backups. If you're unsure, Cancel and work with your hosting provider to clean your system of infected files.

  
"); + } else if(op == 'repair'){ + this.colorbox('400px', "Are you sure you want to repair?", "Are you sure you want to repair a total of " + ids.length + " files? Do not repair files on your system unless you're sure you have reviewed the differences between the original file and your version of the file in the files you are repairing. If you repair a file that has been customized for your system by a developer or your hosting provider it may leave your system unusable. If you're unsure, Cancel and work with your hosting provider to clean your system of infected files.

  
"); + } + } else { + return; + } + }, + bulkOperationConfirmed: function(op){ + jQuery.colorbox.close(); + var self = this; + this.ajax('wordfence_bulkOperation', { + op: op, + ids: jQuery('input.wf' + op + 'Checkbox:checked').map(function(){ return jQuery(this).val(); }).get() + }, function(res){ self.doneBulkOperation(res); }); + }, + doneBulkOperation: function(res){ + var self = this; + if(res.ok){ + this.loadIssues(function(){ self.colorbox('400px', res.bulkHeading, res.bulkBody); }); + } else { + this.loadIssues(function(){}); + } + }, + deleteFile: function(issueID){ + var self = this; + this.ajax('wordfence_deleteFile', { + issueID: issueID + }, function(res){ self.doneDeleteFile(res); }); + }, + doneDeleteFile: function(res){ + var cb = false; + var self = this; + if(res.ok){ + this.loadIssues(function(){ self.colorbox('400px', "Success deleting file", "The file " + res.file + " was successfully deleted."); }); + } else if(res.cerrorMsg){ + this.loadIssues(function(){ self.colorbox('400px', 'An error occurred', res.cerrorMsg); }); + } + }, + restoreFile: function(issueID){ + var self = this; + this.ajax('wordfence_restoreFile', { + issueID: issueID + }, function(res){ self.doneRestoreFile(res); }); + }, + doneRestoreFile: function(res){ + var self = this; + if(res.ok){ + this.loadIssues(function(){ self.colorbox("400px", "File restored OK", "The file " + res.file + " was restored succesfully."); }); + } else if(res.cerrorMsg){ + this.loadIssues(function(){ self.colorbox('400px', 'An error occurred', res.cerrorMsg); }); + } + }, + deleteIssue: function(id){ + var self = this; + this.ajax('wordfence_deleteIssue', { id: id }, function(res){ + self.loadIssues(); + }); + }, + updateIssueStatus: function(id, st){ + var self = this; + this.ajax('wordfence_updateIssueStatus', { id: id, 'status': st }, function(res){ + if(res.ok){ + self.loadIssues(); + } + }); + }, + updateAllIssues: function(op){ // deleteIgnored, deleteNew, ignoreAllNew + var head = "Please confirm"; + if(op == 'deleteIgnored'){ + body = "You have chosen to remove all ignored issues. Once these issues are removed they will be re-scanned by Wordfence and if they have not been fixed, they will appear in the 'new issues' list. Are you sure you want to do this?"; + } else if(op == 'deleteNew'){ + body = "You have chosen to mark all new issues as fixed. If you have not really fixed these issues, they will reappear in the new issues list on the next scan. If you have not fixed them and want them excluded from scans you should choose to 'ignore' them instead. Are you sure you want to mark all new issues as fixed?"; + } else if(op == 'ignoreAllNew'){ + body = "You have chosen to ignore all new issues. That means they will be excluded from future scans. You should only do this if you're sure all new issues are not a problem. Are you sure you want to ignore all new issues?"; + } else { + return; + } + this.colorbox('450px', head, body + '

   
'); + }, + confirmUpdateAllIssues: function(op){ + var self = this; + this.ajax('wordfence_updateAllIssues', { op: op }, function(res){ self.loadIssues(); }); + }, + es: function(val){ + if(val){ + return val; + } else { + return ""; + } + }, + noQuotes: function(str){ + return str.replace(/"/g,'"').replace(/\'/g, '‘'); + }, + commify: function(num){ + return ("" + num).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); + }, + switchToLiveTab: function(elem){ + jQuery('.wfTab1').removeClass('selected'); + jQuery(elem).addClass('selected'); + jQuery('.wfDataPanel').hide(); + var self = this; + jQuery('#wfActivity').fadeIn(function(){ self.completeLiveTabSwitch(); }); + }, + completeLiveTabSwitch: function(){ + this.ajax('wordfence_loadActivityLog', {}, function(res){ + var html = ''; + if(res.events && res.events.length > 0){ + jQuery('#wfActivity').empty(); + for(var i = 0; i < res.events.length; i++){ + var timeTaken = '0.0000'; + if(res.events[i + 1]){ + timeTaken = (res.events[i].ctime - res.events[i + 1].ctime).toFixed(4); + } + var red = ""; + if(res.events[i].type == 'error'){ + red = ' class="wfWarn" '; + } + html += '
[' + res.events[i].type + ' : ' + timeTaken + ' : ' + res.events[i].timeAgo + ' ago] ' + res.events[i].msg + "
"; + } + jQuery('#wfActivity').html(html); + } else { + jQuery('#wfActivity').html("

  No activity to report yet. Please complete your first scan.

"); + } + }); + }, + emailActivityLog: function(){ + this.colorbox('400px', 'Email Wordfence Activity Log', "Enter the email address you would like to send the Wordfence activity log to. Note that the activity log may contain thousands of lines of data. This log is usually only sent to a member of the Wordfence support team. It also contains your PHP configuration from the phpinfo() function for diagnostic data.



"); + }, + completeEmailActivityLog: function(){ + jQuery.colorbox.close(); + var email = jQuery('#wfALogRecip').val(); + if(! /^[^@]+@[^@]+$/.test(email)){ + alert("Please enter a valid email address."); + return; + } + var self = this; + this.ajax('wordfence_sendActivityLog', { email: jQuery('#wfALogRecip').val() }, function(res){ + if(res.ok){ + self.colorbox('400px', 'Activity Log Sent', "Your Wordfence activity log was sent to " + email + "



"); + } + }); + }, + reloadActivityData: function(){ + jQuery('#wfActivity').html('
'); // 
 
 
 
 
 
 
 
 
 
+ this.completeLiveTabSwitch(); + }, + switchToSummaryTab: function(elem){ + jQuery('.wfTab1').removeClass('selected'); + jQuery(elem).addClass('selected'); + jQuery('.wfDataPanel').hide(); + jQuery('#wfSummaryTables').fadeIn(); + }, + switchIssuesTab: function(elem, type){ + jQuery('.wfTab2').removeClass('selected'); + jQuery('.wfIssuesContainer').hide(); + jQuery(elem).addClass('selected'); + this.visibleIssuesPanel = type; + jQuery('#wfIssues_' + type).fadeIn(); + }, + switchTab: function(tabElement, tabClass, contentClass, selectedContentID, callback){ + jQuery('.' + tabClass).removeClass('selected'); + jQuery(tabElement).addClass('selected'); + jQuery('.' + contentClass).hide().html('
'); + var func = function(){}; + if(callback){ + func = function(){ callback(); }; + } + jQuery('#' + selectedContentID).fadeIn(func); + }, + activityTabChanged: function(){ + var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_',''); + if(! mode){ return; } + this.activityMode = mode; + this.reloadActivities(); + }, + reloadActivities: function(){ + jQuery('#wfActivity_' + this.activityMode).html('
'); + this.newestActivityTime = 0; + this.updateTicker(true); + }, + staticTabChanged: function(){ + var mode = jQuery('.wfDataPanel:visible')[0].id.replace('wfActivity_',''); + if(! mode){ return; } + this.activityMode = mode; + + var self = this; + this.ajax('wordfence_loadStaticPanel', { + mode: this.activityMode + }, function(res){ + self.completeLoadStaticPanel(res); + }); + }, + completeLoadStaticPanel: function(res){ + var contentElem = '#wfActivity_' + this.activityMode; + jQuery(contentElem).empty(); + if(res.results && res.results.length > 0){ + var tmpl; + if(this.activityMode == 'topScanners' || this.activityMode == 'topLeechers'){ + tmpl = '#wfLeechersTmpl'; + } else if(this.activityMode == 'blockedIPs'){ + tmpl = '#wfBlockedIPsTmpl'; + } else if(this.activityMode == 'lockedOutIPs'){ + tmpl = '#wfLockedOutIPsTmpl'; + } else if(this.activityMode == 'throttledIPs'){ + tmpl = '#wfThrottledIPsTmpl'; + } else { return; } + var i, j, chunk = 1000; + var bigArray = res.results.slice(0); + res.results = false; + for(i = 0, j = bigArray.length; i < j; i += chunk){ + res.results = bigArray.slice(i, i + chunk); + jQuery(tmpl).tmpl(res).appendTo(contentElem); + } + this.reverseLookupIPs(); + } else { + if(this.activityMode == 'topScanners' || this.activityMode == 'topLeechers'){ + jQuery(contentElem).html("No site hits have been logged yet. Check back soon."); + } else if(this.activityMode == 'blockedIPs'){ + jQuery(contentElem).html("No IP addresses have been blocked yet. If you manually block an IP address or if Wordfence automatically blocks one, it will appear here."); + } else if(this.activityMode == 'lockedOutIPs'){ + jQuery(contentElem).html("No IP addresses have been locked out from signing in or using the password recovery system."); + } else if(this.activityMode == 'throttledIPs'){ + jQuery(contentElem).html("No IP addresses have been throttled yet. If an IP address accesses the site too quickly and breaks one of the Wordfence rules, it will appear here."); + } else { return; } + } + }, + ucfirst: function(str){ + str = "" + str; + return str.charAt(0).toUpperCase() + str.slice(1); + }, + makeIPTrafLink: function(IP){ + return WordfenceAdminVars.siteBaseURL + '?_wfsf=IPTraf&nonce=' + this.nonce + '&IP=' + encodeURIComponent(IP); + }, + makeDiffLink: function(dat){ + return WordfenceAdminVars.siteBaseURL + '?_wfsf=diff&nonce=' + this.nonce + + '&file=' + encodeURIComponent(this.es(dat['file'])) + + '&cType=' + encodeURIComponent(this.es(dat['cType'])) + + '&cKey=' + encodeURIComponent(this.es(dat['cKey'])) + + '&cName=' + encodeURIComponent(this.es(dat['cName'])) + + '&cVersion=' + encodeURIComponent(this.es(dat['cVersion'])); + }, + makeViewFileLink: function(file){ + return WordfenceAdminVars.siteBaseURL + '?_wfsf=view&nonce=' + this.nonce + '&file=' + encodeURIComponent(file); + }, + makeTimeAgo: function(t){ + var months = Math.floor(t / (86400 * 30)); + var days = Math.floor(t / 86400); + var hours = Math.floor(t / 3600); + var minutes = Math.floor(t / 60); + if(months > 0){ + days -= months * 30; + return this.pluralize(months, 'month', days, 'day'); + } else if(days > 0){ + hours -= days * 24; + return this.pluralize(days, 'day', hours, 'hour'); + } else if(hours > 0) { + minutes -= hours * 60; + return this.pluralize(hours, 'hour', minutes, 'min'); + } else if(minutes > 0) { + //t -= minutes * 60; + return this.pluralize(minutes, 'minute'); + } else { + return Math.round(t) + " seconds"; + } + }, + pluralize: function(m1, t1, m2, t2){ + if(m1 != 1) { + t1 = t1 + 's'; + } + if(m2 != 1) { + t2 = t2 + 's'; + } + if(m1 && m2){ + return m1 + ' ' + t1 + ' ' + m2 + ' ' + t2; + } else { + return m1 + ' ' + t1; + } + }, + calcRangeTotal: function(){ + var range = jQuery('#ipRange').val(); + if(! range){ return; } + range = range.replace(/ /g, ''); + if(range && /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s*\-\s*\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(range)){ + var ips = range.split('-'); + var total = this.inet_aton(ips[1]) - this.inet_aton(ips[0]) + 1; + if(total < 1){ + jQuery('#wfShowRangeTotal').html("Invalid. Starting IP is greater than ending IP."); + return; + } + jQuery('#wfShowRangeTotal').html("Valid: " + total + " addresses in range."); + } else { + jQuery('#wfShowRangeTotal').empty(); + } + }, + loadBlockRanges: function(){ + var self = this; + this.ajax('wordfence_loadBlockRanges', {}, function(res){ self.completeLoadBlockRanges(res); }); + + }, + completeLoadBlockRanges: function(res){ + jQuery('#currentBlocks').empty(); + if(res.results && res.results.length > 0){ + jQuery('#wfBlockedRangesTmpl').tmpl(res).prependTo('#currentBlocks'); + } else { + jQuery('#currentBlocks').html("You have not blocked any IP ranges or other patterns yet."); + } + }, + whois: function(val){ + val = val.replace(' ',''); + if( ! /\w+/.test(val)){ + this.colorbox('300px', "Enter a valid IP or domain", "Please enter a valid IP address or domain name for your whois lookup."); + return; + } + var self = this; + jQuery('#whoisbutton').attr('disabled', 'disabled'); + jQuery('#whoisbutton').attr('value', 'Loading...'); + this.ajax('wordfence_whois', { + val: val + }, function(res){ + jQuery('#whoisbutton').removeAttr('disabled'); + jQuery('#whoisbutton').attr('value', 'Look up IP or Domain'); + if(res.ok){ + self.completeWhois(res); + } + }); + }, + completeWhois: function(res){ + if(res.ok && res.result && res.result.rawdata && res.result.rawdata.length > 0){ + var rawhtml = ""; + for(var i = 0; i < res.result.rawdata.length; i++){ + res.result.rawdata[i] = jQuery('
').text(res.result.rawdata[i]).html(); + res.result.rawdata[i] = res.result.rawdata[i].replace(/([^\s\t\r\n:;]+@[^\s\t\r\n:;\.]+\.[^\s\t\r\n:;]+)/, "$1<\/a>"); + res.result.rawdata[i] = res.result.rawdata[i].replace(/(https?:\/\/[^\/]+[^\s\r\n\t]+)/, "$1<\/a>"); + var redStyle = ""; + if(this.getQueryParam('wfnetworkblock')){ + redStyle = " style=\"color: #F00;\""; + } + var self = this; + function wfm21(str, ipRange, offset, totalStr){ + var ips = ipRange.split(/\s*\-\s*/); + var ip1num = self.inet_aton(ips[0]); + var ip2num = self.inet_aton(ips[1]); + var totalIPs = ip2num - ip1num + 1; + return "" + ipRange + " [" + totalIPs + " addresses in this network. Click to block this network]<\/a>"; + } + + res.result.rawdata[i] = res.result.rawdata[i].replace(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} - \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/, wfm21); + rawhtml += res.result.rawdata[i] + "
"; + } + jQuery('#wfrawhtml').html(rawhtml); + } else { + jQuery('#wfrawhtml').html('Sorry, but no data for that IP or domain was found.'); + } + }, + blockIPUARange: function(ipRange, uaRange, reason){ + if(! /\w+/.test(reason)){ + this.colorbox('300px', "Please specify a reason", "You forgot to include a reason you're blocking this IP range. We ask you to include this for your own record keeping."); + return; + } + ipRange = ipRange.replace(/ /g, ''); + if(ipRange){ + if(! /^\d+\.\d+\.\d+\.\d+\-\d+\.\d+\.\d+\.\d+$/.test(ipRange)){ + this.colorbox('300px', 'Specify a valid IP range', "Please specify a valid IP address range in the form of \"1.2.3.4 - 1.2.3.5\" without quotes. Make sure the dash between the IP addresses in a normal dash (a minus sign on your keyboard) and not another character that looks like a dash."); + return; + } + } + if( ! (/\w+/.test(ipRange) || /\w+/.test(uaRange))){ + this.colorbox('300px', 'Specify an IP range or Browser pattern', "Please specify either an IP address range or a web browser pattern to match."); + return; + } + var self = this; + this.ajax('wordfence_blockIPUARange', { + ipRange: ipRange, + uaRange: uaRange, + reason: reason + }, function(res){ + if(res.ok){ + self.loadBlockRanges(); + return; + } + }); + }, + unblockRange: function(id){ + var self = this; + this.ajax('wordfence_unblockRange', { + id: id + }, function(res){ + self.loadBlockRanges(); + }); + }, + blockIP: function(IP, reason){ + var self = this; + this.ajax('wordfence_blockIP', { + IP: IP, + reason: reason + }, function(res){ + if(res.errorMsg){ + return; + } else { + self.reloadActivities(); + } + }); + }, + blockIPTwo: function(IP, reason, perm){ + var self = this; + this.ajax('wordfence_blockIP', { + IP: IP, + reason: reason, + perm: (perm ? '1' : '0') + }, function(res){ + if(res.errorMsg){ + return; + } else { + self.staticTabChanged(); + } + }); + }, + unlockOutIP: function(IP){ + var self = this; + this.ajax('wordfence_unlockOutIP', { + IP: IP + }, function(res){ self.staticTabChanged(); }); + }, + unblockIP: function(IP){ + var self = this; + this.ajax('wordfence_unblockIP', { + IP: IP + }, function(res){ + self.reloadActivities(); + }); + }, + unblockIPTwo: function(IP){ + var self = this; + this.ajax('wordfence_unblockIP', { + IP: IP + }, function(res){ + self.staticTabChanged(); + }); + }, + permBlockIP: function(IP){ + var self = this; + this.ajax('wordfence_permBlockIP', { + IP: IP + }, function(res){ self.staticTabChanged(); }); + }, + makeElemID: function(){ + return 'wfElemGen' + this.elementGeneratorIter++; + }, + pulse: function(sel){ + jQuery(sel).fadeIn(function(){ + setTimeout(function(){ jQuery(sel).fadeOut(); }, 2000); + }); + }, + getCacheStats: function(){ + var self = this; + this.ajax('wordfence_getCacheStats', {}, function(res){ + if(res.ok){ + self.colorbox('400px', res.heading, res.body); + } + }); + }, + clearPageCache: function(){ + var self = this; + this.ajax('wordfence_clearPageCache', {}, function(res){ + if(res.ok){ + self.colorbox('400px', res.heading, res.body); + } + }); + }, + switchToFalcon: function(){ + var self = this; + this.ajax('wordfence_checkFalconHtaccess', { + }, function(res){ + if(res.ok){ + self.colorbox('400px', "Enabling Falcon Engine", 'First read this
Introduction to Falcon Engine. Falcon modifies your website configuration file which is called your .htaccess file. To enable Falcon we ask that you make a backup of this file. This is a safety precaution in case for some reason Falcon is not compatible with your site.

Click here to download a backup copy of your .htaccess file now

'); + } else if(res.nginx){ + self.colorbox('400px', "Enabling Falcon Engine", 'You are using an Nginx web server and using a FastCGI processor like PHP5-FPM. To use Falcon you will need to manually modify your nginx.conf configuration file and reload your Nginx server for the changes to take effect. You can find the rules you need to make these changes to nginx.conf on this page on wordfence.com. Once you have made these changes, compressed cached files will be served to your visitors directly from Nginx making your site extremely fast. When you have made the changes and reloaded your Nginx server, you can click the button below to enable Falcon.

'); + } else if(res.err){ + self.colorbox('400px', "We encountered a problem", "We can't modify your .htaccess file for you because: " + res.err + "

Advanced users: If you would like to manually enable Falcon yourself by editing your .htaccess, you can add the rules below to the beginning of your .htaccess file. Then click the button below to enable Falcon. Don't do this unless you understand website configuration.

"); + } + }); + }, + confirmSwitchToFalcon: function(noEditHtaccess){ + jQuery.colorbox.close(); + var cacheType = 'falcon'; + var self = this; + this.ajax('wordfence_saveCacheConfig', { + cacheType: cacheType, + noEditHtaccess: noEditHtaccess + }, function(res){ + if(res.ok){ + self.colorbox('400px', res.heading, res.body); + } + } + ); + }, + saveCacheConfig: function(){ + var cacheType = jQuery('input:radio[name=cacheType]:checked').val(); + if(cacheType == 'falcon'){ + return this.switchToFalcon(); + } + var self = this; + this.ajax('wordfence_saveCacheConfig', { + cacheType: cacheType + }, function(res){ + if(res.ok){ + self.colorbox('400px', res.heading, res.body); + } + } + ); + }, + saveCacheOptions: function(){ + var self = this; + this.ajax('wordfence_saveCacheOptions', { + allowHTTPSCaching: (jQuery('#wfallowHTTPSCaching').is(':checked') ? 1 : 0), + addCacheComment: (jQuery('#wfaddCacheComment').is(':checked') ? 1 : 0), + clearCacheSched: (jQuery('#wfclearCacheSched').is(':checked') ? 1 : 0) + }, function(res){ + if(res.updateErr){ + self.colorbox('400px', "You need to manually update your .htaccess", res.updateErr + "
Your option was updated but you need to change the Wordfence code in your .htaccess to the following:
'); + } + } + ); + }, + saveConfig: function(){ + var qstr = jQuery('#wfConfigForm').serialize(); + var self = this; + jQuery('.wfSavedMsg').hide(); + jQuery('.wfAjax24').show(); + this.ajax('wordfence_saveConfig', qstr, function(res){ + jQuery('.wfAjax24').hide(); + if(res.ok){ + if(res['paidKeyMsg']){ + self.colorbox('400px', "Congratulations! You have been upgraded to Premium Scanning.", "You have upgraded to a Premium API key. Once this page reloads, you can choose which premium scanning options you would like to enable and then click save. Click the button below to reload this page now.

"); + return; + } else if(res['reload'] == 'reload' || WFAD.reloadConfigPage){ + self.colorbox('400px', "Please reload this page", "You selected a config option that requires a page reload. Click the button below to reload this page to update the menu.

"); + return; + } else { + self.pulse('.wfSavedMsg'); + } + } else if(res.errorMsg){ + return; + } else { + self.colorbox('400px', 'An error occurred', 'We encountered an error trying to save your changes.'); + } + }); + }, + changeSecurityLevel: function(){ + var level = jQuery('#securityLevel').val(); + for(var k in WFSLevels[level].checkboxes){ + if(k != 'liveTraf_ignorePublishers'){ + jQuery('#' + k).prop("checked", WFSLevels[level].checkboxes[k]); + } + } + for(var k in WFSLevels[level].otherParams){ + if(! /^(?:apiKey|securityLevel|alertEmails|liveTraf_ignoreUsers|liveTraf_ignoreIPs|liveTraf_ignoreUA|liveTraf_hitsMaxSize|maxMem|maxExecutionTime|actUpdateInterval)$/.test(k)){ + jQuery('#' + k).val(WFSLevels[level].otherParams[k]); + } + } + }, + clearAllBlocked: function(op){ + if(op == 'blocked'){ + body = "Are you sure you want to clear all blocked IP addresses and allow visitors from those addresses to access the site again?"; + } else if(op == 'locked'){ + body = "Are you sure you want to clear all locked IP addresses and allow visitors from those addresses to sign in again?"; + } else { + return; + } + this.colorbox('450px', "Please confirm", body + + '

   ' + + '
'); + }, + confirmClearAllBlocked: function(op){ + var self = this; + this.ajax('wordfence_clearAllBlocked', { op: op }, function(res){ + self.staticTabChanged(); + }); + }, + setOwnCountry: function(code){ + this.ownCountry = (code + "").toUpperCase(); + }, + loadBlockedCountries: function(str){ + var codes = str.split(','); + for(var i = 0; i < codes.length; i++){ + jQuery('#wfCountryCheckbox_' + codes[i]).prop('checked', true); + } + }, + saveCountryBlocking: function(){ + var action = jQuery('#wfBlockAction').val(); + var redirURL = jQuery('#wfRedirURL').val(); + var bypassRedirURL = jQuery('#wfBypassRedirURL').val(); + var bypassRedirDest = jQuery('#wfBypassRedirDest').val(); + var bypassViewURL = jQuery('#wfBypassViewURL').val(); + + if(action == 'redir' && (! /^https?:\/\/[^\/]+/i.test(redirURL))){ + this.colorbox('400px', "Please enter a URL for redirection", "You have chosen to redirect blocked countries to a specific page. You need to enter a URL in the text box provided that starts with http:// or https://"); + return; + } + if( bypassRedirURL || bypassRedirDest ){ + if(! (bypassRedirURL && bypassRedirDest)){ + this.colorbox('400px', "Missing data from form", "If you want to set up a URL that will bypass country blocking, you must enter a URL that a visitor can hit and the destination they will be redirected to. You have only entered one of these components. Please enter both."); + return; + } + if(bypassRedirURL == bypassRedirDest){ + this.colorbox('400px', "URLs are the same", "The URL that a user hits to bypass country blocking and the URL they are redirected to are the same. This would cause a circular redirect. Please fix this."); + return; + } + } + if(bypassRedirURL && (! /^(?:\/|http:\/\/)/.test(bypassRedirURL))){ this.invalidCountryURLMsg(bypassRedirURL); return; } + if(bypassRedirDest && (! /^(?:\/|http:\/\/)/.test(bypassRedirDest))){ this.invalidCountryURLMsg(bypassRedirDest); return; } + if(bypassViewURL && (! /^(?:\/|http:\/\/)/.test(bypassViewURL))){ this.invalidCountryURLMsg(bypassViewURL); return; } + + var codesArr = []; + var ownCountryBlocked = false; + var self = this; + jQuery('.wfCountryCheckbox').each(function(idx, elem){ + if(jQuery(elem).is(':checked')){ + var code = jQuery(elem).val(); + codesArr.push(code); + if(code == self.ownCountry){ + ownCountryBlocked = true; + } + } + }); + var codes = codesArr.join(','); + this.countryCodesToSave = codes; + if(ownCountryBlocked){ + this.colorbox('400px', "Please confirm blocking yourself", "You are about to block your own country. This could lead to you being locked out. Please make sure that your user profile on this machine has a current and valid email address and make sure you know what it is. That way if you are locked out, you can send yourself an unlock email. If you're sure you want to block your own country, click 'Confirm' below, otherwise click 'Cancel'.
" + + ' '); + } else { + this.confirmSaveCountryBlocking(); + } + }, + invalidCountryURLMsg: function(URL){ + this.colorbox('400px', "Invalid URL", "URL's that you provide for bypassing country blocking must start with '/' or 'http://' without quotes. The URL that is invalid is: " + URL); + return; + }, + confirmSaveCountryBlocking: function(){ + var action = jQuery('#wfBlockAction').val(); + var redirURL = jQuery('#wfRedirURL').val(); + var loggedInBlocked = jQuery('#wfLoggedInBlocked').is(':checked') ? '1' : '0'; + var loginFormBlocked = jQuery('#wfLoginFormBlocked').is(':checked') ? '1' : '0'; + var restOfSiteBlocked = jQuery('#wfRestOfSiteBlocked').is(':checked') ? '1' : '0'; + var bypassRedirURL = jQuery('#wfBypassRedirURL').val(); + var bypassRedirDest = jQuery('#wfBypassRedirDest').val(); + var bypassViewURL = jQuery('#wfBypassViewURL').val(); + + jQuery('.wfAjax24').show(); + var self = this; + this.ajax('wordfence_saveCountryBlocking', { + blockAction: action, + redirURL: redirURL, + loggedInBlocked: loggedInBlocked, + loginFormBlocked: loginFormBlocked, + restOfSiteBlocked: restOfSiteBlocked, + bypassRedirURL: bypassRedirURL, + bypassRedirDest: bypassRedirDest, + bypassViewURL: bypassViewURL, + codes: this.countryCodesToSave + }, function(res){ + jQuery('.wfAjax24').hide(); + self.pulse('.wfSavedMsg'); + }); + }, + paidUsersOnly: function(msg){ + var pos = jQuery('#paidWrap').position(); + var width = jQuery('#paidWrap').width(); + var height = jQuery('#paidWrap').height(); + jQuery('').insertAfter('#paidWrap').fadeTo(10000, 0.7); + }, + sched_modeChange: function(){ + var self = this; + if(jQuery('#schedMode').val() == 'auto'){ + jQuery('.wfSchedCheckbox').attr('disabled', true); + } else { + jQuery('.wfSchedCheckbox').attr('disabled', false); + } + }, + sched_shortcut: function(mode){ + if(jQuery('#schedMode').val() == 'auto'){ + this.colorbox('400px', 'Change the scan mode', "You need to change the scan mode to manually scheduled scans if you want to select scan times."); + return; + } + jQuery('.wfSchedCheckbox').prop('checked', false); + if(this.schedStartHour === false){ + this.schedStartHour = Math.floor((Math.random()*24)); + } else { + this.schedStartHour++; + if(this.schedStartHour > 23){ + this.schedStartHour = 0; + } + } + if(mode == 'onceDaily'){ + for(var i = 0; i <= 6; i++){ + jQuery('#wfSchedDay_' + i + '_' + this.schedStartHour).attr('checked', true); + } + } else if(mode == 'twiceDaily'){ + var secondHour = this.schedStartHour + 12; + if(secondHour >= 24){ secondHour = secondHour - 24; } + for(var i = 0; i <= 6; i++){ + jQuery('#wfSchedDay_' + i + '_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_' + i + '_' + secondHour).attr('checked', true); + } + } else if(mode == 'oddDaysWE'){ + var startDay = Math.floor((Math.random())); + jQuery('#wfSchedDay_1_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_3_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_5_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_6_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_0_' + this.schedStartHour).attr('checked', true); + } else if(mode == 'weekends'){ + var startDay = Math.floor((Math.random())); + jQuery('#wfSchedDay_6_' + this.schedStartHour).attr('checked', true); + jQuery('#wfSchedDay_0_' + this.schedStartHour).attr('checked', true); + } else if(mode == 'every6hours'){ + for(var i = 0; i <= 6; i++){ + for(var hour = this.schedStartHour; hour < this.schedStartHour + 24; hour = hour + 6){ + var displayHour = hour; + if(displayHour >= 24){ displayHour = displayHour - 24; } + jQuery('#wfSchedDay_' + i + '_' + displayHour).attr('checked', true); + } + } + } + + }, + sched_save: function(){ + var schedMode = jQuery('#schedMode').val(); + var schedule = []; + for(var day = 0; day <= 6; day++){ + var hours = []; + for(var hour = 0; hour <= 23; hour++){ + var elemID = '#wfSchedDay_' + day + '_' + hour; + hours[hour] = jQuery(elemID).is(':checked') ? '1' : '0'; + } + schedule[day] = hours.join(','); + } + scheduleTxt = schedule.join('|'); + var self = this; + this.ajax('wordfence_saveScanSchedule', { + schedMode: schedMode, + schedTxt: scheduleTxt + }, function(res){ + jQuery('#wfScanStartTime').html(res.nextStart); + jQuery('.wfAjax24').hide(); + self.pulse('.wfSaveMsg'); + }); + }, + twoFacStatus: function(msg){ + jQuery('#wfTwoFacMsg').html(msg); + jQuery('#wfTwoFacMsg').fadeIn(function(){ + setTimeout(function(){ jQuery('#wfTwoFacMsg').fadeOut(); }, 2000); + }); + }, + addTwoFactor: function(username, phone){ + var self = this; + this.ajax('wordfence_addTwoFactor', { + username: username, + phone: phone + }, function(res){ + if(res.ok){ + self.twoFacStatus('User added! Check the user\'s phone to get the activation code.'); + jQuery('
' + jQuery('#wfTwoFacUserTmpl').tmpl(res).html() + '
').prependTo(jQuery('#wfTwoFacUsers')); + } + }); + }, + twoFacActivate: function(userID, code){ + var self = this; + this.ajax('wordfence_twoFacActivate', { + userID: userID, + code: code + }, function(res){ + if(res.ok){ + jQuery('#twoFacCont_' + res.userID).html( + jQuery('#wfTwoFacUserTmpl').tmpl(res) + ); + self.twoFacStatus('Cellphone Sign-in activated for user.'); + } + }); + }, + delTwoFac: function(userID){ + this.ajax('wordfence_twoFacDel', { + userID: userID + }, function(res){ + if(res.ok){ + jQuery('#twoFacCont_' + res.userID).fadeOut(function(){ jQuery(this).remove(); }); + } + }); + }, + loadTwoFactor: function(){ + this.ajax('wordfence_loadTwoFactor', {}, function(res){ + if(res.users && res.users.length > 0){ + for(var i = 0; i < res.users.length; i++){ + jQuery('
' + + jQuery('#wfTwoFacUserTmpl').tmpl(res.users[i]).html() + + + '
').appendTo(jQuery('#wfTwoFacUsers')); + } + } + }); + }, + getQueryParam: function(name){ + name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); + var regexS = "[\\?&]" + name + "=([^&#]*)"; + var regex = new RegExp(regexS); + var results = regex.exec(window.location.search); + if(results == null){ + return ""; + } else { + return decodeURIComponent(results[1].replace(/\+/g, " ")); + } + }, + inet_aton: function(dot) { + var d = dot.split('.'); + return ((((((+d[0])*256)+(+d[1]))*256)+(+d[2]))*256)+(+d[3]); + }, + inet_ntoa: function(num){ + var d = num % 256; + for(var i = 3; i > 0; i--) { + num = Math.floor(num/256); + d = num%256 + '.' + d; + } + return d; + }, + removeCacheExclusion: function(id){ + this.ajax('wordfence_removeCacheExclusion', { id: id }, function(res){ window.location.reload(true); }); + }, + addCacheExclusion: function(patternType, pattern){ + if(/^https?:\/\//.test(pattern)){ + this.colorbox('400px', "Incorrect pattern for exclusion", "You can not enter full URL's for exclusion from caching. You entered a full URL that started with http:// or https://. You must enter relative URL's e.g. /exclude/this/page/. You can also enter text that might be contained in the path part of a URL or at the end of the path part of a URL."); + return; + } + + this.ajax('wordfence_addCacheExclusion', { + patternType: patternType, + pattern: pattern + }, function(res){ + if(res.ok){ //Otherwise errorMsg will get caught + window.location.reload(true); + } + }); + }, + loadCacheExclusions: function(){ + this.ajax('wordfence_loadCacheExclusions', {}, function(res){ + if(res.ex instanceof Array && res.ex.length > 0){ + for(var i = 0; i < res.ex.length; i++){ + var newElem = jQuery('#wfCacheExclusionTmpl').tmpl(res.ex[i]); + newElem.prependTo('#wfCacheExclusions').fadeIn(); + } + jQuery('

Cache Exclusions

').prependTo('#wfCacheExclusions'); + } else { + jQuery('

Cache Exclusions

There are not currently any exclusions. If you have a site that does not change often, it is perfectly normal to not have any pages you want to exclude from the cache.

').prependTo('#wfCacheExclusions'); + } + + }); + } +}; +window['WFAD'] = window['wordfenceAdmin']; +} +jQuery(function(){ + wordfenceAdmin.init(); +}); diff --git a/wp-content/plugins/wordfence/js/jquery.colorbox-min.js b/wp-content/plugins/wordfence/js/jquery.colorbox-min.js new file mode 100644 index 0000000..e84ff66 --- /dev/null +++ b/wp-content/plugins/wordfence/js/jquery.colorbox-min.js @@ -0,0 +1,4 @@ +// ColorBox v1.3.19 - jQuery lightbox plugin +// (c) 2011 Jack Moore - jacklmoore.com +// License: http://www.opensource.org/licenses/mit-license.php +(function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("
"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||QK.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this); \ No newline at end of file diff --git a/wp-content/plugins/wordfence/js/jquery.dataTables.min.js b/wp-content/plugins/wordfence/js/jquery.dataTables.min.js new file mode 100644 index 0000000..4280c6d --- /dev/null +++ b/wp-content/plugins/wordfence/js/jquery.dataTables.min.js @@ -0,0 +1,151 @@ +/* + * File: jquery.dataTables.min.js + * Version: 1.8.2 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Info: www.datatables.net + * + * Copyright 2008-2011 Allan Jardine, all rights reserved. + * + * This source file is free software, under either the GPL v2 license or a + * BSD style license, as supplied with this software. + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + */ +(function(i,za,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var n=i.fn.dataTableExt;n.sVersion="1.8.2";n.sErrMode="alert";n.iApiIndex=0;n.oApi={};n.afnFiltering=[];n.aoFeatures=[];n.ofnSearch={};n.afnSortData=[];n.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", +sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};n.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left", +sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled", +sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default", +sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll", +sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,l,s){var t,w,y;if(g.bJUI){t=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev; +t.appendChild(y)}else{t=p.createElement("div");w=p.createElement("div")}t.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;t.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(t);l.appendChild(w);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(t).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false}); +if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,s=0,t=l.length;s=w-t){t=w-s+1;x=w}else{t=y-Math.ceil(s/2)+1;x=t+s-1}for(s=t;s<=x;s++)F+=y!=s?''+s+"":''+s+"";x=g.aanFeatures.p;var z,$=function(M){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);M.preventDefault()},X=function(){return false};s=0;for(t=x.length;sl?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g< +l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l- +g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};n.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,s=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var t=1;t")!=-1)return"html";return null}];n.fnVersionCheck=function(g){var l=function(x,v){for(;x.length=parseInt(w,10)};n._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal= +function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance= +this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table", +sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"", +bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripeClasses=[];this.asDestroyStripes=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType= +"two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:function(f){i(d.oInstance).trigger("xhr",d);c(f)},dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; +this.aoServerParams=[];this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!Ca(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h= +h;h=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);i(a.oInstance).trigger("draw",a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function da(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)N(a, +a.oPreviousSearch);else{E(a);C(a)}}function Ca(a){if(a.bAjaxDataGet){a.iDraw++;K(a,true);var b=Da(a);ha(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(c){Ea(a,c)},a);return false}else return true}function Da(a){var b=a.aoColumns.length,c=[],d,f;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ka(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength: +-1});for(f=0;f")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ga(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Ha(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ia(a);e=1}else if(h=="t"){f=Ja(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ka(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=La(a);e=1}else if(n.aoFeatures.length!==0){j=n.aoFeatures;u=0;for(k=j.length;ui(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true); +a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var U=S(a,h);f=0;for(e=U.length;fd.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!== +"")a.nTable.style.width=q(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()f-a.oScroll.iBarWidth)a.nTable.style.width=q(f)}else a.nTable.style.width=q(f);f=i(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width= +q(r);H.push(r)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width=q(r);H.push(r)},j,k);i(j).height(0)}P(function(I){I.innerHTML="";I.style.width=q(H.shift())},h);a.nTFoot!==null&&P(function(I){I.innerHTML="";I.style.width=q(H.shift())},j);if(i(a.nTable).outerWidth()d.offsetHeight|| +i(d).css("overflow-y")=="scroll"?f+a.oScroll.iBarWidth:f;if(B&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(j-a.oScroll.iBarWidth);d.style.width=q(j);b.parentNode.style.width=q(j);if(a.nTFoot!==null)L.parentNode.style.width=q(j);if(a.oScroll.sX==="")J(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width.");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else{d.style.width= +q("100%");b.parentNode.style.width=q("100%");if(a.nTFoot!==null)L.parentNode.style.width=q("100%")}if(a.oScroll.sY==="")if(B)d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=q(a.oScroll.sY);B=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'):b===""?'':b+' ';var c=p.createElement("div"); +c.className=a.oClasses.sFilter;c.innerHTML="";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=qa(G(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Oa(a,b,c,d,f){var e=pa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(n.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length|| +a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);oa(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=n.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&& +(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c=h)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()- +1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Ka(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ra,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Ra(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+ +1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j=a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_", +e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length"); +f.className=a.oClasses.sLength;f.innerHTML="";i('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;ca.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Sa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=q(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ga(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th", +a.nTHead);for(e=0;etd",b);h=S(a,e);for(e=d=0;e0)a.aoColumns[e].sWidth=q(c);d++}a.nTable.style.width=q(i(b).outerWidth());b.parentNode.removeChild(b)}}function Ua(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!== +"")b.style.width=q(i(b).outerWidth())}function Ta(a,b){var c=Va(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=G(a,c,b,"");return d}return Q(a,c)[b]}function Va(a,b){for(var c=-1,d=-1,f=0;f/g,"");if(e.length>c){c=e.length;d=f}}return d}function q(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+ +"px"}function Za(a,b){if(a.length!=b.length)return 1;for(var c=0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function Fa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d4096){a=p.cookie.split(";");for(var j=0,k=a.length;j=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[n.iApiIndex]);la(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[n.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c; +e.colSpan=Z(d);if(typeof b.jquery!="undefined"||typeof b=="object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[n.iApiIndex]),c=0;c=Z(d);if(!j)for(f=a;ftr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove(); +if(a.nTable!=a.nTHead.parentNode){i(a.nTable).children("thead").remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&&a.nTable!=a.nTFoot.parentNode){i(a.nTable).children("tfoot").remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];V(a);i(ba(a)).removeClass(a.asStripeClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oJUIClasses.sSortableAsc,n.oJUIClasses.sSortableDesc,n.oJUIClasses.sSortableNone].join(" ")); +i("th span."+n.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e=i("div."+n.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oStdClasses.sSortableAsc,n.oStdClasses.sSortableDesc,n.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;dt<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!== +"")e.oScroll.iBarWidth=Ya();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Xa(e,g);e.aoDrawCallback.push({fn:va,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&& +typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(u){y(e,u,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"&&typeof g.asStripeClasses=="undefined"){e.asStripeClasses.push(e.oClasses.sStripeOdd);e.asStripeClasses.push(e.oClasses.sStripeEven)}c=false;d=i(this).children("tbody").children("tr"); +a=0;for(b=e.asStripeClasses.length;a=0;a--){var m= +g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c=0){for(;e.aoColumns.length<=m[c];)F(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]=="number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;c0){e.nTFoot=a[0];Y(e.aoFooter,e.nTFoot)}if(j)for(a=0;a)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/wordfence/js/jquery.tools.min.js b/wp-content/plugins/wordfence/js/jquery.tools.min.js new file mode 100644 index 0000000..c626d96 --- /dev/null +++ b/wp-content/plugins/wordfence/js/jquery.tools.min.js @@ -0,0 +1,15 @@ +/*! + * jQuery Tools v1.2.6 - The missing UI library for the Web + * + * tooltip/tooltip.js + * tooltip/tooltip.dynamic.js + * tooltip/tooltip.slide.js + * + * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. + * + * http://flowplayer.org/tools/ + * + */ +(function(a){a.tools=a.tools||{version:"v1.2.6"},a.tools.tooltip={conf:{effect:"toggle",fadeOutSpeed:"fast",predelay:0,delay:30,opacity:1,tip:0,fadeIE:!1,position:["top","center"],offset:[0,0],relative:!1,cancelDefault:!0,events:{def:"mouseenter,mouseleave",input:"focus,blur",widget:"focus mouseenter,blur mouseleave",tooltip:"mouseenter,mouseleave"},layout:"
",tipClass:"tooltip"},addEffect:function(a,c,d){b[a]=[c,d]}};var b={toggle:[function(a){var b=this.getConf(),c=this.getTip(),d=b.opacity;d<1&&c.css({opacity:d}),c.show(),a.call()},function(a){this.getTip().hide(),a.call()}],fade:[function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeTo(c.fadeInSpeed,c.opacity,b):(this.getTip().show(),b())},function(b){var c=this.getConf();!a.browser.msie||c.fadeIE?this.getTip().fadeOut(c.fadeOutSpeed,b):(this.getTip().hide(),b())}]};function c(b,c,d){var e=d.relative?b.position().top:b.offset().top,f=d.relative?b.position().left:b.offset().left,g=d.position[0];e-=c.outerHeight()-d.offset[0],f+=b.outerWidth()+d.offset[1],/iPad/i.test(navigator.userAgent)&&(e-=a(window).scrollTop());var h=c.outerHeight()+b.outerHeight();g=="center"&&(e+=h/2),g=="bottom"&&(e+=h),g=d.position[1];var i=c.outerWidth()+b.outerWidth();g=="center"&&(f-=i/2),g=="left"&&(f-=i);return{top:e,left:f}}function d(d,e){var f=this,g=d.add(f),h,i=0,j=0,k=d.attr("title"),l=d.attr("data-tooltip"),m=b[e.effect],n,o=d.is(":input"),p=o&&d.is(":checkbox, :radio, select, :button, :submit"),q=d.attr("type"),r=e.events[q]||e.events[o?p?"widget":"input":"def"];if(!m)throw"Nonexistent effect \""+e.effect+"\"";r=r.split(/,\s*/);if(r.length!=2)throw"Tooltip: bad events configuration for "+q;d.bind(r[0],function(a){clearTimeout(i),e.predelay?j=setTimeout(function(){f.show(a)},e.predelay):f.show(a)}).bind(r[1],function(a){clearTimeout(j),e.delay?i=setTimeout(function(){f.hide(a)},e.delay):f.hide(a)}),k&&e.cancelDefault&&(d.removeAttr("title"),d.data("title",k)),a.extend(f,{show:function(b){if(!h){l?h=a(l):e.tip?h=a(e.tip).eq(0):k?h=a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k):(h=d.next(),h.length||(h=d.parent().next()));if(!h.length)throw"Cannot find tooltip for "+d}if(f.isShown())return f;h.stop(!0,!0);var o=c(d,h,e);e.tip&&h.html(d.data("title")),b=a.Event(),b.type="onBeforeShow",g.trigger(b,[o]);if(b.isDefaultPrevented())return f;o=c(d,h,e),h.css({position:"absolute",top:o.top,left:o.left}),n=!0,m[0].call(f,function(){b.type="onShow",n="full",g.trigger(b)});var p=e.events.tooltip.split(/,\s*/);h.data("__set")||(h.unbind(p[0]).bind(p[0],function(){clearTimeout(i),clearTimeout(j)}),p[1]&&!d.is("input:not(:checkbox, :radio), textarea")&&h.unbind(p[1]).bind(p[1],function(a){a.relatedTarget!=d[0]&&d.trigger(r[1].split(" ")[0])}),e.tip||h.data("__set",!0));return f},hide:function(c){if(!h||!f.isShown())return f;c=a.Event(),c.type="onBeforeHide",g.trigger(c);if(!c.isDefaultPrevented()){n=!1,b[e.effect][1].call(f,function(){c.type="onHide",g.trigger(c)});return f}},isShown:function(a){return a?n=="full":n},getConf:function(){return e},getTip:function(){return h},getTrigger:function(){return d}}),a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","),function(b,c){a.isFunction(e[c])&&a(f).bind(c,e[c]),f[c]=function(b){b&&a(f).bind(c,b);return f}})}a.fn.tooltip=function(b){var c=this.data("tooltip");if(c)return c;b=a.extend(!0,{},a.tools.tooltip.conf,b),typeof b.position=="string"&&(b.position=b.position.split(/,?\s/)),this.each(function(){c=new d(a(this),b),a(this).data("tooltip",c)});return b.api?c:this}})(jQuery); +(function(a){var b=a.tools.tooltip;b.dynamic={conf:{classNames:"top right bottom left"}};function c(b){var c=a(window),d=c.width()+c.scrollLeft(),e=c.height()+c.scrollTop();return[b.offset().top<=c.scrollTop(),d<=b.offset().left+b.width(),e<=b.offset().top+b.height(),c.scrollLeft()>=b.offset().left]}function d(a){var b=a.length;while(b--)if(a[b])return!1;return!0}a.fn.dynamic=function(e){typeof e=="number"&&(e={speed:e}),e=a.extend({},b.dynamic.conf,e);var f=a.extend(!0,{},e),g=e.classNames.split(/\s/),h;this.each(function(){var b=a(this).tooltip().onBeforeShow(function(b,e){var i=this.getTip(),j=this.getConf();h||(h=[j.position[0],j.position[1],j.offset[0],j.offset[1],a.extend({},j)]),a.extend(j,h[4]),j.position=[h[0],h[1]],j.offset=[h[2],h[3]],i.css({visibility:"hidden",position:"absolute",top:e.top,left:e.left}).show();var k=a.extend(!0,{},f),l=c(i);if(!d(l)){l[2]&&(a.extend(j,k.top),j.position[0]="top",i.addClass(g[0])),l[3]&&(a.extend(j,k.right),j.position[1]="right",i.addClass(g[1])),l[0]&&(a.extend(j,k.bottom),j.position[0]="bottom",i.addClass(g[2])),l[1]&&(a.extend(j,k.left),j.position[1]="left",i.addClass(g[3]));if(l[0]||l[2])j.offset[0]*=-1;if(l[1]||l[3])j.offset[1]*=-1}i.css({visibility:"visible"}).hide()});b.onBeforeShow(function(){var a=this.getConf(),b=this.getTip();setTimeout(function(){a.position=[h[0],h[1]],a.offset=[h[2],h[3]]},0)}),b.onHide(function(){var a=this.getTip();a.removeClass(e.classNames)}),ret=b});return e.api?ret:this}})(jQuery); +(function(a){var b=a.tools.tooltip;a.extend(b.conf,{direction:"up",bounce:!1,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!a.browser.msie});var c={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};b.addEffect("slide",function(a){var b=this.getConf(),d=this.getTip(),e=b.slideFade?{opacity:b.opacity}:{},f=c[b.direction]||c.up;e[f[1]]=f[0]+"="+b.slideOffset,b.slideFade&&d.css({opacity:0}),d.show().animate(e,b.slideInSpeed,a)},function(b){var d=this.getConf(),e=d.slideOffset,f=d.slideFade?{opacity:0}:{},g=c[d.direction]||c.up,h=""+g[0];d.bounce&&(h=h=="+"?"-":"+"),f[g[1]]=h+"="+e,this.getTip().animate(f,d.slideOutSpeed,function(){a(this).hide(),b.call()})})})(jQuery); diff --git a/wp-content/plugins/wordfence/js/perf.js b/wp-content/plugins/wordfence/js/perf.js new file mode 100644 index 0000000..daa963a --- /dev/null +++ b/wp-content/plugins/wordfence/js/perf.js @@ -0,0 +1,36 @@ +jQuery(document).ready(function(){ + if(typeof(performance) !== 'undefined'){ + var timing = { + fetchStart: false, + domainLookupStart: false, + domainLookupEnd: false, + connectStart: false, + connectEnd: false, + requestStart: false, + responseStart: false, + responseEnd: false + }; + for(var k in timing){ + timing[k] = performance.timing[k]; + } + timing['domReady'] = new Date().getTime(); + jQuery(window).load(function(){ + timing['URL'] = document.URL; + timing['loaded'] = new Date().getTime(); + var fields = ['fetchStart', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd', 'requestStart', 'responseStart', 'responseEnd', 'domReady', 'loaded']; + for(var i = fields.length - 1; i >= 1; i--){ + timing[fields[i]] -= timing[fields[i - 1]]; + } + timing['fetchStart'] = 0; + timing['action'] = 'wordfence_perfLog'; + jQuery.ajax({ + type: 'POST', + url: wordfenceAjaxURL, + dataType: 'json', + data: timing, + success: function(json){}, + error: function(){} + }); + }); + } +}); diff --git a/wp-content/plugins/wordfence/js/tourTip.js b/wp-content/plugins/wordfence/js/tourTip.js new file mode 100644 index 0000000..212d7f6 --- /dev/null +++ b/wp-content/plugins/wordfence/js/tourTip.js @@ -0,0 +1,162 @@ +if(! window['wordfenceExt']){ +window['wordfenceExt'] = { + nonce: false, + loadingCount: 0, + init: function(){ + this.nonce = WordfenceAdminVars.firstNonce; + }, + showLoading: function(){ + this.loadingCount++; + if(this.loadingCount == 1){ + jQuery('
Wordfence is working...
').appendTo('body'); + } + }, + removeLoading: function(){ + this.loadingCount--; + if(this.loadingCount == 0){ + jQuery('#wordfenceWorking').remove(); + } + }, + autoUpdateChoice: function(choice){ + this.ajax('wordfence_autoUpdateChoice', { + choice: choice + }, + function(res){ jQuery('#wordfenceAutoUpdateChoice').fadeOut(); }, + function(){ jQuery('#wordfenceAutoUpdateChoice').fadeOut(); } + ); + }, + removeFromCache: function(postID){ + this.ajax('wordfence_removeFromCache', { + id: postID + }, + function(res){ if(res.ok){ alert("Item removed from the Wordfence cache."); } }, + function(){} + ); + }, + ajax: function(action, data, cb, cbErr, noLoading){ + if(typeof(data) == 'string'){ + if(data.length > 0){ + data += '&'; + } + data += 'action=' + action + '&nonce=' + this.nonce; + } else if(typeof(data) == 'object'){ + data['action'] = action; + data['nonce'] = this.nonce; + } + if(! cbErr){ + cbErr = function(){}; + } + var self = this; + if(! noLoading){ + this.showLoading(); + } + jQuery.ajax({ + type: 'POST', + url: WordfenceAdminVars.ajaxURL, + dataType: "json", + data: data, + success: function(json){ + if(! noLoading){ + self.removeLoading(); + } + if(json && json.nonce){ + self.nonce = json.nonce; + } + cb(json); + }, + error: function(){ + if(! noLoading){ + self.removeLoading(); + } + cbErr(); + } + }); + } +}; +} +jQuery(function(){ + wordfenceExt.init(); +}); + +if(! window['wordfenceTour']){ +window['wordfenceTour'] = { + wfClearEmailField: function(){ + if(jQuery('#wfListEmail').val() == "Enter your email"){ + jQuery('#wfListEmail').val(''); + } + }, + processEmailClick: function(evt){ + var email = jQuery('#wfListEmail').val(); + if(! /[^\@]+\@[^\.]+\.[^\.]+/.test(email)){ + alert("Please enter a valid email address."); + return false; + } + jQuery.ajax({ + type: 'POST', + url: WordfenceAdminVars.ajaxURL, + dataType: "json", + data: { + nonce: WordfenceAdminVars.firstNonce, + email: email, + action: 'wordfence_updateAlertEmail' + }, + success: function(json){ + if(json.ok){ + jQuery('#wordfenceEmailDiv').html('
Your admin alert email address has been set to ' + jQuery('
').text(json.email).html() + '.
'); + } else if(json.err){ + alert(json.err); + } + }, + error: function(){ + } + }); + + if(jQuery('#wfJoinListCheck').is(':checked')){ + return true; + } else { + try { + if(evt.preventDefault) evt.preventDefault(); + evt.returnValue = false; + } catch(e){} + + return false; + } + } +}; +} + +jQuery(function(){ +if(WordfenceAdminVars.tourClosed != '1'){ + var formHTML = '
Also join our WordPress Security email list to receive WordPress Security Alerts and Wordfence news.
'; + var elem = '#toplevel_page_Wordfence'; + jQuery(elem).pointer({ + close: function(){}, + content: "

Congratulations!

You've just installed Wordfence! Start by entering the administrator email address where you would like to receive security alerts for your site:

" + + formHTML + + "

Then click \"Start Tour\" to get a quick introduction to how Wordfence protects your site, keeps you off Google's SEO black-list and can even help clean a hacked site.

", + pointerWidth: 300, + position: { edge: 'bottom', align: 'left' }, + buttons: function(event, t){ + buttonElem = jQuery('
Close'); + buttonElem.bind('click.pointer', function(){ t.element.pointer('close'); + var ajaxData = { + action: 'wordfence_tourClosed', + nonce: WordfenceAdminVars.firstNonce + }; + jQuery.ajax({ + type: 'POST', + url: WordfenceAdminVars.ajaxURL, + dataType: "json", + data: ajaxData, + success: function(json){}, + error: function(){} + }); + }); + return buttonElem; + } + }).pointer('open'); + jQuery('#pointer-close').after('Start Tour'); + jQuery('#pointer-primary').click(function(){ window.location.href = 'admin.php?page=Wordfence'; }); +} +}); + diff --git a/wp-content/plugins/wordfence/lib/.htaccess b/wp-content/plugins/wordfence/lib/.htaccess new file mode 100644 index 0000000..c9c4d1b --- /dev/null +++ b/wp-content/plugins/wordfence/lib/.htaccess @@ -0,0 +1,2 @@ +deny from all + diff --git a/wp-content/plugins/wordfence/lib/Diff.php b/wp-content/plugins/wordfence/lib/Diff.php new file mode 100644 index 0000000..9e0b1b4 --- /dev/null +++ b/wp-content/plugins/wordfence/lib/Diff.php @@ -0,0 +1,176 @@ + + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the Chris Boulton nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package Diff + * @author Chris Boulton + * @copyright (c) 2009 Chris Boulton + * @license New BSD License http://www.opensource.org/licenses/bsd-license.php + * @version 1.1 + * @link http://github.com/chrisboulton/php-diff + */ + +class Diff +{ + /** + * @var array The "old" sequence to use as the basis for the comparison. + */ + private $a = null; + + /** + * @var array The "new" sequence to generate the changes for. + */ + private $b = null; + + /** + * @var array Array containing the generated opcodes for the differences between the two items. + */ + private $groupedCodes = null; + + /** + * @var array Associative array of the default options available for the diff class and their default value. + */ + private $defaultOptions = array( + 'context' => 3, + 'ignoreNewLines' => false, + 'ignoreWhitespace' => false, + 'ignoreCase' => false + ); + + /** + * @var array Array of the options that have been applied for generating the diff. + */ + private $options = array(); + + /** + * The constructor. + * + * @param array $a Array containing the lines of the first string to compare. + * @param array $b Array containing the lines for the second string to compare. + */ + public function __construct($a, $b, $options=array()) + { + $this->a = $a; + $this->b = $b; + + $this->options = array_merge($this->defaultOptions, $options); + } + + /** + * Render a diff using the supplied rendering class and return it. + * + * @param object $renderer An instance of the rendering object to use for generating the diff. + * @return mixed The generated diff. Exact return value depends on the rendered. + */ + public function render(Diff_Renderer_Abstract $renderer) + { + $renderer->diff = $this; + return $renderer->render(); + } + + /** + * Get a range of lines from $start to $end from the first comparison string + * and return them as an array. If no values are supplied, the entire string + * is returned. It's also possible to specify just one line to return only + * that line. + * + * @param int $start The starting number. + * @param int $end The ending number. If not supplied, only the item in $start will be returned. + * @return array Array of all of the lines between the specified range. + */ + public function getA($start=0, $end=null) + { + if($start == 0 && $end === null) { + return $this->a; + } + + if($end === null) { + $length = 1; + } + else { + $length = $end - $start; + } + + return array_slice($this->a, $start, $length); + + } + + /** + * Get a range of lines from $start to $end from the second comparison string + * and return them as an array. If no values are supplied, the entire string + * is returned. It's also possible to specify just one line to return only + * that line. + * + * @param int $start The starting number. + * @param int $end The ending number. If not supplied, only the item in $start will be returned. + * @return array Array of all of the lines between the specified range. + */ + public function getB($start=0, $end=null) + { + if($start == 0 && $end === null) { + return $this->b; + } + + if($end === null) { + $length = 1; + } + else { + $length = $end - $start; + } + + return array_slice($this->b, $start, $length); + } + + /** + * Generate a list of the compiled and grouped opcodes for the differences between the + * two strings. Generally called by the renderer, this class instantiates the sequence + * matcher and performs the actual diff generation and return an array of the opcodes + * for it. Once generated, the results are cached in the diff class instance. + * + * @return array Array of the grouped opcodes for the generated diff. + */ + public function getGroupedOpcodes() + { + if(!is_null($this->groupedCodes)) { + return $this->groupedCodes; + } + + require_once dirname(__FILE__).'/Diff/SequenceMatcher.php'; + $sequenceMatcher = new Diff_SequenceMatcher($this->a, $this->b, null, $this->options); + $this->groupedCodes = $sequenceMatcher->getGroupedOpcodes(); + return $this->groupedCodes; + } +} diff --git a/wp-content/plugins/wordfence/lib/Diff/Renderer/Abstract.php b/wp-content/plugins/wordfence/lib/Diff/Renderer/Abstract.php new file mode 100644 index 0000000..f63c3e7 --- /dev/null +++ b/wp-content/plugins/wordfence/lib/Diff/Renderer/Abstract.php @@ -0,0 +1,82 @@ + + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the Chris Boulton nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package DiffLib + * @author Chris Boulton + * @copyright (c) 2009 Chris Boulton + * @license New BSD License http://www.opensource.org/licenses/bsd-license.php + * @version 1.1 + * @link http://github.com/chrisboulton/php-diff + */ + +abstract class Diff_Renderer_Abstract +{ + /** + * @var object Instance of the diff class that this renderer is generating the rendered diff for. + */ + public $diff; + + /** + * @var array Array of the default options that apply to this renderer. + */ + protected $defaultOptions = array(); + + /** + * @var array Array containing the user applied and merged default options for the renderer. + */ + protected $options = array(); + + /** + * The constructor. Instantiates the rendering engine and if options are passed, + * sets the options for the renderer. + * + * @param array $options Optionally, an array of the options for the renderer. + */ + public function __construct(array $options = array()) + { + $this->setOptions($options); + } + + /** + * Set the options of the renderer to those supplied in the passed in array. + * Options are merged with the default to ensure that there aren't any missing + * options. + * + * @param array $options Array of options to set. + */ + public function setOptions(array $options) + { + $this->options = array_merge($this->defaultOptions, $options); + } +} \ No newline at end of file diff --git a/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/Array.php b/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/Array.php new file mode 100644 index 0000000..c4b80b6 --- /dev/null +++ b/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/Array.php @@ -0,0 +1,224 @@ + + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the Chris Boulton nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package DiffLib + * @author Chris Boulton + * @copyright (c) 2009 Chris Boulton + * @license New BSD License http://www.opensource.org/licenses/bsd-license.php + * @version 1.1 + * @link http://github.com/chrisboulton/php-diff + */ + +require_once dirname(__FILE__).'/../Abstract.php'; + +class Diff_Renderer_Html_Array extends Diff_Renderer_Abstract +{ + /** + * @var array Array of the default options that apply to this renderer. + */ + protected $defaultOptions = array( + 'tabSize' => 4 + ); + + /** + * Render and return an array structure suitable for generating HTML + * based differences. Generally called by subclasses that generate a + * HTML based diff and return an array of the changes to show in the diff. + * + * @return array An array of the generated chances, suitable for presentation in HTML. + */ + public function render() + { + // As we'll be modifying a & b to include our change markers, + // we need to get the contents and store them here. That way + // we're not going to destroy the original data + $a = $this->diff->getA(); + $b = $this->diff->getB(); + + $changes = array(); + $opCodes = $this->diff->getGroupedOpcodes(); + foreach($opCodes as $group) { + $blocks = array(); + $lastTag = null; + $lastBlock = 0; + foreach($group as $code) { + list($tag, $i1, $i2, $j1, $j2) = $code; + + if($tag == 'replace' && $i2 - $i1 == $j2 - $j1) { + for($i = 0; $i < ($i2 - $i1); ++$i) { + $fromLine = $a[$i1 + $i]; + $toLine = $b[$j1 + $i]; + + list($start, $end) = $this->getChangeExtent($fromLine, $toLine); + if($start != 0 || $end != 0) { + $last = $end + strlen($fromLine); + $fromLine = substr_replace($fromLine, "\0", $start, 0); + $fromLine = substr_replace($fromLine, "\1", $last + 1, 0); + $last = $end + strlen($toLine); + $toLine = substr_replace($toLine, "\0", $start, 0); + $toLine = substr_replace($toLine, "\1", $last + 1, 0); + $a[$i1 + $i] = $fromLine; + $b[$j1 + $i] = $toLine; + } + } + } + + if($tag != $lastTag) { + $blocks[] = array( + 'tag' => $tag, + 'base' => array( + 'offset' => $i1, + 'lines' => array() + ), + 'changed' => array( + 'offset' => $j1, + 'lines' => array() + ) + ); + $lastBlock = count($blocks)-1; + } + + $lastTag = $tag; + + if($tag == 'equal') { + $lines = array_slice($a, $i1, ($i2 - $i1)); + $blocks[$lastBlock]['base']['lines'] += $this->formatLines($lines); + $lines = array_slice($b, $j1, ($j2 - $j1)); + $blocks[$lastBlock]['changed']['lines'] += $this->formatLines($lines); + } + else { + if($tag == 'replace' || $tag == 'delete') { + $lines = array_slice($a, $i1, ($i2 - $i1)); + $lines = $this->formatLines($lines); + $lines = str_replace(array("\0", "\1"), array('', ''), $lines); + $blocks[$lastBlock]['base']['lines'] += $lines; + } + + if($tag == 'replace' || $tag == 'insert') { + $lines = array_slice($b, $j1, ($j2 - $j1)); + $lines = $this->formatLines($lines); + $lines = str_replace(array("\0", "\1"), array('', ''), $lines); + $blocks[$lastBlock]['changed']['lines'] += $lines; + } + } + } + $changes[] = $blocks; + } + return $changes; + } + + /** + * Given two strings, determine where the changes in the two strings + * begin, and where the changes in the two strings end. + * + * @param string $fromLine The first string. + * @param string $toLine The second string. + * @return array Array containing the starting position (0 by default) and the ending position (-1 by default) + */ + private function getChangeExtent($fromLine, $toLine) + { + $start = 0; + $limit = min(strlen($fromLine), strlen($toLine)); + while($start < $limit && $fromLine{$start} == $toLine{$start}) { + ++$start; + } + $end = -1; + $limit = $limit - $start; + while(-$end <= $limit && substr($fromLine, $end, 1) == substr($toLine, $end, 1)) { + --$end; + } + return array( + $start, + $end + 1 + ); + } + + /** + * Format a series of lines suitable for output in a HTML rendered diff. + * This involves replacing tab characters with spaces, making the HTML safe + * for output, ensuring that double spaces are replaced with   etc. + * + * @param array $lines Array of lines to format. + * @return array Array of the formatted lines. + */ + private function formatLines($lines) + { + $lines = array_map(array($this, 'ExpandTabs'), $lines); + $lines = array_map(array($this, 'HtmlSafe'), $lines); + foreach($lines as &$line) { + $line = preg_replace('# ( +)|^ #e', "\$this->fixSpaces('\\1')", $line); + } + return $lines; + } + + /** + * Replace a string containing spaces with a HTML representation using  . + * + * @param string $spaces The string of spaces. + * @return string The HTML representation of the string. + */ + function fixSpaces($spaces='') + { + $count = strlen($spaces); + if($count == 0) { + return ''; + } + + $div = floor($count / 2); + $mod = $count % 2; + return str_repeat('  ', $div).str_repeat(' ', $mod); + } + + /** + * Replace tabs in a single line with a number of spaces as defined by the tabSize option. + * + * @param string $line The containing tabs to convert. + * @return string The line with the tabs converted to spaces. + */ + private function expandTabs($line) + { + return str_replace("\t", str_repeat(' ', $this->options['tabSize']), $line); + } + + /** + * Make a string containing HTML safe for output on a page. + * + * @param string $string The string. + * @return string The string with the HTML characters replaced by entities. + */ + private function htmlSafe($string) + { + return @htmlspecialchars($string, ENT_NOQUOTES, 'UTF-8'); + } +} diff --git a/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/SideBySide.php b/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/SideBySide.php new file mode 100644 index 0000000..b78267a --- /dev/null +++ b/wp-content/plugins/wordfence/lib/Diff/Renderer/Html/SideBySide.php @@ -0,0 +1,163 @@ + + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the Chris Boulton nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package DiffLib + * @author Chris Boulton + * @copyright (c) 2009 Chris Boulton + * @license New BSD License http://www.opensource.org/licenses/bsd-license.php + * @version 1.1 + * @link http://github.com/chrisboulton/php-diff + */ + +require_once dirname(__FILE__).'/Array.php'; + +class Diff_Renderer_Html_SideBySide extends Diff_Renderer_Html_Array +{ + /** + * Render a and return diff with changes between the two sequences + * displayed side by side. + * + * @return string The generated side by side diff. + */ + public function render() + { + $changes = parent::render(); + + $html = ''; + if(empty($changes)) { + return $html; + } + + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + foreach($changes as $i => $blocks) { + if($i > 0) { + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + } + + foreach($blocks as $change) { + $html .= ''; + // Equal changes should be shown on both sides of the diff + if($change['tag'] == 'equal') { + foreach($change['base']['lines'] as $no => $line) { + $fromLine = $change['base']['offset'] + $no + 1; + $toLine = $change['changed']['offset'] + $no + 1; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + } + } + // Added lines only on the right side + else if($change['tag'] == 'insert') { + foreach($change['changed']['lines'] as $no => $line) { + $toLine = $change['changed']['offset'] + $no + 1; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + } + } + // Show deleted lines only on the left side + else if($change['tag'] == 'delete') { + foreach($change['base']['lines'] as $no => $line) { + $fromLine = $change['base']['offset'] + $no + 1; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + } + } + // Show modified lines on both sides + else if($change['tag'] == 'replace') { + if(count($change['base']['lines']) >= count($change['changed']['lines'])) { + foreach($change['base']['lines'] as $no => $line) { + $fromLine = $change['base']['offset'] + $no + 1; + $html .= ''; + $html .= ''; + $html .= ''; + if(!isset($change['changed']['lines'][$no])) { + $toLine = ' '; + $changedLine = ' '; + } + else { + $toLine = $change['base']['offset'] + $no + 1; + $changedLine = ''.$change['changed']['lines'][$no].''; + } + $html .= ''; + $html .= ''; + $html .= ''; + } + } + else { + foreach($change['changed']['lines'] as $no => $changedLine) { + if(!isset($change['base']['lines'][$no])) { + $fromLine = ' '; + $line = ' '; + } + else { + $fromLine = $change['base']['offset'] + $no + 1; + $line = ''.$change['base']['lines'][$no].''; + } + $html .= ''; + $html .= ''; + $html .= ''; + $toLine = $change['changed']['offset'] + $no + 1; + $html .= ''; + $html .= ''; + $html .= ''; + } + } + } + $html .= ''; + } + } + $html .= '
The Original Version of the fileThe Modified Version on your WordPress system
  
'.$fromLine.''.$line.' '.$toLine.''.$line.' 
  '.$toLine.''.$line.' 
'.$fromLine.''.$line.'   
'.$fromLine.''.$line.' '.$toLine.''.$changedLine.'
'.$fromLine.''.$line.' '.$toLine.''.$changedLine.'
'; + return $html; + } +} diff --git a/wp-content/plugins/wordfence/lib/Diff/SequenceMatcher.php b/wp-content/plugins/wordfence/lib/Diff/SequenceMatcher.php new file mode 100644 index 0000000..a55dd2f --- /dev/null +++ b/wp-content/plugins/wordfence/lib/Diff/SequenceMatcher.php @@ -0,0 +1,742 @@ + + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the Chris Boulton nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @package Diff + * @author Chris Boulton + * @copyright (c) 2009 Chris Boulton + * @license New BSD License http://www.opensource.org/licenses/bsd-license.php + * @version 1.1 + * @link http://github.com/chrisboulton/php-diff + */ + +class Diff_SequenceMatcher +{ + /** + * @var string|array Either a string or an array containing a callback function to determine if a line is "junk" or not. + */ + private $junkCallback = null; + + /** + * @var array The first sequence to compare against. + */ + private $a = null; + + /** + * @var array The second sequence. + */ + private $b = null; + + /** + * @var array Array of characters that are considered junk from the second sequence. Characters are the array key. + */ + private $junkDict = array(); + + /** + * @var array Array of indices that do not contain junk elements. + */ + private $b2j = array(); + + private $options = array(); + + private $defaultOptions = array( + 'ignoreNewLines' => false, + 'ignoreWhitespace' => false, + 'ignoreCase' => false + ); + + /** + * The constructor. With the sequences being passed, they'll be set for the + * sequence matcher and it will perform a basic cleanup & calculate junk + * elements. + * + * @param string|array $a A string or array containing the lines to compare against. + * @param string|array $b A string or array containing the lines to compare. + * @param string|array $junkCallback Either an array or string that references a callback function (if there is one) to determine 'junk' characters. + */ + public function __construct($a, $b, $junkCallback=null, $options) + { + $this->a = null; + $this->b = null; + $this->junkCallback = $junkCallback; + $this->setOptions($options); + $this->setSequences($a, $b); + } + + public function setOptions($options) + { + $this->options = array_merge($this->defaultOptions, $options); + } + + /** + * Set the first and second sequences to use with the sequence matcher. + * + * @param string|array $a A string or array containing the lines to compare against. + * @param string|array $b A string or array containing the lines to compare. + */ + public function setSequences($a, $b) + { + $this->setSeq1($a); + $this->setSeq2($b); + } + + /** + * Set the first sequence ($a) and reset any internal caches to indicate that + * when calling the calculation methods, we need to recalculate them. + * + * @param string|array $a The sequence to set as the first sequence. + */ + public function setSeq1($a) + { + if(!is_array($a)) { + $a = str_split($a); + } + if($a == $this->a) { + return; + } + + $this->a= $a; + $this->matchingBlocks = null; + $this->opCodes = null; + } + + /** + * Set the second sequence ($b) and reset any internal caches to indicate that + * when calling the calculation methods, we need to recalculate them. + * + * @param string|array $b The sequence to set as the second sequence. + */ + public function setSeq2($b) + { + if(!is_array($b)) { + $b = str_split($b); + } + if($b == $this->b) { + return; + } + + $this->b = $b; + $this->matchingBlocks = null; + $this->opCodes = null; + $this->fullBCount = null; + $this->chainB(); + } + + /** + * Generate the internal arrays containing the list of junk and non-junk + * characters for the second ($b) sequence. + */ + private function chainB() + { + $length = count ($this->b); + $this->b2j = array(); + $popularDict = array(); + + for($i = 0; $i < $length; ++$i) { + $char = $this->b[$i]; + if(isset($this->b2j[$char])) { + if($length >= 200 && count($this->b2j[$char]) * 100 > $length) { + $popularDict[$char] = 1; + unset($this->b2j[$char]); + } + else { + $this->b2j[$char][] = $i; + } + } + else { + $this->b2j[$char] = array( + $i + ); + } + } + + // Remove leftovers + foreach(array_keys($popularDict) as $char) { + unset($this->b2j[$char]); + } + + $this->junkDict = array(); + if(is_callable($this->junkCallback)) { + foreach(array_keys($popularDict) as $char) { + if(call_user_func($this->junkCallback, $char)) { + $this->junkDict[$char] = 1; + unset($popularDict[$char]); + } + } + + foreach(array_keys($this->b2j) as $char) { + if(call_user_func($this->junkCallback, $char)) { + $this->junkDict[$char] = 1; + unset($this->b2j[$char]); + } + } + } + } + + /** + * Checks if a particular character is in the junk dictionary + * for the list of junk characters. + * + * @return boolean $b True if the character is considered junk. False if not. + */ + private function isBJunk($b) + { + if(isset($this->juncDict[$b])) { + return true; + } + + return false; + } + + /** + * Find the longest matching block in the two sequences, as defined by the + * lower and upper constraints for each sequence. (for the first sequence, + * $alo - $ahi and for the second sequence, $blo - $bhi) + * + * Essentially, of all of the maximal matching blocks, return the one that + * startest earliest in $a, and all of those maximal matching blocks that + * start earliest in $a, return the one that starts earliest in $b. + * + * If the junk callback is defined, do the above but with the restriction + * that the junk element appears in the block. Extend it as far as possible + * by matching only junk elements in both $a and $b. + * + * @param int $alo The lower constraint for the first sequence. + * @param int $ahi The upper constraint for the first sequence. + * @param int $blo The lower constraint for the second sequence. + * @param int $bhi The upper constraint for the second sequence. + * @return array Array containing the longest match that includes the starting position in $a, start in $b and the length/size. + */ + public function findLongestMatch($alo, $ahi, $blo, $bhi) + { + $a = $this->a; + $b = $this->b; + + $bestI = $alo; + $bestJ = $blo; + $bestSize = 0; + + $j2Len = array(); + $nothing = array(); + + for($i = $alo; $i < $ahi; ++$i) { + $newJ2Len = array(); + $jDict = $this->arrayGetDefault($this->b2j, $a[$i], $nothing); + foreach($jDict as $jKey => $j) { + if($j < $blo) { + continue; + } + else if($j >= $bhi) { + break; + } + + $k = $this->arrayGetDefault($j2Len, $j -1, 0) + 1; + $newJ2Len[$j] = $k; + if($k > $bestSize) { + $bestI = $i - $k + 1; + $bestJ = $j - $k + 1; + $bestSize = $k; + } + } + + $j2Len = $newJ2Len; + } + + while($bestI > $alo && $bestJ > $blo && !$this->isBJunk($b[$bestJ - 1]) && + !$this->linesAreDifferent($bestI - 1, $bestJ - 1)) { + --$bestI; + --$bestJ; + ++$bestSize; + } + + while($bestI + $bestSize < $ahi && ($bestJ + $bestSize) < $bhi && + !$this->isBJunk($b[$bestJ + $bestSize]) && !$this->linesAreDifferent($bestI + $bestSize, $bestJ + $bestSize)) { + ++$bestSize; + } + + while($bestI > $alo && $bestJ > $blo && $this->isBJunk($b[$bestJ - 1]) && + !$this->isLineDifferent($bestI - 1, $bestJ - 1)) { + --$bestI; + --$bestJ; + ++$bestSize; + } + + while($bestI + $bestSize < $ahi && $bestJ + $bestSize < $bhi && + $this->isBJunk($b[$bestJ + $bestSize]) && !$this->linesAreDifferent($bestI + $bestSize, $bestJ + $bestSize)) { + ++$bestSize; + } + + return array( + $bestI, + $bestJ, + $bestSize + ); + } + + /** + * Check if the two lines at the given indexes are different or not. + * + * @param int $aIndex Line number to check against in a. + * @param int $bIndex Line number to check against in b. + * @return boolean True if the lines are different and false if not. + */ + public function linesAreDifferent($aIndex, $bIndex) + { + $lineA = $this->a[$aIndex]; + $lineB = $this->b[$bIndex]; + + if($this->options['ignoreWhitespace']) { + $replace = array("\t", ' '); + $lineA = str_replace($replace, '', $lineA); + $lineB = str_replace($replace, '', $lineB); + } + + if($this->options['ignoreCase']) { + $lineA = strtolower($lineA); + $lineB = strtolower($lineB); + } + + if($lineA != $lineB) { + return true; + } + + return false; + } + + /** + * Return a nested set of arrays for all of the matching sub-sequences + * in the strings $a and $b. + * + * Each block contains the lower constraint of the block in $a, the lower + * constraint of the block in $b and finally the number of lines that the + * block continues for. + * + * @return array Nested array of the matching blocks, as described by the function. + */ + public function getMatchingBlocks() + { + if(!empty($this->matchingBlocks)) { + return $this->matchingBlocks; + } + + $aLength = count($this->a); + $bLength = count($this->b); + + $queue = array( + array( + 0, + $aLength, + 0, + $bLength + ) + ); + + $matchingBlocks = array(); + while(!empty($queue)) { + list($alo, $ahi, $blo, $bhi) = array_pop($queue); + $x = $this->findLongestMatch($alo, $ahi, $blo, $bhi); + list($i, $j, $k) = $x; + if($k) { + $matchingBlocks[] = $x; + if($alo < $i && $blo < $j) { + $queue[] = array( + $alo, + $i, + $blo, + $j + ); + } + + if($i + $k < $ahi && $j + $k < $bhi) { + $queue[] = array( + $i + $k, + $ahi, + $j + $k, + $bhi + ); + } + } + } + + usort($matchingBlocks, array($this, 'tupleSort')); + + $i1 = 0; + $j1 = 0; + $k1 = 0; + $nonAdjacent = array(); + foreach($matchingBlocks as $block) { + list($i2, $j2, $k2) = $block; + if($i1 + $k1 == $i2 && $j1 + $k1 == $j2) { + $k1 += $k2; + } + else { + if($k1) { + $nonAdjacent[] = array( + $i1, + $j1, + $k1 + ); + } + + $i1 = $i2; + $j1 = $j2; + $k1 = $k2; + } + } + + if($k1) { + $nonAdjacent[] = array( + $i1, + $j1, + $k1 + ); + } + + $nonAdjacent[] = array( + $aLength, + $bLength, + 0 + ); + + $this->matchingBlocks = $nonAdjacent; + return $this->matchingBlocks; + } + + /** + * Return a list of all of the opcodes for the differences between the + * two strings. + * + * The nested array returned contains an array describing the opcode + * which includes: + * 0 - The type of tag (as described below) for the opcode. + * 1 - The beginning line in the first sequence. + * 2 - The end line in the first sequence. + * 3 - The beginning line in the second sequence. + * 4 - The end line in the second sequence. + * + * The different types of tags include: + * replace - The string from $i1 to $i2 in $a should be replaced by + * the string in $b from $j1 to $j2. + * delete - The string in $a from $i1 to $j2 should be deleted. + * insert - The string in $b from $j1 to $j2 should be inserted at + * $i1 in $a. + * equal - The two strings with the specified ranges are equal. + * + * @return array Array of the opcodes describing the differences between the strings. + */ + public function getOpCodes() + { + if(!empty($this->opCodes)) { + return $this->opCodes; + } + + $i = 0; + $j = 0; + $this->opCodes = array(); + + $blocks = $this->getMatchingBlocks(); + foreach($blocks as $block) { + list($ai, $bj, $size) = $block; + $tag = ''; + if($i < $ai && $j < $bj) { + $tag = 'replace'; + } + else if($i < $ai) { + $tag = 'delete'; + } + else if($j < $bj) { + $tag = 'insert'; + } + + if($tag) { + $this->opCodes[] = array( + $tag, + $i, + $ai, + $j, + $bj + ); + } + + $i = $ai + $size; + $j = $bj + $size; + + if($size) { + $this->opCodes[] = array( + 'equal', + $ai, + $i, + $bj, + $j + ); + } + } + return $this->opCodes; + } + + /** + * Return a series of nested arrays containing different groups of generated + * opcodes for the differences between the strings with up to $context lines + * of surrounding content. + * + * Essentially what happens here is any big equal blocks of strings are stripped + * out, the smaller subsets of changes are then arranged in to their groups. + * This means that the sequence matcher and diffs do not need to include the full + * content of the different files but can still provide context as to where the + * changes are. + * + * @param int $context The number of lines of context to provide around the groups. + * @return array Nested array of all of the grouped opcodes. + */ + public function getGroupedOpcodes($context=3) + { + $opCodes = $this->getOpCodes(); + if(empty($opCodes)) { + $opCodes = array( + array( + 'equal', + 0, + 1, + 0, + 1 + ) + ); + } + + if($opCodes[0][0] == 'equal') { + $opCodes[0] = array( + $opCodes[0][0], + max($opCodes[0][1], $opCodes[0][2] - $context), + $opCodes[0][2], + max($opCodes[0][3], $opCodes[0][4] - $context), + $opCodes[0][4] + ); + } + + $lastItem = count($opCodes) - 1; + if($opCodes[$lastItem][0] == 'equal') { + list($tag, $i1, $i2, $j1, $j2) = $opCodes[$lastItem]; + $opCodes[$lastItem] = array( + $tag, + $i1, + min($i2, $i1 + $context), + $j1, + min($j2, $j1 + $context) + ); + } + + $maxRange = $context * 2; + $groups = array(); + $group = array(); + foreach($opCodes as $code) { + list($tag, $i1, $i2, $j1, $j2) = $code; + if($tag == 'equal' && $i2 - $i1 > $maxRange) { + $group[] = array( + $tag, + $i1, + min($i2, $i1 + $context), + $j1, + min($j2, $j1 + $context) + ); + $groups[] = $group; + $group = array(); + $i1 = max($i1, $i2 - $context); + $j1 = max($j1, $j2 - $context); + } + $group[] = array( + $tag, + $i1, + $i2, + $j1, + $j2 + ); + } + + if(!empty($group) && !(count($group) == 1 && $group[0][0] == 'equal')) { + $groups[] = $group; + } + + return $groups; + } + + /** + * Return a measure of the similarity between the two sequences. + * This will be a float value between 0 and 1. + * + * Out of all of the ratio calculation functions, this is the most + * expensive to call if getMatchingBlocks or getOpCodes is yet to be + * called. The other calculation methods (quickRatio and realquickRatio) + * can be used to perform quicker calculations but may be less accurate. + * + * The ratio is calculated as (2 * number of matches) / total number of + * elements in both sequences. + * + * @return float The calculated ratio. + */ + public function Ratio() + { + $matches = array_reduce($this->getMatchingBlocks(), array($this, 'ratioReduce'), 0); + return $this->calculateRatio($matches, count ($this->a) + count ($this->b)); + } + + /** + * Helper function to calculate the number of matches for Ratio(). + * + * @param int $sum The running total for the number of matches. + * @param array $triple Array containing the matching block triple to add to the running total. + * @return int The new running total for the number of matches. + */ + private function ratioReduce($sum, $triple) + { + return $sum + ($triple[count($triple) - 1]); + } + + /** + * Quickly return an upper bound ratio for the similarity of the strings. + * This is quicker to compute than Ratio(). + * + * @return float The calculated ratio. + */ + private function quickRatio() + { + if($this->fullBCount === null) { + $this->fullBCount = array(); + $bLength = count ($b); + for($i = 0; $i < $bLength; ++$i) { + $char = $this->b[$i]; + $this->fullBCount[$char] = $this->arrayGetDefault($this->fullBCount, $char, 0) + 1; + } + } + + $avail = array(); + $matches = 0; + $aLength = count ($this->a); + for($i = 0; $i < $aLength; ++$i) { + $char = $this->a[$i]; + if(isset($avail[$char])) { + $numb = $avail[$char]; + } + else { + $numb = $this->arrayGetDefault($this->fullBCount, $char, 0); + } + $avail[$char] = $numb - 1; + if($numb > 0) { + ++$matches; + } + } + + $this->calculateRatio($matches, count ($this->a) + count ($this->b)); + } + + /** + * Return an upper bound ratio really quickly for the similarity of the strings. + * This is quicker to compute than Ratio() and quickRatio(). + * + * @return float The calculated ratio. + */ + private function realquickRatio() + { + $aLength = count ($this->a); + $bLength = count ($this->b); + + return $this->calculateRatio(min($aLength, $bLength), $aLength + $bLength); + } + + /** + * Helper function for calculating the ratio to measure similarity for the strings. + * The ratio is defined as being 2 * (number of matches / total length) + * + * @param int $matches The number of matches in the two strings. + * @param int $length The length of the two strings. + * @return float The calculated ratio. + */ + private function calculateRatio($matches, $length=0) + { + if($length) { + return 2 * ($matches / $length); + } + else { + return 1; + } + } + + /** + * Helper function that provides the ability to return the value for a key + * in an array of it exists, or if it doesn't then return a default value. + * Essentially cleaner than doing a series of if(isset()) {} else {} calls. + * + * @param array $array The array to search. + * @param string $key The key to check that exists. + * @param mixed $default The value to return as the default value if the key doesn't exist. + * @return mixed The value from the array if the key exists or otherwise the default. + */ + private function arrayGetDefault($array, $key, $default) + { + if(isset($array[$key])) { + return $array[$key]; + } + else { + return $default; + } + } + + /** + * Sort an array by the nested arrays it contains. Helper function for getMatchingBlocks + * + * @param array $a First array to compare. + * @param array $b Second array to compare. + * @return int -1, 0 or 1, as expected by the usort function. + */ + private function tupleSort($a, $b) + { + $max = max(count($a), count($b)); + for($i = 0; $i < $max; ++$i) { + if($a[$i] < $b[$i]) { + return -1; + } + else if($a[$i] > $b[$i]) { + return 1; + } + } + + if(count($a) == $count($b)) { + return 0; + } + else if(count($a) < count($b)) { + return -1; + } + else { + return 1; + } + } +} diff --git a/wp-content/plugins/wordfence/lib/GeoIP.dat b/wp-content/plugins/wordfence/lib/GeoIP.dat new file mode 100644 index 0000000..0355839 Binary files /dev/null and b/wp-content/plugins/wordfence/lib/GeoIP.dat differ diff --git a/wp-content/plugins/wordfence/lib/IPTraf.php b/wp-content/plugins/wordfence/lib/IPTraf.php new file mode 100644 index 0000000..df8734a --- /dev/null +++ b/wp-content/plugins/wordfence/lib/IPTraf.php @@ -0,0 +1,32 @@ + + + + + + +

Wordfence: All recent hits for IP address

+ + $v){ ?> + +Secs since last hit:'; } ?> + + + + + + + + + + + + + +
Time: ago -- -- in Unixtime
' . $v['timeSinceLastHit'] . '
URL:
Type:Page not found'; } ?>
Referrer:
Full Browser ID:
User:
Location:<?php echo $v['loc']['countryName']; ?> + + +

+ +