cf7-mailchimp
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
70 changed files
with
1567 additions
and
0 deletions
wp-content/plugins/cf7-mailchimp/api/api.php
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| 1 | @charset "UTF-8"; | ||
| 2 | |||
| 3 | @font-face { | ||
| 4 | font-family: "vx-fonts"; | ||
| 5 | src:url("fonts/vx-fonts.eot"); | ||
| 6 | src:url("fonts/vx-fonts.eot?#iefix") format("embedded-opentype"), | ||
| 7 | url("fonts/vx-fonts.woff") format("woff"), | ||
| 8 | url("fonts/vx-fonts.ttf") format("truetype"), | ||
| 9 | url("fonts/vx-fonts.svg#vx-fonts") format("svg"); | ||
| 10 | font-weight: normal; | ||
| 11 | font-style: normal; | ||
| 12 | |||
| 13 | } | ||
| 14 | |||
| 15 | [data-icon]:before { | ||
| 16 | font-family: "vx-fonts" !important; | ||
| 17 | content: attr(data-icon); | ||
| 18 | font-style: normal !important; | ||
| 19 | font-weight: normal !important; | ||
| 20 | font-variant: normal !important; | ||
| 21 | text-transform: none !important; | ||
| 22 | speak: none; | ||
| 23 | line-height: 1; | ||
| 24 | -webkit-font-smoothing: antialiased; | ||
| 25 | -moz-osx-font-smoothing: grayscale; | ||
| 26 | } | ||
| 27 | |||
| 28 | [class^="vx-"]:before, | ||
| 29 | [class*=" vx-"]:before { | ||
| 30 | font-family: "vx-fonts" !important; | ||
| 31 | font-style: normal !important; | ||
| 32 | font-weight: normal !important; | ||
| 33 | font-variant: normal !important; | ||
| 34 | text-transform: none !important; | ||
| 35 | speak: none; | ||
| 36 | line-height: 1; | ||
| 37 | -webkit-font-smoothing: antialiased; | ||
| 38 | -moz-osx-font-smoothing: grayscale; | ||
| 39 | } | ||
| 40 | |||
| 41 | .vx-bin-2:before { | ||
| 42 | content: "a"; | ||
| 43 | } | ||
| 44 | .vx-minus-3:before { | ||
| 45 | content: "b"; | ||
| 46 | } | ||
| 47 | .vx-add-4:before { | ||
| 48 | content: "c"; | ||
| 49 | } | ||
| 50 | .vx-add-3:before { | ||
| 51 | content: "d"; | ||
| 52 | } | ||
| 53 | .vx-add-2:before { | ||
| 54 | content: "e"; | ||
| 55 | } | ||
| 56 | .vx-loop-1:before { | ||
| 57 | content: "f"; | ||
| 58 | } | ||
| 59 | .vx-refresh:before { | ||
| 60 | content: "g"; | ||
| 61 | } | ||
| 62 | .vx-check-4:before { | ||
| 63 | content: "h"; | ||
| 64 | } | ||
| 65 | .vx-cross-1:before { | ||
| 66 | content: "i"; | ||
| 67 | } | ||
| 68 | .vx-check-1:before { | ||
| 69 | content: "j"; | ||
| 70 | } | ||
| 71 | .vx-check-2:before { | ||
| 72 | content: "k"; | ||
| 73 | } | ||
| 74 | .vx-chat-2:before { | ||
| 75 | content: "l"; | ||
| 76 | } | ||
| 77 | .vx-chat-1:before { | ||
| 78 | content: "m"; | ||
| 79 | } | ||
| 80 | .vx-check-3:before { | ||
| 81 | content: "n"; | ||
| 82 | } | ||
| 83 | .vx-check-bubble:before { | ||
| 84 | content: "o"; | ||
| 85 | } | ||
| 86 | .vx-check-shield:before { | ||
| 87 | content: "p"; | ||
| 88 | } | ||
| 89 | .vx-cross-shield:before { | ||
| 90 | content: "q"; | ||
| 91 | } | ||
| 92 | .vx-check-list:before { | ||
| 93 | content: "r"; | ||
| 94 | } | ||
| 95 | .vx-cross-bubble:before { | ||
| 96 | content: "s"; | ||
| 97 | } | ||
| 98 | .vx-setting-gear:before { | ||
| 99 | content: "t"; | ||
| 100 | } | ||
| 101 | .vx-scale:before { | ||
| 102 | content: "u"; | ||
| 103 | } | ||
| 104 | .vx-clock-3:before { | ||
| 105 | content: "v"; | ||
| 106 | } | ||
| 107 | .vx-dollar-bag:before { | ||
| 108 | content: "w"; | ||
| 109 | } | ||
| 110 | .vx-dollar-currency-1:before { | ||
| 111 | content: "x"; | ||
| 112 | } | ||
| 113 | .vx-lock-unlock-2:before { | ||
| 114 | content: "y"; | ||
| 115 | } | ||
| 116 | .vx-lock-2:before { | ||
| 117 | content: "z"; | ||
| 118 | } | ||
| 119 | .vx-lock-1:before { | ||
| 120 | content: "A"; | ||
| 121 | } | ||
| 122 | .vx-lock-unlock-1:before { | ||
| 123 | content: "B"; | ||
| 124 | } | ||
| 125 | .vx-wrench:before { | ||
| 126 | content: "C"; | ||
| 127 | } | ||
| 128 | .vx-bubble-ask-2:before { | ||
| 129 | content: "D"; | ||
| 130 | } | ||
| 131 | .vx-bubble-ask-1:before { | ||
| 132 | content: "E"; | ||
| 133 | } | ||
| 134 | .vx-baloon:before { | ||
| 135 | content: "F"; | ||
| 136 | } | ||
| 137 | .vx-bubble-attention-4:before { | ||
| 138 | content: "G"; | ||
| 139 | } | ||
| 140 | .vx-bubble-attention-6:before { | ||
| 141 | content: "H"; | ||
| 142 | } | ||
| 143 | .vx-user-2:before { | ||
| 144 | content: "I"; | ||
| 145 | } | ||
| 146 | .vx-arrow-46:before { | ||
| 147 | content: "J"; | ||
| 148 | } | ||
| 149 | .vx-arrow-50:before { | ||
| 150 | content: "K"; | ||
| 151 | } | ||
| 152 | .vx-arrow-49:before { | ||
| 153 | content: "L"; | ||
| 154 | } | ||
| 155 | .vx-arrow-53:before { | ||
| 156 | content: "M"; | ||
| 157 | } | ||
| 158 | .vx-arrow-54:before { | ||
| 159 | content: "N"; | ||
| 160 | } | ||
| 161 | .vx-arrow-42:before { | ||
| 162 | content: "O"; | ||
| 163 | } | ||
| 164 | .vx-arrow-58:before { | ||
| 165 | content: "P"; | ||
| 166 | } | ||
| 167 | .vx-arrow-59:before { | ||
| 168 | content: "Q"; | ||
| 169 | } | ||
| 170 | .vx-arrow-60:before { | ||
| 171 | content: "R"; | ||
| 172 | } | ||
| 173 | .vx-arrow-62:before { | ||
| 174 | content: "S"; | ||
| 175 | } | ||
| 176 | .vx-arrow-70:before { | ||
| 177 | content: "T"; | ||
| 178 | } | ||
| 179 | .vx-arrow-circle-28:before { | ||
| 180 | content: "U"; | ||
| 181 | } |
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
332 Bytes
333 Bytes
330 Bytes
333 Bytes
225 Bytes
223 Bytes
212 Bytes
206 Bytes
208 Bytes
335 Bytes
207 Bytes
262 Bytes
262 Bytes
332 Bytes
280 Bytes
364 Bytes
6.76 KB
4.44 KB
6.83 KB
6.83 KB
4.44 KB
4.44 KB
4.44 KB
4.44 KB
4.44 KB
6.15 KB
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| 1 | /* TipTip CSS - Version 1.2 */ | ||
| 2 | |||
| 3 | #tiptip_holder { | ||
| 4 | display: none; | ||
| 5 | position: absolute; | ||
| 6 | top: 0; | ||
| 7 | left: 0; | ||
| 8 | z-index: 99999; | ||
| 9 | } | ||
| 10 | |||
| 11 | #tiptip_holder.tip_top { | ||
| 12 | padding-bottom: 5px; | ||
| 13 | } | ||
| 14 | |||
| 15 | #tiptip_holder.tip_bottom { | ||
| 16 | padding-top: 5px; | ||
| 17 | } | ||
| 18 | |||
| 19 | #tiptip_holder.tip_right { | ||
| 20 | padding-left: 5px; | ||
| 21 | } | ||
| 22 | |||
| 23 | #tiptip_holder.tip_left { | ||
| 24 | padding-right: 5px; | ||
| 25 | } | ||
| 26 | |||
| 27 | #tiptip_content { | ||
| 28 | font-size: 11px; | ||
| 29 | color: #fff; | ||
| 30 | text-shadow: 0 0 2px #000; | ||
| 31 | padding: 4px 8px; | ||
| 32 | border: 0px solid rgba(255,255,255,1); | ||
| 33 | background-color: rgb(25,25,25); | ||
| 34 | background-color: rgba(25,25,25,1); | ||
| 35 | border-radius: 0px; | ||
| 36 | -webkit-border-radius: 0px; | ||
| 37 | -moz-border-radius: 0px; | ||
| 38 | text-align: left; | ||
| 39 | |||
| 40 | } | ||
| 41 | |||
| 42 | #tiptip_arrow, #tiptip_arrow_inner { | ||
| 43 | position: absolute; | ||
| 44 | border-color: transparent; | ||
| 45 | border-style: solid; | ||
| 46 | border-width: 6px; | ||
| 47 | height: 0; | ||
| 48 | width: 0; | ||
| 49 | } | ||
| 50 | |||
| 51 | #tiptip_holder.tip_top #tiptip_arrow { | ||
| 52 | border-top-color: #fff; | ||
| 53 | border-top-color: rgba(255,255,255,0.35); | ||
| 54 | } | ||
| 55 | |||
| 56 | #tiptip_holder.tip_bottom #tiptip_arrow { | ||
| 57 | border-bottom-color: #fff; | ||
| 58 | border-bottom-color: rgba(255,255,255,0.35); | ||
| 59 | } | ||
| 60 | |||
| 61 | #tiptip_holder.tip_right #tiptip_arrow { | ||
| 62 | border-right-color: #fff; | ||
| 63 | border-right-color: rgba(255,255,255,0.35); | ||
| 64 | } | ||
| 65 | |||
| 66 | #tiptip_holder.tip_left #tiptip_arrow { | ||
| 67 | border-left-color: #fff; | ||
| 68 | border-left-color: rgba(255,255,255,0.35); | ||
| 69 | } | ||
| 70 | |||
| 71 | #tiptip_holder.tip_top #tiptip_arrow_inner { | ||
| 72 | margin-top: -7px; | ||
| 73 | margin-left: -6px; | ||
| 74 | border-top-color: rgb(25,25,25); | ||
| 75 | border-top-color: rgba(25,25,25,1); | ||
| 76 | } | ||
| 77 | |||
| 78 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { | ||
| 79 | margin-top: -5px; | ||
| 80 | margin-left: -6px; | ||
| 81 | border-bottom-color: rgb(25,25,25); | ||
| 82 | border-bottom-color: rgba(25,25,25,1); | ||
| 83 | } | ||
| 84 | |||
| 85 | #tiptip_holder.tip_right #tiptip_arrow_inner { | ||
| 86 | margin-top: -6px; | ||
| 87 | margin-left: -5px; | ||
| 88 | border-right-color: rgb(25,25,25); | ||
| 89 | border-right-color: rgba(25,25,25,1); | ||
| 90 | } | ||
| 91 | |||
| 92 | #tiptip_holder.tip_left #tiptip_arrow_inner { | ||
| 93 | margin-top: -6px; | ||
| 94 | margin-left: -7px; | ||
| 95 | border-left-color: rgb(25,25,25); | ||
| 96 | border-left-color: rgba(25,25,25,1); | ||
| 97 | } | ||
| 98 | |||
| 99 | /* Webkit Hacks */ | ||
| 100 | @media screen and (-webkit-min-device-pixel-ratio:0) { | ||
| 101 | #tiptip_content { | ||
| 102 | padding: 4px 8px 5px 8px; | ||
| 103 | background-color: rgba(45,45,45,1); | ||
| 104 | } | ||
| 105 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { | ||
| 106 | border-bottom-color: rgba(45,45,45,1); | ||
| 107 | } | ||
| 108 | #tiptip_holder.tip_top #tiptip_arrow_inner { | ||
| 109 | border-top-color: rgba(20,20,20,1); | ||
| 110 | } | ||
| 111 | } |
572 Bytes
222 Bytes
219 Bytes
1.52 KB
493 Bytes
1.54 KB
1.47 KB
14.5 KB
1.53 KB
| 1 | <?php | ||
| 2 | // Exit if accessed directly | ||
| 3 | if( !defined( 'ABSPATH' ) ) exit; | ||
| 4 | |||
| 5 | if( !class_exists( 'vx_crmperks_cf' )): | ||
| 6 | class vx_crmperks_cf{ | ||
| 7 | public $plugin_url="https://www.crmperks.com/"; | ||
| 8 | public function __construct(){ | ||
| 9 | //Add meta boxes | ||
| 10 | add_action( 'vx_cf_add_meta_box', array($this,'add_meta_box'),10,2 ); | ||
| 11 | } | ||
| 12 | public function addons_key(){ | ||
| 13 | $key=''; | ||
| 14 | if(class_exists('vxcf_addons')){ | ||
| 15 | $key=vxcf_addons::addons_key(); | ||
| 16 | } | ||
| 17 | return $key; | ||
| 18 | } | ||
| 19 | public function get_pro_domain(){ | ||
| 20 | global $vx_wc,$vx_cf,$vx_gf,$vx_all; | ||
| 21 | $domain=''; $class=''; | ||
| 22 | if(!empty($vx_cf) && is_array($vx_cf)){ | ||
| 23 | $class=key($vx_cf); | ||
| 24 | }else if(!empty($vx_gf) && is_array($vx_gf)){ | ||
| 25 | $class=key($vx_gf); | ||
| 26 | }else if(!empty($vx_wc) && is_array($vx_wc)){ | ||
| 27 | $class=key($vx_wc); | ||
| 28 | }else if(!empty($vx_all) && is_array($vx_all)){ | ||
| 29 | $class=key($vx_all); | ||
| 30 | } | ||
| 31 | global ${$class}; | ||
| 32 | return ${$class}->domain; | ||
| 33 | } | ||
| 34 | |||
| 35 | /** | ||
| 36 | * Add Customer information box | ||
| 37 | * | ||
| 38 | */ | ||
| 39 | public function add_meta_box($lead,$detail){ | ||
| 40 | $lead_id=isset($lead['id']) ? $lead['id'] : ""; | ||
| 41 | ?> | ||
| 42 | <div class="vx_div"> | ||
| 43 | <div class="vx_head"> | ||
| 44 | <div class="crm_head_div"><i class="fa fa-bullhorn"></i> <?php esc_html_e('Marketing Data', 'contact-form-mailchimp-crm'); ?></div> | ||
| 45 | <div class="crm_btn_div" title="<?php esc_html_e('Expand / Collapse','contact-form-mailchimp-crm') ?>"><i class="fa crm_toggle_btn vx_action_btn fa-minus"></i></div> | ||
| 46 | <div class="crm_clear"></div> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | <div class="vx_group"> | ||
| 50 | <?php | ||
| 51 | $access=$this->addons_key(); | ||
| 52 | if(empty($access) ){ | ||
| 53 | $plugin_url=$this->plugin_url.'?vx_product='.$this->get_pro_domain(); | ||
| 54 | ?> | ||
| 55 | <div class="vx_panel" style="text-align: center; font-size: 16px; color: #888; font-weight: bold;"> | ||
| 56 | <p><?php esc_html_e('Need Marketing Insight? ,','contact-form-mailchimp-crm')?> <a href="<?php echo esc_url($plugin_url) ?>§ion=vxc_premium"><?php esc_html_e('Go Pro!','contact-form-mailchimp-crm')?></a></p> | ||
| 57 | </div> | ||
| 58 | <?php | ||
| 59 | }else{ | ||
| 60 | $html_added=apply_filters('vx_addons_meta_box',false,$lead_id,'cf'); | ||
| 61 | |||
| 62 | if(!$html_added){ | ||
| 63 | ?> | ||
| 64 | <h3 style="text-align: center;"><?php esc_html_e('No Information Available','contact-form-mailchimp-crm')?></h3> | ||
| 65 | <?php | ||
| 66 | } | ||
| 67 | } | ||
| 68 | ?> | ||
| 69 | |||
| 70 | </div> | ||
| 71 | </div> | ||
| 72 | <?php | ||
| 73 | } | ||
| 74 | |||
| 75 | } | ||
| 76 | $addons=new vx_crmperks_cf(); | ||
| 77 | ///$addons->init_premium(); | ||
| 78 | endif; |
This diff is collapsed.
Click to expand it.
| 1 | <?php | ||
| 2 | // Exit if accessed directly | ||
| 3 | if( !defined( 'ABSPATH' ) ) exit; | ||
| 4 | |||
| 5 | |||
| 6 | if( !class_exists( 'vxcf_mailchimp_install' ) ): | ||
| 7 | |||
| 8 | class vxcf_mailchimp_install extends vxcf_mailchimp{ | ||
| 9 | public static $sending_req=false; | ||
| 10 | public function get_roles(){ | ||
| 11 | $roles=array( | ||
| 12 | $this->id."_read_feeds", | ||
| 13 | $this->id."_edit_feeds", | ||
| 14 | $this->id."_read_logs" , | ||
| 15 | $this->id."_read_settings" , | ||
| 16 | $this->id."_edit_settings" , | ||
| 17 | $this->id."_send_to_crm" , | ||
| 18 | $this->id."_export_logs", | ||
| 19 | $this->id."_read_license", | ||
| 20 | $this->id."_uninstall" | ||
| 21 | ); | ||
| 22 | return $roles; | ||
| 23 | |||
| 24 | } | ||
| 25 | public function create_roles(){ | ||
| 26 | global $wp_roles; | ||
| 27 | if ( ! class_exists( 'WP_Roles' ) ) { | ||
| 28 | return; | ||
| 29 | } | ||
| 30 | $roles=$this->get_roles(); | ||
| 31 | foreach($roles as $role){ | ||
| 32 | $wp_roles->add_cap( 'administrator', $role ); | ||
| 33 | } | ||
| 34 | $wp_roles->add_cap( 'administrator', 'vx_crmperks_view_addons' ); | ||
| 35 | $wp_roles->add_cap( 'administrator', 'vx_crmperks_edit_addons' ); | ||
| 36 | } | ||
| 37 | |||
| 38 | public function remove_roles(){ | ||
| 39 | global $wp_roles; | ||
| 40 | if ( ! class_exists( 'WP_Roles' ) ) { | ||
| 41 | return; | ||
| 42 | } | ||
| 43 | $roles=$this->get_roles(); | ||
| 44 | foreach($roles as $role){ | ||
| 45 | $wp_roles->remove_cap( 'administrator', $role ); | ||
| 46 | } | ||
| 47 | } | ||
| 48 | public function remove_data(){ | ||
| 49 | global $wpdb; | ||
| 50 | |||
| 51 | //delete options | ||
| 52 | delete_option($this->type."_version"); | ||
| 53 | delete_option($this->type."_updates"); | ||
| 54 | delete_option($this->type."_settings"); | ||
| 55 | $other_version=$this->other_plugin_version(); | ||
| 56 | if(empty($other_version)){ //if other version not found | ||
| 57 | delete_option($this->id."_crm"); | ||
| 58 | delete_option($this->id."_meta"); | ||
| 59 | $this->deactivate('uninstall'); | ||
| 60 | $data=$this->get_data_object(); | ||
| 61 | $data->drop_tables(); | ||
| 62 | $this->remove_roles(); | ||
| 63 | } | ||
| 64 | |||
| 65 | $this->deactivate_plugin(); | ||
| 66 | } | ||
| 67 | public function deactivate_plugin(){ | ||
| 68 | $slug=$this->get_slug(); | ||
| 69 | //deactivate | ||
| 70 | deactivate_plugins($slug); | ||
| 71 | update_option('recently_activated', array($slug => time()) + (array)get_option('recently_activated')); | ||
| 72 | } | ||
| 73 | |||
| 74 | } | ||
| 75 | |||
| 76 | endif; |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| 1 | /* | ||
| 2 | * TipTip | ||
| 3 | * Copyright 2010 Drew Wilson | ||
| 4 | * www.drewwilson.com | ||
| 5 | * code.drewwilson.com/entry/tiptip-jquery-plugin | ||
| 6 | * | ||
| 7 | * Version 1.3 - Updated: Mar. 23, 2010 | ||
| 8 | * | ||
| 9 | * This Plug-In will create a custom tooltip to replace the default | ||
| 10 | * browser tooltip. It is extremely lightweight and very smart in | ||
| 11 | * that it detects the edges of the browser window and will make sure | ||
| 12 | * the tooltip stays within the current window size. As a result the | ||
| 13 | * tooltip will adjust itself to be displayed above, below, to the left | ||
| 14 | * or to the right depending on what is necessary to stay within the | ||
| 15 | * browser window. It is completely customizable as well via CSS. | ||
| 16 | * | ||
| 17 | * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: | ||
| 18 | * http://www.opensource.org/licenses/mit-license.php | ||
| 19 | * http://www.gnu.org/licenses/gpl.html | ||
| 20 | */ | ||
| 21 | (function($){$.fn.tipTip=function(options){var defaults={activation:"hover",keepAlive:false,maxWidth:"200px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,enter:function(){},exit:function(){}};var opts=$.extend(defaults,options);if($("#tiptip_holder").length<=0){var tiptip_holder=$('<div id="tiptip_holder" style="max-width:'+opts.maxWidth+';"></div>');var tiptip_content=$('<div id="tiptip_content"></div>');var tiptip_arrow=$('<div id="tiptip_arrow"></div>');$("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>')))}else{var tiptip_holder=$("#tiptip_holder");var tiptip_content=$("#tiptip_content");var tiptip_arrow=$("#tiptip_arrow")}return this.each(function(){var org_elem=$(this);if(opts.content){var org_title=opts.content}else{var org_title=org_elem.attr(opts.attribute)}if(org_title!=""){if(!opts.content){org_elem.removeAttr(opts.attribute)}var timeout=false;if(opts.activation=="hover"){org_elem.hover(function(){active_tiptip()},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}else if(opts.activation=="focus"){org_elem.focus(function(){active_tiptip()}).blur(function(){deactive_tiptip()})}else if(opts.activation=="click"){org_elem.click(function(){active_tiptip();return false}).hover(function(){},function(){if(!opts.keepAlive){deactive_tiptip()}});if(opts.keepAlive){tiptip_holder.hover(function(){},function(){deactive_tiptip()})}}function active_tiptip(){opts.enter.call(this);tiptip_content.html(org_title);tiptip_holder.hide().removeAttr("class").css("margin","0");tiptip_arrow.removeAttr("style");var top=parseInt(org_elem.offset()['top']);var left=parseInt(org_elem.offset()['left']);var org_width=parseInt(org_elem.outerWidth());var org_height=parseInt(org_elem.outerHeight());var tip_w=tiptip_holder.outerWidth();var tip_h=tiptip_holder.outerHeight();var w_compare=Math.round((org_width-tip_w)/2);var h_compare=Math.round((org_height-tip_h)/2);var marg_left=Math.round(left+w_compare);var marg_top=Math.round(top+org_height+opts.edgeOffset);var t_class="";var arrow_top="";var arrow_left=Math.round(tip_w-12)/2;if(opts.defaultPosition=="bottom"){t_class="_bottom"}else if(opts.defaultPosition=="top"){t_class="_top"}else if(opts.defaultPosition=="left"){t_class="_left"}else if(opts.defaultPosition=="right"){t_class="_right"}var right_compare=(w_compare+left)<parseInt($(window).scrollLeft());var left_compare=(tip_w+left)>parseInt($(window).width());if((right_compare&&w_compare<0)||(t_class=="_right"&&!left_compare)||(t_class=="_left"&&left<(tip_w+opts.edgeOffset+5))){t_class="_right";arrow_top=Math.round(tip_h-13)/2;arrow_left=-12;marg_left=Math.round(left+org_width+opts.edgeOffset);marg_top=Math.round(top+h_compare)}else if((left_compare&&w_compare<0)||(t_class=="_left"&&!right_compare)){t_class="_left";arrow_top=Math.round(tip_h-13)/2;arrow_left=Math.round(tip_w);marg_left=Math.round(left-(tip_w+opts.edgeOffset+5));marg_top=Math.round(top+h_compare)}var top_compare=(top+org_height+opts.edgeOffset+tip_h+8)>parseInt($(window).height()+$(window).scrollTop());var bottom_compare=((top+org_height)-(opts.edgeOffset+tip_h+8))<0;if(top_compare||(t_class=="_bottom"&&top_compare)||(t_class=="_top"&&!bottom_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_top"}else{t_class=t_class+"_top"}arrow_top=tip_h;marg_top=Math.round(top-(tip_h+5+opts.edgeOffset))}else if(bottom_compare|(t_class=="_top"&&bottom_compare)||(t_class=="_bottom"&&!top_compare)){if(t_class=="_top"||t_class=="_bottom"){t_class="_bottom"}else{t_class=t_class+"_bottom"}arrow_top=-12;marg_top=Math.round(top+org_height+opts.edgeOffset)}if(t_class=="_right_top"||t_class=="_left_top"){marg_top=marg_top+5}else if(t_class=="_right_bottom"||t_class=="_left_bottom"){marg_top=marg_top-5}if(t_class=="_left_top"||t_class=="_left_bottom"){marg_left=marg_left+5}tiptip_arrow.css({"margin-left":arrow_left+"px","margin-top":arrow_top+"px"});tiptip_holder.css({"margin-left":marg_left+"px","margin-top":marg_top+"px"}).attr("class","tip"+t_class);if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){tiptip_holder.stop(true,true).fadeIn(opts.fadeIn)},opts.delay)}function deactive_tiptip(){opts.exit.call(this);if(timeout){clearTimeout(timeout)}tiptip_holder.fadeOut(opts.fadeOut)}}})}})(jQuery); | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
wp-content/plugins/cf7-mailchimp/readme.txt
0 → 100644
| 1 | === Integration for Contact Form 7 and Mailchimp === | ||
| 2 | Contributors: crmperks, sbazzi, asif876 | ||
| 3 | Tags: contact form 7, contact form 7 mailchimp, connecting contact form 7 and mailchimp, mailchimp, contact form 7 mailchimp extension | ||
| 4 | Requires at least: 3.8 | ||
| 5 | Tested up to: 6.1 | ||
| 6 | Stable tag: 1.1.2 | ||
| 7 | Version: 1.1.2 | ||
| 8 | Requires PHP: 5.3 | ||
| 9 | License: GPLv3 | ||
| 10 | License URI: http://www.gnu.org/licenses/gpl-3.0.html | ||
| 11 | |||
| 12 | Send Contact Form 7, CRM Perks Forms and many other contact form submissions to Mailchimp. | ||
| 13 | |||
| 14 | == Description == | ||
| 15 | |||
| 16 | Contact Form 7 Mailchimp extension sends form submissions from [Contact Form 7](https://wordpress.org/plugins/contact-form-7/), [Contact Form Entries](https://wordpress.org/plugins/contact-form-entries/) and many other popular contact form plugins to Mailchimp when anyone submits a form. Learn more at [crmperks.com](https://www.crmperks.com/plugins/contact-form-plugins/contact-form-mailchimp-plugin/?utm_source=wordpress&utm_medium=directory&utm_campaign=mailchimp_readme) | ||
| 17 | |||
| 18 | |||
| 19 | == Why we built this Contact Form 7 Mailchimp Extension == | ||
| 20 | |||
| 21 | Many Mailchimp extensions are already available but we added many new features. This plugin shows all mailchimp merge fields list and you can easily map any field. This plugin displays complete log of data sent to mailchimp. You can easily resend any contact form entry to mailchimp. | ||
| 22 | |||
| 23 | == How to Setup == | ||
| 24 | |||
| 25 | * Go to "Mailchimp Accounts" tab then add new account. | ||
| 26 | * Go to "Mailchimp Feeds" tab then create a new feed. | ||
| 27 | * Map required mailchimp fields to contact form fields. | ||
| 28 | * Send your test entry to mailchimp by clicking "send to mailchimp" button. | ||
| 29 | * Go to "Mailchimp Logs" tab and verify status of previously sent entry. | ||
| 30 | |||
| 31 | |||
| 32 | **Connect Mailchimp account** | ||
| 33 | |||
| 34 | Connect any contact form 7 to Mailchimp account by simply entering Mailchimp API key. Additionally, you can connect multiple Mailchimp accounts to Contact Form 7. | ||
| 35 | |||
| 36 | **Map Mailchimp fields** | ||
| 37 | |||
| 38 | Select any mailchimp list then Map mailchimp list fields to any contact form 7 fields. Plugin displays all mailchimp merge fields. | ||
| 39 | |||
| 40 | **Filter contact form 7 submissions** | ||
| 41 | |||
| 42 | Filter contact form 7 submissions sent to Mailchimp based on user input. For example , send those customers to Mailchimp who check "Subscribe to newsletter" checkbox. | ||
| 43 | |||
| 44 | **Manually send to Mailchimp** | ||
| 45 | |||
| 46 | Send contact form 7 submissions to Mailchimp when someone submits a contact form. You can manually send contact form 7 submissions to Mailchimp by clicking "Send to Mailchimp" button. | ||
| 47 | |||
| 48 | **Mailchimp logs** | ||
| 49 | |||
| 50 | View a detailed log of each contact form 7 submission Whether sent or not sent to Mailchimp and easily resend contact form 7 submission to Mailchimp. | ||
| 51 | |||
| 52 | **Send Data As Mailchimp Member Notes** | ||
| 53 | |||
| 54 | Send one to many contact form 7 form fields as Mailchimp Object notes when someone submits a contact form on your site. | ||
| 55 | |||
| 56 | **Create Or Update Contact in Mailchimp** | ||
| 57 | |||
| 58 | If a member already exists in Mailchimp , update it otherwise create a new member in Mailchimp. | ||
| 59 | |||
| 60 | |||
| 61 | <blockquote> | ||
| 62 | <p><strong>Premium Version Features.</strong></p> | ||
| 63 | <p>Following features are available only in premium version <a href="https://www.crmperks.com/plugins/contact-form-plugins/contact-form-mailchimp-plugin/?utm_source=wordpress&utm_medium=directory&utm_campaign=mailchimp_readme">Contact Form 7 Mailchimp Pro</a>.</p> | ||
| 64 | <ul> | ||
| 65 | <li>Mailchimp tags.</li> | ||
| 66 | <li>Phone number field and all custom fields of Mailchimp.</li> | ||
| 67 | <li>Mailchimp interest groups.</li> | ||
| 68 | <li>Google Analytics Parameters and Geolocation of a visitor who submitted the form.</li> | ||
| 69 | <li>Lookup lead's email and phone using email and phone lookup apis.</li> | ||
| 70 | <li>20+ premium addons</li> | ||
| 71 | </ul> | ||
| 72 | <p><a href="https://www.crmperks.com/plugins/contact-form-plugins/contact-form-mailchimp-plugin/?utm_source=wordpress&utm_medium=directory&utm_campaign=readme">Upgrade to Contact Form 7 Mailchimp Pro</a></p> | ||
| 73 | </blockquote> | ||
| 74 | |||
| 75 | |||
| 76 | == Want to send data to crm == | ||
| 77 | We have Premium Extensions for 20+ CRMs.[View All CRM Extensions](https://www.crmperks.com/plugin-category/contact-form-plugins/?utm_source=wordpress&utm_medium=directory&utm_campaign=mailchimp_readme) | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | == Screenshots == | ||
| 82 | |||
| 83 | 1. Connect Mailchimp Account to contact form 7. | ||
| 84 | 2. Map Mailchimp fields. | ||
| 85 | 3. Mailchimp logs. | ||
| 86 | 4. Manually Send Contact form 7 submission to Mailchimp. | ||
| 87 | 5. Get email infomation of contact form 7 entry from Full Contact(Premium feature). | ||
| 88 | 6. Get Customer geolocation, browser and OS (Premium feature). | ||
| 89 | |||
| 90 | |||
| 91 | == Frequently Asked Questions == | ||
| 92 | |||
| 93 | = Where can I get support? = | ||
| 94 | |||
| 95 | Our team provides free support at <a href="https://www.crmperks.com/contact-us/">https://www.crmperks.com/contact-us/</a>. | ||
| 96 | |||
| 97 | |||
| 98 | = How to integrate contact form 7 with mailchimp = | ||
| 99 | |||
| 100 | You can easily integrate contact form 7 with mailchimp by following these steps. | ||
| 101 | |||
| 102 | * Go to Mailchimp Accounts then connect your account. | ||
| 103 | * Go to Mailchimp Feeds , select desired list then map form fields to mailchimp list fields. | ||
| 104 | * Submit a contact form , a new member will added in mailchimp. | ||
| 105 | * If you have installed Contact Form Entries plugin then open any entry and click "Send to MailChimp" button. | ||
| 106 | * Go to MailChimp logs and check if entry was successfully sent to MailChimp. | ||
| 107 | |||
| 108 | = Contact form 7 mailchimp subscribe = | ||
| 109 | |||
| 110 | * Create beautifull mailchimp subscribe forms and popups with free [CRM Perks Forms](https://wordpress.org/plugins/crm-perks-forms/). | ||
| 111 | * Go to MailChimp accounts tab and connect your mailchimp account. | ||
| 112 | * Creat a feed and select desired list then map form fields to mailchimp list fields. | ||
| 113 | |||
| 114 | = Connecting contact form 7 and mailchimp = | ||
| 115 | |||
| 116 | * Simply Connect your mailchimp account. | ||
| 117 | * Go to Feeds and create mailchimp feed, select list then map contact form 7 fields to mailchimp fields. | ||
| 118 | * Test by submitting a form or go to Contact Form Entries and open any entry then press "Send to Mailchimp" button. | ||
| 119 | * Go to MailChimp Logs and verify if entry was sent to mailchimp. | ||
| 120 | |||
| 121 | = contact form 7 mailchimp integration = | ||
| 122 | |||
| 123 | You can easily integrate contact form 7 with mailchimp. You can add a member as Subsribed or pending in mailchimp when someone submits a form on your site. | ||
| 124 | |||
| 125 | = Add mailchimp to contact form 7 = | ||
| 126 | |||
| 127 | You can add mailchimp to contact form 7 with this free Wordpress contact form 7 mailchimp plugin. Simply connect mailchimp then map mailchimp list fields to contact form 7 fields. | ||
| 128 | |||
| 129 | = Mailchimp integration with contact form 7 = | ||
| 130 | |||
| 131 | Integrating mailchimp with contact form 7 is very easy. You can send form entry to mailchimp when anyone submits a form or send it manually by clicking "Send to Mailchimp" button. | ||
| 132 | |||
| 133 | = how to use contact form 7 mailchimp extension = | ||
| 134 | |||
| 135 | It is simple, Go to Mailchimp accounts , add your account then go to Mailchimp feeds and add new feed here. Now submit a contact form 7 form, this new submission will be sent to mailchimp. | ||
| 136 | |||
| 137 | = Contact form 7 integration with mailchimp = | ||
| 138 | |||
| 139 | Easily integrate contact form 7 and mailchimp with this free wordpress mailchimp contact form 7 extension. This plugin displays all data whether sent or not sent to mailchimp as "Mailchimp Logs". | ||
| 140 | |||
| 141 | |||
| 142 | = Mailchimp and contact form 7 = | ||
| 143 | |||
| 144 | contact form 7 is always free forms builder and mailchimp is a free newsletter service which is good. You can easily connect mailchimp to contact form 7 with this free contact form 7 mailchimp extension. | ||
| 145 | |||
| 146 | = Contact form 7 mailchimp checkbox = | ||
| 147 | |||
| 148 | You do not need a separate checkbox for mailchimp optin. simply use "Optin Condition" feature of this plugin. Additionally you can add multiple conditions for mailchimp optin. | ||
| 149 | |||
| 150 | = Contact form 7 mailchimp custom fields = | ||
| 151 | |||
| 152 | This contact form 7 mailchimp extension displays list of all mailchimp custom fields. you can easily map mailchimp merge fields to contact form 7 fields. | ||
| 153 | |||
| 154 | = Contact form 7 mailchimp groups = | ||
| 155 | |||
| 156 | You can add a member to multiple groups in mailchimp. currently this feature is available in pro version of this plugin. | ||
| 157 | |||
| 158 | = Mailchimp for contact form 7 = | ||
| 159 | |||
| 160 | You can use contact form 7 forms for sending form submissions to mailchimp with mailchimp contact form 7 plugin. when anyone submits a form , you can subscribe him to mailchimp list. | ||
| 161 | |||
| 162 | = Contact form 7 newsletter signup mailchimp = | ||
| 163 | |||
| 164 | Mailchimp is a popular newletter service. You can create newsletter singup forms using any form builder then send it to mailchimp with this free contact form 7 mailchimp extension. | ||
| 165 | |||
| 166 | |||
| 167 | == Changelog == | ||
| 168 | |||
| 169 | = 1.1.2 = | ||
| 170 | * fixed "escape variables" issue. | ||
| 171 | |||
| 172 | = 1.1.1 = | ||
| 173 | * fixed "add field" button not working issue. | ||
| 174 | |||
| 175 | = 1.1.0 = | ||
| 176 | * fixed "debug xss" issue. | ||
| 177 | |||
| 178 | = 1.0.9 = | ||
| 179 | * fixed mailchimp groups. | ||
| 180 | |||
| 181 | = 1.0.8 = | ||
| 182 | * fixed file field warning. | ||
| 183 | * fixed dropdown fields. | ||
| 184 | |||
| 185 | = 1.0.7 = | ||
| 186 | * fixed mailchimp interest field. | ||
| 187 | |||
| 188 | = 1.0.6 = | ||
| 189 | * fixed mailchimp groups issue. | ||
| 190 | * removed "send from logs" option. | ||
| 191 | |||
| 192 | = 1.0.5 = | ||
| 193 | * fixed form title field. | ||
| 194 | * fixed groups. | ||
| 195 | |||
| 196 | = 1.0.4 = | ||
| 197 | * added page_url field. | ||
| 198 | |||
| 199 | = 1.0.3 = | ||
| 200 | * increased fields limit to 200. | ||
| 201 | * fixed empty merge fields issue. | ||
| 202 | |||
| 203 | = 1.0.2 = | ||
| 204 | * increased lists limit to 200. | ||
| 205 | * add tags when updating old member. | ||
| 206 | |||
| 207 | = 1.0.1 = | ||
| 208 | * Fixed mailchimp Phone number field. | ||
| 209 | |||
| 210 | = 1.0.0 = | ||
| 211 | * Initial release. | ||
| 212 | |||
| 213 | |||
| 214 |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?> <style type="text/css"> | ||
| 5 | .crm_fields_table{ | ||
| 6 | width: 100%; margin-top: 30px; | ||
| 7 | }.crm_fields_table .crm_field_cell1 label{ | ||
| 8 | font-weight: bold; font-size: 14px; | ||
| 9 | } | ||
| 10 | .crm_fields_table .clear{ | ||
| 11 | clear: both; | ||
| 12 | } | ||
| 13 | .crm_fields_table .crm_field{ | ||
| 14 | margin: 20px 0px; | ||
| 15 | } | ||
| 16 | .crm_fields_table .crm_text{ | ||
| 17 | width: 100%; | ||
| 18 | } | ||
| 19 | .crm_fields_table .crm_field_cell1{ | ||
| 20 | width: 20%; min-width: 100px; float: left; display: inline-block; | ||
| 21 | line-height: 26px; | ||
| 22 | } | ||
| 23 | .crm_fields_table .crm_field_cell2{ | ||
| 24 | width: 80%; float: left; display: inline-block; | ||
| 25 | } | ||
| 26 | .vxc_alert{ | ||
| 27 | padding: 10px 20px; | ||
| 28 | } | ||
| 29 | .vx_icons{ | ||
| 30 | color: #888; | ||
| 31 | } | ||
| 32 | .vx_green{ | ||
| 33 | color:rgb(0, 132, 0); | ||
| 34 | } | ||
| 35 | #tiptip_content{ | ||
| 36 | max-width: 200px; | ||
| 37 | } | ||
| 38 | .vx_tr{ | ||
| 39 | display: table; width: 100%; | ||
| 40 | } | ||
| 41 | .vx_td{ | ||
| 42 | display: table-cell; width: 90%; | ||
| 43 | } | ||
| 44 | .vx_td2{ | ||
| 45 | display: table-cell; | ||
| 46 | } | ||
| 47 | .crm_field .vx_td2 .vx_toggle_btn{ | ||
| 48 | margin: 0 0 0 10px; vertical-align: baseline; width: 80px; | ||
| 49 | } | ||
| 50 | .submit{ | ||
| 51 | display: none; | ||
| 52 | } | ||
| 53 | </style> | ||
| 54 | <script type="text/javascript"> | ||
| 55 | jQuery(document).ready(function($){ | ||
| 56 | |||
| 57 | $(".vx_tabs_radio").click(function(){ | ||
| 58 | $(".vx_tabs").hide(); | ||
| 59 | $("#tab_"+this.id).show(); | ||
| 60 | }); | ||
| 61 | $(".sf_login").click(function(e){ | ||
| 62 | if($("#vx_custom_app_check").is(":checked")){ | ||
| 63 | var client_id=$(this).data('id'); | ||
| 64 | var new_id=$("#app_id").val(); | ||
| 65 | if(client_id!=new_id){ | ||
| 66 | e.preventDefault(); | ||
| 67 | alert("<?php esc_html_e('Mailchimp Client ID Changed.Please save new changes first','contact-form-mailchimp-crm') ?>"); | ||
| 68 | } | ||
| 69 | } | ||
| 70 | }) | ||
| 71 | $("#vx_custom_app_check").click(function(){ | ||
| 72 | if($(this).is(":checked")){ | ||
| 73 | $("#vx_custom_app_div").show(); | ||
| 74 | }else{ | ||
| 75 | $("#vx_custom_app_div").hide(); | ||
| 76 | } | ||
| 77 | }); | ||
| 78 | |||
| 79 | $(document).on('click','#vx_revoke',function(e){ | ||
| 80 | |||
| 81 | if(!confirm('<?php esc_html_e('Notification - Remove Connection?','contact-form-mailchimp-crm'); ?>')){ | ||
| 82 | e.preventDefault(); | ||
| 83 | } | ||
| 84 | }); | ||
| 85 | |||
| 86 | }); | ||
| 87 | </script> | ||
| 88 | <div class="vx_wrap"> | ||
| 89 | |||
| 90 | <form method="post" id="mainform"> | ||
| 91 | <?php wp_nonce_field("vx_nonce") ?> | ||
| 92 | <h2 class="vx_img_head"><img alt="<?php esc_html_e("Mailchimp Feeds", 'contact-form-mailchimp-crm') ?>" title="<?php esc_html_e("Mailchimp Feeds", 'contact-form-mailchimp-crm') ?>" src="<?php echo $this->get_base_url()?>images/mailchimp-crm-logo.png?ver=1" /> <?php | ||
| 93 | if(empty($id)){ | ||
| 94 | esc_html_e("Mailchimp Accounts", 'contact-form-mailchimp-crm'); | ||
| 95 | }else{ | ||
| 96 | esc_html_e("Mailchimp Account #", 'contact-form-mailchimp-crm'); echo $id; | ||
| 97 | } | ||
| 98 | if(empty($id) || $new_account_id != $id){ | ||
| 99 | ?> <a href="<?php echo $new_account ?>" class="add-new-h2" title="<?php esc_html_e('Add New Account','contact-form-mailchimp-crm'); ?>"><?php esc_html_e('Add New Account','contact-form-mailchimp-crm'); ?></a> | ||
| 100 | <?php | ||
| 101 | }if(!empty($id)){ | ||
| 102 | ?> | ||
| 103 | <a href="<?php echo $page_link ?>" class="add-new-h2" title="<?php esc_html_e('Back to Accounts','contact-form-mailchimp-crm'); ?>"><?php esc_html_e('Back to Accounts','contact-form-mailchimp-crm'); ?></a> | ||
| 104 | <?php | ||
| 105 | } | ||
| 106 | ?> | ||
| 107 | </h2> | ||
| 108 | <p style="text-align: left;"> <?php echo sprintf(esc_html__("If you don't have a Mailchimp account, you can %ssign up for one here%s.", 'contact-form-mailchimp-crm'), "<a href='https://www.mailchimp.com/' target='_blank' title='".__('Sign Up for Mailchimp CRM','contact-form-mailchimp-crm')."'>" , "</a>") ?> </p> | ||
| 109 | <?php | ||
| 110 | $this->show_msgs($msgs); | ||
| 111 | |||
| 112 | if(!empty($id)){ | ||
| 113 | $name=$this->post('name',$info); | ||
| 114 | include_once(self::$path . "templates/setting.php"); | ||
| 115 | }else{ | ||
| 116 | include_once(self::$path . "templates/settings-table.php"); | ||
| 117 | } | ||
| 118 | do_action('vx_plugin_upgrade_notice_'.$this->type); | ||
| 119 | ?> | ||
| 120 | <div> | ||
| 121 | |||
| 122 | |||
| 123 | </div> | ||
| 124 | </form> | ||
| 125 | |||
| 126 | </div> |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?> | ||
| 5 | |||
| 6 | <?php | ||
| 7 | $comments=false; | ||
| 8 | if( is_array($log_entry) && count($log_entry)>0){ | ||
| 9 | $objects=$this->get_all_objects(); | ||
| 10 | $log=$this->verify_log($log_entry,$objects); | ||
| 11 | $comments=true; | ||
| 12 | echo $this->format_log_msg($log); | ||
| 13 | } | ||
| 14 | if(isset($_GET['vx_debug'])){ | ||
| 15 | ?> | ||
| 16 | <input type="hidden" name="vx_debug" value="<?php echo esc_attr($_REQUEST['vx_debug']); ?>"> | ||
| 17 | <?php | ||
| 18 | } | ||
| 19 | ?> | ||
| 20 | <div class="box_btns_div"> | ||
| 21 | <button class="button" type="submit" name="<?php echo esc_attr($this->id) ?>_send_btn" value="yes"><?php echo esc_html__("Send to Mailchimp",'contact-form-mailchimp-crm')?></button> | ||
| 22 | <?php | ||
| 23 | if($comments ){ | ||
| 24 | ?> | ||
| 25 | <a href="<?php echo esc_url($log_url); ?>" class="button"><?php echo esc_html__("Go to Logs",'contact-form-mailchimp-crm')?></a> | ||
| 26 | <?php | ||
| 27 | } | ||
| 28 | ?> | ||
| 29 | </div> |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 5 | <html> | ||
| 6 | <head> | ||
| 7 | <meta http-equiv="Content-Type" content="text/html;" charset="UTF-8" /> | ||
| 8 | </head> | ||
| 9 | <body style="margin: 0px; background-color: #FFFFFF; font-family: Helvetica, Arial, sans-serif; font-size:12px;" text="#444444" bgcolor="#FFFFFF" link="#21759B" alink="#21759B" vlink="#21759B" marginheight="0" topmargin="0" marginwidth="0" leftmargin="0"><table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable" style="margin: 0;padding: 0;background-color: #EBEBEB;height: 100% !important;width: 100% !important;"> | ||
| 10 | <tbody><tr> | ||
| 11 | <td align="center" valign="top"> | ||
| 12 | <!-- // End Template Preheader \\ --> | ||
| 13 | <table border="0" cellpadding="0" cellspacing="0" width="600" style="border-top: 5px solid #C35050;" id="templateContainer"> | ||
| 14 | <tbody><tr> | ||
| 15 | <td align="center" valign="top" id="templateHeader" style="background-color: #FFFFFF;border-top: 0;border-bottom: 0px solid #D9D9D9;"> | ||
| 16 | <!-- // Begin Template Header \\ --> | ||
| 17 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
| 18 | <tbody><tr> | ||
| 19 | <td class="headerContent" style="color: #C35050;font-family: Helvetica;font-size: 20px;font-weight: bold;line-height: 100%;padding: 20px;text-align: left;vertical-align: middle; border-top:1px solid #B24747;"> | ||
| 20 | <span style="color:#C35050;"><span style="font-size:24px">{title}</span></span> | ||
| 21 | |||
| 22 | </td> | ||
| 23 | </tr> | ||
| 24 | <tr><td> <p style="padding-left: 10px; padding-bottom: 20px;color: #303030;font-family: Helvetica;font-size: 15px;line-height: 150%;text-align: left;">{msg}</p> | ||
| 25 | </tbody></table> | ||
| 26 | <!-- // End Template Header \\ --> | ||
| 27 | </td> | ||
| 28 | </tr> | ||
| 29 | <tr> | ||
| 30 | <td align="center" valign="top"> | ||
| 31 | <!-- // Begin Template Body \\ --> | ||
| 32 | <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody" style="background-color: #FFFFFF;border-top: 0;border-bottom: 1px solid #CACACA;"> | ||
| 33 | <tbody> | ||
| 34 | {sf_contents} | ||
| 35 | <tr><td valign="top" style="padding: 40px"></td></tr> | ||
| 36 | </tbody></table> | ||
| 37 | <!-- // End Template Body \\ --> | ||
| 38 | </td> | ||
| 39 | </tr> | ||
| 40 | </tbody></table> | ||
| 41 | </td> | ||
| 42 | </tr> | ||
| 43 | |||
| 44 | </tbody></table> | ||
| 45 | </body> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?><div class="vx_div"> | ||
| 5 | <div class="vx_head"> | ||
| 6 | <div class="crm_head_div"> <?php esc_html_e('4. Select the Object to create when a form is submitted.', 'contact-form-mailchimp-crm'); ?></div> | ||
| 7 | <div class="crm_btn_div" title="<?php esc_html_e('Expand / Collapse','contact-form-mailchimp-crm') ?>"><i class="fa crm_toggle_btn vx_action_btn fa-minus"></i></div> | ||
| 8 | <div class="crm_clear"></div> | ||
| 9 | </div> | ||
| 10 | |||
| 11 | <div class="vx_group"> | ||
| 12 | <div class="vx_row"> | ||
| 13 | <div class="vx_col1"> | ||
| 14 | <label for="vx_module" class="left_header"><?php esc_html_e("Mailchimp List", 'contact-form-mailchimp-crm'); ?> | ||
| 15 | <?php $this->tooltip("vx_sel_object") ?> | ||
| 16 | </label> | ||
| 17 | </div> | ||
| 18 | <div class="vx_col2"> | ||
| 19 | <select id="vx_module" class="load_form crm_sel" name="object" autocomplete="off"> | ||
| 20 | <option value=""><?php esc_html_e("Select a Mailchimp List", 'contact-form-mailchimp-crm'); ?></option> | ||
| 21 | <?php | ||
| 22 | foreach ($objects as $k=>$v){ | ||
| 23 | $sel=$feed['object'] == $k ? 'selected="selected"' : ""; | ||
| 24 | |||
| 25 | ?> | ||
| 26 | <option value="<?php echo esc_attr($k) ?>" <?php echo $sel; ?>><?php echo esc_html($v) ?></option> | ||
| 27 | <?php | ||
| 28 | } | ||
| 29 | ?> | ||
| 30 | </select> | ||
| 31 | <span style="margin-left: 10px;"></span> | ||
| 32 | <button class="button" id="vx_refresh_objects" title="<?php esc_html_e('Refresh Lists','contact-form-mailchimp-crm'); ?>"> | ||
| 33 | <span class="reg_ok"><i class="fa fa-refresh"></i> <?php esc_html_e('Refresh Lists','contact-form-mailchimp-crm') ?></span> | ||
| 34 | <span class="reg_proc"><i class="fa fa-refresh fa-spin"></i> <?php esc_html_e('Refreshing...','contact-form-mailchimp-crm') ?></span> | ||
| 35 | </button> | ||
| 36 | <button class="button" id="vx_refresh_fields" title="<?php esc_html_e('Refresh Fields','contact-form-mailchimp-crm'); ?>"> | ||
| 37 | <span class="reg_ok"><i class="fa fa-refresh"></i> <?php esc_html_e('Refresh Fields','contact-form-mailchimp-crm') ?></span> | ||
| 38 | <span class="reg_proc"><i class="fa fa-refresh fa-spin"></i> <?php esc_html_e('Refreshing...','contact-form-mailchimp-crm') ?></span> | ||
| 39 | </button> | ||
| 40 | </div> | ||
| 41 | <div class="clear"></div> | ||
| 42 | </div> | ||
| 43 | </div> | ||
| 44 | </div> | ||
| 45 | |||
| 46 | <div id="crm_ajax_div" style="display:none; text-align: center; line-height: 100px;"><i> <?php esc_html_e('Loading, Please Wait...','contact-form-mailchimp-crm'); ?></i></div> | ||
| 47 | <div id="crm_err_div" class="alert_danger" style="display:none;"></div> | ||
| 48 | <div id="crm_field_group" style="<?php if($object == "" || $form_id == "") {echo 'display:none';} ?>"> | ||
| 49 | <?php | ||
| 50 | if(!empty($object) && !empty($form_id)){ | ||
| 51 | $this->get_field_mapping($feed,$info); | ||
| 52 | } | ||
| 53 | ?> | ||
| 54 | </div> | ||
| 55 |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?> <style type="text/css"> | ||
| 5 | .user-list tr { | ||
| 6 | cursor: move; | ||
| 7 | } | ||
| 8 | .user-list tr td a { | ||
| 9 | cursor: pointer; | ||
| 10 | } | ||
| 11 | .user-list tr:nth-child(even) { | ||
| 12 | background-color: #f5f5f5; | ||
| 13 | } | ||
| 14 | .vx_col{ | ||
| 15 | width: 35px; padding-top: 12px !important; text-align: center; cursor: auto; | ||
| 16 | } | ||
| 17 | .vx_date{ | ||
| 18 | width: 18%; | ||
| 19 | } | ||
| 20 | .ui-sortable-helper { | ||
| 21 | display: table; | ||
| 22 | background: #eee; | ||
| 23 | } | ||
| 24 | |||
| 25 | </style> | ||
| 26 | <div class="vx_wrap"> | ||
| 27 | <h2 class="vx_img_head"><img alt="<?php esc_html_e("Mailchimp Feeds", 'contact-form-mailchimp-crm') ?>" title="<?php esc_html_e("Mailchimp Feeds", 'contact-form-mailchimp-crm') ?>" src="<?php echo $this->get_base_url()?>images/mailchimp-crm-logo.png?ver=1" /> <?php esc_html_e("Mailchimp Feeds", 'contact-form-mailchimp-crm'); ?> <a class="page-title-action" href="<?php echo $new_feed_link?>"> | ||
| 28 | <?php esc_html_e("Add New", 'contact-form-mailchimp-crm') ?> | ||
| 29 | </a> </h2> | ||
| 30 | <div class="clear"></div> | ||
| 31 | <?php | ||
| 32 | if(!$valid_accounts){ | ||
| 33 | ?> | ||
| 34 | <div class="error below-h2" id="message" style="margin-top:20px;"> | ||
| 35 | <p><?php echo sprintf( esc_html__("To get started, please configure your %s Mailchimp Settings %s.", 'contact-form-mailchimp-crm'), '<a href="'.esc_url($page_link).'">', "</a>") ?></p> | ||
| 36 | </div> | ||
| 37 | <?php | ||
| 38 | } | ||
| 39 | ?> | ||
| 40 | |||
| 41 | <form id="feed_form" method="post"> | ||
| 42 | <?php wp_nonce_field('vx_crm_ajax') ?> | ||
| 43 | <input type="hidden" id="action" name="action"/> | ||
| 44 | <input type="hidden" id="action_argument" name="action_argument"/> | ||
| 45 | <div class="tablenav"> | ||
| 46 | <div class="alignleft actions" style="padding:8px 0 7px; "> | ||
| 47 | <label class="hidden" for="bulk_action"> | ||
| 48 | <?php esc_html_e("Bulk action", 'contact-form-mailchimp-crm') ?> | ||
| 49 | </label> | ||
| 50 | <select name="bulk_action" id="bulk_action" style="width: 200px"> | ||
| 51 | <option value=''> | ||
| 52 | <?php esc_html_e("Bulk action", 'contact-form-mailchimp-crm') ?> | ||
| 53 | </option> | ||
| 54 | <option value='delete'> | ||
| 55 | <?php esc_html_e("Delete", 'contact-form-mailchimp-crm') ?> | ||
| 56 | </option> | ||
| 57 | </select> | ||
| 58 | <button type="submit" title="<?php esc_html_e("Apply Action", 'contact-form-mailchimp-crm') ?>" class="button" id="vx_bulk_actions_submit"> | ||
| 59 | <?php esc_html_e("Apply", 'contact-form-mailchimp-crm') ?> | ||
| 60 | </button> | ||
| 61 | </div> | ||
| 62 | </div> | ||
| 63 | <table class="widefat fixed sort" cellspacing="0"> | ||
| 64 | <thead> | ||
| 65 | <tr> | ||
| 66 | <td id="cb" class="column-cb check-column" style=""><input type="checkbox" /></td> | ||
| 67 | <th id="active" class="vx_col"></th> | ||
| 68 | <th><?php esc_html_e("Name", 'contact-form-mailchimp-crm') ?></th> | ||
| 69 | <th><?php esc_html_e("Mailchimp Object", 'contact-form-mailchimp-crm') ?></th> | ||
| 70 | <th><?php esc_html_e("Primary Key", 'contact-form-mailchimp-crm'); ?></th> | ||
| 71 | <th class="vx_date"><?php esc_html_e("Created", 'contact-form-mailchimp-crm') ?></th> | ||
| 72 | </tr> | ||
| 73 | </thead> | ||
| 74 | <tfoot> | ||
| 75 | <tr> | ||
| 76 | <td id="cb" class="column-cb check-column" style=""><input type="checkbox" /></td> | ||
| 77 | <th id="active" class="vx_col"></th> | ||
| 78 | <th><?php esc_html_e("Name", 'contact-form-mailchimp-crm') ?></th> | ||
| 79 | <th><?php esc_html_e("Mailchimp Object", 'contact-form-mailchimp-crm') ?></th> | ||
| 80 | <th><?php esc_html_e("Primary Key", 'contact-form-mailchimp-crm'); ?></th> | ||
| 81 | <th class="vx_date"><?php esc_html_e("Created", 'contact-form-mailchimp-crm') ?></th> | ||
| 82 | </tr> | ||
| 83 | </tfoot> | ||
| 84 | <tbody class="list:user user-list"> | ||
| 85 | <?php | ||
| 86 | |||
| 87 | if(is_array($feeds) && !empty($feeds)){ | ||
| 88 | $objects=$this->get_objects(); | ||
| 89 | foreach($feeds as $feed){ | ||
| 90 | $data=$this->post('data',$feed); | ||
| 91 | $meta=$this->post('meta',$feed); | ||
| 92 | $data=json_decode($data,true); | ||
| 93 | $fields=json_decode($meta,true); | ||
| 94 | $fields=$this->post('fields',$fields); | ||
| 95 | $primary_key=!empty($data['primary_key']) && isset($fields[$data['primary_key']]['label']) ? $fields[$data['primary_key']]['label'] : esc_html__('N/A','contact-form-mailchimp-crm'); | ||
| 96 | $edit_link=$this->get_feed_link($feed['id']); | ||
| 97 | if(isset($objects[$feed['object']])){ | ||
| 98 | $feed['object']=$objects[$feed['object']]; | ||
| 99 | }else{ | ||
| 100 | $feed['object']=''; | ||
| 101 | } | ||
| 102 | ?> | ||
| 103 | <tr class='author-self status-inherit' data-id="<?php echo $feed['id'] ?>"> | ||
| 104 | <th scope="row" class="check-column"><input type="checkbox" class="vx_check" name="feed[]" value="<?php echo $feed["id"] ?>"/></th> | ||
| 105 | <td class="vx_col"><img src="<?php echo $this->get_base_url() ?>images/active<?php echo intval($feed["is_active"]) ?>.png" alt="<?php echo $feed["is_active"] ? esc_html__("Active", 'contact-form-mailchimp-crm') : esc_html__("Inactive", 'contact-form-mailchimp-crm');?>" title="<?php echo $feed["is_active"] ? esc_html__("Active", 'contact-form-mailchimp-crm') : esc_html__("Inactive", 'contact-form-mailchimp-crm');?>" class="vx_toggle_status" /></td> | ||
| 106 | <td><a href="<?php echo $edit_link ?>" title="<?php echo esc_html( $feed["name"] ) ?>"><?php echo esc_attr($feed["name"]) ?></a> | ||
| 107 | |||
| 108 | <div class="row-actions"> <span class="edit"> | ||
| 109 | <a title="<?php esc_attr_e("Edit Settings", 'contact-form-mailchimp-crm') ?>" href="<?php echo $edit_link ?>"> | ||
| 110 | <?php esc_html_e("Edit", 'contact-form-mailchimp-crm') ?> | ||
| 111 | </a> | | ||
| 112 | </span> | ||
| 113 | <span class="edit"> | ||
| 114 | <a title="<?php esc_html_e("Delete", 'contact-form-mailchimp-crm') ?>" href="#" class="vx_del_feed"> | ||
| 115 | <?php esc_html_e("Delete", 'contact-form-mailchimp-crm')?> | ||
| 116 | </a> | ||
| 117 | </span> | ||
| 118 | |||
| 119 | </div></td> | ||
| 120 | <td><p><?php echo $feed["object"]; ?></p></td> | ||
| 121 | <td><p><?php echo $primary_key; ?></p></td> | ||
| 122 | <td><p><?php echo date('M-d-Y H:i:s', strtotime($feed['time'])+$offset); ?></p></td> | ||
| 123 | </tr> | ||
| 124 | <?php | ||
| 125 | } | ||
| 126 | } | ||
| 127 | else { | ||
| 128 | if($valid_accounts){ | ||
| 129 | ?> | ||
| 130 | <tr> | ||
| 131 | <td colspan="4" style="padding:20px;"><?php echo sprintf(esc_html__("You don't have any Mailchimp feeds configured. Let's go %s create one %s!", 'contact-form-mailchimp-crm'), '<a href="'.$new_feed_link.'">', "</a>"); ?></td> | ||
| 132 | </tr> | ||
| 133 | <?php | ||
| 134 | } | ||
| 135 | else{ | ||
| 136 | ?> | ||
| 137 | <tr> | ||
| 138 | <td colspan="4" style="padding:20px;"><?php echo sprintf(esc_html__("To get started, please configure your %s Mailchimp Settings%s.", 'contact-form-mailchimp-crm'), '<a href="'.esc_url($page_link).'">', "</a>"); ?></td> | ||
| 139 | </tr> | ||
| 140 | <?php | ||
| 141 | } | ||
| 142 | } | ||
| 143 | ?> | ||
| 144 | </tbody> | ||
| 145 | </table> | ||
| 146 | </form> | ||
| 147 | </div> | ||
| 148 | |||
| 149 | <?php | ||
| 150 | do_action('vx_plugin_upgrade_notice_'.$this->type); | ||
| 151 | ?> | ||
| 152 | |||
| 153 | <script type="text/javascript"> | ||
| 154 | var vx_crm_nonce='<?php echo wp_create_nonce("vx_crm_ajax") ?>'; | ||
| 155 | |||
| 156 | (function( $ ) { | ||
| 157 | |||
| 158 | $(document).ready( function($) { | ||
| 159 | |||
| 160 | $(".vx_del_feed").click(function(e){ | ||
| 161 | e.preventDefault(); | ||
| 162 | if(!confirm("<?php esc_html_e("Delete this feed? 'Cancel' to stop, 'OK' to delete.", 'contact-form-mailchimp-crm') ?>")){ | ||
| 163 | return; | ||
| 164 | } | ||
| 165 | var id=$(this).closest('tr').data('id'); | ||
| 166 | jQuery("#action_argument").val(id); | ||
| 167 | jQuery("#action").val("delete"); | ||
| 168 | jQuery("#feed_form")[0].submit(); | ||
| 169 | }); | ||
| 170 | $(".vx_toggle_status").click(function(e){ | ||
| 171 | e.preventDefault(); | ||
| 172 | var feed_id; | ||
| 173 | var img=this; | ||
| 174 | var is_active = img.src.indexOf("active1.png") >=0 | ||
| 175 | var $img=$(this); | ||
| 176 | |||
| 177 | if(is_active){ | ||
| 178 | img.src=img.src.replace("active1.png", "active0.png"); | ||
| 179 | $img.attr('title','<?php esc_html_e("Inactive", 'contact-form-mailchimp-crm') ?>').attr('alt', '<?php esc_html_e("Inactive", 'contact-form-mailchimp-crm') ?>'); | ||
| 180 | } | ||
| 181 | else{ | ||
| 182 | img.src = img.src.replace("active0.png", "active1.png"); | ||
| 183 | $img.attr('title','<?php esc_html_e("Active", 'contact-form-mailchimp-crm') ?>').attr('alt', '<?php esc_html_e("Active", 'contact-form-mailchimp-crm') ?>'); | ||
| 184 | } | ||
| 185 | |||
| 186 | if(feed_id = $img.closest('tr').attr('data-id')) { | ||
| 187 | $.post(ajaxurl,{action:"update_feed_<?php echo esc_attr($this->id) ?>",vx_crm_ajax:vx_crm_nonce,feed_id:feed_id,is_active:is_active ? 0 : 1}) | ||
| 188 | } | ||
| 189 | }); | ||
| 190 | |||
| 191 | $("#vx_bulk_actions_submit").click(function(e){ | ||
| 192 | if($("#bulk_action").val() == ""){ | ||
| 193 | alert('<?php esc_html_e('Please Select Action','contact-form-mailchimp-crm') ?>'); | ||
| 194 | return false; | ||
| 195 | } | ||
| 196 | if($(".vx_check:checked").length == 0){ | ||
| 197 | alert('<?php esc_html_e('Please Select Feed','contact-form-mailchimp-crm') ?>'); | ||
| 198 | return false; | ||
| 199 | } | ||
| 200 | if(!confirm('<?php esc_html_e("Are you sure to Delete selected feeds?",'contact-form-mailchimp-crm'); ?>' )){ | ||
| 201 | return false; | ||
| 202 | } | ||
| 203 | }) | ||
| 204 | $('.sort tbody').sortable({ | ||
| 205 | axis: 'y', | ||
| 206 | helper: "clone", | ||
| 207 | helper: function(e, tr) | ||
| 208 | { | ||
| 209 | var $originals = tr.children(); | ||
| 210 | var $helper = tr.clone(); | ||
| 211 | $helper.children().each(function(index) | ||
| 212 | { | ||
| 213 | // Set helper cell sizes to match the original sizes | ||
| 214 | $(this).width($originals.eq(index).width()); | ||
| 215 | }); | ||
| 216 | return $helper; | ||
| 217 | }, | ||
| 218 | update: function(event, ui){ | ||
| 219 | var data = { | ||
| 220 | 'action': 'update_feed_sort_<?php echo esc_attr($this->id) ?>', | ||
| 221 | 'sort': [], | ||
| 222 | 'vx_crm_ajax': vx_crm_nonce, | ||
| 223 | }; | ||
| 224 | |||
| 225 | $(this).children().each(function(index, element) { | ||
| 226 | var id = $(element).attr('data-id') | ||
| 227 | data.sort.push(id); | ||
| 228 | }) | ||
| 229 | |||
| 230 | $.post( ajaxurl, data ); | ||
| 231 | |||
| 232 | } | ||
| 233 | }); | ||
| 234 | |||
| 235 | }); | ||
| 236 | |||
| 237 | }(jQuery)); | ||
| 238 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } | ||
| 5 | ?> | ||
| 6 | <div class="vxa_entry"> | ||
| 7 | <div> | ||
| 8 | <div class="crm_panel crm_panel_50"> | ||
| 9 | <div class="crm_panel_head"> | ||
| 10 | <div class="crm_head_div"><span class="crm_head_text"><?php esc_html_e('Data Sent','contact-form-mailchimp-crm') ?></span></div> | ||
| 11 | <div class="crm_btn_div" title="<?php esc_html_e('Expand / Collapse','contact-form-mailchimp-crm'); ?>"><i class="fa crm_toggle_btn fa-minus"></i></div> | ||
| 12 | <div class="crm_clear"></div> | ||
| 13 | </div> | ||
| 14 | <div class="crm_panel_content crm-block-content"> | ||
| 15 | <?php | ||
| 16 | |||
| 17 | if(is_array($data) && count($data)>0){ | ||
| 18 | foreach($data as $k=>$v){ | ||
| 19 | $label=isset($v['label']) ? $v['label'] : $k; | ||
| 20 | $value=$v; | ||
| 21 | if(is_array($v) && isset($v['value'])){ | ||
| 22 | $value=$v['value']; | ||
| 23 | } | ||
| 24 | if(is_array($value)){ | ||
| 25 | $value=json_encode($v); | ||
| 26 | } | ||
| 27 | |||
| 28 | ?> | ||
| 29 | <div class="entry_row"> | ||
| 30 | <div class="entry_col1 vx_label"><span title="<?php echo esc_attr($k) ?>"><?php echo esc_html($label); ?></span></div> | ||
| 31 | <div class="entry_col2"><?php echo is_array($value) ? esc_html(json_encode($value)) : esc_html($value) ?></div> | ||
| 32 | <div class="crm_clear"></div> | ||
| 33 | </div> | ||
| 34 | <?php | ||
| 35 | } | ||
| 36 | }else{ | ||
| 37 | ?> | ||
| 38 | <div class="vx_error"><i class="fa fa-warning"></i> <?php esc_html_e('Nothing Posted to Mailchimp','contact-form-mailchimp-crm');?></div> | ||
| 39 | <?php | ||
| 40 | } | ||
| 41 | ?> | ||
| 42 | </div></div> | ||
| 43 | <?php | ||
| 44 | if(is_array($response) && count($response)>0){ | ||
| 45 | $error=false; | ||
| 46 | ?> | ||
| 47 | <div class="crm_panel crm_panel_50"> | ||
| 48 | <div class="crm_panel_head"> | ||
| 49 | <div class="crm_head_div"><span class="crm_head_text"><?php esc_html_e('Mailchimp Response','contact-form-mailchimp-crm') ?></span></div> | ||
| 50 | <div class="crm_btn_div" title="<?php esc_html_e('Expand / Collapse','contact-form-mailchimp-crm'); ?>"><i class="fa crm_toggle_btn fa-minus"></i></div> | ||
| 51 | <div class="crm_clear"></div> | ||
| 52 | </div> | ||
| 53 | <div class="crm_panel_content crm-block-content"> | ||
| 54 | <?php | ||
| 55 | foreach($response as $k=>$v){ | ||
| 56 | ?> | ||
| 57 | <div class="entry_row"> | ||
| 58 | <div class="entry_col1 vx_label"><?php echo esc_attr($k) ?></div> | ||
| 59 | <div class="entry_col2"><?php echo is_array($v) ? json_encode($v) : $v ?></div> | ||
| 60 | <div class="crm_clear"></div> | ||
| 61 | </div> | ||
| 62 | <?php | ||
| 63 | } | ||
| 64 | ?> | ||
| 65 | </div></div> | ||
| 66 | <?php | ||
| 67 | } | ||
| 68 | if(is_array($extra) && count($extra)>0){ | ||
| 69 | $detail_class=!$error ? 'crm_panel_100' : 'crm_panel_50'; | ||
| 70 | $error=false; | ||
| 71 | ?> | ||
| 72 | <div class="crm_panel <?php echo esc_attr($detail_class) ?>"> | ||
| 73 | <div class="crm_panel_head"> | ||
| 74 | <div class="crm_head_div"><span class="crm_head_text"><?php esc_html_e('More Detail','contact-form-mailchimp-crm') ?></span></div> | ||
| 75 | <div class="crm_btn_div" title="<?php esc_html_e('Expand / Collapse','contact-form-mailchimp-crm'); ?>"><i class="fa crm_toggle_btn fa-minus"></i></div> | ||
| 76 | <div class="crm_clear"></div> | ||
| 77 | </div> | ||
| 78 | <div class="crm_panel_content crm-block-content"> | ||
| 79 | <?php | ||
| 80 | foreach($extra as $k=>$v){ | ||
| 81 | ?> | ||
| 82 | <div class="entry_row"> | ||
| 83 | <div class="entry_col1 vx_label"><?php echo isset($labels[$k]) ? esc_attr($labels[$k]) : esc_attr($k) ?></div> | ||
| 84 | <div class="entry_col2"><?php | ||
| 85 | if($k == "filter"){ | ||
| 86 | if(is_array($v)){ | ||
| 87 | $or_count=0; | ||
| 88 | foreach($v as $or){ | ||
| 89 | if(is_array($or)){ | ||
| 90 | if($or_count>0){ echo "<div class='vx_or '>OR</div>";} | ||
| 91 | $or_count++; | ||
| 92 | $and_count=0; | ||
| 93 | foreach($or as $con){ | ||
| 94 | $con['field']=$this->get_gf_field_label($form_id,$con['field']); | ||
| 95 | $icon="times"; $color="vx_red"; | ||
| 96 | if($con['check'] == "true"){ | ||
| 97 | $icon="check"; $color="vx_green"; | ||
| 98 | } | ||
| 99 | $op=isset($vx_ops[$con['op']]) ? $vx_ops[$con['op']] : $con['op']; | ||
| 100 | if($and_count>0){ echo "<div class='vx_or'>AND</div>";} | ||
| 101 | echo "<i class='fa fa-".$icon." vx_left_2'></i> ".esc_html($con['field'])." ( <span class='vx_val'>".esc_html($con['input'])."</span> ) <code>".esc_html($op)."</code> <span class='vx_val'>".esc_html($con['field_val'])."</span>"; | ||
| 102 | $and_count++; | ||
| 103 | } | ||
| 104 | } | ||
| 105 | } | ||
| 106 | } | ||
| 107 | }else{ | ||
| 108 | echo is_array($v) ? esc_html(json_encode($v)) : esc_html($v); | ||
| 109 | } ?></div> | ||
| 110 | <div class="crm_clear"></div> | ||
| 111 | </div> | ||
| 112 | <?php | ||
| 113 | } | ||
| 114 | ?> | ||
| 115 | </div></div> | ||
| 116 | <?php | ||
| 117 | } | ||
| 118 | if($error){ | ||
| 119 | ?> | ||
| 120 | <div class="vx_error"><i class="fa fa-warning"></i> <?php esc_html_e('Detail Not Found','contact-form-mailchimp-crm');?></div> | ||
| 121 | <?php | ||
| 122 | } ?> | ||
| 123 | <div style="clear: both"></div> | ||
| 124 | </div> | ||
| 125 | <div class="vx_log_detail_footer"> | ||
| 126 | <?php | ||
| 127 | if($log['feed_id']!=""){ | ||
| 128 | $feed_link=$this->get_feed_link($log['feed_id'],$log['form_id']); | ||
| 129 | ?> | ||
| 130 | <a href="<?php echo esc_url($feed_link) ?>" title="<?php esc_html_e('Edit Feed','contact-form-mailchimp-crm') ?>" class="button"><i class="fa fa-edit"></i> <?php esc_html_e('Edit Feed','contact-form-mailchimp-crm') ?></a> | ||
| 131 | <?php | ||
| 132 | } | ||
| 133 | ?> | ||
| 134 | <a href="<?php echo esc_url($log_link) ?>" title="<?php esc_html_e('Open in New Window','contact-form-mailchimp-crm') ?>" target="_blank" class="button"><i class="fa fa-external-link"></i> <?php esc_html_e('Open in New Window','contact-form-mailchimp-crm') ?></a> | ||
| 135 | <a href="#" class="button vx_close_detail" title="<?php esc_html_e('Close','contact-form-mailchimp-crm') ?>"><i class="fa fa-times"></i> <?php esc_html_e('Close','contact-form-mailchimp-crm') ?></a> | ||
| 136 | |||
| 137 | </div> | ||
| 138 | </div> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?><div class="crm_fields_table"> | ||
| 5 | <div class="crm_field"> | ||
| 6 | <div class="crm_field_cell1"><label for="vx_name"><?php esc_html_e("Account Name",'contact-form-mailchimp-crm'); ?></label> | ||
| 7 | </div> | ||
| 8 | <div class="crm_field_cell2"> | ||
| 9 | <input type="text" name="crm[name]" value="<?php echo !empty($name) ? esc_html($name) : 'Account #'.esc_html($id); ?>" id="vx_name" class="crm_text"> | ||
| 10 | |||
| 11 | </div> | ||
| 12 | <div class="clear"></div> | ||
| 13 | </div> | ||
| 14 | |||
| 15 | <?php if(isset($info['api_token']) && $info['api_token']!="") { | ||
| 16 | ?> | ||
| 17 | <div class="crm_field"> | ||
| 18 | <div class="crm_field_cell1"><label><?php esc_html_e("Test Connection",'contact-form-mailchimp-crm'); ?></label></div> | ||
| 19 | <div class="crm_field_cell2"> <button type="submit" class="button button-secondary" name="vx_test_connection"><i class="fa fa-refresh"></i> <?php esc_html_e("Test Connection",'contact-form-mailchimp-crm'); ?></button> | ||
| 20 | </div> | ||
| 21 | <div class="clear"></div> | ||
| 22 | </div> | ||
| 23 | <?php | ||
| 24 | } | ||
| 25 | ?> | ||
| 26 | <div class="crm_field"> | ||
| 27 | <div class="crm_field_cell1"><label for="vx_pass"><?php esc_html_e('API Key','contact-form-mailchimp-crm'); ?></label></div> | ||
| 28 | <div class="crm_field_cell2"> | ||
| 29 | <div class="vx_tr" > | ||
| 30 | <div class="vx_td"> | ||
| 31 | <input type="password" id="vx_pass" name="crm[api_key]" class="crm_text" placeholder="<?php esc_html_e('API Key','contact-form-mailchimp-crm'); ?>" value="<?php echo $this->post('api_key',$info); ?>" required> | ||
| 32 | </div> | ||
| 33 | <div class="vx_td2"> | ||
| 34 | <a href="#" class="button vx_toggle_btn vx_toggle_key" title="<?php esc_html_e('Toggle Key','contact-form-mailchimp-crm'); ?>"><?php esc_html_e('Show Key','contact-form-mailchimp-crm') ?></a> | ||
| 35 | |||
| 36 | </div> | ||
| 37 | </div> | ||
| 38 | </div> | ||
| 39 | <div class="clear"></div> | ||
| 40 | </div> | ||
| 41 | <div class="crm_field"> | ||
| 42 | <div class="crm_field_cell1"><label for="vx_error_email"><?php esc_html_e("Notify by Email on Errors",'contact-form-mailchimp-crm'); ?></label></div> | ||
| 43 | <div class="crm_field_cell2"><textarea name="crm[error_email]" id="vx_error_email" placeholder="<?php esc_html_e("Enter comma separated email addresses",'contact-form-mailchimp-crm'); ?>" class="crm_text" style="height: 70px"><?php echo isset($info['error_email']) ? esc_html($info['error_email']) : ""; ?></textarea> | ||
| 44 | <span class="howto"><?php esc_html_e("Enter comma separated email addresses. An email will be sent to these email addresses if an order is not properly added to Mailchimp. Leave blank to disable.",'contact-form-mailchimp-crm'); ?></span> | ||
| 45 | </div> | ||
| 46 | <div class="clear"></div> | ||
| 47 | </div> | ||
| 48 | |||
| 49 | |||
| 50 | <button type="submit" value="save" class="button-primary" title="<?php esc_html_e('Save Changes','contact-form-mailchimp-crm'); ?>" name="save"><?php esc_html_e('Save Changes','contact-form-mailchimp-crm'); ?></button> | ||
| 51 | </div> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } | ||
| 5 | wp_enqueue_script('vx-sorter'); | ||
| 6 | ?><style type="text/css"> | ||
| 7 | .vx_red{ | ||
| 8 | color: #E31230; | ||
| 9 | } | ||
| 10 | .vx_green{ | ||
| 11 | color:rgb(0, 132, 0); | ||
| 12 | } | ||
| 13 | .crm_fields_table input , .crm_fields_table select{ | ||
| 14 | margin: 0px; | ||
| 15 | } | ||
| 16 | .vx_accounts_table .vx_pointer{ | ||
| 17 | cursor: pointer; | ||
| 18 | } | ||
| 19 | .vx_accounts_table .fa-caret-up , .vx_accounts_table .fa-caret-down{ | ||
| 20 | display: none; | ||
| 21 | } | ||
| 22 | .vx_accounts_table th.headerSortUp .fa-caret-down{ | ||
| 23 | display: inline; | ||
| 24 | } | ||
| 25 | .vx_accounts_table th.headerSortDown .fa-caret-up{ | ||
| 26 | display: inline; | ||
| 27 | } | ||
| 28 | </style> | ||
| 29 | <table class="widefat fixed sort striped vx_accounts_table" style="margin: 20px 0 50px 0"> | ||
| 30 | <thead> | ||
| 31 | <tr> <th class="manage-column column-cb vx_pointer" style="width: 30px" ><?php esc_html_e("#",'contact-form-mailchimp-crm'); ?> <i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></th> | ||
| 32 | <th class="manage-column vx_pointer"> <?php esc_html_e("Account",'contact-form-mailchimp-crm'); ?> <i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></th> | ||
| 33 | <th class="manage-column"> <?php esc_html_e("Status",'contact-form-mailchimp-crm'); ?> </th> | ||
| 34 | <th class="manage-column vx_pointer"> <?php esc_html_e("Created",'contact-form-mailchimp-crm'); ?> <i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></th> | ||
| 35 | <th class="manage-column vx_pointer"> <?php esc_html_e("Last Connection",'contact-form-mailchimp-crm'); ?> <i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></th> | ||
| 36 | <th class="manage-column"> <?php esc_html_e("Action",'contact-form-mailchimp-crm'); ?> </th> </tr> | ||
| 37 | </thead> | ||
| 38 | <tbody> | ||
| 39 | <?php | ||
| 40 | |||
| 41 | $nonce=wp_create_nonce("vx_nonce"); | ||
| 42 | if(is_array($accounts) && count($accounts) > 0){ | ||
| 43 | $sno=0; | ||
| 44 | foreach($accounts as $id=>$v){ | ||
| 45 | $sno++; $id=$v['id']; | ||
| 46 | $icon= $v['status'] == "1" ? 'fa-check vx_green' : 'fa-times vx_red'; | ||
| 47 | $icon_title= $v['status'] == "1" ? esc_html__('Connected','contact-form-mailchimp-crm') : esc_html__('Disconnected','contact-form-mailchimp-crm'); | ||
| 48 | ?> | ||
| 49 | <tr> <td><?php echo esc_attr($id) ?></td> <td> <?php echo esc_html($v['name']) ?></td> | ||
| 50 | <td> <i class="fa <?php echo esc_attr($icon) ?>" title="<?php echo esc_attr($icon_title) ?>"></i> </td> <td> <?php echo date('M-d-Y H:i:s', strtotime($v['time'])+$offset); ?> </td> | ||
| 51 | <td> <?php echo date('M-d-Y H:i:s', strtotime($v['updated'])+$offset); ?> </td> | ||
| 52 | <td><span class="row-actions visible"> <a href="<?php echo esc_url($page_link."&id=".$id); ?>"><?php | ||
| 53 | if($v['status'] == "1"){ | ||
| 54 | _e('View','contact-form-mailchimp-crm'); | ||
| 55 | }else{ | ||
| 56 | _e('Edit','contact-form-mailchimp-crm'); | ||
| 57 | } | ||
| 58 | ?></a> | <span class="delete"><a href="<?php echo esc_url($page_link.'&'.$this->id.'_tab_action=del_account&id='.$id.'&vx_nonce='.$nonce) ?>" class="vx_del_account" > <?php esc_html_e("Delete",'contact-form-mailchimp-crm'); ?> </a></span></span> </td> </tr> | ||
| 59 | <?php | ||
| 60 | } }else{ | ||
| 61 | ?> | ||
| 62 | <tr><td colspan="6"><p><?php echo sprintf(esc_html__("No Mailchimp Account Found. %sAdd New Account%s",'contact-form-mailchimp-crm'),'<a href="'.esc_url($new_account).'">','</a>'); ?></p></td></tr> | ||
| 63 | <?php | ||
| 64 | } | ||
| 65 | ?> | ||
| 66 | </tbody> | ||
| 67 | <tfoot> | ||
| 68 | <tr> <th class="manage-column column-cb" style="width: 30px" ><?php esc_html_e("#",'contact-form-mailchimp-crm'); ?></th> | ||
| 69 | <th class="manage-column"> <?php esc_html_e("Account",'contact-form-mailchimp-crm'); ?> </th> | ||
| 70 | <th class="manage-column"> <?php esc_html_e("Status",'contact-form-mailchimp-crm'); ?> </th> | ||
| 71 | <th class="manage-column"> <?php esc_html_e("Created",'contact-form-mailchimp-crm'); ?> </th> | ||
| 72 | <th class="manage-column"> <?php esc_html_e("Last Connection",'contact-form-mailchimp-crm'); ?> </th> | ||
| 73 | <th class="manage-column"> <?php esc_html_e("Action",'contact-form-mailchimp-crm'); ?> </th> </tr> | ||
| 74 | </tfoot> | ||
| 75 | </table> | ||
| 76 | <script> | ||
| 77 | jQuery(document).ready(function($){ | ||
| 78 | $('.vx_accounts_table').tablesorter( {headers: { 2:{sorter: false}, 5:{sorter: false}}} ); | ||
| 79 | $(".vx_del_account").click(function(e){ | ||
| 80 | if(!confirm('<?php esc_html_e('Are you sure to delete Account ?','contact-form-mailchimp-crm') ?>')){ | ||
| 81 | e.preventDefault(); | ||
| 82 | } | ||
| 83 | }) | ||
| 84 | }) | ||
| 85 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | <?php | ||
| 2 | if ( ! defined( 'ABSPATH' ) ) { | ||
| 3 | exit; | ||
| 4 | } ?> <style type="text/css"> | ||
| 5 | .crm_fields_table{ | ||
| 6 | width: 100%; margin-top: 30px; | ||
| 7 | }.crm_fields_table .crm_field_cell1 label{ | ||
| 8 | font-weight: bold; font-size: 14px; | ||
| 9 | } | ||
| 10 | .crm_fields_table .clear{ | ||
| 11 | clear: both; | ||
| 12 | } | ||
| 13 | .crm_fields_table .crm_field{ | ||
| 14 | margin: 20px 0px; | ||
| 15 | } | ||
| 16 | .crm_fields_table .crm_text{ | ||
| 17 | width: 100%; | ||
| 18 | } | ||
| 19 | .crm_fields_table .crm_field_cell1{ | ||
| 20 | width: 20%; min-width: 100px; float: left; display: inline-block; | ||
| 21 | line-height: 26px; | ||
| 22 | } | ||
| 23 | .crm_fields_table .crm_field_cell2{ | ||
| 24 | width: 80%; float: left; display: inline-block; | ||
| 25 | } | ||
| 26 | .vxc_alert{ | ||
| 27 | padding: 10px 20px; | ||
| 28 | } | ||
| 29 | .vx_icons{ | ||
| 30 | color: #888; | ||
| 31 | } | ||
| 32 | .vx_green{ | ||
| 33 | color:rgb(0, 132, 0); | ||
| 34 | } | ||
| 35 | #tiptip_content{ | ||
| 36 | max-width: 200px; | ||
| 37 | } | ||
| 38 | .vx_tr{ | ||
| 39 | display: table; width: 100%; | ||
| 40 | } | ||
| 41 | .vx_td{ | ||
| 42 | display: table-cell; width: 90%; | ||
| 43 | } | ||
| 44 | .vx_td2{ | ||
| 45 | display: table-cell; | ||
| 46 | } | ||
| 47 | .crm_field .vx_td2 .vx_toggle_btn{ | ||
| 48 | margin: 0 0 0 10px; vertical-align: baseline; width: 80px; | ||
| 49 | } | ||
| 50 | |||
| 51 | </style> | ||
| 52 | |||
| 53 | <div class="vx_wrap"> | ||
| 54 | |||
| 55 | <form id="mainform" method="post"> | ||
| 56 | <?php wp_nonce_field("vx_nonce") ?> | ||
| 57 | <h2> | ||
| 58 | <?php esc_html_e("Settings", 'contact-form-mailchimp-crm') ?> | ||
| 59 | </h2> | ||
| 60 | <table class="form-table"> | ||
| 61 | <tr> | ||
| 62 | <th scope="row"><label for="vx_plugin_data"><?php esc_html_e("Plugin Data", 'contact-form-mailchimp-crm'); ?></label> | ||
| 63 | </th> | ||
| 64 | <td> | ||
| 65 | <label for="vx_plugin_data"><input type="checkbox" name="meta[plugin_data]" value="yes" <?php if($this->post('plugin_data',$meta) == "yes"){echo 'checked="checked"';} ?> id="vx_plugin_data"><?php esc_html_e('On deleting this plugin remove all of its data','contact-form-mailchimp-crm'); ?></label> | ||
| 66 | </td> | ||
| 67 | </tr> | ||
| 68 | |||
| 69 | |||
| 70 | <?php | ||
| 71 | if(class_exists('vxcf_form')){ | ||
| 72 | ?> | ||
| 73 | <tr> | ||
| 74 | <th><label for="update_entry"><?php esc_html_e("Update Entry",'contact-form-mailchimp-crm'); ?></label></th> | ||
| 75 | <td><label for="update_entry"><input type="checkbox" id="update_entry" name="meta[update]" value="yes" <?php if($this->post('update',$meta) == "yes"){echo 'checked="checked"';} ?> ><?php esc_html_e("Update entry data in Mailchimp when updated in Contact Form Entries Plugin",'contact-form-mailchimp-crm'); ?></label></td> | ||
| 76 | </tr> | ||
| 77 | <tr> | ||
| 78 | <th><label for="delet_entry"><?php esc_html_e("Delete Entry",'contact-form-mailchimp-crm'); ?></label></th> | ||
| 79 | <td><label for="delet_entry"><input type="checkbox" id="delet_entry" name="meta[delete]" value="yes" <?php if($this->post('delete',$meta) == "yes"){echo 'checked="checked"';} ?> ><?php esc_html_e("Delete entry data from Mailchimp when deleted from Contact Form Entries Plugin",'contact-form-mailchimp-crm'); ?></label></td> | ||
| 80 | </tr> | ||
| 81 | <tr> | ||
| 82 | <th><label for="restore_entry"><?php esc_html_e("Restore Entry",'contact-form-mailchimp-crm'); ?></label></th> | ||
| 83 | <td><label for="restore_entry"><input type="checkbox" id="restore_entry" name="meta[restore]" value="yes" <?php if($this->post('restore',$meta) == "yes"){echo 'checked="checked"';} ?> ><?php esc_html_e("Restore entry in Mailchimp when restored in Contact Form Entries Plugin",'contact-form-mailchimp-crm'); ?></label></td> | ||
| 84 | </tr> | ||
| 85 | <tr> | ||
| 86 | <th><label for="notes_meta"><?php esc_html_e("Entry Notes",'contact-form-mailchimp-crm'); ?></label></th> | ||
| 87 | <td><label for="notes_meta"><input type="checkbox" id="notes_meta" name="meta[notes]" value="yes" <?php if($this->post('notes',$meta) == "yes"){echo 'checked="checked"';} ?> ><?php esc_html_e("Add / delete notes to Mailchimp when added / deleted in Contact Form Entries Plugin",'contact-form-mailchimp-crm'); ?></label></td> | ||
| 88 | </tr> | ||
| 89 | |||
| 90 | <?php | ||
| 91 | } | ||
| 92 | ?> | ||
| 93 | </table> | ||
| 94 | |||
| 95 | <p class="submit"><input type="submit" name="save" class="button-primary" title="<?php esc_html_e('Save Settings','contact-form-mailchimp-crm'); ?>" value="<?php esc_html_e("Save Settings", 'contact-form-mailchimp-crm') ?>" /></p> | ||
| 96 | </form> | ||
| 97 | |||
| 98 | <?php | ||
| 99 | //var_dump(self::$tooltips); | ||
| 100 | do_action('add_section_'.$this->id); | ||
| 101 | ?> | ||
| 102 | |||
| 103 | </div> |
| 1 | <?php | ||
| 2 | /** | ||
| 3 | * Uninstall | ||
| 4 | */ | ||
| 5 | if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { | ||
| 6 | exit; | ||
| 7 | } | ||
| 8 | $path=plugin_dir_path(__FILE__); | ||
| 9 | include_once($path . "cf7-mailchimp.php"); | ||
| 10 | include_once($path . "includes/install.php"); | ||
| 11 | $install=new vxcf_mailchimp_install(); | ||
| 12 | $settings=get_option($install->id.'_settings',array()); | ||
| 13 | if(!empty($settings['plugin_data'])){ | ||
| 14 | $install->remove_data(); | ||
| 15 | } | ||
| 16 |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment