From 2956df8f6bf787d9a653ca3734eb9caad825c5e8 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 24 Aug 2012 11:41:35 +0000 Subject: [PATCH] =?UTF-8?q?Tarea=20#1007=20->=20Hacer=20p=C3=A1gina=20de?= =?UTF-8?q?=20"contact=20us"=20con=20formulario?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@120 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6 --- .../contact-form-7/admin/admin-functions.php | 52 + .../plugins/contact-form-7/admin/admin.php | 487 ++++++++ .../contact-form-7/admin/css/styles-rtl.css | 21 + .../contact-form-7/admin/css/styles.css | 260 ++++ .../admin/edit-contact-form.php | 118 ++ .../contact-form-7/admin/images/dropdown.gif | Bin 0 -> 67 bytes .../contact-form-7/admin/images/menu-icon.png | Bin 0 -> 606 bytes .../admin/images/screen-icon.png | Bin 0 -> 1416 bytes .../class-contact-forms-list-table.php | 169 +++ .../admin/includes/meta-boxes.php | 109 ++ .../contact-form-7/admin/js/scripts.js | 75 ++ .../contact-form-7/admin/js/taggenerator.js | 262 ++++ .../contact-form-7/images/ajax-loader.gif | Bin 0 -> 847 bytes .../contact-form-7/includes/capabilities.php | 20 + .../contact-form-7/includes/classes.php | 812 ++++++++++++ .../contact-form-7/includes/controller.php | 288 +++++ .../includes/css/styles-rtl.css | 12 + .../contact-form-7/includes/css/styles.css | 65 + .../contact-form-7/includes/deprecated.php | 26 + .../contact-form-7/includes/formatting.php | 121 ++ .../contact-form-7/includes/functions.php | 293 +++++ .../includes/js/jquery.form.dev.js | 1089 +++++++++++++++++ .../contact-form-7/includes/js/jquery.form.js | 12 + .../contact-form-7/includes/js/scripts.js | 227 ++++ .../plugins/contact-form-7/includes/pipe.php | 67 + .../contact-form-7/includes/shortcodes.php | 195 +++ .../contact-form-7/languages/readme.txt | 9 + .../contact-form-7/languages/wpcf7-af.mo | Bin 0 -> 14283 bytes .../contact-form-7/languages/wpcf7-ar.mo | Bin 0 -> 17242 bytes .../contact-form-7/languages/wpcf7-az_AZ.mo | Bin 0 -> 14824 bytes .../contact-form-7/languages/wpcf7-be_BY.mo | Bin 0 -> 18379 bytes .../contact-form-7/languages/wpcf7-bg_BG.mo | Bin 0 -> 5969 bytes .../contact-form-7/languages/wpcf7-bn_BD.mo | Bin 0 -> 10451 bytes .../contact-form-7/languages/wpcf7-bs.mo | Bin 0 -> 7278 bytes .../contact-form-7/languages/wpcf7-ca.mo | Bin 0 -> 10044 bytes .../contact-form-7/languages/wpcf7-cs_CZ.mo | Bin 0 -> 14748 bytes .../contact-form-7/languages/wpcf7-da_DK.mo | Bin 0 -> 14402 bytes .../contact-form-7/languages/wpcf7-de_DE.mo | Bin 0 -> 16366 bytes .../contact-form-7/languages/wpcf7-el.mo | Bin 0 -> 11506 bytes .../contact-form-7/languages/wpcf7-eo_EO.mo | Bin 0 -> 13743 bytes .../contact-form-7/languages/wpcf7-es_ES.mo | Bin 0 -> 15009 bytes .../contact-form-7/languages/wpcf7-et.mo | Bin 0 -> 14053 bytes .../contact-form-7/languages/wpcf7-eu.mo | Bin 0 -> 13090 bytes .../contact-form-7/languages/wpcf7-fa_IR.mo | Bin 0 -> 16545 bytes .../contact-form-7/languages/wpcf7-fi.mo | Bin 0 -> 14328 bytes .../contact-form-7/languages/wpcf7-fr_FR.mo | Bin 0 -> 15486 bytes .../contact-form-7/languages/wpcf7-gl_ES.mo | Bin 0 -> 14679 bytes .../contact-form-7/languages/wpcf7-he_IL.mo | Bin 0 -> 15688 bytes .../contact-form-7/languages/wpcf7-hi_IN.mo | Bin 0 -> 21274 bytes .../contact-form-7/languages/wpcf7-hr.mo | Bin 0 -> 7313 bytes .../contact-form-7/languages/wpcf7-hu_HU.mo | Bin 0 -> 14832 bytes .../contact-form-7/languages/wpcf7-hy_AM.mo | Bin 0 -> 18925 bytes .../contact-form-7/languages/wpcf7-id_ID.mo | Bin 0 -> 11604 bytes .../contact-form-7/languages/wpcf7-it_IT.mo | Bin 0 -> 16139 bytes .../contact-form-7/languages/wpcf7-ja.mo | Bin 0 -> 18267 bytes .../contact-form-7/languages/wpcf7-ka_GE.mo | Bin 0 -> 21688 bytes .../contact-form-7/languages/wpcf7-ko_KR.mo | Bin 0 -> 8450 bytes .../contact-form-7/languages/wpcf7-lt_LT.mo | Bin 0 -> 14814 bytes .../contact-form-7/languages/wpcf7-lv.mo | Bin 0 -> 14442 bytes .../contact-form-7/languages/wpcf7-mk_MK.mo | Bin 0 -> 18685 bytes .../contact-form-7/languages/wpcf7-ml_IN.mo | Bin 0 -> 21032 bytes .../contact-form-7/languages/wpcf7-ms_MY.mo | Bin 0 -> 13610 bytes .../contact-form-7/languages/wpcf7-mt_MT.mo | Bin 0 -> 13870 bytes .../contact-form-7/languages/wpcf7-nb_NO.mo | Bin 0 -> 14412 bytes .../contact-form-7/languages/wpcf7-nl_NL.mo | Bin 0 -> 14739 bytes .../contact-form-7/languages/wpcf7-pl_PL.mo | Bin 0 -> 15583 bytes .../contact-form-7/languages/wpcf7-pt_BR.mo | Bin 0 -> 14789 bytes .../contact-form-7/languages/wpcf7-pt_PT.mo | Bin 0 -> 14108 bytes .../contact-form-7/languages/wpcf7-ro_RO.mo | Bin 0 -> 14904 bytes .../contact-form-7/languages/wpcf7-ru_RU.mo | Bin 0 -> 17027 bytes .../contact-form-7/languages/wpcf7-si_LK.mo | Bin 0 -> 22639 bytes .../contact-form-7/languages/wpcf7-sk_SK.mo | Bin 0 -> 11071 bytes .../contact-form-7/languages/wpcf7-sl_SI.mo | Bin 0 -> 13836 bytes .../contact-form-7/languages/wpcf7-sq.mo | Bin 0 -> 5017 bytes .../contact-form-7/languages/wpcf7-sr_RS.mo | Bin 0 -> 18156 bytes .../contact-form-7/languages/wpcf7-sv_SE.mo | Bin 0 -> 14324 bytes .../contact-form-7/languages/wpcf7-ta.mo | Bin 0 -> 26093 bytes .../contact-form-7/languages/wpcf7-th.mo | Bin 0 -> 20248 bytes .../contact-form-7/languages/wpcf7-tl.mo | Bin 0 -> 15057 bytes .../contact-form-7/languages/wpcf7-tr_TR.mo | Bin 0 -> 9570 bytes .../contact-form-7/languages/wpcf7-uk.mo | Bin 0 -> 14648 bytes .../contact-form-7/languages/wpcf7-vi.mo | Bin 0 -> 14084 bytes .../contact-form-7/languages/wpcf7-zh_CN.mo | Bin 0 -> 14227 bytes .../contact-form-7/languages/wpcf7-zh_TW.mo | Bin 0 -> 15342 bytes .../contact-form-7/languages/wpcf7.pot | 956 +++++++++++++++ wp-content/plugins/contact-form-7/license.txt | 339 +++++ .../contact-form-7/modules/acceptance.php | 192 +++ .../contact-form-7/modules/akismet.php | 124 ++ .../contact-form-7/modules/captcha.php | 520 ++++++++ .../contact-form-7/modules/checkbox.php | 227 ++++ .../plugins/contact-form-7/modules/file.php | 346 ++++++ .../contact-form-7/modules/flamingo.php | 80 ++ .../contact-form-7/modules/jetpack.php | 19 + .../plugins/contact-form-7/modules/quiz.php | 216 ++++ .../contact-form-7/modules/response.php | 17 + .../plugins/contact-form-7/modules/select.php | 185 +++ .../modules/special-mail-tags.php | 73 ++ .../plugins/contact-form-7/modules/submit.php | 92 ++ .../plugins/contact-form-7/modules/text.php | 227 ++++ .../contact-form-7/modules/textarea.php | 177 +++ wp-content/plugins/contact-form-7/readme.txt | 142 +++ .../plugins/contact-form-7/screenshot-1.png | Bin 0 -> 32124 bytes .../plugins/contact-form-7/settings.php | 172 +++ .../plugins/contact-form-7/uninstall.php | 26 + .../contact-form-7/wp-contact-form-7.php | 76 ++ 105 files changed, 8995 insertions(+) create mode 100644 wp-content/plugins/contact-form-7/admin/admin-functions.php create mode 100644 wp-content/plugins/contact-form-7/admin/admin.php create mode 100644 wp-content/plugins/contact-form-7/admin/css/styles-rtl.css create mode 100644 wp-content/plugins/contact-form-7/admin/css/styles.css create mode 100644 wp-content/plugins/contact-form-7/admin/edit-contact-form.php create mode 100644 wp-content/plugins/contact-form-7/admin/images/dropdown.gif create mode 100644 wp-content/plugins/contact-form-7/admin/images/menu-icon.png create mode 100644 wp-content/plugins/contact-form-7/admin/images/screen-icon.png create mode 100644 wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php create mode 100644 wp-content/plugins/contact-form-7/admin/includes/meta-boxes.php create mode 100644 wp-content/plugins/contact-form-7/admin/js/scripts.js create mode 100644 wp-content/plugins/contact-form-7/admin/js/taggenerator.js create mode 100644 wp-content/plugins/contact-form-7/images/ajax-loader.gif create mode 100644 wp-content/plugins/contact-form-7/includes/capabilities.php create mode 100644 wp-content/plugins/contact-form-7/includes/classes.php create mode 100644 wp-content/plugins/contact-form-7/includes/controller.php create mode 100644 wp-content/plugins/contact-form-7/includes/css/styles-rtl.css create mode 100644 wp-content/plugins/contact-form-7/includes/css/styles.css create mode 100644 wp-content/plugins/contact-form-7/includes/deprecated.php create mode 100644 wp-content/plugins/contact-form-7/includes/formatting.php create mode 100644 wp-content/plugins/contact-form-7/includes/functions.php create mode 100644 wp-content/plugins/contact-form-7/includes/js/jquery.form.dev.js create mode 100644 wp-content/plugins/contact-form-7/includes/js/jquery.form.js create mode 100644 wp-content/plugins/contact-form-7/includes/js/scripts.js create mode 100644 wp-content/plugins/contact-form-7/includes/pipe.php create mode 100644 wp-content/plugins/contact-form-7/includes/shortcodes.php create mode 100644 wp-content/plugins/contact-form-7/languages/readme.txt create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-af.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ar.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-az_AZ.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-be_BY.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-bg_BG.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-bn_BD.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-bs.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ca.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-cs_CZ.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-da_DK.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-de_DE.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-el.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-eo_EO.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-es_ES.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-et.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-eu.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-fa_IR.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-fi.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-fr_FR.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-gl_ES.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-he_IL.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-hi_IN.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-hr.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-hu_HU.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-hy_AM.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-id_ID.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-it_IT.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ja.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ka_GE.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ko_KR.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-lt_LT.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-lv.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-mk_MK.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ml_IN.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ms_MY.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-mt_MT.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-nb_NO.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-nl_NL.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-pl_PL.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-pt_BR.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-pt_PT.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ro_RO.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ru_RU.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-si_LK.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-sk_SK.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-sl_SI.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-sq.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-sr_RS.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-sv_SE.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-ta.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-th.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-tl.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-tr_TR.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-uk.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-vi.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-zh_CN.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7-zh_TW.mo create mode 100644 wp-content/plugins/contact-form-7/languages/wpcf7.pot create mode 100644 wp-content/plugins/contact-form-7/license.txt create mode 100644 wp-content/plugins/contact-form-7/modules/acceptance.php create mode 100644 wp-content/plugins/contact-form-7/modules/akismet.php create mode 100644 wp-content/plugins/contact-form-7/modules/captcha.php create mode 100644 wp-content/plugins/contact-form-7/modules/checkbox.php create mode 100644 wp-content/plugins/contact-form-7/modules/file.php create mode 100644 wp-content/plugins/contact-form-7/modules/flamingo.php create mode 100644 wp-content/plugins/contact-form-7/modules/jetpack.php create mode 100644 wp-content/plugins/contact-form-7/modules/quiz.php create mode 100644 wp-content/plugins/contact-form-7/modules/response.php create mode 100644 wp-content/plugins/contact-form-7/modules/select.php create mode 100644 wp-content/plugins/contact-form-7/modules/special-mail-tags.php create mode 100644 wp-content/plugins/contact-form-7/modules/submit.php create mode 100644 wp-content/plugins/contact-form-7/modules/text.php create mode 100644 wp-content/plugins/contact-form-7/modules/textarea.php create mode 100644 wp-content/plugins/contact-form-7/readme.txt create mode 100644 wp-content/plugins/contact-form-7/screenshot-1.png create mode 100644 wp-content/plugins/contact-form-7/settings.php create mode 100644 wp-content/plugins/contact-form-7/uninstall.php create mode 100644 wp-content/plugins/contact-form-7/wp-contact-form-7.php diff --git a/wp-content/plugins/contact-form-7/admin/admin-functions.php b/wp-content/plugins/contact-form-7/admin/admin-functions.php new file mode 100644 index 0000000..871c518 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/admin-functions.php @@ -0,0 +1,52 @@ + $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; +} + +?> \ 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..5933569 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/admin.php @@ -0,0 +1,487 @@ +initial = true; + } + + $contact_form->title = trim( $_POST['wpcf7-title'] ); + + $form = trim( $_POST['wpcf7-form'] ); + + $mail = array( + 'subject' => trim( $_POST['wpcf7-mail-subject'] ), + 'sender' => trim( $_POST['wpcf7-mail-sender'] ), + 'body' => trim( $_POST['wpcf7-mail-body'] ), + 'recipient' => trim( $_POST['wpcf7-mail-recipient'] ), + 'additional_headers' => trim( $_POST['wpcf7-mail-additional-headers'] ), + 'attachments' => trim( $_POST['wpcf7-mail-attachments'] ), + 'use_html' => + isset( $_POST['wpcf7-mail-use-html'] ) && 1 == $_POST['wpcf7-mail-use-html'] + ); + + $mail_2 = array( + 'active' => + isset( $_POST['wpcf7-mail-2-active'] ) && 1 == $_POST['wpcf7-mail-2-active'], + 'subject' => trim( $_POST['wpcf7-mail-2-subject'] ), + 'sender' => trim( $_POST['wpcf7-mail-2-sender'] ), + 'body' => trim( $_POST['wpcf7-mail-2-body'] ), + 'recipient' => trim( $_POST['wpcf7-mail-2-recipient'] ), + 'additional_headers' => trim( $_POST['wpcf7-mail-2-additional-headers'] ), + 'attachments' => trim( $_POST['wpcf7-mail-2-attachments'] ), + 'use_html' => + isset( $_POST['wpcf7-mail-2-use-html'] ) && 1 == $_POST['wpcf7-mail-2-use-html'] + ); + + $messages = isset( $contact_form->messages ) ? $contact_form->messages : array(); + + foreach ( wpcf7_messages() as $key => $arr ) { + $field_name = 'wpcf7-message-' . strtr( $key, '_', '-' ); + if ( isset( $_POST[$field_name] ) ) + $messages[$key] = trim( $_POST[$field_name] ); + } + + $additional_settings = trim( $_POST['wpcf7-additional-settings'] ); + + $props = apply_filters( 'wpcf7_contact_form_admin_posted_properties', + compact( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' ) ); + + foreach ( (array) $props as $key => $prop ) + $contact_form->{$key} = $prop; + + $query = array(); + $query['message'] = ( $contact_form->initial ) ? 'created' : 'saved'; + + $contact_form->save(); + + $query['post'] = $contact_form->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.', 'wpcf7' ) ); + + $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'; + } else { + $query['post'] = $contact_form->id; + } + + $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 = new WPCF7_ContactForm( $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.', 'wpcf7' ) ); + + if ( ! $post->delete() ) + wp_die( __( 'Error in deleting.', 'wpcf7' ) ); + + $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 ( 'new' == $_GET['post'] && current_user_can( 'wpcf7_edit_contact_forms' ) ) + $post = wpcf7_get_contact_form_default_pack( + array( 'locale' => ( isset( $_GET['locale'] ) ? $_GET['locale'] : '' ) ) ); + elseif ( ! empty( $_GET['post'] ) ) + $post = wpcf7_contact_form( $_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', 'wpcf7' ), + 'default' => 20, + 'option' => 'cfseven_contact_forms_per_page' ) ); + } + + $wpcf7_contact_form = $post; +} + +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( 'thickbox' ), 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', 'thickbox', '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', 'wpcf7' ), + 'pluginUrl' => wpcf7_plugin_url(), + 'tagGenerators' => wpcf7_tag_generators() ) ); +} + +add_action( 'admin_print_footer_scripts', 'wpcf7_print_taggenerators_json', 20 ); + +function wpcf7_print_taggenerators_json() { // for backward compatibility + global $plugin_page, $wpcf7_tag_generators; + + if ( ! version_compare( get_bloginfo( 'version' ), '3.3-dev', '<' ) ) + return; + + if ( ! isset( $plugin_page ) || 'wpcf7' != $plugin_page ) + return; + + $taggenerators = array(); + + foreach ( (array) $wpcf7_tag_generators as $name => $tg ) { + $taggenerators[$name] = array_merge( + (array) $tg['options'], + array( 'title' => $tg['title'], 'content' => $tg['content'] ) ); + } + +?> + +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', 'wpcf7' ) ) . ''; + + if ( ! empty( $_REQUEST['s'] ) ) { + echo sprintf( '' + . __( 'Search results for “%s”', 'wpcf7' ) + . '', esc_html( $_REQUEST['s'] ) ); + } +?>

+ + + +
+ + search_box( __( 'Search Contact Forms', 'wpcf7' ), 'wpcf7-contact' ); ?> + display(); ?> +
+ +
+ + + 'wpcf7-mail-2', + 'name' => 'mail_2', + 'use' => __( 'Use mail (2)', 'wpcf7' ) ) ); + + add_meta_box( 'messagesdiv', __( 'Messages', 'wpcf7' ), + 'wpcf7_messages_meta_box', null, 'messages', 'core' ); + + add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'wpcf7' ), + '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_before_subsubsub' ); + +function wpcf7_admin_before_subsubsub() { + // wpcf7_admin_before_subsubsub is deprecated. Use wpcf7_admin_notices instead. + + $current_screen = get_current_screen(); + + if ( 'toplevel_page_wpcf7' != $current_screen->id ) + return; + + if ( empty( $_GET['post'] ) || ! $contact_form = wpcf7_contact_form( $_GET['post'] ) ) + return; + + do_action_ref_array( 'wpcf7_admin_before_subsubsub', array( &$contact_form ) ); +} + +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.', 'wpcf7' ) ); + elseif ( 'saved' == $_REQUEST['message'] ) + $updated_message = esc_html( __( 'Contact form saved.', 'wpcf7' ) ); + elseif ( 'deleted' == $_REQUEST['message'] ) + $updated_message = esc_html( __( 'Contact form deleted.', 'wpcf7' ) ); + + if ( empty( $updated_message ) ) + return; + +?> +

+' + . esc_html( __( 'Settings', 'wpcf7' ) ) . ''; + + 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( 'wpcf7_admin_notices', 'wpcf7_donation_link' ); + +function wpcf7_donation_link() { + if ( ! WPCF7_SHOW_DONATION_LINK ) + return; + + if ( ! empty( $_REQUEST['post'] ) && 'new' == $_REQUEST['post'] ) + return; + + if ( ! empty( $_REQUEST['message'] ) ) + return; + + $show_link = true; + + $num = mt_rand( 0, 99 ); + + if ( $num >= 20 ) + $show_link = false; + + $show_link = apply_filters( 'wpcf7_show_donation_link', $show_link ); + + if ( ! $show_link ) + return; + + $texts = array( + __( "Contact Form 7 needs your support. Please donate today.", 'wpcf7' ), + __( "Your contribution is needed for making this plugin better.", 'wpcf7' ) ); + + $text = $texts[array_rand( $texts )]; + +?> +
+

+
+ +
+

Contact Form 7 %1$s requires WordPress %2$s or higher. Please update WordPress first.', 'wpcf7' ), 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..0f8971a --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/css/styles.css @@ -0,0 +1,260 @@ +#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: -2em 1em 1em 0; +} + +div.wrap div.cf7com-links a { + text-decoration: none; + font-weight: bold; +} + +div.wrap div.donation { + border-width: 1px; + border-style: solid; + padding: 0 0.6em; + margin: 5px 0 15px; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: #ffffe0; + border-color: #e6db55; +} + +div.wrap div.donation p { + margin: .7em 0; + line-height: 1; + padding: 2px; + font-size: 107%; +} + +div.wrap div.donation p a { + color: #3f3f3f; + text-decoration: none; +} + +div.wrap div.donation p a.button { + margin-left: 1em; + font-weight: bold; +} + +#titlediv { + margin-bottom: 20px; + position: relative; + border: 1px solid #c7c7c7; + padding: 6px; +} + +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; +} + +div.actions-link input.copy { + color: #006505; +} + +div.actions-link input.delete { + color: #bc0b0b; +} + +input#wpcf7-title { + color: #555; + border: none; + font: bold 20px serif; + cursor: pointer; + background-color: transparent; +} + +input#wpcf7-title.focus { + color: #333; + border: 1px solid #777; + font: normal 13px Verdana, Arial, Helvetica, sans-serif; + cursor: text; + background-color: transparent; +} + +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 { + color: #fff; + background: #7e4e0b; + border: none; + width: 100%; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +.postbox .half, .postbox .half-left, .postbox .half-right { + float: left; + width: 50%; +} + +.postbox .half-right > * { + margin-left: 10px; +} + +.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; +} + +div.tag-generator { + position: relative; + background: transparent; + padding: 0 0 5px 1px; +} + +div.tg-pane { + border: 1px dashed #999; + background: #f1f1f1; + margin: 1ex 0 0 0; + padding: 10px; + -webkit-border-radius: 6px; + border-radius: 6px; + 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%; + border: none; + color: #fff; + background-color: #7e4e0b; + -webkit-border-radius: 6px; + border-radius: 6px; +} + +div.tg-pane input.mail-tag { + width: 50%; + background-color: #404f03; +} + +div.tg-mail-tag { + margin-top: 2.4em; + text-align: right; +} + +div.tg-pane span.arrow { + font-family: monospace; + font-size: 1.2em; + color: #333; +} + +div.tg-pane input.tg-name { + border-color: #555; +} + +div.tg-pane input.oneline { + width: 98%; + font-size: smaller; +} + +div.tg-pane textarea { + width: 98%; + 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: bold 132% sans-serif; + margin: 0 0 10px; + color: #777; +} + +input.shortcode-in-list-table { + width: 100%; + border: none; +} \ 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..9161ae6 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/edit-contact-form.php @@ -0,0 +1,118 @@ +
+ + + +

initial ) { + echo ' ' . esc_html( __( 'Add New', 'wpcf7' ) ) . ''; + } +?>

+ + + +
+ + + +
> + + + + + +
+ +
+ /> + + 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 0000000000000000000000000000000000000000..a342dfdf3240db9ef346dc4b7bd1dc6152e1684e GIT binary patch literal 67 zcmZ?wbhEHb6krfwn8*ME|NsBb&(8;via%Kx85o!ubU>mYc?KqtIsGe7zvW*nyrnBM PaccN4{5lRan@K@`V-^Rc<|LYlZ$z~jJFLef|TB_LXe5Np$^jaZpm2&4+8Nh$?F z?P71MrJYuRgM+}`C1s8)>W;U$VY7EmeZW8r+ z9gh$72-CU&-@ZShb86=ou4=X({{SFK5+(v!Oy|_HzZ-v=N~Q}oya7jx3TO7B~mbUc=!_81y;%)nUcu1X?ek zl~Oatu=8cM_0DJ5eOk)RvJ9=Yo)tKJF(L2{whDqGM!8BU^l&&V9%I&)s~r742hPjg zKYT2CV5dzS6Sx7@ckp1Yg#drBF26}B(OT(Vv)K&S@3yZkosL$k1)iQ5t+TNv41xe_ sEmBIn_oV{o97-vY#GsU7A;{PH3SUm}7YBQ6FaQ7m07*qoM6N<$f|P9m@&Et; literal 0 HcmV?d00001 diff --git a/wp-content/plugins/contact-form-7/admin/images/screen-icon.png b/wp-content/plugins/contact-form-7/admin/images/screen-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..70ee014a45abc30626ded8efdf62ab147cfd3d6e GIT binary patch literal 1416 zcmV;31$X+1P)7`zNZ831*jX3)FGv7gDH;?K zHnPMJ+~6AMLTm#51C|IuFfB&fDYVm4LZ@>-&N(jbojWsiT7lB|CO31=dq1A%eb0NI z_l&UC@_(AB4i*;|?4?UTQY_A3j71265U^2x#uzf$Eal}gO1bp(yv5NYN9pY9O0k)p zE!wkZ&f5F;?pdw1-Aw!Q{ylr&5s`uh3_!>C3eN+v5SWdc9gGy;y}V2r^SgHmpdfSXK;(?wk65=9XczfB;7 zSo>=)Xal-sjL7nG&GcgAN%asOB0Y%a`50m00Q6V+0&;0D7S72tT71*hfF2| z#Ow8{&2<&Id>(-1avW${Z9)igxg1*SR}New;9!!q-%^N)xB!mpVy#6fwc#~yW#z4^vpEEDroD_;Bj9;)aYd$adiIc}Ubm+r$E`*??y)y+4!w@M1Dyg@I47g6r$`3*^*=!7$WTGDY^Dj=W zOJZl`B_kQ92GJ{l-((42W6=f}nyihSt{Ch{6yZMXywnl~Sl=nUzuv z_Yx^qSRn|509PrZL;+XZS6`l56Xe9n<4jE4;%Z&w)e}(ljOjQsJ%}_A5JDiVrBKLY zw8n93op5n+f!5Zx|EzY+iRq>CY#MP>@*i3lgR-P20o7KViI8*Ik2C7`$uYDYa*{rrMTW_ zErIVR0eU#DYRG1)140N2En9ha=T7e2x%01-3n9|9HTaUNnSZtK?VcW-W*m}0qHj?aif zrj1HRI*ACB^3WzeUYokk*~~JYN4dO0KA*$$JoeXwy+9IuS9S5EK8R_WkqL9zi(a}yeli?o` WWXK+Y2Xlo00000 '', + 'title' => __( 'Title', 'wpcf7' ), + 'shortcode' => __( 'Shortcode', 'wpcf7' ), + 'author' => __( 'Author', 'wpcf7' ), + 'date' => __( 'Date', 'wpcf7' ) ); + + 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::$found_items; + $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', 'wpcf7' ) ); + + 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', 'wpcf7' ) . '' ); + + 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', 'wpcf7' ) . '' ) ); + } + + $a = sprintf( '%3$s', + $edit_link, + esc_attr( sprintf( __( 'Edit “%s”', 'wpcf7' ), $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', 'wpcf7' ), $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', 'wpcf7' ), human_time_diff( $time ) ); + else + $h_time = mysql2date( __( 'Y/m/d', 'wpcf7' ), $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..a607f75 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/includes/meta-boxes.php @@ -0,0 +1,109 @@ + +
+ +
+ +
+ 'wpcf7-mail', 'name' => 'mail', 'use' => null ); + + if ( ! isset( $box['args'] ) || ! is_array( $box['args'] ) ) + $args = array(); + else + $args = $box['args']; + + extract( wp_parse_args( $args, $defaults ), EXTR_SKIP ); + + $id = esc_attr( $id ); + $mail = $post->{$name}; + + if ( ! empty( $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..f2b0e47 --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/js/scripts.js @@ -0,0 +1,75 @@ +(function($) { + + $(function() { + try { + $('div.cf7com-links').insertAfter($('div.wrap h2:first')); + + $.extend($.tgPanes, _wpcf7.tagGenerators); + $('#taggenerator').tagGenerator(_wpcf7.generateTag, + { dropdownIconUrl: _wpcf7.pluginUrl + '/admin/images/dropdown.gif' }); + + $('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..32fb3fb --- /dev/null +++ b/wp-content/plugins/contact-form-7/admin/js/taggenerator.js @@ -0,0 +1,262 @@ +(function($) { + + $.fn.tagGenerator = function(title, options) { + var menu = $('
'); + + var selector = $('' + title + ''); + + selector.css({ + border: '1px solid #ddd', + padding: '2px 4px', + background: '#fff url( ../wp-admin/images/fade-butt.png ) 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( ../wp-admin/images/fade-butt.png ) 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{1,2}-\d{1,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(); + if (size || maxlength) + options.push(size + '/' + maxlength); + + var cols = scope.find(':input[name="cols"]').val(); + var rows = scope.find(':input[name="rows"]').val(); + if (cols || rows) + options.push(cols + 'x' + rows); + + scope.find('input:text.option').each(function(i) { + if (-1 < $.inArray($(this).attr('name'), ['size', 'maxlength', 'cols', 'rows'])) + 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 0000000000000000000000000000000000000000..f2cfafd67f4e200b13a75d7bd093bdee54c2f116 GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<;O|NsB;^73E5eodJ&W$)g-RaI5p-Q6!`KikeHQNk&~a8qL-PMmd~L0lZBHDs7eQ93&@cStN{uNeJPpqmKuoUC~CDNtXexm zYwdvp2d^Dv;^>*ukeVSP#B=a~ zf`cHJ&w+*y$${?8Oio*#ZVND-p0{bqWVZD*Xt=Aat;&6vAl3|g72d7x8jzOQ(6|TN)0k3Co zc|z??%b8hfRI+(vH2HbDv054g3DyRMDNKeUM;%r)JIk@H5kHpQ-86?$(dkKoJwxMm zrhOBXU7IYboB|^nl6U7WD&rPXTBz{y(Bg!~gf`w#w`Gz=cO?0i7QEK{oc6x~t2H3M z0b_541COhrz@d{8xv>(*cS?BlTxh$Y!7k9nV#1{GTti1?UUB0cu(i`VAUAy((BOjfYz50rVKh zG6xfeLz|8{DtS)i*f48h0*75*E32o0N{2+RoVWQVUJo7igPpo1&00;(u2LcbOAhN^ rOjyy8aDeHjfMF+x#D?h({d~^m865hCENQGUn%zBWiVW7E 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 ); + + $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/classes.php b/wp-content/plugins/contact-form-7/includes/classes.php new file mode 100644 index 0000000..4da400f --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/classes.php @@ -0,0 +1,812 @@ + array( + 'name' => __( 'Contact Forms', 'wpcf7' ), + 'singular_name' => __( 'Contact Form', 'wpcf7' ) ), + '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 function __construct( $post = null ) { + $this->initial = true; + + $post = get_post( $post ); + + if ( $post && self::post_type == get_post_type( $post ) ) { + $this->initial = false; + $this->id = $post->ID; + $this->title = $post->post_title; + + $this->form = get_post_meta( $post->ID, 'form', true ); + $this->mail = get_post_meta( $post->ID, 'mail', true ); + $this->mail_2 = get_post_meta( $post->ID, 'mail_2', true ); + $this->messages = get_post_meta( $post->ID, 'messages', true ); + $this->additional_settings = get_post_meta( $post->ID, 'additional_settings', true ); + + $this->upgrade(); + } + + do_action_ref_array( 'wpcf7_contact_form', array( &$this ) ); + } + + // Return true if this form is the same one as currently POSTed. + function is_posted() { + if ( ! isset( $_POST['_wpcf7_unit_tag'] ) || empty( $_POST['_wpcf7_unit_tag'] ) ) + return false; + + if ( $this->unit_tag == $_POST['_wpcf7_unit_tag'] ) + return true; + + return false; + } + + function clear_post() { + $fes = $this->form_scan_shortcode(); + + foreach ( $fes as $fe ) { + if ( ! isset( $fe['name'] ) || empty( $fe['name'] ) ) + continue; + + $name = $fe['name']; + + if ( isset( $_POST[$name] ) ) + unset( $_POST[$name] ); + } + } + + /* Generating Form HTML */ + + function form_html() { + $form = '
'; + + $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 ); + + $class = 'wpcf7-form'; + + if ( $this->is_posted() ) { + if ( ! empty( $_POST['_wpcf7_validation_errors'] ) ) { + $class .= ' invalid'; + } elseif ( ! empty( $_POST['_wpcf7_mail_sent'] ) ) { + if ( ! empty( $_POST['_wpcf7_mail_sent']['spam'] ) ) + $class .= ' spam'; + elseif ( ! empty( $_POST['_wpcf7_mail_sent']['ok'] ) ) + $class .= ' sent'; + else + $class .= ' failed'; + } + } + + $class = apply_filters( 'wpcf7_form_class_attr', $class ); + + $enctype = apply_filters( 'wpcf7_form_enctype', '' ); + + $form .= '
' . "\n"; + + $form .= $this->form_hidden_fields(); + + $form .= $this->form_elements(); + + if ( ! $this->responses_count ) + $form .= $this->form_response_output(); + + $form .= '
'; + + $form .= '
'; + + return $form; + } + + function form_hidden_fields() { + $hidden_fields = array( + '_wpcf7' => $this->id, + '_wpcf7_version' => WPCF7_VERSION, + '_wpcf7_unit_tag' => $this->unit_tag ); + + if ( WPCF7_VERIFY_NONCE ) + $hidden_fields['_wpnonce'] = wpcf7_create_nonce( $this->unit_tag ); + + $content = ''; + + foreach ( $hidden_fields as $name => $value ) { + $content .= '' . "\n"; + } + + return '
' . "\n" . $content . '
' . "\n"; + } + + function form_response_output() { + $class = 'wpcf7-response-output'; + $content = ''; + + if ( $this->is_posted() ) { // Post response output for non-AJAX + if ( isset( $_POST['_wpcf7_mail_sent'] ) && $_POST['_wpcf7_mail_sent']['id'] == $this->id ) { + if ( $_POST['_wpcf7_mail_sent']['ok'] ) { + $class .= ' wpcf7-mail-sent-ok'; + $content = $_POST['_wpcf7_mail_sent']['message']; + } else { + $class .= ' wpcf7-mail-sent-ng'; + if ( $_POST['_wpcf7_mail_sent']['spam'] ) + $class .= ' wpcf7-spam-blocked'; + $content = $_POST['_wpcf7_mail_sent']['message']; + } + } elseif ( isset( $_POST['_wpcf7_validation_errors'] ) && $_POST['_wpcf7_validation_errors']['id'] == $this->id ) { + $class .= ' wpcf7-validation-errors'; + $content = $this->message( 'validation_error' ); + } + } else { + $class .= ' wpcf7-display-none'; + } + + $class = ' class="' . $class . '"'; + + return '' . $content . ''; + } + + function validation_error( $name ) { + if ( ! $this->is_posted() ) + return ''; + + if ( ! isset( $_POST['_wpcf7_validation_errors']['messages'][$name] ) ) + return ''; + + $ve = trim( $_POST['_wpcf7_validation_errors']['messages'][$name] ); + + if ( ! empty( $ve ) ) { + $ve = '' . esc_html( $ve ) . ''; + return apply_filters( 'wpcf7_validation_error', $ve, $name, $this ); + } + + return ''; + } + + /* Form Elements */ + + function form_do_shortcode() { + global $wpcf7_shortcode_manager; + + $form = $this->form; + + if ( WPCF7_AUTOP ) { + $form = $wpcf7_shortcode_manager->normalize_shortcode( $form ); + $form = wpcf7_autop( $form ); + } + + $form = $wpcf7_shortcode_manager->do_shortcode( $form ); + $this->scanned_form_tags = $wpcf7_shortcode_manager->scanned_tags; + + return $form; + } + + function form_scan_shortcode( $cond = null ) { + global $wpcf7_shortcode_manager; + + if ( ! empty( $this->scanned_form_tags ) ) { + $scanned = $this->scanned_form_tags; + } else { + $scanned = $wpcf7_shortcode_manager->scan_shortcode( $this->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 ); + } + + function form_elements() { + return apply_filters( 'wpcf7_form_elements', $this->form_do_shortcode() ); + } + + function setup_posted_data() { + $posted_data = (array) $_POST; + + $fes = $this->form_scan_shortcode(); + + foreach ( $fes as $fe ) { + if ( empty( $fe['name'] ) ) + continue; + + $name = $fe['name']; + $value = ''; + + if ( isset( $posted_data[$name] ) ) + $value = $posted_data[$name]; + + $pipes = $fe['pipes']; + + if ( WPCF7_USE_PIPE && is_a( $pipes, 'WPCF7_Pipes' ) && ! $pipes->zero() ) { + if ( is_array( $value) ) { + $new_value = array(); + + foreach ( $value as $v ) + $new_value[] = $pipes->do_pipe( stripslashes( $v ) ); + + $value = $new_value; + } else { + $value = $pipes->do_pipe( stripslashes( $value ) ); + } + } + + $posted_data[$name] = $value; + } + + $this->posted_data = apply_filters( 'wpcf7_posted_data', $posted_data ); + + return $this->posted_data; + } + + function submit( $ajax = false ) { + $result = array( + 'valid' => true, + 'invalid_reasons' => array(), + 'spam' => false, + 'message' => '', + 'mail_sent' => false, + 'scripts_on_sent_ok' => null ); + + $this->setup_posted_data(); + + $validation = $this->validate(); + + if ( ! $validation['valid'] ) { // Validation error occured + $result['valid'] = false; + $result['invalid_reasons'] = $validation['reason']; + $result['message'] = $this->message( 'validation_error' ); + + } elseif ( ! $this->accepted() ) { // Not accepted terms + $result['message'] = $this->message( 'accept_terms' ); + + } elseif ( $this->spam() ) { // Spam! + $result['message'] = $this->message( 'spam' ); + $result['spam'] = true; + + } elseif ( $this->mail() ) { + $result['mail_sent'] = true; + $result['message'] = $this->message( 'mail_sent_ok' ); + + do_action_ref_array( 'wpcf7_mail_sent', array( &$this ) ); + + 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 ); + } else { + $this->clear_post(); + } + + } else { + $result['message'] = $this->message( 'mail_sent_ng' ); + } + + // remove upload files + foreach ( (array) $this->uploaded_files as $name => $path ) { + @unlink( $path ); + } + + return $result; + } + + /* Validate */ + + function validate() { + $fes = $this->form_scan_shortcode(); + + $result = array( 'valid' => true, 'reason' => array() ); + + foreach ( $fes as $fe ) { + $result = apply_filters( 'wpcf7_validate_' . $fe['type'], $result, $fe ); + } + + $result = apply_filters( 'wpcf7_validate', $result ); + + return $result; + } + + function accepted() { + $accepted = true; + + return apply_filters( 'wpcf7_acceptance', $accepted ); + } + + function spam() { + $spam = false; + + if ( WPCF7_VERIFY_NONCE && ! $this->verify_nonce() ) + $spam = true; + + return apply_filters( 'wpcf7_spam', $spam ); + } + + function verify_nonce() { + return wpcf7_verify_nonce( $_POST['_wpnonce'], $_POST['_wpcf7_unit_tag'] ); + } + + /* Mail */ + + function mail() { + if ( $this->in_demo_mode() ) + $this->skip_mail = true; + + do_action_ref_array( 'wpcf7_before_send_mail', array( &$this ) ); + + if ( $this->skip_mail ) + return true; + + $result = $this->compose_mail( $this->setup_mail_template( $this->mail, 'mail' ) ); + + if ( $result ) { + $additional_mail = array(); + + if ( $this->mail_2['active'] ) + $additional_mail[] = $this->setup_mail_template( $this->mail_2, 'mail_2' ); + + $additional_mail = apply_filters_ref_array( 'wpcf7_additional_mail', + array( $additional_mail, &$this ) ); + + foreach ( $additional_mail as $mail ) + $this->compose_mail( $mail ); + + return true; + } + + return false; + } + + function setup_mail_template( $mail_template, $name = '' ) { + $defaults = array( + 'subject' => '', 'sender' => '', 'body' => '', + 'recipient' => '', 'additional_headers' => '', + 'attachments' => '', 'use_html' => false ); + + $mail_template = wp_parse_args( $mail_template, $defaults ); + + $name = trim( $name ); + + if ( ! empty( $name ) ) + $mail_template['name'] = $name; + + return $mail_template; + } + + function compose_mail( $mail_template, $send = true ) { + $this->mail_template_in_process = $mail_template; + + $regex = '/(\[?)\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\](\]?)/'; + + $use_html = (bool) $mail_template['use_html']; + + $callback = array( &$this, 'mail_callback' ); + $callback_html = array( &$this, 'mail_callback_html' ); + + $subject = preg_replace_callback( $regex, $callback, $mail_template['subject'] ); + $sender = preg_replace_callback( $regex, $callback, $mail_template['sender'] ); + $recipient = preg_replace_callback( $regex, $callback, $mail_template['recipient'] ); + $additional_headers = + preg_replace_callback( $regex, $callback, $mail_template['additional_headers'] ); + + if ( $use_html ) { + $body = preg_replace_callback( $regex, $callback_html, $mail_template['body'] ); + $body = wpautop( $body ); + } else { + $body = preg_replace_callback( $regex, $callback, $mail_template['body'] ); + } + + $attachments = array(); + + foreach ( (array) $this->uploaded_files as $name => $path ) { + if ( false === strpos( $mail_template['attachments'], "[${name}]" ) || empty( $path ) ) + continue; + + $attachments[] = $path; + } + + $components = compact( + 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments' ); + + $components = apply_filters_ref_array( 'wpcf7_mail_components', + array( $components, &$this ) ); + + extract( $components ); + + $headers = "From: $sender\n"; + + if ( $use_html ) + $headers .= "Content-Type: text/html\n"; + + $headers .= trim( $additional_headers ) . "\n"; + + if ( $send ) + return @wp_mail( $recipient, $subject, $body, $headers, $attachments ); + + return compact( 'subject', 'sender', 'body', 'recipient', 'headers', 'attachments' ); + } + + function mail_callback_html( $matches ) { + return $this->mail_callback( $matches, true ); + } + + function mail_callback( $matches, $html = false ) { + // allow [[foo]] syntax for escaping a tag + if ( $matches[1] == '[' && $matches[3] == ']' ) + return substr( $matches[0], 1, -1 ); + + if ( isset( $this->posted_data[$matches[2]] ) ) { + $submitted = $this->posted_data[$matches[2]]; + + if ( is_array( $submitted ) ) + $replaced = join( ', ', $submitted ); + else + $replaced = $submitted; + + if ( $html ) { + $replaced = strip_tags( $replaced ); + $replaced = wptexturize( $replaced ); + } + + $replaced = apply_filters( 'wpcf7_mail_tag_replaced', $replaced, $submitted ); + + return stripslashes( $replaced ); + } + + if ( $special = apply_filters( 'wpcf7_special_mail_tags', '', $matches[2] ) ) + return $special; + + return $matches[0]; + } + + /* Message */ + + function message( $status ) { + $messages = $this->messages; + $message = isset( $messages[$status] ) ? $messages[$status] : ''; + + return apply_filters( 'wpcf7_display_message', $message, $status ); + } + + /* Additional settings */ + + function additional_setting( $name, $max = 1 ) { + $tmp_settings = (array) explode( "\n", $this->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; + } + + function in_demo_mode() { + $settings = $this->additional_setting( 'demo_mode', false ); + + foreach ( $settings as $setting ) { + if ( in_array( $setting, array( 'on', 'true', '1' ) ) ) + return true; + } + + return false; + } + + /* Upgrade */ + + function upgrade() { + if ( ! isset( $this->mail['recipient'] ) ) + $this->mail['recipient'] = get_option( 'admin_email' ); + + + if ( ! is_array( $this->messages ) ) + $this->messages = array(); + + + foreach ( wpcf7_messages() as $key => $arr ) { + if ( ! isset( $this->messages[$key] ) ) + $this->messages[$key] = $arr['default']; + } + } + + /* Save */ + + function save() { + $metas = array( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' ); + + $post_content = ''; + + foreach ( $metas as $meta ) { + $props = (array) $this->{$meta}; + + foreach ( $props as $prop ) + $post_content .= "\n" . trim( $prop ); + } + + 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 ( $metas as $meta ) + update_post_meta( $post_id, $meta, wpcf7_normalize_newline_deep( $this->{$meta} ) ); + + if ( $this->initial ) { + $this->initial = false; + $this->id = $post_id; + do_action_ref_array( 'wpcf7_after_create', array( &$this ) ); + } else { + do_action_ref_array( 'wpcf7_after_update', array( &$this ) ); + } + + do_action_ref_array( 'wpcf7_after_save', array( &$this ) ); + } + + return $post_id; + } + + function copy() { + $new = new WPCF7_ContactForm(); + $new->initial = true; + $new->title = $this->title . '_copy'; + + $new->form = $this->form; + $new->mail = $this->mail; + $new->mail_2 = $this->mail_2; + $new->messages = $this->messages; + $new->additional_settings = $this->additional_settings; + + $new = apply_filters_ref_array( 'wpcf7_copy', array( &$new, &$this ) ); + + return $new; + } + + function delete() { + if ( $this->initial ) + return; + + if ( wp_delete_post( $this->id, true ) ) { + $this->initial = true; + $this->id = null; + return true; + } + + return false; + } +} + +function wpcf7_contact_form( $id ) { + $contact_form = new WPCF7_ContactForm( $id ); + + if ( $contact_form->initial ) + return false; + + return $contact_form; +} + +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_contact_form_default_pack( $args = '' ) { + global $l10n; + + $defaults = array( 'locale' => null, 'title' => '' ); + $args = wp_parse_args( $args, $defaults ); + + $locale = $args['locale']; + $title = $args['title']; + + if ( $locale && $locale != get_locale() ) { + $mo_orig = $l10n['wpcf7']; + unset( $l10n['wpcf7'] ); + + if ( 'en_US' != $locale ) { + $mofile = wpcf7_plugin_path( 'languages/wpcf7-' . $locale . '.mo' ); + if ( ! load_textdomain( 'wpcf7', $mofile ) ) { + $l10n['wpcf7'] = $mo_orig; + unset( $mo_orig ); + } + } + } + + $contact_form = new WPCF7_ContactForm(); + $contact_form->initial = true; + + $contact_form->title = ( $title ? $title : __( 'Untitled', 'wpcf7' ) ); + + $contact_form->form = wpcf7_get_default_template( 'form' ); + $contact_form->mail = wpcf7_get_default_template( 'mail' ); + $contact_form->mail_2 = wpcf7_get_default_template( 'mail_2' ); + $contact_form->messages = wpcf7_get_default_template( 'messages' ); + $contact_form->additional_settings = wpcf7_get_default_template( 'additional_settings' ); + + if ( isset( $mo_orig ) ) + $l10n['wpcf7'] = $mo_orig; + + $contact_form = apply_filters_ref_array( 'wpcf7_contact_form_default_pack', + array( &$contact_form, $args ) ); + + return $contact_form; +} + +function wpcf7_get_current_contact_form() { + global $wpcf7_contact_form; + + if ( ! is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) ) + return null; + + return $wpcf7_contact_form; +} + +function wpcf7_is_posted() { + if ( ! $contact_form = wpcf7_get_current_contact_form() ) + return false; + + return $contact_form->is_posted(); +} + +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 = 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 ); +} + +?> \ 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..ac99de1 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/controller.php @@ -0,0 +1,288 @@ + false, + 'into' => '#' . $unit_tag, + 'captcha' => null ); + + $result = $wpcf7_contact_form->submit( true ); + + if ( ! empty( $result['message'] ) ) + $items['message'] = $result['message']; + + if ( $result['mail_sent'] ) + $items['mailSent'] = true; + + if ( ! $result['valid'] ) { + $invalids = array(); + + foreach ( $result['invalid_reasons'] as $name => $reason ) { + $invalids[] = array( + 'into' => 'span.wpcf7-form-control-wrap.' . $name, + 'message' => $reason ); + } + + $items['invalids'] = $invalids; + } + + if ( $result['spam'] ) + $items['spam'] = true; + + if ( ! empty( $result['scripts_on_sent_ok'] ) ) + $items['onSentOk'] = $result['scripts_on_sent_ok']; + + $items = apply_filters( 'wpcf7_ajax_json_echo', $items, $result ); + + $wpcf7_contact_form = null; + } + } + + $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() { + global $wpcf7_contact_form; + + if ( ! isset( $_POST['_wpcf7'] ) ) + return; + + $id = (int) $_POST['_wpcf7']; + + if ( $wpcf7_contact_form = wpcf7_contact_form( $id ) ) { + $result = $wpcf7_contact_form->submit(); + + if ( ! $result['valid'] ) { + $_POST['_wpcf7_validation_errors'] = array( + 'id' => $id, + 'messages' => $result['invalid_reasons'] ); + } else { + $_POST['_wpcf7_mail_sent'] = array( + 'id' => $id, + 'ok' => $result['mail_sent'], + 'message' => $result['message'], + 'spam' => $result['spam'] ); + } + + $wpcf7_contact_form = null; + } +} + +add_action( 'the_post', 'wpcf7_the_post' ); + +function wpcf7_the_post() { + global $wpcf7; + + $wpcf7->processing_within = 'p' . get_the_ID(); + $wpcf7->unit_count = 0; +} + +add_action( 'loop_end', 'wpcf7_loop_end' ); + +function wpcf7_loop_end() { + global $wpcf7; + + $wpcf7->processing_within = ''; +} + +add_filter( 'widget_text', 'wpcf7_widget_text_filter', 9 ); + +function wpcf7_widget_text_filter( $content ) { + global $wpcf7; + + if ( ! preg_match( '/\[[\r\n\t ]*contact-form(-7)?[\r\n\t ].*?\]/', $content ) ) + return $content; + + $wpcf7->widget_count += 1; + $wpcf7->processing_within = 'w' . $wpcf7->widget_count; + $wpcf7->unit_count = 0; + + $content = do_shortcode( $content ); + + $wpcf7->processing_within = ''; + + return $content; +} + +/* Shortcodes */ + +add_action( 'plugins_loaded', 'wpcf7_add_shortcodes', 1 ); + +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 = '' ) { + global $wpcf7, $wpcf7_contact_form; + + if ( is_feed() ) + return '[contact-form-7]'; + + if ( 'contact-form-7' == $code ) { + $atts = shortcode_atts( array( 'id' => 0, 'title' => '' ), $atts ); + + $id = (int) $atts['id']; + $title = trim( $atts['title'] ); + + if ( ! $wpcf7_contact_form = wpcf7_contact_form( $id ) ) + $wpcf7_contact_form = wpcf7_get_contact_form_by_title( $title ); + + } else { + if ( is_string( $atts ) ) + $atts = explode( ' ', $atts, 2 ); + + $id = (int) array_shift( $atts ); + $wpcf7_contact_form = wpcf7_get_contact_form_by_old_id( $id ); + } + + if ( ! $wpcf7_contact_form ) + return '[contact-form-7 404 "Not Found"]'; + + if ( $wpcf7->processing_within ) { // Inside post content or text widget + $wpcf7->unit_count += 1; + $unit_count = $wpcf7->unit_count; + $processing_within = $wpcf7->processing_within; + + } else { // Inside template + + if ( ! isset( $wpcf7->global_unit_count ) ) + $wpcf7->global_unit_count = 0; + + $wpcf7->global_unit_count += 1; + $unit_count = 1; + $processing_within = 't' . $wpcf7->global_unit_count; + } + + $unit_tag = 'wpcf7-f' . $wpcf7_contact_form->id . '-' . $processing_within . '-o' . $unit_count; + $wpcf7_contact_form->unit_tag = $unit_tag; + + $form = $wpcf7_contact_form->form_html(); + + $wpcf7_contact_form = null; + + return $form; +} + +if ( WPCF7_LOAD_JS ) + add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' ); + +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.js' ), + array( 'jquery' ), '3.14', 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 ...', 'wpcf7' ) ); + + if ( defined( 'WP_CACHE' ) && WP_CACHE ) + $_wpcf7['cached'] = 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' ); +} + +if ( WPCF7_LOAD_CSS ) + add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_styles' ); + +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' ); +} + +?> \ 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..b41afbd --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/css/styles-rtl.css @@ -0,0 +1,12 @@ +span.wpcf7-not-valid-tip { + left: auto; + right: 20%; + direction: rtl; +} +span.wpcf7-not-valid-tip-no-ajax { + direction: rtl; +} +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..73e5096 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/css/styles.css @@ -0,0 +1,65 @@ +div.wpcf7 { + margin: 0; + padding: 0; +} + +div.wpcf7-response-output { + margin: 2em 0.5em 1em; + padding: 0.2em 1em; +} + +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 { + position: absolute; + top: 20%; + left: 20%; + z-index: 100; + background: #fff; + border: 1px solid #ff0000; + font-size: 10pt; + width: 280px; + padding: 2px; +} + +span.wpcf7-not-valid-tip-no-ajax { + color: #f00; + font-size: 10pt; + display: block; +} + +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 .watermark { + color: #888; +} \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/deprecated.php b/wp-content/plugins/contact-form-7/includes/deprecated.php new file mode 100644 index 0000000..d712428 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/deprecated.php @@ -0,0 +1,26 @@ + 'wpcf7' ); + $args = wp_parse_args( $args, $defaults ); + + $url = menu_page_url( $args['page'], false ); + unset( $args['page'] ); + + $url = add_query_arg( $args, $url ); + + return esc_url_raw( $url ); +} + +function wpcf7_contact_form_default_pack( $locale = null ) { + wpcf7_deprecated_function( __FUNCTION__, '3.0', 'wpcf7_get_contact_form_default_pack()' ); + + return wpcf7_get_contact_form_default_pack( array( 'locale' => $locale ) ); +} + +?> \ 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..3add7d1 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/formatting.php @@ -0,0 +1,121 @@ +\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 ); + $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 ); + 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_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; +} + +?> \ 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..90ba6cf --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/functions.php @@ -0,0 +1,293 @@ +deprecated since Contact Form 7 version %2$s! Use %3$s instead.', 'wpcf7' ), $function, $version, $replacement ) ); + else + trigger_error( sprintf( __( '%1$s is deprecated since Contact Form 7 version %2$s with no alternative available.', 'wpcf7' ), $function, $version ) ); + } +} + +function wpcf7_messages() { + $messages = array( + 'mail_sent_ok' => array( + 'description' => __( "Sender's message was sent successfully", 'wpcf7' ), + 'default' => __( 'Your message was sent successfully. Thanks.', 'wpcf7' ) + ), + + 'mail_sent_ng' => array( + 'description' => __( "Sender's message was failed to send", 'wpcf7' ), + 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'wpcf7' ) + ), + + 'validation_error' => array( + 'description' => __( "Validation errors occurred", 'wpcf7' ), + 'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'wpcf7' ) + ), + + 'accept_terms' => array( + 'description' => __( "There are terms that the sender must accept", 'wpcf7' ), + 'default' => __( 'Please accept the terms to proceed.', 'wpcf7' ) + ), + + 'invalid_email' => array( + 'description' => __( "Email address that the sender entered is invalid", 'wpcf7' ), + 'default' => __( 'Email address seems invalid.', 'wpcf7' ) + ), + + 'invalid_required' => array( + 'description' => __( "There is a field that the sender must fill in", 'wpcf7' ), + 'default' => __( 'Please fill the required field.', 'wpcf7' ) + ) + ); + + return apply_filters( 'wpcf7_messages', $messages ); +} + +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', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '
' . "\n" + . ' [text* your-name]

' . "\n\n" + . '

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

' . "\n\n" + . '

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

' . "\n\n" + . '

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

' . "\n\n" + . '

[submit "' . __( 'Send', 'wpcf7' ) . '"]

'; + + return $template; +} + +function wpcf7_default_mail_template() { + $subject = '[your-subject]'; + $sender = '[your-name] <[your-email]>'; + $body = sprintf( __( 'From: %s', 'wpcf7' ), '[your-name] <[your-email]>' ) . "\n" + . sprintf( __( 'Subject: %s', 'wpcf7' ), '[your-subject]' ) . "\n\n" + . __( 'Message Body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n" + . sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ), + get_bloginfo( 'name' ), get_bloginfo( 'url' ) ); + $recipient = get_option( 'admin_email' ); + $additional_headers = ''; + $attachments = ''; + $use_html = 0; + return compact( 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' ); +} + +function wpcf7_default_mail_2_template() { + $active = false; + $subject = '[your-subject]'; + $sender = '[your-name] <[your-email]>'; + $body = __( 'Message body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n" + . sprintf( __( 'This mail is sent via contact form on %1$s %2$s', 'wpcf7' ), + get_bloginfo( 'name' ), get_bloginfo( 'url' ) ); + $recipient = '[your-email]'; + $additional_headers = ''; + $attachments = ''; + $use_html = 0; + return compact( 'active', 'subject', 'sender', 'body', 'recipient', 'additional_headers', 'attachments', 'use_html' ); +} + +function wpcf7_default_messages_template() { + $messages = array(); + + foreach ( wpcf7_messages() as $key => $arr ) { + $messages[$key] = $arr['default']; + } + + return $messages; +} + +function wpcf7_upload_dir( $type = false ) { + global $switched; + + $siteurl = get_option( 'siteurl' ); + $upload_path = trim( get_option( 'upload_path' ) ); + + $main_override = is_multisite() && defined( 'MULTISITE' ) && is_main_site(); + + if ( empty( $upload_path ) ) { + $dir = WP_CONTENT_DIR . '/uploads'; + } else { + $dir = $upload_path; + + if ( 'wp-content/uploads' == $upload_path ) { + $dir = WP_CONTENT_DIR . '/uploads'; + } elseif ( 0 !== strpos( $dir, ABSPATH ) ) { + // $dir is absolute, $upload_path is (maybe) relative to ABSPATH + $dir = path_join( ABSPATH, $dir ); + } + } + + if ( ! $url = get_option( 'upload_url_path' ) ) { + if ( empty( $upload_path ) + || ( 'wp-content/uploads' == $upload_path ) + || ( $upload_path == $dir ) ) + $url = WP_CONTENT_URL . '/uploads'; + else + $url = trailingslashit( $siteurl ) . $upload_path; + } + + if ( defined( 'UPLOADS' ) && ! $main_override + && ( ! isset( $switched ) || $switched === false ) ) { + $dir = ABSPATH . UPLOADS; + $url = trailingslashit( $siteurl ) . UPLOADS; + } + + if ( is_multisite() && ! $main_override + && ( ! isset( $switched ) || $switched === false ) ) { + + if ( defined( 'BLOGUPLOADDIR' ) ) + $dir = untrailingslashit( BLOGUPLOADDIR ); + + $url = str_replace( UPLOADS, 'files', $url ); + } + + $uploads = apply_filters( 'wpcf7_upload_dir', array( 'dir' => $dir, 'url' => $url ) ); + + if ( 'dir' == $type ) + return $uploads['dir']; + if ( 'url' == $type ) + return $uploads['url']; + + return $uploads; +} + +function wpcf7_l10n() { + $l10n = array( + 'af' => __( 'Afrikaans', 'wpcf7' ), + 'sq' => __( 'Albanian', 'wpcf7' ), + 'ar' => __( 'Arabic', 'wpcf7' ), + 'hy_AM' => __( 'Armenian', 'wpcf7' ), + 'az_AZ' => __( 'Azerbaijani', 'wpcf7' ), + 'bn_BD' => __( 'Bangla', 'wpcf7' ), + 'eu' => __( 'Basque', 'wpcf7' ), + 'be_BY' => __( 'Belarusian', 'wpcf7' ), + 'bs' => __( 'Bosnian', 'wpcf7' ), + 'pt_BR' => __( 'Brazilian Portuguese', 'wpcf7' ), + 'bg_BG' => __( 'Bulgarian', 'wpcf7' ), + 'ca' => __( 'Catalan', 'wpcf7' ), + 'zh_CN' => __( 'Chinese (Simplified)', 'wpcf7' ), + 'zh_TW' => __( 'Chinese (Traditional)', 'wpcf7' ), + 'hr' => __( 'Croatian', 'wpcf7' ), + 'cs_CZ' => __( 'Czech', 'wpcf7' ), + 'da_DK' => __( 'Danish', 'wpcf7' ), + 'nl_NL' => __( 'Dutch', 'wpcf7' ), + 'en_US' => __( 'English', 'wpcf7' ), + 'eo_EO' => __( 'Esperanto', 'wpcf7' ), + 'et' => __( 'Estonian', 'wpcf7' ), + 'fi' => __( 'Finnish', 'wpcf7' ), + 'fr_FR' => __( 'French', 'wpcf7' ), + 'gl_ES' => __( 'Galician', 'wpcf7' ), + 'ka_GE' => __( 'Georgian', 'wpcf7' ), + 'de_DE' => __( 'German', 'wpcf7' ), + 'el' => __( 'Greek', 'wpcf7' ), + 'he_IL' => __( 'Hebrew', 'wpcf7' ), + 'hi_IN' => __( 'Hindi', 'wpcf7' ), + 'hu_HU' => __( 'Hungarian', 'wpcf7' ), + 'id_ID' => __( 'Indonesian', 'wpcf7' ), + 'it_IT' => __( 'Italian', 'wpcf7' ), + 'ja' => __( 'Japanese', 'wpcf7' ), + 'ko_KR' => __( 'Korean', 'wpcf7' ), + 'lv' => __( 'Latvian', 'wpcf7' ), + 'lt_LT' => __( 'Lithuanian', 'wpcf7' ), + 'mk_MK' => __( 'Macedonian', 'wpcf7' ), + 'ms_MY' => __( 'Malay', 'wpcf7' ), + 'ml_IN' => __( 'Malayalam', 'wpcf7' ), + 'mt_MT' => __( 'Maltese', 'wpcf7' ), + 'nb_NO' => __( 'Norwegian', 'wpcf7' ), + 'fa_IR' => __( 'Persian', 'wpcf7' ), + 'pl_PL' => __( 'Polish', 'wpcf7' ), + 'pt_PT' => __( 'Portuguese', 'wpcf7' ), + 'ru_RU' => __( 'Russian', 'wpcf7' ), + 'ro_RO' => __( 'Romanian', 'wpcf7' ), + 'sr_RS' => __( 'Serbian', 'wpcf7' ), + 'si_LK' => __( 'Sinhala', 'wpcf7' ), + 'sk_SK' => __( 'Slovak', 'wpcf7' ), + 'sl_SI' => __( 'Slovene', 'wpcf7' ), + 'es_ES' => __( 'Spanish', 'wpcf7' ), + 'sv_SE' => __( 'Swedish', 'wpcf7' ), + 'ta' => __( 'Tamil', 'wpcf7' ), + 'th' => __( 'Thai', 'wpcf7' ), + 'tl' => __( 'Tagalog', 'wpcf7' ), + 'tr_TR' => __( 'Turkish', 'wpcf7' ), + 'uk' => __( 'Ukrainian', 'wpcf7' ), + 'vi' => __( 'Vietnamese', 'wpcf7' ) + ); + + return $l10n; +} + +function wpcf7_is_rtl() { + if ( function_exists( 'is_rtl' ) ) + return is_rtl(); + + return false; +} + +function wpcf7_ajax_loader() { + $url = wpcf7_plugin_url( 'images/ajax-loader.gif' ); + + return apply_filters( 'wpcf7_ajax_loader', $url ); +} + +/* Nonce functions: wpcf7_verify_nonce() and wpcf7_create_nonce() + * For front-end use only. + * Almost the same as wp_verify_nonce() and wp_create_nonce() except that $uid is always 0. +*/ + +function wpcf7_verify_nonce( $nonce, $action = -1 ) { + $i = wp_nonce_tick(); + $uid = 0; + + // Nonce generated 0-12 hours ago + if ( substr( wp_hash( $i . $action . $uid, 'nonce' ), -12, 10 ) == $nonce ) + return 1; + + // Nonce generated 12-24 hours ago + if ( substr( wp_hash( ( $i - 1 ) . $action . $uid, 'nonce' ), -12, 10 ) == $nonce ) + return 2; + + // Invalid nonce + return false; +} + +function wpcf7_create_nonce( $action = -1 ) { + $i = wp_nonce_tick(); + $uid = 0; + + return substr( wp_hash( $i . $action . $uid, 'nonce' ), -12, 10 ); +} + +?> \ No newline at end of file diff --git a/wp-content/plugins/contact-form-7/includes/js/jquery.form.dev.js b/wp-content/plugins/contact-form-7/includes/js/jquery.form.dev.js new file mode 100644 index 0000000..13e9a55 --- /dev/null +++ b/wp-content/plugins/contact-form-7/includes/js/jquery.form.dev.js @@ -0,0 +1,1089 @@ +/*! + * jQuery Form Plugin + * version: 3.14 (30-JUL-2012) + * @requires jQuery v1.3.2 or later + * + * Examples and documentation at: http://malsup.com/jquery/form/ + * Project repository: https://github.com/malsup/form + * Dual licensed under the MIT and GPL licenses: + * http://malsup.github.com/mit-license.txt + * http://malsup.github.com/gpl-license-v2.txt + */ +/*global ActiveXObject alert */ +;(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; + +/** + * 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 }; + } + + method = this.attr('method'); + action = this.attr('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 || 'GET', + 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]); + } + }; + + // are there files to upload? + var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113) + 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; + + // 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() { + fileUploadIframe(a); + }); + } + else { + fileUploadIframe(a); + } + } + else if ((hasFileInputs || multipart) && fileAPI) { + fileUploadXhr(a); + } + else { + $.ajax(options); + } + + // 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; + + // 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) { + for (var p in options.extraData) + if (options.extraData.hasOwnProperty(p)) + formdata.append(p, options.extraData[p]); + } + + options.data = null; + + var s = $.extend(true, {}, $.ajaxSettings, options, { + contentType: false, + processData: false, + cache: false, + type: 'POST' + }); + + if (options.uploadProgress) { + // workaround because jqXHR does not expose upload property + s.xhr = function() { + var xhr = jQuery.ajaxSettings.xhr(); + if (xhr.upload) { + xhr.upload.onprogress = 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); + }; + } + return xhr; + }; + } + + s.data = null; + var beforeSend = s.beforeSend; + s.beforeSend = function(xhr, o) { + o.data = formdata; + if(beforeSend) + beforeSend.call(this, xhr, o); + }; + $.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 useProp = !!$.fn.prop; + + if ($(':input[name=submit],:input[id=submit]', form).length) { + // if there is an input with a name or id of 'submit' then we won't be + // able to invoke the submit fn on the form (at least not x-browser) + alert('Error: Form elements must not have name or id of "submit".'); + return; + } + + if (a) { + // ensure that every serialized input is still enabled + for (i=0; i < elements.length; i++) { + el = $(elements[i]); + if ( useProp ) + 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.attr('name'); + if (!n) + $io.attr('name', id); + else + id = n; + } + else { + $io = $('