Version Description
- migrate to API v3
- remove iframe depended views
Download this release
Release Info
Developer | neeraj_slit |
Plugin | SendinBlue Subscribe Form And WP SMTP |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.9.18 to 3.0.0
- css/admin.css +296 -275
- css/datepicker.css +1 -0
- css/mailin-front.css +108 -108
- inc/SendinblueApiClient.php +297 -0
- inc/mailin.php +59 -1009
- inc/sendinblue.php +7 -17
- inc/sib-api-manager.php +214 -286
- inc/sib-form-preview.php +68 -68
- inc/sib-sms-code.php +121 -121
- inc/table-forms.php +4 -4
- inc/templates/confirm/index.php +8 -8
- inc/templates/confirm/temp.html +58 -58
- inc/templates/confirm/temp_fr-FR.html +59 -59
- inc/templates/double-optin/index.php +8 -8
- inc/templates/double-optin/temp.html +62 -62
- inc/templates/double-optin/temp_fr-FR.html +63 -63
- inc/templates/double-optin/temp_fr-FR.txt +1 -1
- inc/templates/index.php +8 -8
- inc/templates/test/index.php +8 -8
- inc/templates/test/temp.html +154 -154
- inc/templates/test/temp_fr-FR.html +161 -161
- index.php +8 -8
- js/admin.js +1152 -1120
- js/index.php +8 -8
- js/mailin-front.js +297 -320
- lang/index.php +8 -8
- lang/sib_lang-fr_FR.po +1280 -1280
- model/index.php +8 -8
- model/model-contacts.php +37 -35
- model/model-forms.php +35 -24
- model/model-lang.php +8 -10
- model/model-users.php +22 -34
- page/index.php +8 -8
- page/page-campaigns.php +0 -143
- page/page-form.php +45 -46
- page/page-home.php +63 -204
- page/page-lists.php +0 -130
- page/page-statistics.php +144 -5
- readme.txt +453 -475
- sendinblue.php +94 -73
- widget/index.php +8 -8
css/admin.css
CHANGED
@@ -1,275 +1,296 @@
|
|
1 |
-
|
2 |
-
#adminmenuwrap {
|
3 |
-
clear: left;
|
4 |
-
}
|
5 |
-
#adminmenuback {
|
6 |
-
z-index: 0 !important;
|
7 |
-
}
|
8 |
-
body {
|
9 |
-
height: auto !important;
|
10 |
-
background: #F1F1F1 !important;
|
11 |
-
}
|
12 |
-
|
13 |
-
.btn:focus, .btn.active:focus, .btn:active, .btn.active {
|
14 |
-
outline: none !important;
|
15 |
-
}
|
16 |
-
#main-content .panel-default > .page-header {
|
17 |
-
background-color: #f5f5f5 !important;
|
18 |
-
}
|
19 |
-
.breadcrumb {
|
20 |
-
background-color: transparent !important;
|
21 |
-
}
|
22 |
-
.clearfix {
|
23 |
-
clear: both;
|
24 |
-
}
|
25 |
-
|
26 |
-
.box-border-box {
|
27 |
-
-moz-box-sizing: border-box;
|
28 |
-
-webkit-box-sizing: border-box;
|
29 |
-
box-sizing: border-box;
|
30 |
-
}
|
31 |
-
|
32 |
-
#wrap {
|
33 |
-
margin-top: 20px;
|
34 |
-
}
|
35 |
-
|
36 |
-
#logo-img {
|
37 |
-
margin-right: 10px;
|
38 |
-
width: 154px;
|
39 |
-
}
|
40 |
-
|
41 |
-
#wrap-right-side {
|
42 |
-
padding-left: 30px;
|
43 |
-
}
|
44 |
-
|
45 |
-
.sidebar-widget {
|
46 |
-
padding: 5px 15px;
|
47 |
-
margin-bottom: 30px;
|
48 |
-
min-height: 150px;
|
49 |
-
}
|
50 |
-
|
51 |
-
.small-content {
|
52 |
-
margin-top: 20px;
|
53 |
-
display:block;
|
54 |
-
}
|
55 |
-
|
56 |
-
.small-content .panel-body{
|
57 |
-
display: block;
|
58 |
-
}
|
59 |
-
|
60 |
-
.small-content .panel-body .row{
|
61 |
-
display: block;
|
62 |
-
}
|
63 |
-
|
64 |
-
div.title {
|
65 |
-
border-bottom: 1px solid #333;
|
66 |
-
margin-right: 20px;
|
67 |
-
margin-bottom: 20px;
|
68 |
-
}
|
69 |
-
|
70 |
-
.input-field {
|
71 |
-
margin-bottom: 10px;
|
72 |
-
}
|
73 |
-
|
74 |
-
div.small-content1 {
|
75 |
-
margin-top: 20px;
|
76 |
-
}
|
77 |
-
|
78 |
-
.sub-title {
|
79 |
-
font-size: 16px;
|
80 |
-
margin-bottom: 10px;
|
81 |
-
text-decoration: underline;
|
82 |
-
}
|
83 |
-
div.tooltip {
|
84 |
-
width: 350px !important;
|
85 |
-
}
|
86 |
-
button#send_email_btn {
|
87 |
-
margin-top: 10px;
|
88 |
-
}
|
89 |
-
div#email_send_field{
|
90 |
-
margin-top: 10px;
|
91 |
-
display:grid;
|
92 |
-
}
|
93 |
-
input.has-success {
|
94 |
-
border-color: #3c763d;
|
95 |
-
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
|
96 |
-
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
|
97 |
-
}
|
98 |
-
input.error {
|
99 |
-
border-color: rgb(196, 32, 74) !important;
|
100 |
-
background-color: rgb(255, 255, 255);
|
101 |
-
}
|
102 |
-
ol.sib-bread {
|
103 |
-
margin-top: 30px;
|
104 |
-
}
|
105 |
-
.sib-widget-title {
|
106 |
-
margin-top: 10px;
|
107 |
-
margin-bottom: 30px;
|
108 |
-
}
|
109 |
-
.sib-widget-menu {
|
110 |
-
margin-top: 20px;
|
111 |
-
}
|
112 |
-
|
113 |
-
div#sib-field-form1 {
|
114 |
-
margin: 10px;
|
115 |
-
padding: 0px;
|
116 |
-
-moz-box-sizing: border-box;
|
117 |
-
-webkit-box-sizing: border-box;
|
118 |
-
box-sizing: border-box;
|
119 |
-
/*min-height: 200px;*/
|
120 |
-
}
|
121 |
-
|
122 |
-
div.form-field {
|
123 |
-
margin: 10px 0;
|
124 |
-
padding: 0px;
|
125 |
-
-moz-box-sizing: border-box;
|
126 |
-
-webkit-box-sizing: border-box;
|
127 |
-
box-sizing: border-box;
|
128 |
-
background-color: #f5f5f5;
|
129 |
-
}
|
130 |
-
#sib-preview-form{
|
131 |
-
padding: 0 24px 24px 24px;
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
-
div.small-content-1 {
|
136 |
-
margin-top: 10px;
|
137 |
-
}
|
138 |
-
|
139 |
-
div.small-content2 {
|
140 |
-
display: block;
|
141 |
-
margin-left: 15px;
|
142 |
-
margin-right: 15px;
|
143 |
-
}
|
144 |
-
div#main-content textarea{
|
145 |
-
padding-left: 3px;
|
146 |
-
}
|
147 |
-
|
148 |
-
div.sib-scenarios{
|
149 |
-
padding-top: 20px;
|
150 |
-
}
|
151 |
-
.sib-scenarios .thumbnail{
|
152 |
-
min-height: 220px;
|
153 |
-
padding: 16px 6px 0 6px;
|
154 |
-
}
|
155 |
-
.sib-scenarios .thumbanail_focus:hover {
|
156 |
-
border: 2px solid #3498db;
|
157 |
-
}
|
158 |
-
.sib-scenarios .thumbanail_focus {
|
159 |
-
cursor: pointer;
|
160 |
-
border: 2px solid rgba(0, 0, 0, 0.09);
|
161 |
-
}
|
162 |
-
.sib-radio-label
|
163 |
-
{
|
164 |
-
font-weight: normal;
|
165 |
-
margin-right: 20px;
|
166 |
-
margin-bottom: 0px;
|
167 |
-
}
|
168 |
-
.sib-captcha-key
|
169 |
-
{
|
170 |
-
margin-top: 15px;
|
171 |
-
margin-bottom: 15px;
|
172 |
-
}
|
173 |
-
/* ---------------------- */
|
174 |
-
|
175 |
-
.popover.right > .arrow {
|
176 |
-
width: 0;
|
177 |
-
height: 0;
|
178 |
-
border-left: transparent !important;
|
179 |
-
border-top: 10px solid transparent !important;
|
180 |
-
border-bottom: 10px solid transparent !important;
|
181 |
-
border-right:10px solid #dddddd !important;
|
182 |
-
margin-left: 0px !important;
|
183 |
-
}
|
184 |
-
|
185 |
-
.popover.left > .arrow{
|
186 |
-
left:auto;
|
187 |
-
}
|
188 |
-
|
189 |
-
#wrap-right-side #wrap-right-side p, #wrap-right-side a, #wrap-right-side span, #wrap-right-side strong {
|
190 |
-
font-size: 12px !important;
|
191 |
-
}
|
192 |
-
div#main-content, div#main-content p, div#main-content a, div#main-content span, div#main-content strong {
|
193 |
-
font-size: 14px;
|
194 |
-
}
|
195 |
-
|
196 |
-
input[type=radio]:focus {
|
197 |
-
outline: 0 !important;
|
198 |
-
}
|
199 |
-
.sib-content .page-header {
|
200 |
-
/*margin-top: 20px !important;*/
|
201 |
-
padding: 10px 15px !important;
|
202 |
-
margin: 0 0 12px 0 !important;
|
203 |
-
border-color: #ddd !important;
|
204 |
-
display:block;
|
205 |
-
}
|
206 |
-
|
207 |
-
.popover-help-form {
|
208 |
-
cursor: pointer;
|
209 |
-
}
|
210 |
-
|
211 |
-
#main-content button {
|
212 |
-
min-width: 100px;
|
213 |
-
}
|
214 |
-
|
215 |
-
a.sib-scenario-link, a:hover.sib-scenario-link {
|
216 |
-
color: #333 !important;
|
217 |
-
text-decoration: none !important;
|
218 |
-
}
|
219 |
-
|
220 |
-
#datamain{
|
221 |
-
margin-top: 20px;
|
222 |
-
}
|
223 |
-
pre.script {
|
224 |
-
visibility: hidden;
|
225 |
-
display: none;
|
226 |
-
}
|
227 |
-
|
228 |
-
#sib-sync-form label{
|
229 |
-
margin: 4px 24px 0 7px;
|
230 |
-
font-weight: normal;
|
231 |
-
}
|
232 |
-
|
233 |
-
.sync-modal-body .sync-row {
|
234 |
-
margin: 6px 0 0 0;
|
235 |
-
padding: 10px;
|
236 |
-
border-bottom: solid 1px #ddd;
|
237 |
-
}
|
238 |
-
.sync-modal-body .row {
|
239 |
-
margin: 10px 0 0 0;
|
240 |
-
}
|
241 |
-
|
242 |
-
.sync-row a{
|
243 |
-
text-decoration: none;
|
244 |
-
opacity: 0.5;
|
245 |
-
}
|
246 |
-
.sync-row a:hover,.sync-row a:focus{
|
247 |
-
text-decoration: none;
|
248 |
-
opacity: 1;
|
249 |
-
}
|
250 |
-
.sib-terms-url {
|
251 |
-
margin-top: 15px;
|
252 |
-
margin-bottom: 15px;
|
253 |
-
}
|
254 |
-
.sib-forms-wrapper i{
|
255 |
-
font-size: 13px;
|
256 |
-
color: #72777c;
|
257 |
-
}
|
258 |
-
.sib-form-duplicate {
|
259 |
-
margin-top:10px;
|
260 |
-
}
|
261 |
-
#sib_final_confirm_template_id_area {
|
262 |
-
padding-left: 0px;
|
263 |
-
}
|
264 |
-
|
265 |
-
.sib-gdpr-block-area {
|
266 |
-
margin-top: 15px;
|
267 |
-
margin-bottom: 20px;
|
268 |
-
}
|
269 |
-
.sib-gdpr-block-area textarea {
|
270 |
-
margin-bottom: 10px;
|
271 |
-
}
|
272 |
-
.sib-gdpr-block-area label {
|
273 |
-
font-weight: 100;
|
274 |
-
margin-left: 5px;
|
275 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
#adminmenuwrap {
|
3 |
+
clear: left;
|
4 |
+
}
|
5 |
+
#adminmenuback {
|
6 |
+
z-index: 0 !important;
|
7 |
+
}
|
8 |
+
body {
|
9 |
+
height: auto !important;
|
10 |
+
background: #F1F1F1 !important;
|
11 |
+
}
|
12 |
+
|
13 |
+
.btn:focus, .btn.active:focus, .btn:active, .btn.active {
|
14 |
+
outline: none !important;
|
15 |
+
}
|
16 |
+
#main-content .panel-default > .page-header {
|
17 |
+
background-color: #f5f5f5 !important;
|
18 |
+
}
|
19 |
+
.breadcrumb {
|
20 |
+
background-color: transparent !important;
|
21 |
+
}
|
22 |
+
.clearfix {
|
23 |
+
clear: both;
|
24 |
+
}
|
25 |
+
|
26 |
+
.box-border-box {
|
27 |
+
-moz-box-sizing: border-box;
|
28 |
+
-webkit-box-sizing: border-box;
|
29 |
+
box-sizing: border-box;
|
30 |
+
}
|
31 |
+
|
32 |
+
#wrap {
|
33 |
+
margin-top: 20px;
|
34 |
+
}
|
35 |
+
|
36 |
+
#logo-img {
|
37 |
+
margin-right: 10px;
|
38 |
+
width: 154px;
|
39 |
+
}
|
40 |
+
|
41 |
+
#wrap-right-side {
|
42 |
+
padding-left: 30px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.sidebar-widget {
|
46 |
+
padding: 5px 15px;
|
47 |
+
margin-bottom: 30px;
|
48 |
+
min-height: 150px;
|
49 |
+
}
|
50 |
+
|
51 |
+
.sib-small-content {
|
52 |
+
margin-top: 20px;
|
53 |
+
display:block;
|
54 |
+
}
|
55 |
+
|
56 |
+
.sib-small-content .panel-body{
|
57 |
+
display: block;
|
58 |
+
}
|
59 |
+
|
60 |
+
.sib-small-content .panel-body .row{
|
61 |
+
display: block;
|
62 |
+
}
|
63 |
+
|
64 |
+
div.title {
|
65 |
+
border-bottom: 1px solid #333;
|
66 |
+
margin-right: 20px;
|
67 |
+
margin-bottom: 20px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.input-field {
|
71 |
+
margin-bottom: 10px;
|
72 |
+
}
|
73 |
+
|
74 |
+
div.small-content1 {
|
75 |
+
margin-top: 20px;
|
76 |
+
}
|
77 |
+
|
78 |
+
.sub-title {
|
79 |
+
font-size: 16px;
|
80 |
+
margin-bottom: 10px;
|
81 |
+
text-decoration: underline;
|
82 |
+
}
|
83 |
+
div.tooltip {
|
84 |
+
width: 350px !important;
|
85 |
+
}
|
86 |
+
button#send_email_btn {
|
87 |
+
margin-top: 10px;
|
88 |
+
}
|
89 |
+
div#email_send_field{
|
90 |
+
margin-top: 10px;
|
91 |
+
display:grid;
|
92 |
+
}
|
93 |
+
input.has-success {
|
94 |
+
border-color: #3c763d;
|
95 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
|
96 |
+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
|
97 |
+
}
|
98 |
+
input.error {
|
99 |
+
border-color: rgb(196, 32, 74) !important;
|
100 |
+
background-color: rgb(255, 255, 255);
|
101 |
+
}
|
102 |
+
ol.sib-bread {
|
103 |
+
margin-top: 30px;
|
104 |
+
}
|
105 |
+
.sib-widget-title {
|
106 |
+
margin-top: 10px;
|
107 |
+
margin-bottom: 30px;
|
108 |
+
}
|
109 |
+
.sib-widget-menu {
|
110 |
+
margin-top: 20px;
|
111 |
+
}
|
112 |
+
|
113 |
+
div#sib-field-form1 {
|
114 |
+
margin: 10px;
|
115 |
+
padding: 0px;
|
116 |
+
-moz-box-sizing: border-box;
|
117 |
+
-webkit-box-sizing: border-box;
|
118 |
+
box-sizing: border-box;
|
119 |
+
/*min-height: 200px;*/
|
120 |
+
}
|
121 |
+
|
122 |
+
div.form-field {
|
123 |
+
margin: 10px 0;
|
124 |
+
padding: 0px;
|
125 |
+
-moz-box-sizing: border-box;
|
126 |
+
-webkit-box-sizing: border-box;
|
127 |
+
box-sizing: border-box;
|
128 |
+
background-color: #f5f5f5;
|
129 |
+
}
|
130 |
+
#sib-preview-form{
|
131 |
+
padding: 0 24px 24px 24px;
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
div.small-content-1 {
|
136 |
+
margin-top: 10px;
|
137 |
+
}
|
138 |
+
|
139 |
+
div.small-content2 {
|
140 |
+
display: block;
|
141 |
+
margin-left: 15px;
|
142 |
+
margin-right: 15px;
|
143 |
+
}
|
144 |
+
div#main-content textarea{
|
145 |
+
padding-left: 3px;
|
146 |
+
}
|
147 |
+
|
148 |
+
div.sib-scenarios{
|
149 |
+
padding-top: 20px;
|
150 |
+
}
|
151 |
+
.sib-scenarios .thumbnail{
|
152 |
+
min-height: 220px;
|
153 |
+
padding: 16px 6px 0 6px;
|
154 |
+
}
|
155 |
+
.sib-scenarios .thumbanail_focus:hover {
|
156 |
+
border: 2px solid #3498db;
|
157 |
+
}
|
158 |
+
.sib-scenarios .thumbanail_focus {
|
159 |
+
cursor: pointer;
|
160 |
+
border: 2px solid rgba(0, 0, 0, 0.09);
|
161 |
+
}
|
162 |
+
.sib-radio-label
|
163 |
+
{
|
164 |
+
font-weight: normal;
|
165 |
+
margin-right: 20px;
|
166 |
+
margin-bottom: 0px;
|
167 |
+
}
|
168 |
+
.sib-captcha-key
|
169 |
+
{
|
170 |
+
margin-top: 15px;
|
171 |
+
margin-bottom: 15px;
|
172 |
+
}
|
173 |
+
/* ---------------------- */
|
174 |
+
|
175 |
+
.popover.right > .arrow {
|
176 |
+
width: 0;
|
177 |
+
height: 0;
|
178 |
+
border-left: transparent !important;
|
179 |
+
border-top: 10px solid transparent !important;
|
180 |
+
border-bottom: 10px solid transparent !important;
|
181 |
+
border-right:10px solid #dddddd !important;
|
182 |
+
margin-left: 0px !important;
|
183 |
+
}
|
184 |
+
|
185 |
+
.popover.left > .arrow{
|
186 |
+
left:auto;
|
187 |
+
}
|
188 |
+
|
189 |
+
#wrap-right-side #wrap-right-side p, #wrap-right-side a, #wrap-right-side span, #wrap-right-side strong {
|
190 |
+
font-size: 12px !important;
|
191 |
+
}
|
192 |
+
div#main-content, div#main-content p, div#main-content a, div#main-content span, div#main-content strong {
|
193 |
+
font-size: 14px;
|
194 |
+
}
|
195 |
+
|
196 |
+
input[type=radio]:focus {
|
197 |
+
outline: 0 !important;
|
198 |
+
}
|
199 |
+
.sib-content .page-header {
|
200 |
+
/*margin-top: 20px !important;*/
|
201 |
+
padding: 10px 15px !important;
|
202 |
+
margin: 0 0 12px 0 !important;
|
203 |
+
border-color: #ddd !important;
|
204 |
+
display:block;
|
205 |
+
}
|
206 |
+
|
207 |
+
.popover-help-form {
|
208 |
+
cursor: pointer;
|
209 |
+
}
|
210 |
+
|
211 |
+
#main-content button {
|
212 |
+
min-width: 100px;
|
213 |
+
}
|
214 |
+
|
215 |
+
a.sib-scenario-link, a:hover.sib-scenario-link {
|
216 |
+
color: #333 !important;
|
217 |
+
text-decoration: none !important;
|
218 |
+
}
|
219 |
+
|
220 |
+
#datamain{
|
221 |
+
margin-top: 20px;
|
222 |
+
}
|
223 |
+
pre.script {
|
224 |
+
visibility: hidden;
|
225 |
+
display: none;
|
226 |
+
}
|
227 |
+
|
228 |
+
#sib-sync-form label{
|
229 |
+
margin: 4px 24px 0 7px;
|
230 |
+
font-weight: normal;
|
231 |
+
}
|
232 |
+
|
233 |
+
.sync-modal-body .sync-row {
|
234 |
+
margin: 6px 0 0 0;
|
235 |
+
padding: 10px;
|
236 |
+
border-bottom: solid 1px #ddd;
|
237 |
+
}
|
238 |
+
.sync-modal-body .row {
|
239 |
+
margin: 10px 0 0 0;
|
240 |
+
}
|
241 |
+
|
242 |
+
.sync-row a{
|
243 |
+
text-decoration: none;
|
244 |
+
opacity: 0.5;
|
245 |
+
}
|
246 |
+
.sync-row a:hover,.sync-row a:focus{
|
247 |
+
text-decoration: none;
|
248 |
+
opacity: 1;
|
249 |
+
}
|
250 |
+
.sib-terms-url {
|
251 |
+
margin-top: 15px;
|
252 |
+
margin-bottom: 15px;
|
253 |
+
}
|
254 |
+
.sib-forms-wrapper i{
|
255 |
+
font-size: 13px;
|
256 |
+
color: #72777c;
|
257 |
+
}
|
258 |
+
.sib-form-duplicate {
|
259 |
+
margin-top:10px;
|
260 |
+
}
|
261 |
+
#sib_final_confirm_template_id_area {
|
262 |
+
padding-left: 0px;
|
263 |
+
}
|
264 |
+
|
265 |
+
.sib-gdpr-block-area {
|
266 |
+
margin-top: 15px;
|
267 |
+
margin-bottom: 20px;
|
268 |
+
}
|
269 |
+
.sib-gdpr-block-area textarea {
|
270 |
+
margin-bottom: 10px;
|
271 |
+
}
|
272 |
+
.sib-gdpr-block-area label {
|
273 |
+
font-weight: 100;
|
274 |
+
margin-left: 5px;
|
275 |
+
}
|
276 |
+
|
277 |
+
.sib-statistics-data-value {
|
278 |
+
padding-left: 3.5rem !important;
|
279 |
+
}
|
280 |
+
|
281 |
+
#sib-statistics-date-container {
|
282 |
+
margin-bottom: 10px;
|
283 |
+
}
|
284 |
+
label[for="sib-statistics-date"] {
|
285 |
+
margin-bottom: 0;
|
286 |
+
line-height: 2.15384615;
|
287 |
+
font-size: 15px;
|
288 |
+
}
|
289 |
+
|
290 |
+
.sib-last-column-value {
|
291 |
+
padding-left: 0 !important;
|
292 |
+
}
|
293 |
+
|
294 |
+
.sib-spinner {
|
295 |
+
float: none;
|
296 |
+
}
|
css/datepicker.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.ui-datepicker{padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background-color:#fff;border:1px solid #dfdfdf;border-top:none;-webkit-box-shadow:0 3px 6px rgba(0,0,0,.075);box-shadow:0 3px 6px rgba(0,0,0,.075);min-width:17em;width:auto;z-index:1000!important}body.wp-admin:not(.rtl) .ui-datepicker{margin-left:-1px}body.wp-admin.rtl .ui-datepicker{margin-right:-1px}.ui-datepicker *{padding:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-datepicker table{font-size:13px;margin:0;border:none;border-collapse:collapse}.ui-datepicker .ui-datepicker-header,.ui-datepicker .ui-widget-header{background-image:none;border:none;color:#fff;font-weight:400}.ui-datepicker .ui-datepicker-header .ui-state-hover{background:0 0;border-color:transparent;cursor:pointer}.ui-datepicker .ui-datepicker-title{margin:0;padding:10px 0;color:#fff;font-size:14px;line-height:14px;text-align:center}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:relative;top:0;height:34px;width:34px}.ui-datepicker .ui-state-hover.ui-datepicker-next,.ui-datepicker .ui-state-hover.ui-datepicker-prev{border:none}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-prev-hover{left:0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-next-hover{right:0}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:none}.ui-datepicker .ui-datepicker-prev{float:left}.ui-datepicker .ui-datepicker-next{float:right}.ui-datepicker .ui-datepicker-next:before,.ui-datepicker .ui-datepicker-prev:before{font:normal 20px/34px dashicons;padding-left:7px;color:#fff;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:34px;height:34px}.ui-datepicker .ui-datepicker-prev:before{content:'\f341'}.ui-datepicker .ui-datepicker-next:before{content:'\f345'}.ui-datepicker .ui-datepicker-next-hover:before,.ui-datepicker .ui-datepicker-prev-hover:before{opacity:.7}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:33%}.ui-datepicker thead{color:#fff;font-weight:600}.ui-datepicker th{padding:10px}.ui-datepicker td{padding:0;border:1px solid #f4f4f4}.ui-datepicker td.ui-datepicker-other-month{border:transparent}.ui-datepicker tr:first-of-type td{border-top:1px solid #f0f0f0}.ui-datepicker td.ui-datepicker-week-end{background-color:#f4f4f4;border:1px solid #f0f0f0}.ui-datepicker td.ui-datepicker-today{background-color:#f0f0c0}.ui-datepicker td.ui-datepicker-current-day{background:#bd8}.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;text-decoration:none;width:auto;display:block;padding:5px 10px;font-weight:400;color:#444}.ui-datepicker td.ui-state-disabled .ui-state-default{opacity:.5}.ui-datepicker .ui-datepicker-header,.ui-datepicker .ui-widget-header{background:#00a0d2}.ui-datepicker thead{background:#32373c}.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-fresh .ui-datepicker .ui-datepicker-header,.admin-color-fresh .ui-datepicker .ui-widget-header{background:#00a0d2}.admin-color-fresh .ui-datepicker thead{background:#32373c}.admin-color-fresh .ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.admin-color-blue .ui-datepicker .ui-datepicker-header,.admin-color-blue .ui-datepicker .ui-widget-header{background:#52accc}.admin-color-blue .ui-datepicker thead{background:#4796b3}.admin-color-blue .ui-datepicker td .ui-state-hover{background:#096484;color:#fff}.admin-color-coffee .ui-datepicker .ui-datepicker-header,.admin-color-coffee .ui-datepicker .ui-widget-header{background:#59524c}.admin-color-coffee .ui-datepicker thead{background:#46403c}.admin-color-coffee .ui-datepicker td .ui-state-hover{background:#c7a589;color:#fff}.admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,.admin-color-ectoplasm .ui-datepicker .ui-widget-header{background:#523f6d}.admin-color-ectoplasm .ui-datepicker thead{background:#413256}.admin-color-ectoplasm .ui-datepicker td .ui-state-hover{background:#a3b745;color:#fff}.admin-color-midnight .ui-datepicker .ui-datepicker-header,.admin-color-midnight .ui-datepicker .ui-widget-header{background:#363b3f}.admin-color-midnight .ui-datepicker thead{background:#26292c}.admin-color-midnight .ui-datepicker td .ui-state-hover{background:#e14d43;color:#fff}.admin-color-ocean .ui-datepicker .ui-datepicker-header,.admin-color-ocean .ui-datepicker .ui-widget-header{background:#738e96}.admin-color-ocean .ui-datepicker thead{background:#627c83}.admin-color-ocean .ui-datepicker td .ui-state-hover{background:#9ebaa0;color:#fff}.admin-color-sunrise .ui-datepicker .ui-datepicker-header,.admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,.admin-color-sunrise .ui-datepicker .ui-widget-header{background:#cf4944}.admin-color-sunrise .ui-datepicker th{border-color:#be3631;background:#be3631}.admin-color-sunrise .ui-datepicker td .ui-state-hover{background:#dd823b;color:#fff}.admin-color-light .ui-datepicker .ui-datepicker-header,.admin-color-light .ui-datepicker .ui-widget-header{background:#e5e5e5}.admin-color-light .ui-datepicker thead{background:#888}.admin-color-light .ui-datepicker .ui-datepicker-next:before,.admin-color-light .ui-datepicker .ui-datepicker-prev:before,.admin-color-light .ui-datepicker .ui-datepicker-title,.admin-color-light .ui-datepicker td .ui-state-default{color:#555}.admin-color-light .ui-datepicker td .ui-state-hover{background:#e5e5e5}.admin-color-bbp-evergreen .ui-datepicker .ui-datepicker-header,.admin-color-bbp-evergreen .ui-datepicker .ui-widget-header{background:#56b274}.admin-color-bbp-evergreen .ui-datepicker thead{background:#36533f}.admin-color-bbp-evergreen .ui-datepicker td .ui-state-hover{background:#446950;color:#fff}.admin-color-bbp-mint .ui-datepicker .ui-datepicker-header,.admin-color-bbp-mint .ui-datepicker .ui-widget-header{background:#4ca26a}.admin-color-bbp-mint .ui-datepicker thead{background:#4f6d59}.admin-color-bbp-mint .ui-datepicker td .ui-state-hover{background:#5fb37c;color:#fff}
|
css/mailin-front.css
CHANGED
@@ -1,109 +1,109 @@
|
|
1 |
-
div.sib-sms-field {
|
2 |
-
display: inline-block;
|
3 |
-
position: relative;
|
4 |
-
width: 100%;
|
5 |
-
}
|
6 |
-
|
7 |
-
.sib-sms-field .sib-country-block {
|
8 |
-
position: absolute;
|
9 |
-
right: auto;
|
10 |
-
left: 0;
|
11 |
-
top: 0;
|
12 |
-
bottom: 0;
|
13 |
-
padding: 1px;
|
14 |
-
-webkit-box-sizing: border-box;
|
15 |
-
-moz-box-sizing: border-box;
|
16 |
-
box-sizing: border-box;
|
17 |
-
}
|
18 |
-
|
19 |
-
.sib-country-block .sib-toggle.sib-country-flg {
|
20 |
-
z-index: 1;
|
21 |
-
position: relative;
|
22 |
-
width: 46px;
|
23 |
-
height: 100%;
|
24 |
-
padding: 0 0 0 8px;
|
25 |
-
-webkit-box-sizing: border-box;
|
26 |
-
-moz-box-sizing: border-box;
|
27 |
-
box-sizing: border-box;
|
28 |
-
background-color: #dbdbdb;
|
29 |
-
cursor: pointer;
|
30 |
-
}
|
31 |
-
|
32 |
-
.sib-country-block .sib-toggle .sib-cflags {
|
33 |
-
position: absolute;
|
34 |
-
top: 0;
|
35 |
-
bottom: 0;
|
36 |
-
margin: auto;
|
37 |
-
height: 15px;
|
38 |
-
width: 20px;
|
39 |
-
background-repeat: no-repeat;
|
40 |
-
background-color: #dbdbdb;
|
41 |
-
-webkit-box-sizing: border-box;
|
42 |
-
-moz-box-sizing: border-box;
|
43 |
-
box-sizing: border-box;
|
44 |
-
background-image: url('../img/flags/fr.png');
|
45 |
-
}
|
46 |
-
.sib-country-block .sib-toggle .sib-icon-arrow {
|
47 |
-
position: absolute;
|
48 |
-
top: 50%;
|
49 |
-
margin-top: -2px;
|
50 |
-
right: 6px;
|
51 |
-
width: 0;
|
52 |
-
height: 0;
|
53 |
-
border-left: 3px solid transparent;
|
54 |
-
border-right: 3px solid transparent;
|
55 |
-
border-top: 4px solid;
|
56 |
-
}
|
57 |
-
.sib-sms-field ul.sib-country-list {
|
58 |
-
position: absolute;
|
59 |
-
z-index: 2;
|
60 |
-
list-style: none;
|
61 |
-
text-align: left;
|
62 |
-
padding: 0px;
|
63 |
-
margin: 0px 0px 0px -1px;
|
64 |
-
box-shadow: rgba(0, 0, 0, 0.2) 1px 1px 4px;
|
65 |
-
background-color: white;
|
66 |
-
border: 1px solid rgb(204, 204, 204);
|
67 |
-
white-space: nowrap;
|
68 |
-
max-height: 150px;
|
69 |
-
overflow-y: scroll;
|
70 |
-
overflow-x: hidden;
|
71 |
-
top: 50px;
|
72 |
-
width: 250px;
|
73 |
-
}
|
74 |
-
.sib-sms-field ul.sib-country-list li.sib-country-prefix {
|
75 |
-
font-size: 14px;
|
76 |
-
padding:1px 10px;
|
77 |
-
cursor: pointer;
|
78 |
-
}
|
79 |
-
.sib-sms-field ul.sib-country-list li.sib-country-prefix:hover {
|
80 |
-
background-color: #dbdbdb;
|
81 |
-
}
|
82 |
-
.sib-sms-field ul.sib-country-list li .sib-flag-box {
|
83 |
-
width: 20px;
|
84 |
-
}
|
85 |
-
|
86 |
-
.sib-sms-field ul.sib-country-list li .sib-flag-box .sib-flag {
|
87 |
-
height: 18px;
|
88 |
-
width: 20px;
|
89 |
-
background-image: url("../img/flags/ad.png");
|
90 |
-
vertical-align: middle;
|
91 |
-
display: inline-block;
|
92 |
-
background-repeat:no-repeat;
|
93 |
-
}
|
94 |
-
.sib-sms-field ul.sib-country-list li .sib-flag-box .sib-dial-code {
|
95 |
-
margin-left: 20px;
|
96 |
-
}
|
97 |
-
.sib-sms-field .sib-sms {
|
98 |
-
padding-right: 6px;
|
99 |
-
padding-left: 52px;
|
100 |
-
margin-left: 0;
|
101 |
-
position: relative;
|
102 |
-
z-index: 0;
|
103 |
-
margin-top: 0 !important;
|
104 |
-
margin-bottom: 0 !important;
|
105 |
-
margin-right: 0;
|
106 |
-
}
|
107 |
-
.sib-multi-lists.sib_error {
|
108 |
-
color: #A94442;
|
109 |
}
|
1 |
+
div.sib-sms-field {
|
2 |
+
display: inline-block;
|
3 |
+
position: relative;
|
4 |
+
width: 100%;
|
5 |
+
}
|
6 |
+
|
7 |
+
.sib-sms-field .sib-country-block {
|
8 |
+
position: absolute;
|
9 |
+
right: auto;
|
10 |
+
left: 0;
|
11 |
+
top: 0;
|
12 |
+
bottom: 0;
|
13 |
+
padding: 1px;
|
14 |
+
-webkit-box-sizing: border-box;
|
15 |
+
-moz-box-sizing: border-box;
|
16 |
+
box-sizing: border-box;
|
17 |
+
}
|
18 |
+
|
19 |
+
.sib-country-block .sib-toggle.sib-country-flg {
|
20 |
+
z-index: 1;
|
21 |
+
position: relative;
|
22 |
+
width: 46px;
|
23 |
+
height: 100%;
|
24 |
+
padding: 0 0 0 8px;
|
25 |
+
-webkit-box-sizing: border-box;
|
26 |
+
-moz-box-sizing: border-box;
|
27 |
+
box-sizing: border-box;
|
28 |
+
background-color: #dbdbdb;
|
29 |
+
cursor: pointer;
|
30 |
+
}
|
31 |
+
|
32 |
+
.sib-country-block .sib-toggle .sib-cflags {
|
33 |
+
position: absolute;
|
34 |
+
top: 0;
|
35 |
+
bottom: 0;
|
36 |
+
margin: auto;
|
37 |
+
height: 15px;
|
38 |
+
width: 20px;
|
39 |
+
background-repeat: no-repeat;
|
40 |
+
background-color: #dbdbdb;
|
41 |
+
-webkit-box-sizing: border-box;
|
42 |
+
-moz-box-sizing: border-box;
|
43 |
+
box-sizing: border-box;
|
44 |
+
background-image: url('../img/flags/fr.png');
|
45 |
+
}
|
46 |
+
.sib-country-block .sib-toggle .sib-icon-arrow {
|
47 |
+
position: absolute;
|
48 |
+
top: 50%;
|
49 |
+
margin-top: -2px;
|
50 |
+
right: 6px;
|
51 |
+
width: 0;
|
52 |
+
height: 0;
|
53 |
+
border-left: 3px solid transparent;
|
54 |
+
border-right: 3px solid transparent;
|
55 |
+
border-top: 4px solid;
|
56 |
+
}
|
57 |
+
.sib-sms-field ul.sib-country-list {
|
58 |
+
position: absolute;
|
59 |
+
z-index: 2;
|
60 |
+
list-style: none;
|
61 |
+
text-align: left;
|
62 |
+
padding: 0px;
|
63 |
+
margin: 0px 0px 0px -1px;
|
64 |
+
box-shadow: rgba(0, 0, 0, 0.2) 1px 1px 4px;
|
65 |
+
background-color: white;
|
66 |
+
border: 1px solid rgb(204, 204, 204);
|
67 |
+
white-space: nowrap;
|
68 |
+
max-height: 150px;
|
69 |
+
overflow-y: scroll;
|
70 |
+
overflow-x: hidden;
|
71 |
+
top: 50px;
|
72 |
+
width: 250px;
|
73 |
+
}
|
74 |
+
.sib-sms-field ul.sib-country-list li.sib-country-prefix {
|
75 |
+
font-size: 14px;
|
76 |
+
padding:1px 10px;
|
77 |
+
cursor: pointer;
|
78 |
+
}
|
79 |
+
.sib-sms-field ul.sib-country-list li.sib-country-prefix:hover {
|
80 |
+
background-color: #dbdbdb;
|
81 |
+
}
|
82 |
+
.sib-sms-field ul.sib-country-list li .sib-flag-box {
|
83 |
+
width: 20px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.sib-sms-field ul.sib-country-list li .sib-flag-box .sib-flag {
|
87 |
+
height: 18px;
|
88 |
+
width: 20px;
|
89 |
+
background-image: url("../img/flags/ad.png");
|
90 |
+
vertical-align: middle;
|
91 |
+
display: inline-block;
|
92 |
+
background-repeat:no-repeat;
|
93 |
+
}
|
94 |
+
.sib-sms-field ul.sib-country-list li .sib-flag-box .sib-dial-code {
|
95 |
+
margin-left: 20px;
|
96 |
+
}
|
97 |
+
.sib-sms-field .sib-sms {
|
98 |
+
padding-right: 6px;
|
99 |
+
padding-left: 52px;
|
100 |
+
margin-left: 0;
|
101 |
+
position: relative;
|
102 |
+
z-index: 0;
|
103 |
+
margin-top: 0 !important;
|
104 |
+
margin-bottom: 0 !important;
|
105 |
+
margin-right: 0;
|
106 |
+
}
|
107 |
+
.sib-multi-lists.sib_error {
|
108 |
+
color: #A94442;
|
109 |
}
|
inc/SendinblueApiClient.php
ADDED
@@ -0,0 +1,297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class SendinblueApiClient
|
5 |
+
{
|
6 |
+
const API_BASE_URL = 'https://api.sendinblue.com/v3';
|
7 |
+
const HTTP_METHOD_GET = 'GET';
|
8 |
+
const HTTP_METHOD_POST = 'POST';
|
9 |
+
const HTTP_METHOD_PUT = 'PUT';
|
10 |
+
const HTTP_METHOD_DELETE = 'DELETE';
|
11 |
+
const CAMPAIGN_TYPE_EMAIL = 'email';
|
12 |
+
const CAMPAIGN_TYPE_SMS = 'sms';
|
13 |
+
const RESPONSE_CODE_OK = 200;
|
14 |
+
const RESPONSE_CODE_ACCEPTED = 202;
|
15 |
+
|
16 |
+
private $apiKey;
|
17 |
+
private $lastResponseCode;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* SendinblueApiClient constructor.
|
21 |
+
*/
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
$this->apiKey = get_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @return mixed
|
29 |
+
*/
|
30 |
+
public function getAccount()
|
31 |
+
{
|
32 |
+
return $this->get('/account');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @return mixed
|
37 |
+
*/
|
38 |
+
public function getAttributes()
|
39 |
+
{
|
40 |
+
return $this->get("/contacts/attributes");
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @param $type,$name,$data
|
45 |
+
* @return mixed
|
46 |
+
*/
|
47 |
+
public function createAttribute($type,$name,$data)
|
48 |
+
{
|
49 |
+
return $this->post("/contacts/attributes/".$type."/".$name,$data);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @param $id
|
54 |
+
* @return mixed
|
55 |
+
*/
|
56 |
+
public function getEmailTemplate($id)
|
57 |
+
{
|
58 |
+
return $this->get("/smtp/templates/".$id);
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @param string $type
|
63 |
+
* @param array $data
|
64 |
+
* @return array
|
65 |
+
*/
|
66 |
+
public function getAllCampaignsByType($type = self::CAMPAIGN_TYPE_EMAIL, $data = [])
|
67 |
+
{
|
68 |
+
$campaigns =[];
|
69 |
+
|
70 |
+
if (!isset($data['offset'])) {
|
71 |
+
$data['offset'] = 0;
|
72 |
+
}
|
73 |
+
|
74 |
+
do {
|
75 |
+
if ($type === self::CAMPAIGN_TYPE_SMS) {
|
76 |
+
$response = $this->getSmsCampaigns($data);
|
77 |
+
} else {
|
78 |
+
$response = $this->getEmailCampaigns($data);
|
79 |
+
}
|
80 |
+
|
81 |
+
if (isset($response['campaigns']) && is_array($response['campaigns'])) {
|
82 |
+
$campaigns = array_merge($campaigns, $response['campaigns']);
|
83 |
+
$data['offset']++;
|
84 |
+
}
|
85 |
+
} while (!empty($response['campaigns']));
|
86 |
+
|
87 |
+
return $campaigns;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @param $data
|
92 |
+
* @return mixed
|
93 |
+
*/
|
94 |
+
public function getEmailCampaigns($data)
|
95 |
+
{
|
96 |
+
return $this->get("/emailCampaigns",$data);
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @param $data
|
101 |
+
* @return mixed
|
102 |
+
*/
|
103 |
+
public function getSmsCampaigns($data)
|
104 |
+
{
|
105 |
+
return $this->get("/smsCampaigns",$data);
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @param $data
|
110 |
+
* @return mixed
|
111 |
+
*/
|
112 |
+
public function getEmailTemplates($data)
|
113 |
+
{
|
114 |
+
return $this->get("/smtp/templates",$data);
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @param $data
|
119 |
+
* @return mixed
|
120 |
+
*/
|
121 |
+
public function sendEmail($data)
|
122 |
+
{
|
123 |
+
return $this->post("/smtp/email",$data);
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* @param $id,$data
|
128 |
+
* @return mixed
|
129 |
+
*/
|
130 |
+
public function sendTransactionalTemplate($id,$data)
|
131 |
+
{
|
132 |
+
return $this->post("/smtp/templates/".$id."/send",$data);
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @param $email
|
137 |
+
* @return mixed
|
138 |
+
*/
|
139 |
+
public function getUser($email)
|
140 |
+
{
|
141 |
+
return $this->get("/contacts/". urlencode($email));
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* @param $data
|
146 |
+
* @return mixed
|
147 |
+
*/
|
148 |
+
public function createUser($data)
|
149 |
+
{
|
150 |
+
return $this->post("/contacts",$data);
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @return mixed
|
155 |
+
*/
|
156 |
+
public function getSenders()
|
157 |
+
{
|
158 |
+
return $this->get("/senders");
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* @param $email,$data
|
163 |
+
* @return mixed
|
164 |
+
*/
|
165 |
+
public function updateUser($email, $data)
|
166 |
+
{
|
167 |
+
return $this->put("/contacts/".$email, $data);
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* @param $data
|
172 |
+
* @return mixed
|
173 |
+
*/
|
174 |
+
public function createList($data)
|
175 |
+
{
|
176 |
+
return $this->post("/contacts/lists",$data);
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* @param $data
|
181 |
+
* @return mixed
|
182 |
+
*/
|
183 |
+
public function getLists($data)
|
184 |
+
{
|
185 |
+
return $this->get("/contacts/lists",$data);
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* @param $data
|
190 |
+
* @return mixed
|
191 |
+
*/
|
192 |
+
public function getAllLists()
|
193 |
+
{
|
194 |
+
$lists = array("lists" => array(), "count" => 0);
|
195 |
+
$offset = 0;
|
196 |
+
$limit = 50;
|
197 |
+
do {
|
198 |
+
$list_data = $this->getLists(array('limit' => $limit, 'offset' => $offset));
|
199 |
+
if (isset($list_data["lists"]) && is_array($list_data["lists"])) {
|
200 |
+
$lists["lists"] = array_merge($lists["lists"],$list_data["lists"]) ;
|
201 |
+
$offset += 50;
|
202 |
+
$lists["count"] = $list_data["count"];
|
203 |
+
}
|
204 |
+
}
|
205 |
+
while(!empty($lists['lists']) && count($lists["lists"]) < $list_data["count"]);
|
206 |
+
|
207 |
+
return $lists;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* @param $data
|
212 |
+
* @return mixed
|
213 |
+
*/
|
214 |
+
public function importContacts($data)
|
215 |
+
{
|
216 |
+
return $this->post('/contacts/import', $data);
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* @param $endpoint
|
221 |
+
* @param array $parameters
|
222 |
+
* @return mixed
|
223 |
+
*/
|
224 |
+
public function get($endpoint, $parameters = [])
|
225 |
+
{
|
226 |
+
if ($parameters) {
|
227 |
+
foreach ($parameters as $key => $parameter) {
|
228 |
+
if (is_bool($parameter)) {
|
229 |
+
// http_build_query converts bool to int
|
230 |
+
$parameters[$key] = $parameter ? 'true' : 'false';
|
231 |
+
}
|
232 |
+
}
|
233 |
+
$endpoint .= '?' . http_build_query($parameters);
|
234 |
+
}
|
235 |
+
return $this->makeHttpRequest(self::HTTP_METHOD_GET, $endpoint);
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* @param $endpoint
|
240 |
+
* @param array $data
|
241 |
+
* @return mixed
|
242 |
+
*/
|
243 |
+
public function post($endpoint, $data = [])
|
244 |
+
{
|
245 |
+
return $this->makeHttpRequest(self::HTTP_METHOD_POST, $endpoint, $data);
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* @param $endpoint
|
250 |
+
* @param array $data
|
251 |
+
* @return mixed
|
252 |
+
*/
|
253 |
+
public function put($endpoint, $data = [])
|
254 |
+
{
|
255 |
+
return $this->makeHttpRequest(self::HTTP_METHOD_PUT, $endpoint, $data);
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* @param $method
|
260 |
+
* @param $endpoint
|
261 |
+
* @param array $body
|
262 |
+
* @return mixed
|
263 |
+
*/
|
264 |
+
private function makeHttpRequest($method, $endpoint, $body = [])
|
265 |
+
{
|
266 |
+
$url = self::API_BASE_URL . $endpoint;
|
267 |
+
|
268 |
+
$args = [
|
269 |
+
'method' => $method,
|
270 |
+
'headers' => [
|
271 |
+
'api-key' => $this->apiKey,
|
272 |
+
'Content-Type' => 'application/json'
|
273 |
+
],
|
274 |
+
];
|
275 |
+
|
276 |
+
if ($method != self::HTTP_METHOD_GET && $method != self::HTTP_METHOD_DELETE) {
|
277 |
+
if (isset($body['listIds'])) {
|
278 |
+
$body['listIds'] = array_map('intval', (array) $body['listIds']);
|
279 |
+
}
|
280 |
+
$args['body'] = wp_json_encode($body);
|
281 |
+
}
|
282 |
+
|
283 |
+
$response = wp_remote_request($url, $args);
|
284 |
+
$data = wp_remote_retrieve_body($response);
|
285 |
+
$this->lastResponseCode = wp_remote_retrieve_response_code($response);
|
286 |
+
|
287 |
+
return json_decode($data, true);
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* @return int
|
292 |
+
*/
|
293 |
+
public function getLastResponseCode()
|
294 |
+
{
|
295 |
+
return $this->lastResponseCode;
|
296 |
+
}
|
297 |
+
}
|
inc/mailin.php
CHANGED
@@ -1,1009 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Sendinblue REST client
|
5 |
-
*/
|
6 |
-
|
7 |
-
class
|
8 |
-
{
|
9 |
-
public $api_key;
|
10 |
-
public $base_url;
|
11 |
-
public
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
$this->
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
'
|
35 |
-
'
|
36 |
-
|
37 |
-
'
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
{
|
61 |
-
return $this->do_request($resource,"DELETE",$input);
|
62 |
-
}
|
63 |
-
|
64 |
-
/*
|
65 |
-
Get Account.
|
66 |
-
No input required
|
67 |
-
*/
|
68 |
-
public function get_account()
|
69 |
-
{
|
70 |
-
return $this->get("account","");
|
71 |
-
}
|
72 |
-
|
73 |
-
/*
|
74 |
-
Get SMTP details.
|
75 |
-
No input required
|
76 |
-
*/
|
77 |
-
public function get_smtp_details()
|
78 |
-
{
|
79 |
-
return $this->get("account/smtpdetail","");
|
80 |
-
}
|
81 |
-
|
82 |
-
/*
|
83 |
-
Create Child Account.
|
84 |
-
@param {Array} data contains php array with key value pair.
|
85 |
-
@options data {String} child_email: Email address of Reseller child [Mandatory]
|
86 |
-
@options data {String} password: Password of Reseller child to login [Mandatory]
|
87 |
-
@options data {String} company_org: Name of Reseller child’s company [Mandatory]
|
88 |
-
@options data {String} first_name: First name of Reseller child [Mandatory]
|
89 |
-
@options data {String} last_name: Last name of Reseller child [Mandatory]
|
90 |
-
@options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional]
|
91 |
-
- email_credit {Integer} number of email credits
|
92 |
-
- sms_credit {Integer} Number of sms credts
|
93 |
-
@options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
|
94 |
-
*/
|
95 |
-
public function create_child_account($data)
|
96 |
-
{
|
97 |
-
return $this->post("account",$data);
|
98 |
-
}
|
99 |
-
|
100 |
-
/*
|
101 |
-
Update Child Account.
|
102 |
-
@param {Array} data contains php array with key value pair.
|
103 |
-
@options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory]
|
104 |
-
@options data {String} company_org: Name of Reseller child’s company [Optional]
|
105 |
-
@options data {String} first_name: First name of Reseller child [Optional]
|
106 |
-
@options data {String} last_name: Last name of Reseller child [Optional]
|
107 |
-
@options data {String} password: Password of Reseller child to login [Optional]
|
108 |
-
@options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
|
109 |
-
@options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional]
|
110 |
-
*/
|
111 |
-
public function update_child_account($data)
|
112 |
-
{
|
113 |
-
return $this->put("account",$data);
|
114 |
-
}
|
115 |
-
|
116 |
-
/*
|
117 |
-
Delete Child Account.
|
118 |
-
@param {Array} data contains php array with key value pair.
|
119 |
-
@options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
|
120 |
-
*/
|
121 |
-
public function delete_child_account($data)
|
122 |
-
{
|
123 |
-
return $this->delete("account/".$data['auth_key'],"");
|
124 |
-
}
|
125 |
-
|
126 |
-
/*
|
127 |
-
Get Reseller child Account.
|
128 |
-
@param {Array} data contains php array with key value pair.
|
129 |
-
@options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory]
|
130 |
-
*/
|
131 |
-
public function get_reseller_child($data)
|
132 |
-
{
|
133 |
-
return $this->post("account/getchildv2",$data);
|
134 |
-
}
|
135 |
-
|
136 |
-
/*
|
137 |
-
Add/Remove Reseller child's Email/Sms credits.
|
138 |
-
@param {Array} data contains php array with key value pair.
|
139 |
-
@options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory]
|
140 |
-
@options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty]
|
141 |
-
- email_credit {Integer} number of email credits
|
142 |
-
- sms_credit {Integer} Number of sms credts
|
143 |
-
@options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty]
|
144 |
-
- email_credit {Integer} number of email credits
|
145 |
-
- sms_credit {Integer} Number of sms credts
|
146 |
-
*/
|
147 |
-
public function add_remove_child_credits($data)
|
148 |
-
{
|
149 |
-
return $this->post("account/addrmvcredit",$data);
|
150 |
-
}
|
151 |
-
|
152 |
-
/*
|
153 |
-
Get a particular campaign detail.
|
154 |
-
@param {Array} data contains php array with key value pair.
|
155 |
-
@options data {Integer} id: Unique Id of the campaign [Mandatory]
|
156 |
-
*/
|
157 |
-
public function get_campaign_v2($data)
|
158 |
-
{
|
159 |
-
return $this->get("campaign/".$data['id']."/detailsv2","");
|
160 |
-
}
|
161 |
-
|
162 |
-
/*
|
163 |
-
Get all campaigns detail.
|
164 |
-
@param {Array} data contains php array with key value pair.
|
165 |
-
@options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional]
|
166 |
-
@options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional]
|
167 |
-
@options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional]
|
168 |
-
@options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
|
169 |
-
*/
|
170 |
-
public function get_campaigns_v2($data)
|
171 |
-
{
|
172 |
-
return $this->get("campaign/detailsv2",$data);
|
173 |
-
}
|
174 |
-
|
175 |
-
/*
|
176 |
-
Create and Schedule your campaigns. It returns the ID of the created campaign.
|
177 |
-
@param {Array} data contains php array with key value pair.
|
178 |
-
@options data {String} category: Tag name of the campaign [Optional]
|
179 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
180 |
-
@options data {String} name: Name of the campaign [Mandatory]
|
181 |
-
@options data {String} bat: Email address for test mail [Optional]
|
182 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
|
183 |
-
@options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
|
184 |
-
@options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
|
185 |
-
@options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
|
186 |
-
@options data {String} subject: Subject of the campaign [Mandatory]
|
187 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
188 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
189 |
-
@options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
190 |
-
@options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
|
191 |
-
@options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
|
192 |
-
@options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
|
193 |
-
@options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
|
194 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
195 |
-
|
196 |
-
*/
|
197 |
-
public function create_campaign($data)
|
198 |
-
{
|
199 |
-
return $this->post("campaign",$data);
|
200 |
-
}
|
201 |
-
|
202 |
-
/*
|
203 |
-
Update your campaign.
|
204 |
-
@param {Array} data contains php array with key value pair.
|
205 |
-
@options data {Integer} id: Id of campaign to be modified [Mandatory]
|
206 |
-
@options data {String} category: Tag name of the campaign [Optional]
|
207 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
208 |
-
@options data {String} name: Name of the campaign [Optional]
|
209 |
-
@options data {String} bat: Email address for test mail [Optional]
|
210 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional]
|
211 |
-
@options data {String} html_url: Url which content is the body of content [Optional]
|
212 |
-
@options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
|
213 |
-
@options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
|
214 |
-
@options data {String} subject: Subject of the campaign.
|
215 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
216 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
217 |
-
@options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
218 |
-
@options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
|
219 |
-
@options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
|
220 |
-
@options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
|
221 |
-
@options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
|
222 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
223 |
-
*/
|
224 |
-
public function update_campaign($data)
|
225 |
-
{
|
226 |
-
$id = $data['id'];
|
227 |
-
unset($data['id']);
|
228 |
-
return $this->put("campaign/".$id,$data);
|
229 |
-
}
|
230 |
-
|
231 |
-
/*
|
232 |
-
Delete your campaigns.
|
233 |
-
@param {Array} data contains php array with key value pair.
|
234 |
-
@options data {Integer} id: Id of campaign to be deleted [Mandatory]
|
235 |
-
*/
|
236 |
-
public function delete_campaign($data)
|
237 |
-
{
|
238 |
-
return $this->delete("campaign/".$data['id'],"");
|
239 |
-
}
|
240 |
-
|
241 |
-
/*
|
242 |
-
Send report of Sent and Archived campaign.
|
243 |
-
@param {Array} data contains php array with key value pair.
|
244 |
-
@options data {Integer} id: Id of campaign to send its report [Mandatory]
|
245 |
-
@options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional]
|
246 |
-
@options data {String} email_subject: Message subject [Mandatory]
|
247 |
-
@options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
|
248 |
-
@options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory]
|
249 |
-
@options data {Array} email_bcc: Same as email_to but for Bcc [Optional]
|
250 |
-
@options data {Array} email_cc: Same as email_to but for Cc [Optional]
|
251 |
-
@options data {String} email_body: Body of the message [Mandatory]
|
252 |
-
*/
|
253 |
-
public function campaign_report_email($data)
|
254 |
-
{
|
255 |
-
$id = $data['id'];
|
256 |
-
unset($data['id']);
|
257 |
-
return $this->post("campaign/".$id."/report",$data);
|
258 |
-
}
|
259 |
-
|
260 |
-
/*
|
261 |
-
Export the recipients of a specified campaign.
|
262 |
-
@param {Array} data contains php array with key value pair.
|
263 |
-
@options data {Integer} id: Id of campaign to export its recipients [Mandatory]
|
264 |
-
@options data {String} notify_url: URL that will be called once the export process is finished [Mandatory]
|
265 |
-
@options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory]
|
266 |
-
*/
|
267 |
-
public function campaign_recipients_export($data)
|
268 |
-
{
|
269 |
-
$id = $data['id'];
|
270 |
-
unset($data['id']);
|
271 |
-
return $this->post("campaign/".$id."/recipients",$data);
|
272 |
-
}
|
273 |
-
|
274 |
-
/*
|
275 |
-
Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available.
|
276 |
-
@param {Array} data contains php array with key value pair.
|
277 |
-
@options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory]
|
278 |
-
*/
|
279 |
-
|
280 |
-
public function share_campaign($data)
|
281 |
-
{
|
282 |
-
return $this->post("campaign/sharelinkv2",$data);
|
283 |
-
}
|
284 |
-
|
285 |
-
/*
|
286 |
-
Send a Test Campaign.
|
287 |
-
@param {Array} data contains php array with key value pair.
|
288 |
-
@options data {Integer} id: Id of the campaign [Mandatory]
|
289 |
-
@options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
|
290 |
-
*/
|
291 |
-
public function send_bat_email($data)
|
292 |
-
{
|
293 |
-
$id = $data['id'];
|
294 |
-
unset($data['id']);
|
295 |
-
return $this->post("campaign/".$id."/test",$data);
|
296 |
-
}
|
297 |
-
|
298 |
-
/*
|
299 |
-
Update the Campaign status.
|
300 |
-
@param {Array} data contains php array with key value pair.
|
301 |
-
@options data {Integer} id: Id of campaign to update its status [Mandatory]
|
302 |
-
@options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory]
|
303 |
-
*/
|
304 |
-
public function update_campaign_status($data)
|
305 |
-
{
|
306 |
-
$id = $data['id'];
|
307 |
-
unset($data['id']);
|
308 |
-
return $this->put("campaign/".$id."/updatecampstatus",$data);
|
309 |
-
}
|
310 |
-
|
311 |
-
/*
|
312 |
-
Create and schedule your Trigger campaigns.
|
313 |
-
@param {Array} data contains php array with key value pair.
|
314 |
-
@options data {String} category: Tag name of the campaign [Optional]
|
315 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
316 |
-
@options data {String} trigger_name: Name of the campaign [Mandatory]
|
317 |
-
@options data {String} bat: Email address for test mail [Optional]
|
318 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
|
319 |
-
@options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
|
320 |
-
@options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
|
321 |
-
@options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
|
322 |
-
@options data {String} subject: Subject of the campaign [Mandatory]
|
323 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
324 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
325 |
-
@options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
326 |
-
@options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
|
327 |
-
@options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
|
328 |
-
@options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
|
329 |
-
@options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
|
330 |
-
@options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
|
331 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
332 |
-
*/
|
333 |
-
public function create_trigger_campaign($data)
|
334 |
-
{
|
335 |
-
return $this->post("campaign",$data);
|
336 |
-
}
|
337 |
-
|
338 |
-
/*
|
339 |
-
Update and schedule your Trigger campaigns.
|
340 |
-
@param {Array} data contains php array with key value pair.
|
341 |
-
@options data {Integer} id: Id of Trigger campaign to be modified [Mandatory]
|
342 |
-
@options data {String} category: Tag name of the campaign [Optional]
|
343 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
344 |
-
@options data {String} trigger_name: Name of the campaign [Mandatory]
|
345 |
-
@options data {String} bat Email address for test mail [Optional]
|
346 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
|
347 |
-
@options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
|
348 |
-
@options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
|
349 |
-
@options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
|
350 |
-
@options data {String} subject: Subject of the campaign [Mandatory]
|
351 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
|
352 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
353 |
-
@options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
354 |
-
@options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
|
355 |
-
@options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
|
356 |
-
@options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
|
357 |
-
@options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
|
358 |
-
@options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
|
359 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
360 |
-
*/
|
361 |
-
public function update_trigger_campaign($data)
|
362 |
-
{
|
363 |
-
$id = $data['id'];
|
364 |
-
unset($data['id']);
|
365 |
-
return $this->put("campaign/".$id,$data);
|
366 |
-
}
|
367 |
-
|
368 |
-
/*
|
369 |
-
Get all folders detail.
|
370 |
-
@param {Array} data contains php array with key value pair.
|
371 |
-
@options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory]
|
372 |
-
@options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
|
373 |
-
*/
|
374 |
-
public function get_folders($data)
|
375 |
-
{
|
376 |
-
return $this->get("folder",$data);
|
377 |
-
}
|
378 |
-
|
379 |
-
/*
|
380 |
-
Get a particular folder detail.
|
381 |
-
@param {Array} data contains php array with key value pair.
|
382 |
-
@options data {Integer} id: Id of folder to get details [Mandatory]
|
383 |
-
*/
|
384 |
-
public function get_folder($data)
|
385 |
-
{
|
386 |
-
return $this->get("folder/".$data['id'],"");
|
387 |
-
}
|
388 |
-
|
389 |
-
/*
|
390 |
-
Create a new folder.
|
391 |
-
@param {Array} data contains php array with key value pair.
|
392 |
-
@options data {String} name: Desired name of the folder to be created [Mandatory]
|
393 |
-
*/
|
394 |
-
public function create_folder($data)
|
395 |
-
{
|
396 |
-
return $this->post("folder",$data);
|
397 |
-
}
|
398 |
-
|
399 |
-
/*
|
400 |
-
Delete a specific folder information.
|
401 |
-
@param {Array} data contains php array with key value pair.
|
402 |
-
@options data {Integer} id: Id of folder to be deleted [Mandatory]
|
403 |
-
*/
|
404 |
-
public function delete_folder($data)
|
405 |
-
{
|
406 |
-
return $this->delete("folder/".$data['id'],"");
|
407 |
-
}
|
408 |
-
|
409 |
-
/*
|
410 |
-
Update an existing folder.
|
411 |
-
@param {Array} data contains php array with key value pair.
|
412 |
-
@options data {Integer} id: Id of folder to be modified [Mandatory]
|
413 |
-
@options data {String} name: Desired name of the folder to be modified [Mandatory]
|
414 |
-
*/
|
415 |
-
public function update_folder($data)
|
416 |
-
{
|
417 |
-
$id = $data['id'];
|
418 |
-
unset($data['id']);
|
419 |
-
return $this->put("folder/".$id,$data);
|
420 |
-
}
|
421 |
-
|
422 |
-
/*
|
423 |
-
Get all lists detail.
|
424 |
-
@param {Array} data contains php array with key value pair.
|
425 |
-
@options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional]
|
426 |
-
@options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
|
427 |
-
@options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
|
428 |
-
*/
|
429 |
-
public function get_lists($data)
|
430 |
-
{
|
431 |
-
return $this->get("list",$data);
|
432 |
-
}
|
433 |
-
|
434 |
-
/*
|
435 |
-
Get a particular list detail.
|
436 |
-
@param {Array} data contains php array with key value pair.
|
437 |
-
@options data {Integer} id: Id of list to get details [Mandatory]
|
438 |
-
*/
|
439 |
-
public function get_list($data)
|
440 |
-
{
|
441 |
-
return $this->get("list/".$data['id'],"");
|
442 |
-
}
|
443 |
-
|
444 |
-
/*
|
445 |
-
Create a new list.
|
446 |
-
@param {Array} data contains php array with key value pair.
|
447 |
-
@options data {String} list_name: Desired name of the list to be created [Mandatory]
|
448 |
-
@options data {Integer} list_parent: Folder ID [Mandatory]
|
449 |
-
*/
|
450 |
-
public function create_list($data)
|
451 |
-
{
|
452 |
-
return $this->post("list",$data);
|
453 |
-
}
|
454 |
-
|
455 |
-
/*
|
456 |
-
Update a list.
|
457 |
-
@param {Array} data contains php array with key value pair.
|
458 |
-
@options data {Integer} id: Id of list to be modified [Mandatory]
|
459 |
-
@options data {String} list_name: Desired name of the list to be modified [Optional]
|
460 |
-
@options data {Integer} list_parent: Folder ID [Mandatory]
|
461 |
-
*/
|
462 |
-
public function update_list($data)
|
463 |
-
{
|
464 |
-
$id = $data['id'];
|
465 |
-
unset($data['id']);
|
466 |
-
return $this->put("list/".$id,$data);
|
467 |
-
}
|
468 |
-
|
469 |
-
/*
|
470 |
-
Delete a specific list.
|
471 |
-
@param {Array} data contains php array with key value pair.
|
472 |
-
@options data {Integer} id: Id of list to be deleted [Mandatory]
|
473 |
-
*/
|
474 |
-
public function delete_list($data)
|
475 |
-
{
|
476 |
-
return $this->delete("list/".$data['id'],"");
|
477 |
-
}
|
478 |
-
|
479 |
-
/*
|
480 |
-
Display details of all users for the given lists.
|
481 |
-
@param {Array} data contains php array with key value pair.
|
482 |
-
@options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory]
|
483 |
-
@options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional]
|
484 |
-
@options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional]
|
485 |
-
@options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
|
486 |
-
*/
|
487 |
-
public function display_list_users($data)
|
488 |
-
{
|
489 |
-
return $this->post("list/display",$data);
|
490 |
-
}
|
491 |
-
|
492 |
-
/*
|
493 |
-
Add already existing users in the Sendinblue contacts to the list.
|
494 |
-
@param {Array} data contains php array with key value pair.
|
495 |
-
@options data {Integer} id: Id of list to link users in it [Mandatory]
|
496 |
-
@options data {Array} users: Email address of the already existing user(s) in the Sendinblue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
|
497 |
-
*/
|
498 |
-
|
499 |
-
public function add_users_list($data)
|
500 |
-
{
|
501 |
-
$id = $data['id'];
|
502 |
-
unset($data['id']);
|
503 |
-
return $this->post("list/".$id."/users",$data);
|
504 |
-
}
|
505 |
-
|
506 |
-
/*
|
507 |
-
Delete already existing users in the Sendinblue contacts from the list.
|
508 |
-
@param {Array} data contains php array with key value pair.
|
509 |
-
@options data {Integer} id: Id of list to unlink users from it [Mandatory]
|
510 |
-
@options data {Array} users: Email address of the already existing user(s) in the Sendinblue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
|
511 |
-
*/
|
512 |
-
public function delete_users_list($data)
|
513 |
-
{
|
514 |
-
$id = $data['id'];
|
515 |
-
unset($data['id']);
|
516 |
-
return $this->delete("list/".$id."/delusers",$data);
|
517 |
-
}
|
518 |
-
|
519 |
-
/*
|
520 |
-
Access all the attributes information under the account.
|
521 |
-
No input required
|
522 |
-
*/
|
523 |
-
public function get_attributes()
|
524 |
-
{
|
525 |
-
return $this->get("attribute","");
|
526 |
-
}
|
527 |
-
|
528 |
-
/*
|
529 |
-
Access the specific type of attribute information.
|
530 |
-
@param {Array} data contains php array with key value pair.
|
531 |
-
@options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional]
|
532 |
-
*/
|
533 |
-
public function get_attribute($data)
|
534 |
-
{
|
535 |
-
return $this->get("attribute/".$data['type'],"");
|
536 |
-
}
|
537 |
-
|
538 |
-
/*
|
539 |
-
Create an Attribute.
|
540 |
-
@param {Array} data contains php array with key value pair.
|
541 |
-
@options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory]
|
542 |
-
@options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your Sendinblue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′).
|
543 |
-
The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory]
|
544 |
-
*/
|
545 |
-
public function create_attribute($data)
|
546 |
-
{
|
547 |
-
return $this->post("attribute/",$data);
|
548 |
-
}
|
549 |
-
|
550 |
-
/*
|
551 |
-
Delete a specific type of attribute information.
|
552 |
-
@param {Array} data contains php array with key value pair.
|
553 |
-
@options data {Integer} type: Type of attribute to be deleted [Mandatory]
|
554 |
-
*/
|
555 |
-
public function delete_attribute($type,$data)
|
556 |
-
{
|
557 |
-
$type = $data['type'];
|
558 |
-
unset($data['type']);
|
559 |
-
return $this->post("attribute/".$type,$data);
|
560 |
-
}
|
561 |
-
|
562 |
-
/*
|
563 |
-
Create a new user if an email provided as input, doesn’t exists in the contact list of your Sendinblue account, otherwise it will update the existing user.
|
564 |
-
@param {Array} data contains php array with key value pair.
|
565 |
-
@options data {String} email: Email address of the user to be created in Sendinblue contacts. Already existing email address of user in the Sendinblue contacts to be modified [Mandatory]
|
566 |
-
@options data {Array} attributes: The name of attribute present in your Sendinblue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
|
567 |
-
@options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional]
|
568 |
-
@options data {Array} listid: The list id(s) to be linked from user [Optional]
|
569 |
-
@options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional]
|
570 |
-
@options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional]
|
571 |
-
*/
|
572 |
-
public function create_update_user($data)
|
573 |
-
{
|
574 |
-
return $this->post("user/createdituser",$data);
|
575 |
-
}
|
576 |
-
|
577 |
-
/*
|
578 |
-
Get Access a specific user Information.
|
579 |
-
@param {Array} data contains php array with key value pair.
|
580 |
-
@options data {String} email: Email address of the already existing user in the Sendinblue contacts [Mandatory]
|
581 |
-
*/
|
582 |
-
public function get_user($data)
|
583 |
-
{
|
584 |
-
return $this->get("user/".$data['email'],"");
|
585 |
-
}
|
586 |
-
|
587 |
-
/*
|
588 |
-
Unlink existing user from all lists.
|
589 |
-
@param {Array} data contains php array with key value pair.
|
590 |
-
@options data {String} email: Email address of the already existing user in the Sendinblue contacts to be unlinked from all lists [Mandatory]
|
591 |
-
*/
|
592 |
-
public function delete_user($data)
|
593 |
-
{
|
594 |
-
return $this->delete("user/".$data['email'],"");
|
595 |
-
}
|
596 |
-
|
597 |
-
/*
|
598 |
-
Import Users Information.
|
599 |
-
@param {Array} data contains php array with key value pair.
|
600 |
-
@options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty]
|
601 |
-
@options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty]
|
602 |
-
@options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty]
|
603 |
-
@options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method
|
604 |
-
@options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty]
|
605 |
-
@options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional]
|
606 |
-
*/
|
607 |
-
public function import_users($data)
|
608 |
-
{
|
609 |
-
return $this->post("user/import",$data);
|
610 |
-
}
|
611 |
-
|
612 |
-
/*
|
613 |
-
Export Users Information.
|
614 |
-
@param {Array} data contains php array with key value pair.
|
615 |
-
@options data {String} export_attrib: The name of attribute present in your Sendinblue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional]
|
616 |
-
@options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory]
|
617 |
-
@options data {String} notify_url: URL that will be called once the export process is finished [Optional]
|
618 |
-
*/
|
619 |
-
public function export_users($data)
|
620 |
-
{
|
621 |
-
return $this->post("user/export",$data);
|
622 |
-
}
|
623 |
-
|
624 |
-
/*
|
625 |
-
Get all the processes information under the account.
|
626 |
-
@param {Array} data contains php array with key value pair.
|
627 |
-
@options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
|
628 |
-
@options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
|
629 |
-
*/
|
630 |
-
public function get_processes($data)
|
631 |
-
{
|
632 |
-
return $this->get("process",$data);
|
633 |
-
}
|
634 |
-
|
635 |
-
/*
|
636 |
-
Get the process information.
|
637 |
-
@param {Array} data contains php array with key value pair.
|
638 |
-
@options data {Integer} id: Id of process to get details [Mandatory]
|
639 |
-
*/
|
640 |
-
public function get_process($data)
|
641 |
-
{
|
642 |
-
return $this->get("process/".$data['id'],"");
|
643 |
-
}
|
644 |
-
|
645 |
-
/*
|
646 |
-
To retrieve details of all webhooks.
|
647 |
-
@param {Array} data contains php array with key value pair.
|
648 |
-
@options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional]
|
649 |
-
*/
|
650 |
-
public function get_webhooks($data)
|
651 |
-
{
|
652 |
-
return $this->get("webhook",$data);
|
653 |
-
}
|
654 |
-
|
655 |
-
/*
|
656 |
-
To retrieve details of any particular webhook.
|
657 |
-
@param {Array} data contains php array with key value pair.
|
658 |
-
@options data {Integer} id: Id of webhook to get details [Mandatory]
|
659 |
-
*/
|
660 |
-
public function get_webhook($data)
|
661 |
-
{
|
662 |
-
return $this->get("webhook/".$data['id'],"");
|
663 |
-
}
|
664 |
-
|
665 |
-
/*
|
666 |
-
Create a Webhook.
|
667 |
-
@param {Array} data contains php array with key value pair.
|
668 |
-
@options data {String} url: URL that will be triggered by a webhook [Mandatory]
|
669 |
-
@options data {String} description: Webook description [Optional]
|
670 |
-
@options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
|
671 |
-
@options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional]
|
672 |
-
*/
|
673 |
-
public function create_webhook($data)
|
674 |
-
{
|
675 |
-
return $this->post("webhook",$data);
|
676 |
-
}
|
677 |
-
|
678 |
-
/*
|
679 |
-
Delete a webhook.
|
680 |
-
@param {Array} data contains php array with key value pair.
|
681 |
-
@options data {Integer} id: Id of webhook to be deleted [Mandatory]
|
682 |
-
*/
|
683 |
-
public function delete_webhook($data)
|
684 |
-
{
|
685 |
-
return $this->delete("webhook/".$data['id'],"");
|
686 |
-
}
|
687 |
-
|
688 |
-
/*
|
689 |
-
Update a webhook.
|
690 |
-
@param {Array} data contains php array with key value pair.
|
691 |
-
@options data {Integer} id: Id of webhook to be modified [Mandatory]
|
692 |
-
@options data {String} url: URL that will be triggered by a webhook [Mandatory]
|
693 |
-
@options data {String} description: Webook description [Optional]
|
694 |
-
@options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
|
695 |
-
*/
|
696 |
-
public function update_webhook($data)
|
697 |
-
{
|
698 |
-
$id = $data['id'];
|
699 |
-
unset($data['id']);
|
700 |
-
return $this->put("webhook/".$id,$data);
|
701 |
-
}
|
702 |
-
|
703 |
-
/*
|
704 |
-
Get Access of created senders information.
|
705 |
-
@param {Array} data contains php array with key value pair.
|
706 |
-
@options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional]
|
707 |
-
*/
|
708 |
-
public function get_senders($data)
|
709 |
-
{
|
710 |
-
return $this->get("advanced",$data);
|
711 |
-
}
|
712 |
-
|
713 |
-
/*
|
714 |
-
Create your Senders.
|
715 |
-
@param {Array} data contains php array with key value pair.
|
716 |
-
@options data {String} name: Name of the sender [Mandatory]
|
717 |
-
@options data {String} email: Email address of the sender [Mandatory]
|
718 |
-
@options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
|
719 |
-
*/
|
720 |
-
public function create_sender($data)
|
721 |
-
{
|
722 |
-
return $this->post("advanced",$data);
|
723 |
-
}
|
724 |
-
|
725 |
-
/*
|
726 |
-
Update your Senders.
|
727 |
-
@param {Array} data contains php array with key value pair.
|
728 |
-
@options data {Integer} id: Id of sender to be modified [Mandatory]
|
729 |
-
@options data {String} name: Name of the sender [Mandatory]
|
730 |
-
@options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
|
731 |
-
*/
|
732 |
-
public function update_sender($data)
|
733 |
-
{
|
734 |
-
$id = $data['id'];
|
735 |
-
unset($data['id']);
|
736 |
-
return $this->put("advanced/".$id,$data);
|
737 |
-
}
|
738 |
-
|
739 |
-
/*
|
740 |
-
Delete your Sender Information.
|
741 |
-
@param {Array} data contains php array with key value pair.
|
742 |
-
@options data {Integer} id: Id of sender to be deleted [Mandatory]
|
743 |
-
*/
|
744 |
-
public function delete_sender($data)
|
745 |
-
{
|
746 |
-
return $this->delete("advanced/".$data['id'],"");
|
747 |
-
}
|
748 |
-
|
749 |
-
/*
|
750 |
-
Send Transactional Email.
|
751 |
-
@param {Array} data contains php array with key value pair.
|
752 |
-
@options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory]
|
753 |
-
@options data {String} subject: Message subject [Mandatory]
|
754 |
-
@options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory]
|
755 |
-
@options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use <img src="{YourFileName.Extension}" alt="image" border="0" >, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter
|
756 |
-
@options data {String} text: Body of the message. (text version) [Optional]
|
757 |
-
@options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional]
|
758 |
-
@options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional]
|
759 |
-
@options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional]
|
760 |
-
@options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional]
|
761 |
-
@options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
|
762 |
-
@options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional]
|
763 |
-
*/
|
764 |
-
public function send_email($data)
|
765 |
-
{
|
766 |
-
return $this->post("email",$data);
|
767 |
-
}
|
768 |
-
|
769 |
-
/*
|
770 |
-
Aggregate / date-wise report of the Sendinblue SMTP account.
|
771 |
-
@param {Array} data contains php array with key value pair.
|
772 |
-
@options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional]
|
773 |
-
@options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
|
774 |
-
@options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
|
775 |
-
@options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional]
|
776 |
-
@options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional]
|
777 |
-
*/
|
778 |
-
public function get_statistics($data)
|
779 |
-
{
|
780 |
-
return $this->post("statistics",$data);
|
781 |
-
}
|
782 |
-
|
783 |
-
/*
|
784 |
-
Get Email Event report.
|
785 |
-
@param {Array} data contains php array with key value pair.
|
786 |
-
@options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional]
|
787 |
-
@options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
|
788 |
-
@options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
|
789 |
-
@options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional]
|
790 |
-
@options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional]
|
791 |
-
@options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional]
|
792 |
-
@options data {String} email: Email address to search report for [Optional]
|
793 |
-
*/
|
794 |
-
public function get_report($data)
|
795 |
-
{
|
796 |
-
return $this->post("report",$data);
|
797 |
-
}
|
798 |
-
|
799 |
-
/*
|
800 |
-
Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures.
|
801 |
-
@param {Array} data contains php array with key value pair.
|
802 |
-
@options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
|
803 |
-
@options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
|
804 |
-
@options data {String} email: Email address to delete its bounces [Optional]
|
805 |
-
*/
|
806 |
-
public function delete_bounces($data)
|
807 |
-
{
|
808 |
-
return $this->post("bounces",$data);
|
809 |
-
}
|
810 |
-
|
811 |
-
/*
|
812 |
-
Send templates created on Sendinblue, through Sendinblue SMTP (transactional mails).
|
813 |
-
@param {Array} data contains php array with key value pair.
|
814 |
-
@options data {Integer} id: Id of the template created on Sendinblue account [Mandatory]
|
815 |
-
@options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory]
|
816 |
-
@options data {String} cc: Same as to but for Cc [Optional]
|
817 |
-
@options data {String} bcc: Same as to but for Bcc [Optional]
|
818 |
-
@options data {Array} attrv The name of attribute present in your Sendinblue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
|
819 |
-
@options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional]
|
820 |
-
@options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional]
|
821 |
-
*/
|
822 |
-
public function send_transactional_template($data)
|
823 |
-
{
|
824 |
-
$id = $data['id'];
|
825 |
-
unset($data['id']);
|
826 |
-
return $this->put("template/".$id,$data);
|
827 |
-
}
|
828 |
-
|
829 |
-
/*
|
830 |
-
Create a Template.
|
831 |
-
@param {Array} data contains php array with key value pair.
|
832 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
|
833 |
-
@options data {String} template_name: Name of the Template [Mandatory]
|
834 |
-
@options data {String} bat: Email address for test mail [Optional]
|
835 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
|
836 |
-
@options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty]
|
837 |
-
@options data {String} subject: Subject of the campaign [Mandatory]
|
838 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
|
839 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
840 |
-
@options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
841 |
-
@options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
|
842 |
-
@options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
|
843 |
-
*/
|
844 |
-
public function create_template($data)
|
845 |
-
{
|
846 |
-
return $this->post("template",$data);
|
847 |
-
}
|
848 |
-
|
849 |
-
/*
|
850 |
-
Update a Template.
|
851 |
-
@param {Array} data contains php array with key value pair.
|
852 |
-
@options data {Integer} id: Id of Template to be modified [Mandatory]
|
853 |
-
@options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
|
854 |
-
@options data {String} template_name: Name of the Template [Mandatory]
|
855 |
-
@options data {String} bat: Email address for test mail [Optional]
|
856 |
-
@options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
|
857 |
-
@options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
|
858 |
-
@options data {String} subject: Subject of the campaign [Mandatory]
|
859 |
-
@options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
|
860 |
-
@options data {String} reply_to: The reply to email in the campaign emails [Optional]
|
861 |
-
@options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in Sendinblue account [Optional]
|
862 |
-
@options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
|
863 |
-
@options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
|
864 |
-
*/
|
865 |
-
public function update_template($data)
|
866 |
-
{
|
867 |
-
$id = $data['id'];
|
868 |
-
unset($data['id']);
|
869 |
-
return $this->put("template/".$id,$data);
|
870 |
-
}
|
871 |
-
|
872 |
-
/*
|
873 |
-
Send a transactional SMS.
|
874 |
-
@param {Array} data contains php array with key value pair.
|
875 |
-
@options data {String} to: The mobile number to send SMS to with country code [Mandatory]
|
876 |
-
@options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory]
|
877 |
-
@options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory]
|
878 |
-
@options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional]
|
879 |
-
@options data {String} tag: The tag that you can associate with the message [Optional]
|
880 |
-
@options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional]
|
881 |
-
*/
|
882 |
-
public function send_sms($data)
|
883 |
-
{
|
884 |
-
return $this->post("sms",$data);
|
885 |
-
}
|
886 |
-
|
887 |
-
/*
|
888 |
-
Create & Schedule your SMS campaigns.
|
889 |
-
@param {Array} data contains php array with key value pair.
|
890 |
-
@options data {String} name: Name of the SMS campaign [Mandatory]
|
891 |
-
@options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
|
892 |
-
@options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
|
893 |
-
@options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in Sendinblue account and should not be blacklisted [Optional]
|
894 |
-
@options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
|
895 |
-
@options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
|
896 |
-
@options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
|
897 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
898 |
-
*/
|
899 |
-
public function create_sms_campaign($data)
|
900 |
-
{
|
901 |
-
return $this->post("sms",$data);
|
902 |
-
}
|
903 |
-
|
904 |
-
/*
|
905 |
-
Update your SMS campaigns.
|
906 |
-
@param {Array} data contains php array with key value pair.
|
907 |
-
@options data {Integer} id: Id of the SMS campaign [Mandatory]
|
908 |
-
@options data {String} name: Name of the SMS campaign [Optional]
|
909 |
-
@options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
|
910 |
-
@options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
|
911 |
-
@options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in Sendinblue account and should not be blacklisted [Optional]
|
912 |
-
@options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
|
913 |
-
@options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
|
914 |
-
@options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
|
915 |
-
@options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
|
916 |
-
*/
|
917 |
-
public function update_sms_campaign($data)
|
918 |
-
{
|
919 |
-
$id = $data['id'];
|
920 |
-
unset($data['id']);
|
921 |
-
return $this->put("sms/".$id,$data);
|
922 |
-
}
|
923 |
-
|
924 |
-
/*
|
925 |
-
Send a Test SMS.
|
926 |
-
@param {Array} data contains php array with key value pair.
|
927 |
-
@options data {Integer} id: Id of the SMS campaign [Mandatory]
|
928 |
-
@options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in Sendinblue account and should not be blacklisted [Mandatory]
|
929 |
-
*/
|
930 |
-
public function send_bat_sms($data)
|
931 |
-
{
|
932 |
-
$id = $data['id'];
|
933 |
-
unset($data['id']);
|
934 |
-
return $this->get("sms/".$id,$data);
|
935 |
-
}
|
936 |
-
/*
|
937 |
-
* */
|
938 |
-
public function get_access_tokens()
|
939 |
-
{
|
940 |
-
return $this->get("account/token","");
|
941 |
-
}
|
942 |
-
public function delete_token($key)
|
943 |
-
{
|
944 |
-
return $this->post("account/deletetoken", json_encode(array("token"=>$key)));
|
945 |
-
}
|
946 |
-
|
947 |
-
/**
|
948 |
-
* Method is used to update the user info using web service in Sendinblue.
|
949 |
-
*/
|
950 |
-
public function updateUser($data=array()) {
|
951 |
-
$data['key'] = $this->api_key;
|
952 |
-
$data['webaction'] = 'USERCREADIT';
|
953 |
-
//$data['timezone'] = date_default_timezone_get();
|
954 |
-
$result = json_decode($this->curlRequest($data),true);
|
955 |
-
return $result['result'];
|
956 |
-
}
|
957 |
-
|
958 |
-
/**
|
959 |
-
* Method is used to add the partner's name in Sendinblue.
|
960 |
-
* In this case its "WORDPRESS".
|
961 |
-
*/
|
962 |
-
public function partnerWordpress() {
|
963 |
-
$data = array();
|
964 |
-
$data['key'] = $this->api_key;
|
965 |
-
$data['webaction'] = 'MAILIN-PARTNER';
|
966 |
-
$data['partner'] = 'WORDPRESS';
|
967 |
-
$this->curlRequest($data);
|
968 |
-
}
|
969 |
-
/**
|
970 |
-
* Get default config of user
|
971 |
-
*/
|
972 |
-
public function getPluginConfig()
|
973 |
-
{
|
974 |
-
return $this->get("account/plugin_config", "");
|
975 |
-
}
|
976 |
-
/**
|
977 |
-
* CURL function to send request to the Sendinblue API server
|
978 |
-
*/
|
979 |
-
public function curlRequest($data)
|
980 |
-
{
|
981 |
-
// prepare data for curl post
|
982 |
-
$ndata = '';
|
983 |
-
$data['source'] = 'Wordpress';
|
984 |
-
if (is_array($data))
|
985 |
-
foreach ($data as $key => $value)
|
986 |
-
$ndata .= $key.'='.urlencode($value).'&';
|
987 |
-
else
|
988 |
-
$ndata = $data;
|
989 |
-
$url = 'http://ws.mailin.fr/';
|
990 |
-
|
991 |
-
$args = array(
|
992 |
-
'method' => 'POST',
|
993 |
-
'sslverify' => false,
|
994 |
-
'headers' => array('Expect' => ''),
|
995 |
-
'body' => $ndata
|
996 |
-
);
|
997 |
-
|
998 |
-
$response = wp_remote_request($url, $args);
|
999 |
-
if( is_wp_error($response) ){
|
1000 |
-
$data = array(
|
1001 |
-
'code' => $response->get_error_message()
|
1002 |
-
);
|
1003 |
-
return $data;
|
1004 |
-
}
|
1005 |
-
$data = wp_remote_retrieve_body($response);
|
1006 |
-
return json_decode($data,true);
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Sendinblue REST client
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Mailin
|
8 |
+
{
|
9 |
+
public $api_key;
|
10 |
+
public $base_url;
|
11 |
+
public function __construct($base_url,$api_key)
|
12 |
+
{
|
13 |
+
if(!function_exists('curl_init'))
|
14 |
+
{
|
15 |
+
throw new Exception('Mailin requires CURL module');
|
16 |
+
}
|
17 |
+
$this->base_url = $base_url;
|
18 |
+
$this->api_key = $api_key;
|
19 |
+
}
|
20 |
+
/**
|
21 |
+
* Do CURL request with authorization
|
22 |
+
*/
|
23 |
+
private function do_request($resource,$method,$input)
|
24 |
+
{
|
25 |
+
$called_url = $this->base_url."/".$resource;
|
26 |
+
$ssl_verify = true;
|
27 |
+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
28 |
+
// Windows only over-ride
|
29 |
+
$ssl_verify = false;
|
30 |
+
}
|
31 |
+
|
32 |
+
$args = array(
|
33 |
+
'method' => $method,
|
34 |
+
'sslverify' => $ssl_verify,
|
35 |
+
'headers' => array(
|
36 |
+
'api-key' => $this->api_key,
|
37 |
+
'Content-Type'=> 'application/json'),
|
38 |
+
);
|
39 |
+
$args['body'] = $input;
|
40 |
+
|
41 |
+
$response = wp_remote_request($called_url, $args);
|
42 |
+
$data = wp_remote_retrieve_body($response);
|
43 |
+
|
44 |
+
return json_decode($data,true);
|
45 |
+
}
|
46 |
+
public function post($resource,$input)
|
47 |
+
{
|
48 |
+
return $this->do_request($resource,"POST",json_encode($input));
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @return mixed
|
53 |
+
*/
|
54 |
+
public function generateApiV3Key()
|
55 |
+
{
|
56 |
+
return $this->post("/account/generateapiv3key", ['name' => 'wordpress']);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/sendinblue.php
CHANGED
@@ -23,30 +23,20 @@
|
|
23 |
}
|
24 |
|
25 |
}
|
|
|
26 |
/**
|
27 |
-
*
|
|
|
28 |
*/
|
29 |
-
|
30 |
private function do_request($input)
|
31 |
{
|
32 |
$input['key'] = $this->api_key;
|
33 |
-
$
|
34 |
-
|
35 |
-
|
36 |
-
// Windows only over-ride
|
37 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
38 |
-
}
|
39 |
-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
40 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
41 |
-
curl_setopt($ch, CURLOPT_HEADER, 0);
|
42 |
-
$data = curl_exec($ch);
|
43 |
-
if(curl_errno($ch))
|
44 |
-
{
|
45 |
-
echo 'Curl error: ' . curl_error($ch). '\n';
|
46 |
-
}
|
47 |
-
curl_close($ch);
|
48 |
return json_decode($data,true);
|
49 |
}
|
|
|
50 |
public function identify($data)
|
51 |
{
|
52 |
$data['sib_type'] = 'identify';
|
23 |
}
|
24 |
|
25 |
}
|
26 |
+
|
27 |
/**
|
28 |
+
* @param $input
|
29 |
+
* @return mixed
|
30 |
*/
|
|
|
31 |
private function do_request($input)
|
32 |
{
|
33 |
$input['key'] = $this->api_key;
|
34 |
+
$url = $this->base_url . "?" . http_build_query($input);
|
35 |
+
$data = wp_remote_retrieve_body(wp_remote_request($url, ['method' => 'GET']));
|
36 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
return json_decode($data,true);
|
38 |
}
|
39 |
+
|
40 |
public function identify($data)
|
41 |
{
|
42 |
$data['sib_type'] = 'identify';
|
inc/sib-api-manager.php
CHANGED
@@ -29,111 +29,38 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
29 |
// get account's info.
|
30 |
$account_info = get_transient( 'sib_credit_' . md5( SIB_Manager::$access_key ) );
|
31 |
if ( false === $account_info || false == $account_info ) {
|
32 |
-
$
|
33 |
-
|
34 |
-
if (
|
35 |
-
|
36 |
-
$count = count( $account_data );
|
37 |
-
if ( isset($account_data[ $count -1 ]['plan_type']) )
|
38 |
-
{
|
39 |
-
$account_email = $account_data[ $count - 2 ]['email'];
|
40 |
-
$account_user_name = $account_data[ $count - 2 ]['first_name'] . ' ' . $account_data[ $count - 2 ]['last_name'];
|
41 |
-
}
|
42 |
-
else{
|
43 |
-
$account_email = $account_data[ $count - 1 ]['email'];
|
44 |
-
$account_user_name = $account_data[ $count - 1 ]['first_name'] . ' ' . $account_data[ $count - 1 ]['last_name'];
|
45 |
-
}
|
46 |
|
47 |
$account_info = array(
|
48 |
'account_email' => $account_email,
|
49 |
-
'account_user_name' => $
|
50 |
-
'account_data' => $
|
51 |
);
|
52 |
-
}
|
|
|
|
|
53 |
set_transient( 'sib_credit_' . md5( SIB_Manager::$access_key ), $account_info, self::DELAYTIME );
|
54 |
}
|
55 |
return $account_info;
|
56 |
}
|
57 |
|
58 |
-
/** Get campaign stats */
|
59 |
-
public static function get_campaign_stats() {
|
60 |
-
$campaigns = get_transient( 'sib_campaigns_' . md5( SIB_Manager::$access_key ) );
|
61 |
-
if ( false === $campaigns || false == $campaigns ) {
|
62 |
-
$mailin = new SibMailin( SIB_Manager::SENDINBLUE_API_URL, SIB_Manager::$access_key );
|
63 |
-
$data = array();
|
64 |
-
$response = $mailin->get_campaigns_v2( $data );
|
65 |
-
|
66 |
-
$ret = array(
|
67 |
-
'classic' => array(
|
68 |
-
'Sent' => 0,
|
69 |
-
'Draft' => 0,
|
70 |
-
'Queued' => 0,
|
71 |
-
'Suspended' => 0,
|
72 |
-
'In_process' => 0,
|
73 |
-
'Archive' => 0,
|
74 |
-
'Sent and Archived' => 0,
|
75 |
-
'Temp_active' => 0,
|
76 |
-
'Temp_inactive' => 0,
|
77 |
-
'Scheduled' => 0,
|
78 |
-
),
|
79 |
-
'sms' => array(
|
80 |
-
'Sent' => 0,
|
81 |
-
'Draft' => 0,
|
82 |
-
'Queued' => 0,
|
83 |
-
'Suspended' => 0,
|
84 |
-
'In_process' => 0,
|
85 |
-
'Archive' => 0,
|
86 |
-
'Sent and Archived' => 0,
|
87 |
-
'Temp_active' => 0,
|
88 |
-
'Temp_inactive' => 0,
|
89 |
-
'Scheduled' => 0,
|
90 |
-
),
|
91 |
-
'trigger' => array(
|
92 |
-
'Sent' => 0,
|
93 |
-
'Draft' => 0,
|
94 |
-
'Queued' => 0,
|
95 |
-
'Suspended' => 0,
|
96 |
-
'In_process' => 0,
|
97 |
-
'Archive' => 0,
|
98 |
-
'Sent and Archived' => 0,
|
99 |
-
'Temp_active' => 0,
|
100 |
-
'Temp_inactive' => 0,
|
101 |
-
'Scheduled' => 0,
|
102 |
-
),
|
103 |
-
);
|
104 |
-
|
105 |
-
$campaign_records = ( 'success' == $response['code'] ) ? $response['data']['campaign_records'] : array();
|
106 |
-
|
107 |
-
if ( isset( $campaign_records ) && is_array( $campaign_records ) ) {
|
108 |
-
foreach ( $campaign_records as $campaign_record ) {
|
109 |
-
if ( 'template' == $campaign_record['type'] || '' == $campaign_record['type'] ) {
|
110 |
-
continue;
|
111 |
-
}
|
112 |
-
|
113 |
-
$ret[ $campaign_record['type'] ][ $campaign_record['status'] ]++;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
$campaigns = $ret;
|
117 |
-
set_transient( 'sib_campaigns_' . md5( SIB_Manager::$access_key ), $campaigns, self::DELAYTIME );
|
118 |
-
}
|
119 |
-
|
120 |
-
return $campaigns;
|
121 |
-
}
|
122 |
-
|
123 |
/** Get smtp status */
|
124 |
public static function get_smtp_status() {
|
125 |
$status = get_transient( 'sib_smtp_status_' . md5( SIB_Manager::$access_key ) );
|
126 |
if ( false === $status || false == $status ) {
|
127 |
-
|
128 |
-
|
129 |
$status = 'disabled';
|
130 |
-
if (
|
131 |
-
$status = $
|
132 |
set_transient( 'sib_smtp_status_' . md5( SIB_Manager::$access_key ), $status, self::DELAYTIME );
|
133 |
|
134 |
// get Marketing Automation API key.
|
135 |
-
if ( isset( $
|
136 |
-
$ma_key = $
|
137 |
} else {
|
138 |
$ma_key = '';
|
139 |
}
|
@@ -151,22 +78,30 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
151 |
$attrs = get_transient( 'sib_attributes_' . md5( SIB_Manager::$access_key ) );
|
152 |
|
153 |
if ( false === $attrs || false == $attrs ) {
|
154 |
-
$mailin = new
|
155 |
-
$response = $mailin->
|
156 |
-
$attributes = $response['
|
157 |
-
|
158 |
-
|
159 |
-
$attributes = array(
|
160 |
'normal_attributes' => array(),
|
161 |
'category_attributes' => array(),
|
162 |
-
)
|
163 |
-
}
|
164 |
-
$attrs = array(
|
165 |
-
'attributes' => $attributes,
|
166 |
);
|
|
|
167 |
if ( count( $attributes ) > 0 ) {
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
|
|
|
|
170 |
}
|
171 |
|
172 |
return $attrs;
|
@@ -180,24 +115,23 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
180 |
$templates = get_transient( 'sib_template_' . md5( SIB_Manager::$access_key ) );
|
181 |
|
182 |
if ( false === $templates || false == $templates ) {
|
183 |
-
$mailin = new
|
184 |
$data = array(
|
185 |
-
'
|
186 |
-
'status' => 'temp_active',
|
187 |
);
|
188 |
-
$templates = $mailin->
|
189 |
$template_data = array();
|
190 |
|
191 |
-
if (
|
192 |
|
193 |
-
foreach ( $templates['
|
194 |
$is_dopt = 0;
|
195 |
-
if ( strpos( $template['
|
196 |
$is_dopt = 1;
|
197 |
}
|
198 |
$template_data[] = array(
|
199 |
'id' => $template['id'],
|
200 |
-
'name' => $template['
|
201 |
'is_dopt' => $is_dopt,
|
202 |
);
|
203 |
|
@@ -223,75 +157,45 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
223 |
// get lists.
|
224 |
$lists = get_transient( 'sib_list_' . md5( SIB_Manager::$access_key ) );
|
225 |
if ( false === $lists || false == $lists ) {
|
226 |
-
|
227 |
-
$
|
228 |
-
$list_data = $mailin->get_lists( $data );
|
229 |
$lists = array();
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
244 |
}
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
/** Get total users */
|
249 |
-
public static function get_totalusers() {
|
250 |
-
$total_subscribers = get_transient( 'sib_totalusers_' . md5( SIB_Manager::$access_key ) );
|
251 |
-
if ( false === $total_subscribers || false == $total_subscribers ) {
|
252 |
-
$mailin = new SibMailin( SIB_Manager::SENDINBLUE_API_URL, SIB_Manager::$access_key );
|
253 |
-
$data = array();
|
254 |
-
$list_response = $mailin->get_lists( $data );
|
255 |
-
if ( 'success' != $list_response['code'] ) {
|
256 |
-
$total_subscribers = 0;
|
257 |
-
} else {
|
258 |
-
$list_datas = $list_response['data'];
|
259 |
-
$list_ids = array();
|
260 |
-
if ( isset( $list_datas ) && is_array( $list_datas ) ) {
|
261 |
-
foreach ( $list_datas as $list_data ) {
|
262 |
-
$list_ids[] = $list_data['id'];
|
263 |
-
}
|
264 |
-
}
|
265 |
-
$data = array(
|
266 |
-
'listids' => $list_ids,
|
267 |
-
'page' => 1,
|
268 |
-
'page_limit' => 500,
|
269 |
-
);
|
270 |
-
$users_response = $mailin->display_list_users( $data );
|
271 |
-
$total_subscribers = isset($users_response['data']['total_list_records']) ? intval( $users_response['data']['total_list_records'] ) : 0;
|
272 |
-
}
|
273 |
-
set_transient( 'sib_totalusers_' . md5( SIB_Manager::$access_key ), $total_subscribers, self::DELAYTIME );
|
274 |
}
|
275 |
-
return $
|
276 |
}
|
277 |
|
278 |
/** Get all sender of sendinblue */
|
279 |
public static function get_sender_lists() {
|
280 |
$senders = get_transient( 'sib_senders_' . md5( SIB_Manager::$access_key ) );
|
281 |
if ( false === $senders || false == $senders ) {
|
282 |
-
$mailin = new
|
283 |
-
$
|
284 |
-
'option' => '',
|
285 |
-
);
|
286 |
-
$response = $mailin->get_senders( $data );
|
287 |
$senders = array();
|
288 |
-
if (
|
289 |
// reorder by id.
|
290 |
-
foreach ( $response['
|
291 |
$senders[] = array(
|
292 |
'id' => $sender['id'],
|
293 |
-
'from_name' => $sender['
|
294 |
-
'from_email' => $sender['
|
295 |
);
|
296 |
}
|
297 |
}
|
@@ -312,6 +216,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
312 |
delete_transient( 'sib_attributes_' . md5( SIB_Manager::$access_key ) );
|
313 |
delete_transient( 'sib_template_' . md5( SIB_Manager::$access_key ) );
|
314 |
delete_transient( 'sib_senders_' . md5( SIB_Manager::$access_key ) );
|
|
|
315 |
}
|
316 |
|
317 |
/**
|
@@ -321,9 +226,14 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
321 |
*/
|
322 |
public static function identify_user( $data ) {
|
323 |
$general_settings = get_option( SIB_Manager::MAIN_OPTION_NAME, array() );
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
327 |
}
|
328 |
|
329 |
/**
|
@@ -333,8 +243,8 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
333 |
* @return array|mixed|object
|
334 |
*/
|
335 |
public static function send_email( $data ) {
|
336 |
-
$mailin = new
|
337 |
-
$result = $mailin->
|
338 |
return $result;
|
339 |
}
|
340 |
|
@@ -347,7 +257,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
347 |
* @return array
|
348 |
*/
|
349 |
static function validation_email( $type = 'simple', $email, $list_id ) {
|
350 |
-
$mailin = new
|
351 |
|
352 |
$isDopted = false;
|
353 |
|
@@ -362,11 +272,10 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
362 |
$data = array(
|
363 |
'email' => $email,
|
364 |
);
|
365 |
-
$
|
366 |
-
$res = $response['data'];
|
367 |
|
368 |
// new user.
|
369 |
-
if ( '
|
370 |
$ret = array(
|
371 |
'code' => 'new',
|
372 |
'isDopted' => $isDopted,
|
@@ -375,9 +284,9 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
375 |
return $ret;
|
376 |
}
|
377 |
|
378 |
-
$listid = $res['
|
379 |
|
380 |
-
//
|
381 |
if ( ! isset( $listid ) || ! is_array( $listid ) ) {
|
382 |
$ret = array(
|
383 |
'code' => 'update',
|
@@ -406,7 +315,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
406 |
array_push( $listid, $temp_dopt_list );
|
407 |
}
|
408 |
} else {
|
409 |
-
if ( '1' == $res['
|
410 |
$status = 'update';
|
411 |
} else {
|
412 |
$status = 'already_exist';
|
@@ -455,21 +364,48 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
455 |
$listid = array_diff( $listid, $list_unlink );
|
456 |
}
|
457 |
|
458 |
-
$mailin = new
|
459 |
-
$
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
if('' != $exist)
|
470 |
{
|
471 |
$response['code'] = $exist;
|
472 |
}
|
|
|
|
|
|
|
|
|
473 |
return $response['code'];
|
474 |
}
|
475 |
|
@@ -483,7 +419,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
483 |
* @param string $code - code.
|
484 |
*/
|
485 |
public static function send_comfirm_email( $type = 'confirm', $to_email, $template_id = '-1', $attributes = null, $code = '' ) {
|
486 |
-
$mailin = new
|
487 |
|
488 |
// set subject info.
|
489 |
if ( 'confirm' == $type ) {
|
@@ -517,20 +453,20 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
517 |
$data = array(
|
518 |
'id' => $template_id,
|
519 |
);
|
520 |
-
$response = $mailin->
|
521 |
-
if (
|
522 |
-
$html_content = $response['
|
523 |
-
if ( trim( $response['
|
524 |
-
$subject = trim( $response['
|
525 |
}
|
526 |
-
if ( ( '[DEFAULT_FROM_NAME]' != $response['
|
527 |
-
( '[DEFAULT_FROM_EMAIL]' != $response['
|
528 |
-
( '' != $response['
|
529 |
) {
|
530 |
-
$sender_name = $response['
|
531 |
-
$sender_email = $response['
|
532 |
}
|
533 |
-
$transactional_tags = $response['
|
534 |
|
535 |
// pls ask Ekta about attachment of template.
|
536 |
}
|
@@ -578,31 +514,28 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
578 |
'EMAIL' => $to_email,
|
579 |
)
|
580 |
);
|
581 |
-
|
582 |
-
|
583 |
-
'to' => $to_email,
|
584 |
-
'attr' => $attrs,
|
585 |
-
'attachment_url' => '',
|
586 |
-
'headers' => array(
|
587 |
-
'Content-Type' => 'text/html;charset=iso-8859-1',
|
588 |
-
'X-Mailin-tag' => $transactional_tags,
|
589 |
-
),
|
590 |
-
);
|
591 |
-
$res = $mailin->send_transactional_template( $data );
|
592 |
} else {
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
}
|
607 |
} else {
|
608 |
$headers[] = 'Content-Type: text/html; charset=UTF-8';
|
@@ -640,25 +573,36 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
640 |
/**
|
641 |
* Sync wp users to contact list.
|
642 |
*
|
643 |
-
* @param
|
644 |
* @param array $list_ids - desired lists
|
645 |
* @return array|mixed|object
|
646 |
*/
|
647 |
public static function sync_users( $users_info, $list_ids ) {
|
648 |
-
$
|
649 |
$data = array(
|
650 |
-
'
|
651 |
-
'
|
652 |
);
|
653 |
-
$
|
654 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
}
|
656 |
|
657 |
/**
|
658 |
* Subscribe process for double optin subscribers
|
659 |
*/
|
660 |
public static function subscribe() {
|
661 |
-
$code = isset( $_GET['code'] ) ?
|
662 |
|
663 |
$contact_info = SIB_Model_Users::get_data_by_code( $code );
|
664 |
|
@@ -767,9 +711,9 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
767 |
* Unsubscribe process
|
768 |
*/
|
769 |
function unsubscribe() {
|
770 |
-
$mailin = new
|
771 |
-
$code = isset( $_GET['code'] ) ? esc_attr(
|
772 |
-
$list_id = isset( $_GET['li'] ) ? intval(
|
773 |
|
774 |
$email = base64_decode( strtr( $code, '-_', '+/' ) );
|
775 |
$data = array(
|
@@ -777,27 +721,23 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
777 |
);
|
778 |
$response = $mailin->get_user( $data );
|
779 |
|
780 |
-
if (
|
781 |
-
$attributes = $response['
|
782 |
|
783 |
-
$listid = $response['
|
784 |
|
785 |
-
$blacklisted = $response['
|
786 |
$diff_listid = array_diff( $listid, array( $list_id ) );
|
787 |
|
788 |
if ( count( $diff_listid ) == 0 ) {
|
789 |
-
$blacklisted =
|
790 |
$diff_listid = $listid;
|
791 |
}
|
792 |
$data = array(
|
793 |
'email' => $email,
|
794 |
-
'
|
795 |
-
'blacklisted' => $blacklisted,
|
796 |
-
'listid' => $diff_listid,
|
797 |
-
'listid_unlink' => null,
|
798 |
-
'blacklisted_sms' => 0,
|
799 |
);
|
800 |
-
$mailin->
|
801 |
}
|
802 |
?>
|
803 |
<body style="margin:0; padding:0;">
|
@@ -865,67 +805,55 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
865 |
exit;
|
866 |
}
|
867 |
|
868 |
-
/** Update access token */
|
869 |
-
public static function update_access_token() {
|
870 |
-
$access_token_settings = get_option( SIB_Manager::ACCESS_TOKEN_OPTION_NAME, array() );
|
871 |
-
$access_token = isset( $access_token_settings['access_token'] ) ? $access_token_settings['access_token'] : '';
|
872 |
-
|
873 |
-
$mailin = new SibMailin( SIB_Manager::SENDINBLUE_API_URL, SIB_Manager::$access_key );
|
874 |
-
$mailin->delete_token( $access_token );
|
875 |
-
|
876 |
-
$access_response = $mailin->get_access_tokens();
|
877 |
-
if ( 'success' != $access_response['code'] ) {
|
878 |
-
$access_response = $mailin->get_access_tokens();
|
879 |
-
}
|
880 |
-
$access_token = $access_response['data']['access_token'];
|
881 |
-
$token_settings = array(
|
882 |
-
'access_token' => $access_token,
|
883 |
-
);
|
884 |
-
|
885 |
-
update_option( SIB_Manager::ACCESS_TOKEN_OPTION_NAME, $token_settings );
|
886 |
-
return $access_token;
|
887 |
-
}
|
888 |
-
|
889 |
/** Create list and attribute for double optin */
|
890 |
public static function create_default_dopt() {
|
891 |
|
892 |
-
$mailin = new
|
893 |
-
|
894 |
// add list.
|
895 |
$isEmpty = false;
|
896 |
-
|
897 |
-
$list_data = $mailin->
|
898 |
-
foreach ( $list_data['
|
899 |
-
if ( 'Temp - DOUBLE OPTIN' == $
|
900 |
$isEmpty = true;
|
901 |
-
|
902 |
}
|
903 |
}
|
904 |
-
|
|
|
905 |
$data = array(
|
906 |
-
'
|
907 |
-
'
|
908 |
);
|
909 |
-
$mailin->
|
910 |
}
|
|
|
911 |
|
912 |
// add attribute.
|
913 |
$isEmpty = false;
|
914 |
-
$
|
915 |
-
|
916 |
-
)
|
917 |
-
|
918 |
-
|
919 |
-
if ( 'DOUBLE_OPT-IN' == $attr['name'] && ! empty( $attr['enumeration'] ) ) {
|
920 |
-
$isEmpty = true;
|
921 |
}
|
922 |
}
|
|
|
923 |
if ( ! $isEmpty ) {
|
924 |
-
$data =
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
}
|
930 |
}
|
931 |
|
29 |
// get account's info.
|
30 |
$account_info = get_transient( 'sib_credit_' . md5( SIB_Manager::$access_key ) );
|
31 |
if ( false === $account_info || false == $account_info ) {
|
32 |
+
$client = new SendinblueApiClient();
|
33 |
+
$account = $client->getAccount();
|
34 |
+
if ($client->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK && !empty($account['email'])) {
|
35 |
+
$account_email = $account['email'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
$account_info = array(
|
38 |
'account_email' => $account_email,
|
39 |
+
'account_user_name' => $account['firstName'] . ' ' . $account['lastName'],
|
40 |
+
'account_data' => $account['plan'],
|
41 |
);
|
42 |
+
} else {
|
43 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
44 |
+
}
|
45 |
set_transient( 'sib_credit_' . md5( SIB_Manager::$access_key ), $account_info, self::DELAYTIME );
|
46 |
}
|
47 |
return $account_info;
|
48 |
}
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/** Get smtp status */
|
51 |
public static function get_smtp_status() {
|
52 |
$status = get_transient( 'sib_smtp_status_' . md5( SIB_Manager::$access_key ) );
|
53 |
if ( false === $status || false == $status ) {
|
54 |
+
$client = new SendinblueApiClient();
|
55 |
+
$account = $client->getAccount();
|
56 |
$status = 'disabled';
|
57 |
+
if ($client->getLastResponseCode() == 200) {
|
58 |
+
$status = $account['relay']['enabled'] ? 'enabled' : 'disabled';
|
59 |
set_transient( 'sib_smtp_status_' . md5( SIB_Manager::$access_key ), $status, self::DELAYTIME );
|
60 |
|
61 |
// get Marketing Automation API key.
|
62 |
+
if ( isset( $account['marketingAutomation']['enabled'] ) && true == $account['marketingAutomation']['enabled'] ) {
|
63 |
+
$ma_key = $account['marketingAutomation']['key'];
|
64 |
} else {
|
65 |
$ma_key = '';
|
66 |
}
|
78 |
$attrs = get_transient( 'sib_attributes_' . md5( SIB_Manager::$access_key ) );
|
79 |
|
80 |
if ( false === $attrs || false == $attrs ) {
|
81 |
+
$mailin = new SendinblueApiClient();
|
82 |
+
$response = $mailin->getAttributes();
|
83 |
+
$attributes = $response['attributes'];
|
84 |
+
$attrs = array(
|
85 |
+
'attributes' => array(
|
|
|
86 |
'normal_attributes' => array(),
|
87 |
'category_attributes' => array(),
|
88 |
+
)
|
|
|
|
|
|
|
89 |
);
|
90 |
+
|
91 |
if ( count( $attributes ) > 0 ) {
|
92 |
+
foreach ($attributes as $key => $value) {
|
93 |
+
if ($value["category"] == "normal") {
|
94 |
+
$attrs['attributes']['normal_attributes'][] = $value;
|
95 |
+
}
|
96 |
+
elseif ($value["category"] == "category") {
|
97 |
+
$value["type"] = "category";
|
98 |
+
$attrs['attributes']['category_attributes'][] = $value;
|
99 |
+
}
|
100 |
+
|
101 |
+
}
|
102 |
}
|
103 |
+
|
104 |
+
set_transient( 'sib_attributes_' . md5( SIB_Manager::$access_key ), $attrs, self::DELAYTIME );
|
105 |
}
|
106 |
|
107 |
return $attrs;
|
115 |
$templates = get_transient( 'sib_template_' . md5( SIB_Manager::$access_key ) );
|
116 |
|
117 |
if ( false === $templates || false == $templates ) {
|
118 |
+
$mailin = new SendinblueApiClient();
|
119 |
$data = array(
|
120 |
+
'templateStatus' => true
|
|
|
121 |
);
|
122 |
+
$templates = $mailin->getEmailTemplates( $data );
|
123 |
$template_data = array();
|
124 |
|
125 |
+
if ( $mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK ) {
|
126 |
|
127 |
+
foreach ( $templates['templates'] as $template ) {
|
128 |
$is_dopt = 0;
|
129 |
+
if ( strpos( $template['htmlContent'], 'DOUBLEOPTIN' ) != false || strpos( $template['htmlContent'], 'doubleoptin' ) != false) {
|
130 |
$is_dopt = 1;
|
131 |
}
|
132 |
$template_data[] = array(
|
133 |
'id' => $template['id'],
|
134 |
+
'name' => $template['name'],
|
135 |
'is_dopt' => $is_dopt,
|
136 |
);
|
137 |
|
157 |
// get lists.
|
158 |
$lists = get_transient( 'sib_list_' . md5( SIB_Manager::$access_key ) );
|
159 |
if ( false === $lists || false == $lists ) {
|
160 |
+
|
161 |
+
$mailin = new SendinblueApiClient();
|
|
|
162 |
$lists = array();
|
163 |
+
$list_data = $mailin->getAllLists();
|
164 |
+
|
165 |
+
if (!empty($list_data['lists'])) {
|
166 |
+
foreach ( $list_data['lists'] as $value ) {
|
167 |
+
if ( 'Temp - DOUBLE OPTIN' == $value['name'] ) {
|
168 |
+
$tempList = $value['id'];
|
169 |
+
update_option( SIB_Manager::TEMPLIST_OPTION_NAME, $tempList );
|
170 |
+
continue;
|
171 |
+
}
|
172 |
+
$lists[] = array(
|
173 |
+
'id' => $value['id'],
|
174 |
+
'name' => $value['name'],
|
175 |
+
);
|
176 |
+
}
|
177 |
+
}
|
178 |
}
|
179 |
+
if ( count( $lists ) > 0 ) {
|
180 |
+
set_transient( 'sib_list_' . md5( SIB_Manager::$access_key ), $lists, self::DELAYTIME );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
+
return $lists;
|
183 |
}
|
184 |
|
185 |
/** Get all sender of sendinblue */
|
186 |
public static function get_sender_lists() {
|
187 |
$senders = get_transient( 'sib_senders_' . md5( SIB_Manager::$access_key ) );
|
188 |
if ( false === $senders || false == $senders ) {
|
189 |
+
$mailin = new SendinblueApiClient();
|
190 |
+
$response = $mailin->getSenders();
|
|
|
|
|
|
|
191 |
$senders = array();
|
192 |
+
if ($mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK) {
|
193 |
// reorder by id.
|
194 |
+
foreach ( $response['senders'] as $sender ) {
|
195 |
$senders[] = array(
|
196 |
'id' => $sender['id'],
|
197 |
+
'from_name' => $sender['name'],
|
198 |
+
'from_email' => $sender['email'],
|
199 |
);
|
200 |
}
|
201 |
}
|
216 |
delete_transient( 'sib_attributes_' . md5( SIB_Manager::$access_key ) );
|
217 |
delete_transient( 'sib_template_' . md5( SIB_Manager::$access_key ) );
|
218 |
delete_transient( 'sib_senders_' . md5( SIB_Manager::$access_key ) );
|
219 |
+
delete_transient( SIB_Manager::API_KEY_V3_OPTION_NAME);
|
220 |
}
|
221 |
|
222 |
/**
|
226 |
*/
|
227 |
public static function identify_user( $data ) {
|
228 |
$general_settings = get_option( SIB_Manager::MAIN_OPTION_NAME, array() );
|
229 |
+
if (isset($general_settings['ma_key'])) {
|
230 |
+
try {
|
231 |
+
$event = new Sendinblue( $general_settings['ma_key'] );
|
232 |
+
$event->identify( $data );
|
233 |
+
} catch (Exception $exception) {
|
234 |
+
echo $exception->getMessage() . "\n";
|
235 |
+
}
|
236 |
+
}
|
237 |
}
|
238 |
|
239 |
/**
|
243 |
* @return array|mixed|object
|
244 |
*/
|
245 |
public static function send_email( $data ) {
|
246 |
+
$mailin = new SendinblueApiClient( );
|
247 |
+
$result = $mailin->sendEmail( $data );
|
248 |
return $result;
|
249 |
}
|
250 |
|
257 |
* @return array
|
258 |
*/
|
259 |
static function validation_email( $type = 'simple', $email, $list_id ) {
|
260 |
+
$mailin = new SendinblueApiClient( );
|
261 |
|
262 |
$isDopted = false;
|
263 |
|
272 |
$data = array(
|
273 |
'email' => $email,
|
274 |
);
|
275 |
+
$res = $mailin->getUser( $data["email"] );
|
|
|
276 |
|
277 |
// new user.
|
278 |
+
if ( isset($res['code']) && $res['code'] == 'document_not_found' ) {
|
279 |
$ret = array(
|
280 |
'code' => 'new',
|
281 |
'isDopted' => $isDopted,
|
284 |
return $ret;
|
285 |
}
|
286 |
|
287 |
+
$listid = $res['listIds'];
|
288 |
|
289 |
+
// update user when listid is empty.
|
290 |
if ( ! isset( $listid ) || ! is_array( $listid ) ) {
|
291 |
$ret = array(
|
292 |
'code' => 'update',
|
315 |
array_push( $listid, $temp_dopt_list );
|
316 |
}
|
317 |
} else {
|
318 |
+
if ( '1' == $res['emailBlacklisted'] ) {
|
319 |
$status = 'update';
|
320 |
} else {
|
321 |
$status = 'already_exist';
|
364 |
$listid = array_diff( $listid, $list_unlink );
|
365 |
}
|
366 |
|
367 |
+
$mailin = new SendinblueApiClient();
|
368 |
+
$user = $mailin->getUser($email);
|
369 |
+
if($mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK && isset($user['email']))
|
370 |
+
{
|
371 |
+
unset($info["email"]);
|
372 |
+
if(isset($info["internalUserHistory"]) && is_array($info["internalUserHistory"])) {
|
373 |
+
$info["internalUserHistory"][] = array("action"=>"SUBSCRIBE_BY_PLUGIN", "id"=> 1, "name"=>"wordpress");
|
374 |
+
} else {
|
375 |
+
$info["internalUserHistory"] = array(array("action"=>"SUBSCRIBE_BY_PLUGIN", "id"=> 1, "name"=>"wordpress"));
|
376 |
+
}
|
377 |
+
$data = [
|
378 |
+
'email' => $email,
|
379 |
+
'attributes' => $info,
|
380 |
+
'emailBlacklisted' => false,
|
381 |
+
'smsBlacklisted' => false,
|
382 |
+
'listIds' => $listid,
|
383 |
+
'unlinkListIds' => $list_unlink
|
384 |
+
];
|
385 |
+
$mailin->updateUser($email ,$data );
|
386 |
+
}
|
387 |
+
else
|
388 |
+
{
|
389 |
+
$info["internalUserHistory"] = array(array("action"=>"SUBSCRIBE_BY_PLUGIN", "id"=> 1, "name"=>"wordpress"));
|
390 |
+
$data = [
|
391 |
+
'email' => $email,
|
392 |
+
'attributes' => $info,
|
393 |
+
'emailBlacklisted' => false,
|
394 |
+
'smsBlacklisted' => false,
|
395 |
+
'listIds' => $listid
|
396 |
+
];
|
397 |
+
|
398 |
+
$created_user = $mailin->createUser( $data );
|
399 |
+
}
|
400 |
|
401 |
if('' != $exist)
|
402 |
{
|
403 |
$response['code'] = $exist;
|
404 |
}
|
405 |
+
else if(isset($created_user['id']))
|
406 |
+
{
|
407 |
+
$response['code'] = "success";
|
408 |
+
}
|
409 |
return $response['code'];
|
410 |
}
|
411 |
|
419 |
* @param string $code - code.
|
420 |
*/
|
421 |
public static function send_comfirm_email( $type = 'confirm', $to_email, $template_id = '-1', $attributes = null, $code = '' ) {
|
422 |
+
$mailin = new SendinblueApiClient();
|
423 |
|
424 |
// set subject info.
|
425 |
if ( 'confirm' == $type ) {
|
453 |
$data = array(
|
454 |
'id' => $template_id,
|
455 |
);
|
456 |
+
$response = $mailin->getEmailTemplate( $data["id"] );
|
457 |
+
if ( $mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK ) {
|
458 |
+
$html_content = $response['htmlContent'];
|
459 |
+
if ( trim( $response['subject'] ) != '' ) {
|
460 |
+
$subject = trim( $response['subject'] );
|
461 |
}
|
462 |
+
if ( ( '[DEFAULT_FROM_NAME]' != $response['sender']['name'] ) &&
|
463 |
+
( '[DEFAULT_FROM_EMAIL]' != $response['sender']['email'] ) &&
|
464 |
+
( '' != $response['sender']['email'] )
|
465 |
) {
|
466 |
+
$sender_name = $response['sender']['name'];
|
467 |
+
$sender_email = $response['sender']['email'];
|
468 |
}
|
469 |
+
$transactional_tags = $response['sender']['name'];
|
470 |
|
471 |
// pls ask Ekta about attachment of template.
|
472 |
}
|
514 |
'EMAIL' => $to_email,
|
515 |
)
|
516 |
);
|
517 |
+
|
518 |
+
$res = $mailin->sendTransactionalTemplate( intval( $template_id ),['emailTo' => [$to_email]]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
} else {
|
520 |
+
|
521 |
+
$data = [
|
522 |
+
'sender' => [
|
523 |
+
'email' => $from[0],
|
524 |
+
'name' => $from[1],
|
525 |
+
],
|
526 |
+
'replyTo' => [
|
527 |
+
'email' => $from[0],
|
528 |
+
],
|
529 |
+
'to' => [
|
530 |
+
[
|
531 |
+
'email' => $to_email
|
532 |
+
]
|
533 |
+
],
|
534 |
+
'subject' => $subject,
|
535 |
+
'htmlContent' => $html_content
|
536 |
+
];
|
537 |
+
|
538 |
+
$res = $mailin->sendEmail( $data );
|
539 |
}
|
540 |
} else {
|
541 |
$headers[] = 'Content-Type: text/html; charset=UTF-8';
|
573 |
/**
|
574 |
* Sync wp users to contact list.
|
575 |
*
|
576 |
+
* @param string $users_info - user's attributes.
|
577 |
* @param array $list_ids - desired lists
|
578 |
* @return array|mixed|object
|
579 |
*/
|
580 |
public static function sync_users( $users_info, $list_ids ) {
|
581 |
+
$client = new SendinblueApiClient();
|
582 |
$data = array(
|
583 |
+
'fileBody' => $users_info,
|
584 |
+
'listIds' => $list_ids,
|
585 |
);
|
586 |
+
$client->importContacts($data);
|
587 |
+
if ( SendinblueApiClient::RESPONSE_CODE_ACCEPTED == $client->getLastResponseCode() ) {
|
588 |
+
$response = array(
|
589 |
+
'code' => 'success',
|
590 |
+
'message' => __( 'Contact synchronization has started.', 'sib_lang' )
|
591 |
+
);
|
592 |
+
} else {
|
593 |
+
$response = array(
|
594 |
+
'code' => 'failed',
|
595 |
+
'message' => __( 'Something went wrong. PLease try again.', 'sib_lang' )
|
596 |
+
);
|
597 |
+
}
|
598 |
+
return $response;
|
599 |
}
|
600 |
|
601 |
/**
|
602 |
* Subscribe process for double optin subscribers
|
603 |
*/
|
604 |
public static function subscribe() {
|
605 |
+
$code = isset( $_GET['code'] ) ? sanitize_text_field( $_GET['code'] ) : '';
|
606 |
|
607 |
$contact_info = SIB_Model_Users::get_data_by_code( $code );
|
608 |
|
711 |
* Unsubscribe process
|
712 |
*/
|
713 |
function unsubscribe() {
|
714 |
+
$mailin = new SendinblueApiClient();
|
715 |
+
$code = isset( $_GET['code'] ) ? esc_attr( $_GET['code'] ) : '' ;
|
716 |
+
$list_id = isset( $_GET['li'] ) ? intval( esc_attr( $_GET['li'] ) ) : '' ;
|
717 |
|
718 |
$email = base64_decode( strtr( $code, '-_', '+/' ) );
|
719 |
$data = array(
|
721 |
);
|
722 |
$response = $mailin->get_user( $data );
|
723 |
|
724 |
+
if ($mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK) {
|
725 |
+
$attributes = $response['attributes'];
|
726 |
|
727 |
+
$listid = $response['listIds'];
|
728 |
|
729 |
+
$blacklisted = $response['emailBlacklisted'];
|
730 |
$diff_listid = array_diff( $listid, array( $list_id ) );
|
731 |
|
732 |
if ( count( $diff_listid ) == 0 ) {
|
733 |
+
$blacklisted = true;
|
734 |
$diff_listid = $listid;
|
735 |
}
|
736 |
$data = array(
|
737 |
'email' => $email,
|
738 |
+
'data' =>'{"listIds":'.$diff_listid.',"emailBlacklisted":'.$blacklisted.'}'
|
|
|
|
|
|
|
|
|
739 |
);
|
740 |
+
$mailin->updateUser( $data["email"],$data["data"] );
|
741 |
}
|
742 |
?>
|
743 |
<body style="margin:0; padding:0;">
|
805 |
exit;
|
806 |
}
|
807 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
808 |
/** Create list and attribute for double optin */
|
809 |
public static function create_default_dopt() {
|
810 |
|
811 |
+
$mailin = new SendinblueApiClient();
|
|
|
812 |
// add list.
|
813 |
$isEmpty = false;
|
814 |
+
|
815 |
+
$list_data = $mailin->getAllLists();
|
816 |
+
foreach ( $list_data['lists'] as $value ) {
|
817 |
+
if ( 'Temp - DOUBLE OPTIN' == $value['name'] ) {
|
818 |
$isEmpty = true;
|
819 |
+
break;
|
820 |
}
|
821 |
}
|
822 |
+
|
823 |
+
if(!$isEmpty) {
|
824 |
$data = array(
|
825 |
+
'name' => 'Temp - DOUBLE OPTIN',
|
826 |
+
'folderId' => 1,
|
827 |
);
|
828 |
+
$mailin->createList( $data );
|
829 |
}
|
830 |
+
|
831 |
|
832 |
// add attribute.
|
833 |
$isEmpty = false;
|
834 |
+
$ret = $mailin->getAttributes();
|
835 |
+
|
836 |
+
foreach ($ret["attributes"] as $key => $value) {
|
837 |
+
if($value["category"] == "category" && 'DOUBLE_OPT-IN' == $value['name'] && ! empty( $value['enumeration'] ) ) {
|
838 |
+
$isEmpty = true;
|
|
|
|
|
839 |
}
|
840 |
}
|
841 |
+
|
842 |
if ( ! $isEmpty ) {
|
843 |
+
$data = [
|
844 |
+
'enumeration' => [
|
845 |
+
'type' => 'category',
|
846 |
+
[
|
847 |
+
'value' => 1,
|
848 |
+
'label' => 'Yes'
|
849 |
+
],
|
850 |
+
[
|
851 |
+
'value' => 2,
|
852 |
+
'label' => 'No'
|
853 |
+
],
|
854 |
+
]
|
855 |
+
];
|
856 |
+
$client->createAttribute('category', 'DOUBLE_OPT', $data);
|
857 |
}
|
858 |
}
|
859 |
|
inc/sib-form-preview.php
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Page to preview form
|
4 |
-
*/
|
5 |
-
|
6 |
-
$sib_form_id = isset($_GET['sib_form']) ? $_GET['sib_form'] : '';
|
7 |
-
$sib_preview = isset($_GET['action']) ? $_GET['action'] : '';
|
8 |
-
|
9 |
-
wp_head();
|
10 |
-
|
11 |
-
?>
|
12 |
-
<body style="background-color: #f5f5f5;">
|
13 |
-
<div id="page" class="site" style="padding:16px;">
|
14 |
-
<div id="sib-preview-form">
|
15 |
-
<?php
|
16 |
-
if($sib_preview == '') {
|
17 |
-
$formData = SIB_Forms::getForm($sib_form_id);
|
18 |
-
} else {
|
19 |
-
$formData = get_option(SIB_Manager::PREVIEW_OPTION_NAME, array());
|
20 |
-
}
|
21 |
-
if( isset( $formData['gCaptcha'] ) && '0' != $formData['gCaptcha'] ) {
|
22 |
-
if( '1' == $formData['gCaptcha'] ) { // For old forms.
|
23 |
-
$formData['html'] = preg_replace( '/([\s\S]*?)<div class="g-recaptcha"[\s\S]*?data-size="invisible"><\/div>/', '$1', $formData['html'] );
|
24 |
-
}
|
25 |
-
if ( '3' == $formData['gCaptcha'] ) { // The case of using google recaptcha.
|
26 |
-
?>
|
27 |
-
<script type="text/javascript">
|
28 |
-
var onloadSibCallback = function() {
|
29 |
-
grecaptcha.render('sib_captcha',{
|
30 |
-
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>'
|
31 |
-
});
|
32 |
-
};
|
33 |
-
</script>
|
34 |
-
<?php
|
35 |
-
}
|
36 |
-
else { // The case of using google invisible recaptcha.
|
37 |
-
?>
|
38 |
-
<script type="text/javascript">
|
39 |
-
var onloadSibCallback = function() {
|
40 |
-
var element = document.getElementsByClassName('sib-default-btn');
|
41 |
-
grecaptcha.render(element[0],{
|
42 |
-
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>',
|
43 |
-
'callback' : sibVerifyCallback
|
44 |
-
});
|
45 |
-
};
|
46 |
-
</script>
|
47 |
-
<?php
|
48 |
-
}
|
49 |
-
?>
|
50 |
-
<script src="https://www.google.com/recaptcha/api.js?onload=onloadSibCallback&render=explicit" async defer></script>
|
51 |
-
<?php
|
52 |
-
}
|
53 |
-
|
54 |
-
$html = stripslashes_deep($formData['html']);
|
55 |
-
$css = stripslashes_deep($formData['css']);
|
56 |
-
echo $html;
|
57 |
-
?>
|
58 |
-
</div>
|
59 |
-
<style>
|
60 |
-
<?php
|
61 |
-
if($formData['dependTheme'] != '1'){
|
62 |
-
$css = str_replace('[form]', '#sib-preview-form', $css);
|
63 |
-
echo $css;
|
64 |
-
}
|
65 |
-
?>
|
66 |
-
</style>
|
67 |
-
</div>
|
68 |
-
</body>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Page to preview form
|
4 |
+
*/
|
5 |
+
|
6 |
+
$sib_form_id = isset($_GET['sib_form']) ? esc_attr($_GET['sib_form']) : '';
|
7 |
+
$sib_preview = isset($_GET['action']) ? esc_attr($_GET['action']) : '';
|
8 |
+
|
9 |
+
wp_head();
|
10 |
+
|
11 |
+
?>
|
12 |
+
<body style="background-color: #f5f5f5;">
|
13 |
+
<div id="page" class="site" style="padding:16px;">
|
14 |
+
<div id="sib-preview-form">
|
15 |
+
<?php
|
16 |
+
if($sib_preview == '') {
|
17 |
+
$formData = SIB_Forms::getForm($sib_form_id);
|
18 |
+
} else {
|
19 |
+
$formData = get_option(SIB_Manager::PREVIEW_OPTION_NAME, array());
|
20 |
+
}
|
21 |
+
if( isset( $formData['gCaptcha'] ) && '0' != $formData['gCaptcha'] ) {
|
22 |
+
if( '1' == $formData['gCaptcha'] ) { // For old forms.
|
23 |
+
$formData['html'] = preg_replace( '/([\s\S]*?)<div class="g-recaptcha"[\s\S]*?data-size="invisible"><\/div>/', '$1', $formData['html'] );
|
24 |
+
}
|
25 |
+
if ( '3' == $formData['gCaptcha'] ) { // The case of using google recaptcha.
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
var onloadSibCallback = function() {
|
29 |
+
grecaptcha.render('sib_captcha',{
|
30 |
+
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>'
|
31 |
+
});
|
32 |
+
};
|
33 |
+
</script>
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
else { // The case of using google invisible recaptcha.
|
37 |
+
?>
|
38 |
+
<script type="text/javascript">
|
39 |
+
var onloadSibCallback = function() {
|
40 |
+
var element = document.getElementsByClassName('sib-default-btn');
|
41 |
+
grecaptcha.render(element[0],{
|
42 |
+
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>',
|
43 |
+
'callback' : sibVerifyCallback
|
44 |
+
});
|
45 |
+
};
|
46 |
+
</script>
|
47 |
+
<?php
|
48 |
+
}
|
49 |
+
?>
|
50 |
+
<script src="https://www.google.com/recaptcha/api.js?onload=onloadSibCallback&render=explicit" async defer></script>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
|
54 |
+
$html = stripslashes_deep($formData['html']);
|
55 |
+
$css = stripslashes_deep($formData['css']);
|
56 |
+
echo $html;
|
57 |
+
?>
|
58 |
+
</div>
|
59 |
+
<style>
|
60 |
+
<?php
|
61 |
+
if($formData['dependTheme'] != '1'){
|
62 |
+
$css = str_replace('[form]', '#sib-preview-form', $css);
|
63 |
+
echo $css;
|
64 |
+
}
|
65 |
+
?>
|
66 |
+
</style>
|
67 |
+
</div>
|
68 |
+
</body>
|
inc/sib-sms-code.php
CHANGED
@@ -1,122 +1,122 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Get SMS country prefix code
|
4 |
-
*
|
5 |
-
* @package SIB_SMS_Code
|
6 |
-
*/
|
7 |
-
if ( !class_exists( 'SIB_SMS_Code' ) ) {
|
8 |
-
/**
|
9 |
-
* Class SIB_SMS_Code
|
10 |
-
*/
|
11 |
-
class SIB_SMS_Code {
|
12 |
-
|
13 |
-
public $smsCode ;
|
14 |
-
|
15 |
-
function __construct()
|
16 |
-
{
|
17 |
-
$this->smsCode = array(
|
18 |
-
'DZ'=>array('name'=>'ALGERIA','code'=>'213'),
|
19 |
-
'AD'=>array('name'=>'ANDORRA','code'=>'376'),
|
20 |
-
'AR'=>array('name'=>'ARGENTINA','code'=>'54'),
|
21 |
-
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'),
|
22 |
-
'AT'=>array('name'=>'AUSTRIA','code'=>'43'),
|
23 |
-
'AU'=>array('name'=>'AUSTRALIA','code'=>'61'),
|
24 |
-
'BA'=>array('name'=>'BOSNIA AND HERZEGOVINA','code'=>'387'),
|
25 |
-
'BD'=>array('name'=>'BANGLADESH','code'=>'880'),
|
26 |
-
'BE'=>array('name'=>'BELGIUM','code'=>'32'),
|
27 |
-
'BG'=>array('name'=>'BULGARIA','code'=>'359'),
|
28 |
-
'BH'=>array('name'=>'BAHRAIN','code'=>'973'),
|
29 |
-
'BL'=>array('name'=>'SAINT BARTHELEMY','code'=>'590'),
|
30 |
-
'BR'=>array('name'=>'BRAZIL','code'=>'55'),
|
31 |
-
'CA'=>array('name'=>'CANADA','code'=>'1'),
|
32 |
-
'CH'=>array('name'=>'SWITZERLAND','code'=>'41'),
|
33 |
-
'CL'=>array('name'=>'CHILE','code'=>'56'),
|
34 |
-
'CN'=>array('name'=>'CHINA','code'=>'86'),
|
35 |
-
'CO'=>array('name'=>'COLOMBIA','code'=>'57'),
|
36 |
-
'CZ'=>array('name'=>'CZECH REPUBLIC','code'=>'420'),
|
37 |
-
'DE'=>array('name'=>'GERMANY','code'=>'49'),
|
38 |
-
'DK'=>array('name'=>'DENMARK','code'=>'45'),
|
39 |
-
'EC'=>array('name'=>'ECUADOR','code'=>'593'),
|
40 |
-
'EE'=>array('name'=>'ESTONIA','code'=>'372'),
|
41 |
-
'EG'=>array('name'=>'EGYPT','code'=>'20'),
|
42 |
-
'ES'=>array('name'=>'SPAIN','code'=>'34'),
|
43 |
-
'FI'=>array('name'=>'FINLAND','code'=>'358'),
|
44 |
-
'FR'=>array('name'=>'FRANCE','code'=>'33'),
|
45 |
-
'GB'=>array('name'=>'UNITED KINGDOM','code'=>'44'),
|
46 |
-
'GE'=>array('name'=>'GEORGIA','code'=>'995'),
|
47 |
-
'GR'=>array('name'=>'GREECE','code'=>'30'),
|
48 |
-
'HK'=>array('name'=>'HONG KONG','code'=>'852'),
|
49 |
-
'HR'=>array('name'=>'CROATIA','code'=>'385'),
|
50 |
-
'HT'=>array('name'=>'HAITI','code'=>'509'),
|
51 |
-
'HU'=>array('name'=>'HUNGARY','code'=>'36'),
|
52 |
-
'ID'=>array('name'=>'INDONESIA','code'=>'62'),
|
53 |
-
'IE'=>array('name'=>'IRELAND','code'=>'353'),
|
54 |
-
'IL'=>array('name'=>'ISRAEL','code'=>'972'),
|
55 |
-
'IN'=>array('name'=>'INDIA','code'=>'91'),
|
56 |
-
'IR'=>array('name'=>'IRAN','code'=>'98'),
|
57 |
-
'IT'=>array('name'=>'ITALY','code'=>'39'),
|
58 |
-
'JM'=>array('name'=>'JAMAICA','code'=>'1'),
|
59 |
-
'JO'=>array('name'=>'JORDAN','code'=>'962'),
|
60 |
-
'JP'=>array('name'=>'JAPAN','code'=>'81'),
|
61 |
-
'KM'=>array('name'=>'COMOROS','code'=>'269'),
|
62 |
-
'LB'=>array('name'=>'LEBANON','code'=>'961'),
|
63 |
-
'LK'=>array('name'=>'SRI LANKA','code'=>'94'),
|
64 |
-
'LT'=>array('name'=>'LITHUANIA','code'=>'370'),
|
65 |
-
'LU'=>array('name'=>'LUXEMBOURG','code'=>'352'),
|
66 |
-
'LV'=>array('name'=>'LATVIA','code'=>'371'),
|
67 |
-
'MA'=>array('name'=>'MOROCCO','code'=>'212'),
|
68 |
-
'MG'=>array('name'=>'MADAGASCAR','code'=>'261'),
|
69 |
-
'MT'=>array('name'=>'MALTA','code'=>'356'),
|
70 |
-
'MU'=>array('name'=>'MAURITIUS','code'=>'230'),
|
71 |
-
'MX'=>array('name'=>'MEXICO','code'=>'52'),
|
72 |
-
'MY'=>array('name'=>'MALAYSIA','code'=>'60'),
|
73 |
-
'NC'=>array('name'=>'NEW CALEDONIA','code'=>'687'),
|
74 |
-
'NG'=>array('name'=>'NIGERIA','code'=>'234'),
|
75 |
-
'NI'=>array('name'=>'NICARAGUA','code'=>'505'),
|
76 |
-
'NL'=>array('name'=>'NETHERLANDS','code'=>'31'),
|
77 |
-
'NO'=>array('name'=>'NORWAY','code'=>'47'),
|
78 |
-
'NP'=>array('name'=>'NEPAL','code'=>'977'),
|
79 |
-
'NZ'=>array('name'=>'NEW ZEALAND','code'=>'64'),
|
80 |
-
'PA'=>array('name'=>'PANAMA','code'=>'507'),
|
81 |
-
'PE'=>array('name'=>'PERU','code'=>'51'),
|
82 |
-
'PF'=>array('name'=>'FRENCH POLYNESIA','code'=>'689'),
|
83 |
-
'PG'=>array('name'=>'PAPUA NEW GUINEA','code'=>'675'),
|
84 |
-
'PH'=>array('name'=>'PHILIPPINES','code'=>'63'),
|
85 |
-
'PK'=>array('name'=>'PAKISTAN','code'=>'92'),
|
86 |
-
'PL'=>array('name'=>'POLAND','code'=>'48'),
|
87 |
-
'PM'=>array('name'=>'SAINT PIERRE AND MIQUELON','code'=>'508'),
|
88 |
-
'PR'=>array('name'=>'PUERTO RICO','code'=>'1'),
|
89 |
-
'PT'=>array('name'=>'PORTUGAL','code'=>'351'),
|
90 |
-
'PY'=>array('name'=>'PARAGUAY','code'=>'595'),
|
91 |
-
'QA'=>array('name'=>'QATAR','code'=>'974'),
|
92 |
-
'RO'=>array('name'=>'ROMANIA','code'=>'40'),
|
93 |
-
'RU'=>array('name'=>'RUSSIA','code'=>'7'),
|
94 |
-
'SE'=>array('name'=>'SWEDEN','code'=>'46'),
|
95 |
-
'SG'=>array('name'=>'SINGAPORE','code'=>'65'),
|
96 |
-
'SI'=>array('name'=>'SLOVENIA','code'=>'386'),
|
97 |
-
'SK'=>array('name'=>'SLOVAKIA','code'=>'421'),
|
98 |
-
'TH'=>array('name'=>'THAILAND','code'=>'66'),
|
99 |
-
'TN'=>array('name'=>'TUNISIA','code'=>'216'),
|
100 |
-
'TR'=>array('name'=>'TURKEY','code'=>'90'),
|
101 |
-
'TW'=>array('name'=>'TAIWAN','code'=>'886'),
|
102 |
-
'UA'=>array('name'=>'UKRAINE','code'=>'380'),
|
103 |
-
'UG'=>array('name'=>'UGANDA','code'=>'256'),
|
104 |
-
'US'=>array('name'=>'UNITED STATES','code'=>'1'),
|
105 |
-
'UY'=>array('name'=>'URUGUAY','code'=>'598'),
|
106 |
-
'VE'=>array('name'=>'VENEZUELA','code'=>'58'),
|
107 |
-
'VN'=>array('name'=>'VIET NAM','code'=>'84'),
|
108 |
-
'WF'=>array('name'=>'WALLIS AND FUTUNA','code'=>'681'),
|
109 |
-
'YT'=>array('name'=>'MAYOTTE','code'=>'262'),
|
110 |
-
'ZA'=>array('name'=>'SOUTH AFRICA','code'=>'27'),
|
111 |
-
);
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Get sms code lists.
|
116 |
-
* @return array
|
117 |
-
*/
|
118 |
-
public function get_sms_code_list(){
|
119 |
-
return $this->smsCode;
|
120 |
-
}
|
121 |
-
}
|
122 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Get SMS country prefix code
|
4 |
+
*
|
5 |
+
* @package SIB_SMS_Code
|
6 |
+
*/
|
7 |
+
if ( !class_exists( 'SIB_SMS_Code' ) ) {
|
8 |
+
/**
|
9 |
+
* Class SIB_SMS_Code
|
10 |
+
*/
|
11 |
+
class SIB_SMS_Code {
|
12 |
+
|
13 |
+
public $smsCode ;
|
14 |
+
|
15 |
+
function __construct()
|
16 |
+
{
|
17 |
+
$this->smsCode = array(
|
18 |
+
'DZ'=>array('name'=>'ALGERIA','code'=>'213'),
|
19 |
+
'AD'=>array('name'=>'ANDORRA','code'=>'376'),
|
20 |
+
'AR'=>array('name'=>'ARGENTINA','code'=>'54'),
|
21 |
+
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'),
|
22 |
+
'AT'=>array('name'=>'AUSTRIA','code'=>'43'),
|
23 |
+
'AU'=>array('name'=>'AUSTRALIA','code'=>'61'),
|
24 |
+
'BA'=>array('name'=>'BOSNIA AND HERZEGOVINA','code'=>'387'),
|
25 |
+
'BD'=>array('name'=>'BANGLADESH','code'=>'880'),
|
26 |
+
'BE'=>array('name'=>'BELGIUM','code'=>'32'),
|
27 |
+
'BG'=>array('name'=>'BULGARIA','code'=>'359'),
|
28 |
+
'BH'=>array('name'=>'BAHRAIN','code'=>'973'),
|
29 |
+
'BL'=>array('name'=>'SAINT BARTHELEMY','code'=>'590'),
|
30 |
+
'BR'=>array('name'=>'BRAZIL','code'=>'55'),
|
31 |
+
'CA'=>array('name'=>'CANADA','code'=>'1'),
|
32 |
+
'CH'=>array('name'=>'SWITZERLAND','code'=>'41'),
|
33 |
+
'CL'=>array('name'=>'CHILE','code'=>'56'),
|
34 |
+
'CN'=>array('name'=>'CHINA','code'=>'86'),
|
35 |
+
'CO'=>array('name'=>'COLOMBIA','code'=>'57'),
|
36 |
+
'CZ'=>array('name'=>'CZECH REPUBLIC','code'=>'420'),
|
37 |
+
'DE'=>array('name'=>'GERMANY','code'=>'49'),
|
38 |
+
'DK'=>array('name'=>'DENMARK','code'=>'45'),
|
39 |
+
'EC'=>array('name'=>'ECUADOR','code'=>'593'),
|
40 |
+
'EE'=>array('name'=>'ESTONIA','code'=>'372'),
|
41 |
+
'EG'=>array('name'=>'EGYPT','code'=>'20'),
|
42 |
+
'ES'=>array('name'=>'SPAIN','code'=>'34'),
|
43 |
+
'FI'=>array('name'=>'FINLAND','code'=>'358'),
|
44 |
+
'FR'=>array('name'=>'FRANCE','code'=>'33'),
|
45 |
+
'GB'=>array('name'=>'UNITED KINGDOM','code'=>'44'),
|
46 |
+
'GE'=>array('name'=>'GEORGIA','code'=>'995'),
|
47 |
+
'GR'=>array('name'=>'GREECE','code'=>'30'),
|
48 |
+
'HK'=>array('name'=>'HONG KONG','code'=>'852'),
|
49 |
+
'HR'=>array('name'=>'CROATIA','code'=>'385'),
|
50 |
+
'HT'=>array('name'=>'HAITI','code'=>'509'),
|
51 |
+
'HU'=>array('name'=>'HUNGARY','code'=>'36'),
|
52 |
+
'ID'=>array('name'=>'INDONESIA','code'=>'62'),
|
53 |
+
'IE'=>array('name'=>'IRELAND','code'=>'353'),
|
54 |
+
'IL'=>array('name'=>'ISRAEL','code'=>'972'),
|
55 |
+
'IN'=>array('name'=>'INDIA','code'=>'91'),
|
56 |
+
'IR'=>array('name'=>'IRAN','code'=>'98'),
|
57 |
+
'IT'=>array('name'=>'ITALY','code'=>'39'),
|
58 |
+
'JM'=>array('name'=>'JAMAICA','code'=>'1'),
|
59 |
+
'JO'=>array('name'=>'JORDAN','code'=>'962'),
|
60 |
+
'JP'=>array('name'=>'JAPAN','code'=>'81'),
|
61 |
+
'KM'=>array('name'=>'COMOROS','code'=>'269'),
|
62 |
+
'LB'=>array('name'=>'LEBANON','code'=>'961'),
|
63 |
+
'LK'=>array('name'=>'SRI LANKA','code'=>'94'),
|
64 |
+
'LT'=>array('name'=>'LITHUANIA','code'=>'370'),
|
65 |
+
'LU'=>array('name'=>'LUXEMBOURG','code'=>'352'),
|
66 |
+
'LV'=>array('name'=>'LATVIA','code'=>'371'),
|
67 |
+
'MA'=>array('name'=>'MOROCCO','code'=>'212'),
|
68 |
+
'MG'=>array('name'=>'MADAGASCAR','code'=>'261'),
|
69 |
+
'MT'=>array('name'=>'MALTA','code'=>'356'),
|
70 |
+
'MU'=>array('name'=>'MAURITIUS','code'=>'230'),
|
71 |
+
'MX'=>array('name'=>'MEXICO','code'=>'52'),
|
72 |
+
'MY'=>array('name'=>'MALAYSIA','code'=>'60'),
|
73 |
+
'NC'=>array('name'=>'NEW CALEDONIA','code'=>'687'),
|
74 |
+
'NG'=>array('name'=>'NIGERIA','code'=>'234'),
|
75 |
+
'NI'=>array('name'=>'NICARAGUA','code'=>'505'),
|
76 |
+
'NL'=>array('name'=>'NETHERLANDS','code'=>'31'),
|
77 |
+
'NO'=>array('name'=>'NORWAY','code'=>'47'),
|
78 |
+
'NP'=>array('name'=>'NEPAL','code'=>'977'),
|
79 |
+
'NZ'=>array('name'=>'NEW ZEALAND','code'=>'64'),
|
80 |
+
'PA'=>array('name'=>'PANAMA','code'=>'507'),
|
81 |
+
'PE'=>array('name'=>'PERU','code'=>'51'),
|
82 |
+
'PF'=>array('name'=>'FRENCH POLYNESIA','code'=>'689'),
|
83 |
+
'PG'=>array('name'=>'PAPUA NEW GUINEA','code'=>'675'),
|
84 |
+
'PH'=>array('name'=>'PHILIPPINES','code'=>'63'),
|
85 |
+
'PK'=>array('name'=>'PAKISTAN','code'=>'92'),
|
86 |
+
'PL'=>array('name'=>'POLAND','code'=>'48'),
|
87 |
+
'PM'=>array('name'=>'SAINT PIERRE AND MIQUELON','code'=>'508'),
|
88 |
+
'PR'=>array('name'=>'PUERTO RICO','code'=>'1'),
|
89 |
+
'PT'=>array('name'=>'PORTUGAL','code'=>'351'),
|
90 |
+
'PY'=>array('name'=>'PARAGUAY','code'=>'595'),
|
91 |
+
'QA'=>array('name'=>'QATAR','code'=>'974'),
|
92 |
+
'RO'=>array('name'=>'ROMANIA','code'=>'40'),
|
93 |
+
'RU'=>array('name'=>'RUSSIA','code'=>'7'),
|
94 |
+
'SE'=>array('name'=>'SWEDEN','code'=>'46'),
|
95 |
+
'SG'=>array('name'=>'SINGAPORE','code'=>'65'),
|
96 |
+
'SI'=>array('name'=>'SLOVENIA','code'=>'386'),
|
97 |
+
'SK'=>array('name'=>'SLOVAKIA','code'=>'421'),
|
98 |
+
'TH'=>array('name'=>'THAILAND','code'=>'66'),
|
99 |
+
'TN'=>array('name'=>'TUNISIA','code'=>'216'),
|
100 |
+
'TR'=>array('name'=>'TURKEY','code'=>'90'),
|
101 |
+
'TW'=>array('name'=>'TAIWAN','code'=>'886'),
|
102 |
+
'UA'=>array('name'=>'UKRAINE','code'=>'380'),
|
103 |
+
'UG'=>array('name'=>'UGANDA','code'=>'256'),
|
104 |
+
'US'=>array('name'=>'UNITED STATES','code'=>'1'),
|
105 |
+
'UY'=>array('name'=>'URUGUAY','code'=>'598'),
|
106 |
+
'VE'=>array('name'=>'VENEZUELA','code'=>'58'),
|
107 |
+
'VN'=>array('name'=>'VIET NAM','code'=>'84'),
|
108 |
+
'WF'=>array('name'=>'WALLIS AND FUTUNA','code'=>'681'),
|
109 |
+
'YT'=>array('name'=>'MAYOTTE','code'=>'262'),
|
110 |
+
'ZA'=>array('name'=>'SOUTH AFRICA','code'=>'27'),
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get sms code lists.
|
116 |
+
* @return array
|
117 |
+
*/
|
118 |
+
public function get_sms_code_list(){
|
119 |
+
return $this->smsCode;
|
120 |
+
}
|
121 |
+
}
|
122 |
}
|
inc/table-forms.php
CHANGED
@@ -229,8 +229,8 @@ class SIB_Forms_List extends WP_List_Table {
|
|
229 |
die( 'Go get a life script kiddies' );
|
230 |
}
|
231 |
else {
|
232 |
-
SIB_Forms::deleteForm( absint( $_GET['id'] ) );
|
233 |
-
SIB_Forms_Lang::remove_trans( absint( $_GET['id'] ) );
|
234 |
wp_redirect(add_query_arg('page', SIB_Page_Form::PAGE_ID, admin_url('admin.php'))); exit;
|
235 |
}
|
236 |
|
@@ -259,9 +259,9 @@ class SIB_Forms_List extends WP_List_Table {
|
|
259 |
|
260 |
static function usort_reorder( $a, $b ) {
|
261 |
// If no sort, default to title
|
262 |
-
$orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'title'; // by title
|
263 |
// If no order, default to asc
|
264 |
-
$order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'ask';
|
265 |
// Determine sort order
|
266 |
$result = strcmp( $a[$orderby], $b[$orderby] );
|
267 |
// Send final sort direction to usort
|
229 |
die( 'Go get a life script kiddies' );
|
230 |
}
|
231 |
else {
|
232 |
+
SIB_Forms::deleteForm( absint( esc_attr($_GET['id']) ) );
|
233 |
+
SIB_Forms_Lang::remove_trans( absint( esc_attr($_GET['id']) ) );
|
234 |
wp_redirect(add_query_arg('page', SIB_Page_Form::PAGE_ID, admin_url('admin.php'))); exit;
|
235 |
}
|
236 |
|
259 |
|
260 |
static function usort_reorder( $a, $b ) {
|
261 |
// If no sort, default to title
|
262 |
+
$orderby = ( ! empty( $_GET['orderby'] ) ) ? esc_attr($_GET['orderby']) : 'title'; // by title
|
263 |
// If no order, default to asc
|
264 |
+
$order = ( ! empty($_GET['order'] ) ) ? esc_attr($_GET['order']) : 'ask';
|
265 |
// Determine sort order
|
266 |
$result = strcmp( $a[$orderby], $b[$orderby] );
|
267 |
// Send final sort direction to usort
|
inc/templates/confirm/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
inc/templates/confirm/temp.html
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
-
<body style="margin:0; padding:0;">
|
2 |
-
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
3 |
-
<tbody>
|
4 |
-
<tr style="border-collapse:collapse;">
|
5 |
-
<td style="border-collapse:collapse;" align="center">
|
6 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
7 |
-
<tbody>
|
8 |
-
<tr>
|
9 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
10 |
-
</tr>
|
11 |
-
</tbody>
|
12 |
-
</table>
|
13 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
14 |
-
<tbody>
|
15 |
-
<tr>
|
16 |
-
<td style="line-height:0; font-size:0;" height="20">
|
17 |
-
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
18 |
-
Thank you for subscribing</div>
|
19 |
-
</td>
|
20 |
-
</tr>
|
21 |
-
</tbody>
|
22 |
-
</table>
|
23 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
24 |
-
<tbody>
|
25 |
-
<tr>
|
26 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
27 |
-
</tr>
|
28 |
-
</tbody>
|
29 |
-
</table>
|
30 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
31 |
-
<tbody>
|
32 |
-
<tr>
|
33 |
-
<td align="left">
|
34 |
-
|
35 |
-
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
36 |
-
<br>
|
37 |
-
You have just subscribed to the newsletter of {site_domain}.<br>
|
38 |
-
<br>
|
39 |
-
If at any time you wish to stop receiving our emails, you can <a href="[UNSUBSCRIBE]" title="Unsubscribe from the newsletter">unsubscribe here</a>.<br>
|
40 |
-
<br>
|
41 |
-
-Sendinblue</div>
|
42 |
-
</td>
|
43 |
-
</tr>
|
44 |
-
</tbody>
|
45 |
-
</table>
|
46 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
47 |
-
<tbody>
|
48 |
-
<tr>
|
49 |
-
<td style="line-height:0; font-size:0;" height="20">
|
50 |
-
</td>
|
51 |
-
</tr>
|
52 |
-
</tbody>
|
53 |
-
</table>
|
54 |
-
</td>
|
55 |
-
</tr>
|
56 |
-
</tbody>
|
57 |
-
</table>
|
58 |
-
</body>
|
1 |
+
<body style="margin:0; padding:0;">
|
2 |
+
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
3 |
+
<tbody>
|
4 |
+
<tr style="border-collapse:collapse;">
|
5 |
+
<td style="border-collapse:collapse;" align="center">
|
6 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
7 |
+
<tbody>
|
8 |
+
<tr>
|
9 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
10 |
+
</tr>
|
11 |
+
</tbody>
|
12 |
+
</table>
|
13 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
14 |
+
<tbody>
|
15 |
+
<tr>
|
16 |
+
<td style="line-height:0; font-size:0;" height="20">
|
17 |
+
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
18 |
+
Thank you for subscribing</div>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
</tbody>
|
22 |
+
</table>
|
23 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
24 |
+
<tbody>
|
25 |
+
<tr>
|
26 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
27 |
+
</tr>
|
28 |
+
</tbody>
|
29 |
+
</table>
|
30 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
31 |
+
<tbody>
|
32 |
+
<tr>
|
33 |
+
<td align="left">
|
34 |
+
|
35 |
+
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
36 |
+
<br>
|
37 |
+
You have just subscribed to the newsletter of {site_domain}.<br>
|
38 |
+
<br>
|
39 |
+
If at any time you wish to stop receiving our emails, you can <a href="[UNSUBSCRIBE]" title="Unsubscribe from the newsletter">unsubscribe here</a>.<br>
|
40 |
+
<br>
|
41 |
+
-Sendinblue</div>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
</tbody>
|
45 |
+
</table>
|
46 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
47 |
+
<tbody>
|
48 |
+
<tr>
|
49 |
+
<td style="line-height:0; font-size:0;" height="20">
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
</tbody>
|
53 |
+
</table>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
</tbody>
|
57 |
+
</table>
|
58 |
+
</body>
|
inc/templates/confirm/temp_fr-FR.html
CHANGED
@@ -1,59 +1,59 @@
|
|
1 |
-
<meta charset="UTF-8">
|
2 |
-
<body style="margin:0; padding:0;">
|
3 |
-
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
4 |
-
<tbody>
|
5 |
-
<tr style="border-collapse:collapse;">
|
6 |
-
<td style="border-collapse:collapse;" align="center">
|
7 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
8 |
-
<tbody>
|
9 |
-
<tr>
|
10 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
11 |
-
</tr>
|
12 |
-
</tbody>
|
13 |
-
</table>
|
14 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
15 |
-
<tbody>
|
16 |
-
<tr>
|
17 |
-
<td style="line-height:0; font-size:0;" height="20">
|
18 |
-
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
19 |
-
Merci pour votre inscription</div>
|
20 |
-
</td>
|
21 |
-
</tr>
|
22 |
-
</tbody>
|
23 |
-
</table>
|
24 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
25 |
-
<tbody>
|
26 |
-
<tr>
|
27 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
28 |
-
</tr>
|
29 |
-
</tbody>
|
30 |
-
</table>
|
31 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
32 |
-
<tbody>
|
33 |
-
<tr>
|
34 |
-
<td align="left">
|
35 |
-
|
36 |
-
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
37 |
-
<br>
|
38 |
-
Vous venez de vous inscrire à la newsletter de {site_domain}.<br>
|
39 |
-
<br>
|
40 |
-
Si vous souhaitez ne plus recevoir nos emails, vous pouvez <a href="[UNSUBSCRIBE]" title="Se désinscire">vous désinscrire ici</a>.<br>
|
41 |
-
<br>
|
42 |
-
-Sendinblue</div>
|
43 |
-
</td>
|
44 |
-
</tr>
|
45 |
-
</tbody>
|
46 |
-
</table>
|
47 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
48 |
-
<tbody>
|
49 |
-
<tr>
|
50 |
-
<td style="line-height:0; font-size:0;" height="20">
|
51 |
-
</td>
|
52 |
-
</tr>
|
53 |
-
</tbody>
|
54 |
-
</table>
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
</tbody>
|
58 |
-
</table>
|
59 |
-
</body>
|
1 |
+
<meta charset="UTF-8">
|
2 |
+
<body style="margin:0; padding:0;">
|
3 |
+
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
4 |
+
<tbody>
|
5 |
+
<tr style="border-collapse:collapse;">
|
6 |
+
<td style="border-collapse:collapse;" align="center">
|
7 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
8 |
+
<tbody>
|
9 |
+
<tr>
|
10 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
11 |
+
</tr>
|
12 |
+
</tbody>
|
13 |
+
</table>
|
14 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
15 |
+
<tbody>
|
16 |
+
<tr>
|
17 |
+
<td style="line-height:0; font-size:0;" height="20">
|
18 |
+
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
19 |
+
Merci pour votre inscription</div>
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
</tbody>
|
23 |
+
</table>
|
24 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
25 |
+
<tbody>
|
26 |
+
<tr>
|
27 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
28 |
+
</tr>
|
29 |
+
</tbody>
|
30 |
+
</table>
|
31 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
32 |
+
<tbody>
|
33 |
+
<tr>
|
34 |
+
<td align="left">
|
35 |
+
|
36 |
+
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
37 |
+
<br>
|
38 |
+
Vous venez de vous inscrire à la newsletter de {site_domain}.<br>
|
39 |
+
<br>
|
40 |
+
Si vous souhaitez ne plus recevoir nos emails, vous pouvez <a href="[UNSUBSCRIBE]" title="Se désinscire">vous désinscrire ici</a>.<br>
|
41 |
+
<br>
|
42 |
+
-Sendinblue</div>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
</tbody>
|
46 |
+
</table>
|
47 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
48 |
+
<tbody>
|
49 |
+
<tr>
|
50 |
+
<td style="line-height:0; font-size:0;" height="20">
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
</tbody>
|
54 |
+
</table>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
</tbody>
|
58 |
+
</table>
|
59 |
+
</body>
|
inc/templates/double-optin/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
inc/templates/double-optin/temp.html
CHANGED
@@ -1,62 +1,62 @@
|
|
1 |
-
<body style="margin:0; padding:0;">
|
2 |
-
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
3 |
-
<tbody>
|
4 |
-
<tr style="border-collapse:collapse;">
|
5 |
-
<td style="border-collapse:collapse;" align="center">
|
6 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
7 |
-
<tbody>
|
8 |
-
<tr>
|
9 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
10 |
-
</tr>
|
11 |
-
</tbody>
|
12 |
-
</table>
|
13 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
14 |
-
<tbody>
|
15 |
-
<tr>
|
16 |
-
<td style="line-height:0; font-size:0;" height="20">
|
17 |
-
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
18 |
-
Please confirm your subscription</div>
|
19 |
-
</td>
|
20 |
-
</tr>
|
21 |
-
</tbody>
|
22 |
-
</table>
|
23 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
24 |
-
<tbody>
|
25 |
-
<tr>
|
26 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
27 |
-
</tr>
|
28 |
-
</tbody>
|
29 |
-
</table>
|
30 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
31 |
-
<tbody>
|
32 |
-
<tr>
|
33 |
-
<td align="left">
|
34 |
-
|
35 |
-
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
36 |
-
<br>
|
37 |
-
Do you want to receive newsletters from {site_domain} ?<br>
|
38 |
-
<br>
|
39 |
-
<a href="{subscribe_url}" style="color:#ffffff;display:inline-block;font-family:Arial,sans-serif;width:auto;white-space:nowrap;min-height:32px;margin:5px 5px 0 0;padding:0 22px;text-decoration:none;text-align:center;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:0;border-radius:4px;vertical-align:top;background-color:#3276b1" target="_blank">
|
40 |
-
<span style="display:inline;font-family:Arial,sans-serif;text-decoration:none;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:none;background-color:#3276b1;color:#ffffff">Yes, subscribe me to this list.</span></a>
|
41 |
-
<br>
|
42 |
-
<br>
|
43 |
-
If you received this email by mistake, simply delete it. You will not be subscribed to this list if you don't click the confirmation link above.
|
44 |
-
<br><br>
|
45 |
-
-Sendinblue</div>
|
46 |
-
</td>
|
47 |
-
</tr>
|
48 |
-
</tbody>
|
49 |
-
</table>
|
50 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
51 |
-
<tbody>
|
52 |
-
<tr>
|
53 |
-
<td style="line-height:0; font-size:0;" height="20">
|
54 |
-
</td>
|
55 |
-
</tr>
|
56 |
-
</tbody>
|
57 |
-
</table>
|
58 |
-
</td>
|
59 |
-
</tr>
|
60 |
-
</tbody>
|
61 |
-
</table>
|
62 |
-
</body>
|
1 |
+
<body style="margin:0; padding:0;">
|
2 |
+
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
3 |
+
<tbody>
|
4 |
+
<tr style="border-collapse:collapse;">
|
5 |
+
<td style="border-collapse:collapse;" align="center">
|
6 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
7 |
+
<tbody>
|
8 |
+
<tr>
|
9 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
10 |
+
</tr>
|
11 |
+
</tbody>
|
12 |
+
</table>
|
13 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
14 |
+
<tbody>
|
15 |
+
<tr>
|
16 |
+
<td style="line-height:0; font-size:0;" height="20">
|
17 |
+
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
18 |
+
Please confirm your subscription</div>
|
19 |
+
</td>
|
20 |
+
</tr>
|
21 |
+
</tbody>
|
22 |
+
</table>
|
23 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
24 |
+
<tbody>
|
25 |
+
<tr>
|
26 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
27 |
+
</tr>
|
28 |
+
</tbody>
|
29 |
+
</table>
|
30 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
31 |
+
<tbody>
|
32 |
+
<tr>
|
33 |
+
<td align="left">
|
34 |
+
|
35 |
+
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
36 |
+
<br>
|
37 |
+
Do you want to receive newsletters from {site_domain} ?<br>
|
38 |
+
<br>
|
39 |
+
<a href="{subscribe_url}" style="color:#ffffff;display:inline-block;font-family:Arial,sans-serif;width:auto;white-space:nowrap;min-height:32px;margin:5px 5px 0 0;padding:0 22px;text-decoration:none;text-align:center;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:0;border-radius:4px;vertical-align:top;background-color:#3276b1" target="_blank">
|
40 |
+
<span style="display:inline;font-family:Arial,sans-serif;text-decoration:none;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:none;background-color:#3276b1;color:#ffffff">Yes, subscribe me to this list.</span></a>
|
41 |
+
<br>
|
42 |
+
<br>
|
43 |
+
If you received this email by mistake, simply delete it. You will not be subscribed to this list if you don't click the confirmation link above.
|
44 |
+
<br><br>
|
45 |
+
-Sendinblue</div>
|
46 |
+
</td>
|
47 |
+
</tr>
|
48 |
+
</tbody>
|
49 |
+
</table>
|
50 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
51 |
+
<tbody>
|
52 |
+
<tr>
|
53 |
+
<td style="line-height:0; font-size:0;" height="20">
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
</tbody>
|
57 |
+
</table>
|
58 |
+
</td>
|
59 |
+
</tr>
|
60 |
+
</tbody>
|
61 |
+
</table>
|
62 |
+
</body>
|
inc/templates/double-optin/temp_fr-FR.html
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<meta charset="UTF-8">
|
2 |
-
<body style="margin:0; padding:0;">
|
3 |
-
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
4 |
-
<tbody>
|
5 |
-
<tr style="border-collapse:collapse;">
|
6 |
-
<td style="border-collapse:collapse;" align="center">
|
7 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
8 |
-
<tbody>
|
9 |
-
<tr>
|
10 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
11 |
-
</tr>
|
12 |
-
</tbody>
|
13 |
-
</table>
|
14 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
15 |
-
<tbody>
|
16 |
-
<tr>
|
17 |
-
<td style="line-height:0; font-size:0;" height="20">
|
18 |
-
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
19 |
-
Confirmez votre inscription</div>
|
20 |
-
</td>
|
21 |
-
</tr>
|
22 |
-
</tbody>
|
23 |
-
</table>
|
24 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
25 |
-
<tbody>
|
26 |
-
<tr>
|
27 |
-
<td style="line-height:0; font-size:0;" height="20"></td>
|
28 |
-
</tr>
|
29 |
-
</tbody>
|
30 |
-
</table>
|
31 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
32 |
-
<tbody>
|
33 |
-
<tr>
|
34 |
-
<td align="left">
|
35 |
-
|
36 |
-
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
37 |
-
<br>
|
38 |
-
Voulez vous recevoir les newsletters de {site_domain} ?<br>
|
39 |
-
<br>
|
40 |
-
<a href="{subscribe_url}" style="color:#ffffff;display:inline-block;font-family:Arial,sans-serif;width:auto;white-space:nowrap;min-height:32px;margin:5px 5px 0 0;padding:0 22px;text-decoration:none;text-align:center;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:0;border-radius:4px;vertical-align:top;background-color:#3276b1" target="_blank">
|
41 |
-
<span style="display:inline;font-family:Arial,sans-serif;text-decoration:none;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:none;background-color:#3276b1;color:#ffffff">Yes, subscribe me to this list.</span></a>
|
42 |
-
<br>
|
43 |
-
<br>
|
44 |
-
Si vous recevez cet email par erreur, vous pouvez simplement le supprimer. Vous ne serez pas inscrit à la newsletter si vous ne cliquez pas sur le lien de confirmation ci-dessus.
|
45 |
-
<br><br>
|
46 |
-
-Sendinblue</div>
|
47 |
-
</td>
|
48 |
-
</tr>
|
49 |
-
</tbody>
|
50 |
-
</table>
|
51 |
-
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
52 |
-
<tbody>
|
53 |
-
<tr>
|
54 |
-
<td style="line-height:0; font-size:0;" height="20">
|
55 |
-
</td>
|
56 |
-
</tr>
|
57 |
-
</tbody>
|
58 |
-
</table>
|
59 |
-
</td>
|
60 |
-
</tr>
|
61 |
-
</tbody>
|
62 |
-
</table>
|
63 |
-
</body>
|
1 |
+
<meta charset="UTF-8">
|
2 |
+
<body style="margin:0; padding:0;">
|
3 |
+
<table style="background-color:#ffffff" cellpadding="0" cellspacing="0" border="0" width="100%">
|
4 |
+
<tbody>
|
5 |
+
<tr style="border-collapse:collapse;">
|
6 |
+
<td style="border-collapse:collapse;" align="center">
|
7 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
8 |
+
<tbody>
|
9 |
+
<tr>
|
10 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
11 |
+
</tr>
|
12 |
+
</tbody>
|
13 |
+
</table>
|
14 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
15 |
+
<tbody>
|
16 |
+
<tr>
|
17 |
+
<td style="line-height:0; font-size:0;" height="20">
|
18 |
+
<div style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
19 |
+
Confirmez votre inscription</div>
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
</tbody>
|
23 |
+
</table>
|
24 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
25 |
+
<tbody>
|
26 |
+
<tr>
|
27 |
+
<td style="line-height:0; font-size:0;" height="20"></td>
|
28 |
+
</tr>
|
29 |
+
</tbody>
|
30 |
+
</table>
|
31 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
32 |
+
<tbody>
|
33 |
+
<tr>
|
34 |
+
<td align="left">
|
35 |
+
|
36 |
+
<div style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
37 |
+
<br>
|
38 |
+
Voulez vous recevoir les newsletters de {site_domain} ?<br>
|
39 |
+
<br>
|
40 |
+
<a href="{subscribe_url}" style="color:#ffffff;display:inline-block;font-family:Arial,sans-serif;width:auto;white-space:nowrap;min-height:32px;margin:5px 5px 0 0;padding:0 22px;text-decoration:none;text-align:center;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:0;border-radius:4px;vertical-align:top;background-color:#3276b1" target="_blank">
|
41 |
+
<span style="display:inline;font-family:Arial,sans-serif;text-decoration:none;font-weight:bold;font-style:normal;font-size:15px;line-height:32px;border:none;background-color:#3276b1;color:#ffffff">Yes, subscribe me to this list.</span></a>
|
42 |
+
<br>
|
43 |
+
<br>
|
44 |
+
Si vous recevez cet email par erreur, vous pouvez simplement le supprimer. Vous ne serez pas inscrit à la newsletter si vous ne cliquez pas sur le lien de confirmation ci-dessus.
|
45 |
+
<br><br>
|
46 |
+
-Sendinblue</div>
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
</tbody>
|
50 |
+
</table>
|
51 |
+
<table cellpadding="0" cellspacing="0" border="0" width="540">
|
52 |
+
<tbody>
|
53 |
+
<tr>
|
54 |
+
<td style="line-height:0; font-size:0;" height="20">
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
</tbody>
|
58 |
+
</table>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</tbody>
|
62 |
+
</table>
|
63 |
+
</body>
|
inc/templates/double-optin/temp_fr-FR.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Si vous recevez cet email par erreur, vous pouvez simplement le supprimer. Vous ne serez pas inscrit à la newsletter si vous ne cliquez pas sur le lien de confirmation ci-dessus. -Sendinblue
|
1 |
+
Si vous recevez cet email par erreur, vous pouvez simplement le supprimer. Vous ne serez pas inscrit à la newsletter si vous ne cliquez pas sur le lien de confirmation ci-dessus. -Sendinblue
|
inc/templates/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
inc/templates/test/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
inc/templates/test/temp.html
CHANGED
@@ -1,155 +1,155 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5 |
-
<title>{title}</title>
|
6 |
-
</head>
|
7 |
-
<body style="font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #222;">
|
8 |
-
<div class="moz-forward-container">
|
9 |
-
<br>
|
10 |
-
<table style="background-color:#ffffff" width="100%" border="0"
|
11 |
-
cellpadding="0" cellspacing="0">
|
12 |
-
<tbody>
|
13 |
-
<tr style="border-collapse:collapse;">
|
14 |
-
<td style="border-collapse:collapse;" align="center">
|
15 |
-
<table width="570" border="0" cellpadding="0"
|
16 |
-
cellspacing="0">
|
17 |
-
<tbody>
|
18 |
-
<tr>
|
19 |
-
<td style="line-height:0; font-size:0;" height="20"><img src="{shop_logo}" alt="{shop_name}" width="0" height="0"/></td>
|
20 |
-
</tr>
|
21 |
-
</tbody>
|
22 |
-
</table>
|
23 |
-
<table width="570" border="0" cellpadding="0"
|
24 |
-
cellspacing="0">
|
25 |
-
<tbody>
|
26 |
-
<tr>
|
27 |
-
<td align="" valign="middle">
|
28 |
-
<h1 style="margin:0;color:#2f8bee;font-family:arial,sans-serif">
|
29 |
-
<img alt="Sendinblue" src="http://img.sendinblue.com/14406/images/529f2339c6ece.png"></h1>
|
30 |
-
</td>
|
31 |
-
</tr>
|
32 |
-
</tbody>
|
33 |
-
</table>
|
34 |
-
<table width="570" border="0" cellpadding="0"
|
35 |
-
cellspacing="0">
|
36 |
-
<tbody>
|
37 |
-
<tr>
|
38 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
39 |
-
</tr>
|
40 |
-
</tbody>
|
41 |
-
</table>
|
42 |
-
<table width="540" border="0" cellpadding="0"
|
43 |
-
cellspacing="0">
|
44 |
-
<tbody>
|
45 |
-
<tr>
|
46 |
-
<td align="left">
|
47 |
-
<div style="font-family:arial,sans-serif;
|
48 |
-
color:#2f8bee; font-size:18px; font-weight:bold;
|
49 |
-
margin:0 0 10px 0;">This email has been sent using Sendinblue SMTP. <br />
|
50 |
-
Congratulations, your Sendinblue SMTP module has been set up well.
|
51 |
-
</div>
|
52 |
-
</td>
|
53 |
-
</tr>
|
54 |
-
</tbody>
|
55 |
-
</table>
|
56 |
-
<table width="570" border="0" cellpadding="0"
|
57 |
-
cellspacing="0">
|
58 |
-
<tbody>
|
59 |
-
<tr>
|
60 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
61 |
-
</tr>
|
62 |
-
<tr>
|
63 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
64 |
-
</tr>
|
65 |
-
</tbody>
|
66 |
-
</table>
|
67 |
-
<table width="540" border="0" cellpadding="0"
|
68 |
-
cellspacing="0">
|
69 |
-
<tbody>
|
70 |
-
<tr>
|
71 |
-
<td align="right">
|
72 |
-
<div style="font-family:arial,sans-serif;
|
73 |
-
font-size:14px; color:#2f8bee; margin:0;
|
74 |
-
font-weight:bold; line-height:18px;"> Sendinblue Team</div>
|
75 |
-
</td>
|
76 |
-
</tr>
|
77 |
-
</tbody>
|
78 |
-
</table>
|
79 |
-
<table width="570" border="0" cellpadding="0"
|
80 |
-
cellspacing="0">
|
81 |
-
<tbody>
|
82 |
-
<tr>
|
83 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
84 |
-
</tr>
|
85 |
-
</tbody>
|
86 |
-
</table>
|
87 |
-
<table width="570" border="0" cellpadding="0"
|
88 |
-
cellspacing="0">
|
89 |
-
<tbody>
|
90 |
-
<tr>
|
91 |
-
<td style="line-height:0; font-size:0;" height="10"> </td>
|
92 |
-
</tr>
|
93 |
-
</tbody>
|
94 |
-
</table>
|
95 |
-
<table width="570" border="0" cellpadding="0"
|
96 |
-
cellspacing="0">
|
97 |
-
<tbody>
|
98 |
-
<tr>
|
99 |
-
<td style="font-family:arial,sans-serif;"
|
100 |
-
align="center"><hr /></td>
|
101 |
-
</tr>
|
102 |
-
</tbody>
|
103 |
-
</table>
|
104 |
-
<table width="540" border="0" cellpadding="0"
|
105 |
-
cellspacing="0">
|
106 |
-
<tbody>
|
107 |
-
<tr>
|
108 |
-
<td style="line-height:0; font-size:0;" height="10"> </td>
|
109 |
-
</tr>
|
110 |
-
<tr>
|
111 |
-
<td align="left" valign="top" width="200">
|
112 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
113 |
-
<strong style="color:#2f8bee;">Sendinblue</strong></div>
|
114 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
115 |
-
118, rue de Tocqueville</div>
|
116 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
117 |
-
75017 Paris - France</div>
|
118 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
119 |
-
Tél : 0 899 25 30 61</div>
|
120 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
121 |
-
<a href="https://www.sendinblue.com" style="color:#2f8bee;" target="_blank">www.sendinblue.com</a></div>
|
122 |
-
</td>
|
123 |
-
<td align="right" valign="top">
|
124 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:20px; color:#7e7e7e;">
|
125 |
-
<a href="http://www.facebook.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Facebook" src="https://my.sendinblue.com/public/upload/14406/images/523693143fe88.gif" style="border:none;"> </a> <a href="https://twitter.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Twitter" src="https://my.sendinblue.com/public/upload/14406/images/5236931746c01.gif" style="border:none;"> </a> <a href="http://www.linkedin.com/company/mailin" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Linkedin" src="https://my.sendinblue.com/public/upload/14406/images/5236931ad253b.gif" style="border:none;"> </a> <a href="http://sendinblue.tumblr.com/" style="color:#2f8bee; text-decoration:none;" target="_blank">Blog</a></div>
|
126 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
127 |
-
© 2013-2014 Sendinblue, all rights reserved.</div>
|
128 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
129 |
-
This is an automatic message generated by Sendinblue.</div>
|
130 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
131 |
-
Do not respond, you wouldn't receive any answer.</div>
|
132 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"><a href="https://www.sendinblue.com/legal/antispampolicy" style="color:#7e7e7e;" target="_blank">Anti-spam & emailing policy</a> | <a href="https://www.sendinblue.com/legal/generalterms" style="color:#7e7e7e;" target="_blank">General Terms and Conditions</a></div>
|
133 |
-
</td>
|
134 |
-
</tr>
|
135 |
-
</tbody>
|
136 |
-
</table>
|
137 |
-
<table width="570" border="0" cellpadding="0"
|
138 |
-
cellspacing="0">
|
139 |
-
<tbody>
|
140 |
-
<tr>
|
141 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
142 |
-
</tr>
|
143 |
-
<tr>
|
144 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
145 |
-
</tr>
|
146 |
-
</tbody>
|
147 |
-
</table>
|
148 |
-
</td>
|
149 |
-
</tr>
|
150 |
-
</tbody>
|
151 |
-
</table>
|
152 |
-
<br>
|
153 |
-
</div>
|
154 |
-
</body>
|
155 |
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5 |
+
<title>{title}</title>
|
6 |
+
</head>
|
7 |
+
<body style="font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #222;">
|
8 |
+
<div class="moz-forward-container">
|
9 |
+
<br>
|
10 |
+
<table style="background-color:#ffffff" width="100%" border="0"
|
11 |
+
cellpadding="0" cellspacing="0">
|
12 |
+
<tbody>
|
13 |
+
<tr style="border-collapse:collapse;">
|
14 |
+
<td style="border-collapse:collapse;" align="center">
|
15 |
+
<table width="570" border="0" cellpadding="0"
|
16 |
+
cellspacing="0">
|
17 |
+
<tbody>
|
18 |
+
<tr>
|
19 |
+
<td style="line-height:0; font-size:0;" height="20"><img src="{shop_logo}" alt="{shop_name}" width="0" height="0"/></td>
|
20 |
+
</tr>
|
21 |
+
</tbody>
|
22 |
+
</table>
|
23 |
+
<table width="570" border="0" cellpadding="0"
|
24 |
+
cellspacing="0">
|
25 |
+
<tbody>
|
26 |
+
<tr>
|
27 |
+
<td align="" valign="middle">
|
28 |
+
<h1 style="margin:0;color:#2f8bee;font-family:arial,sans-serif">
|
29 |
+
<img alt="Sendinblue" src="http://img.sendinblue.com/14406/images/529f2339c6ece.png"></h1>
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
</tbody>
|
33 |
+
</table>
|
34 |
+
<table width="570" border="0" cellpadding="0"
|
35 |
+
cellspacing="0">
|
36 |
+
<tbody>
|
37 |
+
<tr>
|
38 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
39 |
+
</tr>
|
40 |
+
</tbody>
|
41 |
+
</table>
|
42 |
+
<table width="540" border="0" cellpadding="0"
|
43 |
+
cellspacing="0">
|
44 |
+
<tbody>
|
45 |
+
<tr>
|
46 |
+
<td align="left">
|
47 |
+
<div style="font-family:arial,sans-serif;
|
48 |
+
color:#2f8bee; font-size:18px; font-weight:bold;
|
49 |
+
margin:0 0 10px 0;">This email has been sent using Sendinblue SMTP. <br />
|
50 |
+
Congratulations, your Sendinblue SMTP module has been set up well.
|
51 |
+
</div>
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
</tbody>
|
55 |
+
</table>
|
56 |
+
<table width="570" border="0" cellpadding="0"
|
57 |
+
cellspacing="0">
|
58 |
+
<tbody>
|
59 |
+
<tr>
|
60 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
61 |
+
</tr>
|
62 |
+
<tr>
|
63 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
64 |
+
</tr>
|
65 |
+
</tbody>
|
66 |
+
</table>
|
67 |
+
<table width="540" border="0" cellpadding="0"
|
68 |
+
cellspacing="0">
|
69 |
+
<tbody>
|
70 |
+
<tr>
|
71 |
+
<td align="right">
|
72 |
+
<div style="font-family:arial,sans-serif;
|
73 |
+
font-size:14px; color:#2f8bee; margin:0;
|
74 |
+
font-weight:bold; line-height:18px;"> Sendinblue Team</div>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
</tbody>
|
78 |
+
</table>
|
79 |
+
<table width="570" border="0" cellpadding="0"
|
80 |
+
cellspacing="0">
|
81 |
+
<tbody>
|
82 |
+
<tr>
|
83 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
84 |
+
</tr>
|
85 |
+
</tbody>
|
86 |
+
</table>
|
87 |
+
<table width="570" border="0" cellpadding="0"
|
88 |
+
cellspacing="0">
|
89 |
+
<tbody>
|
90 |
+
<tr>
|
91 |
+
<td style="line-height:0; font-size:0;" height="10"> </td>
|
92 |
+
</tr>
|
93 |
+
</tbody>
|
94 |
+
</table>
|
95 |
+
<table width="570" border="0" cellpadding="0"
|
96 |
+
cellspacing="0">
|
97 |
+
<tbody>
|
98 |
+
<tr>
|
99 |
+
<td style="font-family:arial,sans-serif;"
|
100 |
+
align="center"><hr /></td>
|
101 |
+
</tr>
|
102 |
+
</tbody>
|
103 |
+
</table>
|
104 |
+
<table width="540" border="0" cellpadding="0"
|
105 |
+
cellspacing="0">
|
106 |
+
<tbody>
|
107 |
+
<tr>
|
108 |
+
<td style="line-height:0; font-size:0;" height="10"> </td>
|
109 |
+
</tr>
|
110 |
+
<tr>
|
111 |
+
<td align="left" valign="top" width="200">
|
112 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
113 |
+
<strong style="color:#2f8bee;">Sendinblue</strong></div>
|
114 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
115 |
+
118, rue de Tocqueville</div>
|
116 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
117 |
+
75017 Paris - France</div>
|
118 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
119 |
+
Tél : 0 899 25 30 61</div>
|
120 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
121 |
+
<a href="https://www.sendinblue.com" style="color:#2f8bee;" target="_blank">www.sendinblue.com</a></div>
|
122 |
+
</td>
|
123 |
+
<td align="right" valign="top">
|
124 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:20px; color:#7e7e7e;">
|
125 |
+
<a href="http://www.facebook.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Facebook" src="https://my.sendinblue.com/public/upload/14406/images/523693143fe88.gif" style="border:none;"> </a> <a href="https://twitter.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Twitter" src="https://my.sendinblue.com/public/upload/14406/images/5236931746c01.gif" style="border:none;"> </a> <a href="http://www.linkedin.com/company/mailin" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Linkedin" src="https://my.sendinblue.com/public/upload/14406/images/5236931ad253b.gif" style="border:none;"> </a> <a href="http://sendinblue.tumblr.com/" style="color:#2f8bee; text-decoration:none;" target="_blank">Blog</a></div>
|
126 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
127 |
+
© 2013-2014 Sendinblue, all rights reserved.</div>
|
128 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
129 |
+
This is an automatic message generated by Sendinblue.</div>
|
130 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;">
|
131 |
+
Do not respond, you wouldn't receive any answer.</div>
|
132 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"><a href="https://www.sendinblue.com/legal/antispampolicy" style="color:#7e7e7e;" target="_blank">Anti-spam & emailing policy</a> | <a href="https://www.sendinblue.com/legal/generalterms" style="color:#7e7e7e;" target="_blank">General Terms and Conditions</a></div>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
</tbody>
|
136 |
+
</table>
|
137 |
+
<table width="570" border="0" cellpadding="0"
|
138 |
+
cellspacing="0">
|
139 |
+
<tbody>
|
140 |
+
<tr>
|
141 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
142 |
+
</tr>
|
143 |
+
<tr>
|
144 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
145 |
+
</tr>
|
146 |
+
</tbody>
|
147 |
+
</table>
|
148 |
+
</td>
|
149 |
+
</tr>
|
150 |
+
</tbody>
|
151 |
+
</table>
|
152 |
+
<br>
|
153 |
+
</div>
|
154 |
+
</body>
|
155 |
</html>
|
inc/templates/test/temp_fr-FR.html
CHANGED
@@ -1,162 +1,162 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5 |
-
<title>{title}</title>
|
6 |
-
</head>
|
7 |
-
<body style="font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #222;">
|
8 |
-
<div class="moz-forward-container">
|
9 |
-
<br>
|
10 |
-
<table style="background-color:#ffffff" width="100%" border="0"
|
11 |
-
cellpadding="0" cellspacing="0">
|
12 |
-
<tbody>
|
13 |
-
<tr style="border-collapse:collapse;">
|
14 |
-
<td style="border-collapse:collapse;" align="center">
|
15 |
-
<table width="570" border="0" cellpadding="0"
|
16 |
-
cellspacing="0">
|
17 |
-
<tbody>
|
18 |
-
<tr>
|
19 |
-
<td style="line-height:0; font-size:0;" height="20"><img src="{shop_logo}" alt="{shop_name}" width="0" height="0"/></td>
|
20 |
-
</tr>
|
21 |
-
</tbody>
|
22 |
-
</table>
|
23 |
-
<table width="570" border="0" cellpadding="0"
|
24 |
-
cellspacing="0">
|
25 |
-
<tbody>
|
26 |
-
<tr>
|
27 |
-
<td align="" valign="middle">
|
28 |
-
<h1 style="margin:0;color:#2f8bee;font-family:arial,sans-serif">
|
29 |
-
<img alt="Sendinblue" src="http://img.sendinblue.com/14406/images/529f2339c6ece.png"></h1>
|
30 |
-
</td>
|
31 |
-
</tr>
|
32 |
-
</tbody>
|
33 |
-
</table>
|
34 |
-
<table width="570" border="0" cellpadding="0"
|
35 |
-
cellspacing="0">
|
36 |
-
<tbody>
|
37 |
-
<tr>
|
38 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
39 |
-
</tr>
|
40 |
-
</tbody>
|
41 |
-
</table>
|
42 |
-
<table width="540" border="0" cellpadding="0"
|
43 |
-
cellspacing="0">
|
44 |
-
<tbody>
|
45 |
-
<tr>
|
46 |
-
<td align="left">
|
47 |
-
<div style="font-family:arial,sans-serif;
|
48 |
-
color:#2f8bee; font-size:18px; font-weight:bold;
|
49 |
-
margin:0 0 10px 0;">Cet e-mail a été envoyé via Sendinblue SMTP. <br />
|
50 |
-
Félicitations, la fonctionnalité Sendinblue SMTP est bien configurée.
|
51 |
-
</div>
|
52 |
-
</td>
|
53 |
-
</tr>
|
54 |
-
</tbody>
|
55 |
-
</table>
|
56 |
-
<table width="570" border="0" cellpadding="0"
|
57 |
-
cellspacing="0">
|
58 |
-
<tbody>
|
59 |
-
<tr>
|
60 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
61 |
-
</tr>
|
62 |
-
<tr>
|
63 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
64 |
-
</tr>
|
65 |
-
</tbody>
|
66 |
-
</table>
|
67 |
-
<table width="540" border="0" cellpadding="0"
|
68 |
-
cellspacing="0">
|
69 |
-
<tbody>
|
70 |
-
<tr>
|
71 |
-
<td align="right">
|
72 |
-
<div style="font-family:arial,sans-serif;
|
73 |
-
font-size:14px; color:#2f8bee; margin:0;
|
74 |
-
font-weight:bold; line-height:18px;"> L'équipe
|
75 |
-
de Sendinblue
|
76 |
-
</div>
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
</tbody>
|
80 |
-
</table>
|
81 |
-
<table width="570" border="0" cellpadding="0"
|
82 |
-
cellspacing="0">
|
83 |
-
<tbody>
|
84 |
-
<tr>
|
85 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
86 |
-
</tr>
|
87 |
-
</tbody>
|
88 |
-
</table>
|
89 |
-
<table width="570" border="0" cellpadding="0"
|
90 |
-
cellspacing="0">
|
91 |
-
<tbody>
|
92 |
-
<tr>
|
93 |
-
<td style="font-family:arial,sans-serif;"
|
94 |
-
align="center"><hr /></td>
|
95 |
-
</tr>
|
96 |
-
</tbody>
|
97 |
-
</table>
|
98 |
-
<table width="570" border="0" cellpadding="0"
|
99 |
-
cellspacing="0">
|
100 |
-
<tbody>
|
101 |
-
<tr>
|
102 |
-
<td style="line-height:0; font-size:0;" height="10"> </td>
|
103 |
-
</tr>
|
104 |
-
</tbody>
|
105 |
-
</table>
|
106 |
-
<table width="540" border="0" cellpadding="0"
|
107 |
-
cellspacing="0">
|
108 |
-
<tbody>
|
109 |
-
<tr>
|
110 |
-
<td style="line-height:0; font-size:0;" height="10"> </td>
|
111 |
-
</tr>
|
112 |
-
<tr>
|
113 |
-
<td align="left" valign="top" width="200">
|
114 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
115 |
-
<strong style="color:#2f8bee;">Sendinblue</strong></div>
|
116 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
117 |
-
118, rue de Tocqueville</div>
|
118 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
119 |
-
75017 Paris - France</div>
|
120 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
121 |
-
Tél : 0 899 25 30 61</div>
|
122 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
123 |
-
<a href="https://www.sendinblue.com" style="color:#2f8bee;" target="_blank">www.sendinblue.com</a></div>
|
124 |
-
</td>
|
125 |
-
<td align="right" valign="top">
|
126 |
-
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:20px; color:#7e7e7e;">
|
127 |
-
<a href="http://www.facebook.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Facebook" src="https://my.sendinblue.com/public/upload/14406/images/523693143fe88.gif" style="border:none;"> </a> <a href="https://twitter.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Twitter" src="https://my.sendinblue.com/public/upload/14406/images/5236931746c01.gif" style="border:none;"> </a> <a href="http://www.linkedin.com/company/mailin" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Linkedin" src="https://my.sendinblue.com/public/upload/14406/images/5236931ad253b.gif" style="border:none;"> </a> <a href="http://sendinblue.tumblr.com/" style="color:#2f8bee; text-decoration:none;" target="_blank">Blog</a></div>
|
128 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> © 2013-2014 Sendinblue, tous droits
|
129 |
-
réservés.
|
130 |
-
</div>
|
131 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> Ceci est un message automatique
|
132 |
-
généré par Sendinblue.
|
133 |
-
</div>
|
134 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> Ne pas y répondre, vous ne
|
135 |
-
recevriez aucune réponse.
|
136 |
-
</div>
|
137 |
-
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"><a href="https://www.sendinblue.com/legal/antispampolicy" style="color:#7e7e7e;" target="_blank">Politique
|
138 |
-
anti-spam & emailing</a> | <a href="https://www.sendinblue.com/legal/generalterms" style="color:#7e7e7e;" target="_blank">Conditions
|
139 |
-
générales de ventes</a></div>
|
140 |
-
</td>
|
141 |
-
</tr>
|
142 |
-
</tbody>
|
143 |
-
</table>
|
144 |
-
<table width="570" border="0" cellpadding="0"
|
145 |
-
cellspacing="0">
|
146 |
-
<tbody>
|
147 |
-
<tr>
|
148 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
149 |
-
</tr>
|
150 |
-
<tr>
|
151 |
-
<td style="line-height:0; font-size:0;" height="20"> </td>
|
152 |
-
</tr>
|
153 |
-
</tbody>
|
154 |
-
</table>
|
155 |
-
</td>
|
156 |
-
</tr>
|
157 |
-
</tbody>
|
158 |
-
</table>
|
159 |
-
<br>
|
160 |
-
</div>
|
161 |
-
</body>
|
162 |
</html>
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5 |
+
<title>{title}</title>
|
6 |
+
</head>
|
7 |
+
<body style="font-family: Arial, Helvetica, sans-serif;font-size: 12px;color: #222;">
|
8 |
+
<div class="moz-forward-container">
|
9 |
+
<br>
|
10 |
+
<table style="background-color:#ffffff" width="100%" border="0"
|
11 |
+
cellpadding="0" cellspacing="0">
|
12 |
+
<tbody>
|
13 |
+
<tr style="border-collapse:collapse;">
|
14 |
+
<td style="border-collapse:collapse;" align="center">
|
15 |
+
<table width="570" border="0" cellpadding="0"
|
16 |
+
cellspacing="0">
|
17 |
+
<tbody>
|
18 |
+
<tr>
|
19 |
+
<td style="line-height:0; font-size:0;" height="20"><img src="{shop_logo}" alt="{shop_name}" width="0" height="0"/></td>
|
20 |
+
</tr>
|
21 |
+
</tbody>
|
22 |
+
</table>
|
23 |
+
<table width="570" border="0" cellpadding="0"
|
24 |
+
cellspacing="0">
|
25 |
+
<tbody>
|
26 |
+
<tr>
|
27 |
+
<td align="" valign="middle">
|
28 |
+
<h1 style="margin:0;color:#2f8bee;font-family:arial,sans-serif">
|
29 |
+
<img alt="Sendinblue" src="http://img.sendinblue.com/14406/images/529f2339c6ece.png"></h1>
|
30 |
+
</td>
|
31 |
+
</tr>
|
32 |
+
</tbody>
|
33 |
+
</table>
|
34 |
+
<table width="570" border="0" cellpadding="0"
|
35 |
+
cellspacing="0">
|
36 |
+
<tbody>
|
37 |
+
<tr>
|
38 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
39 |
+
</tr>
|
40 |
+
</tbody>
|
41 |
+
</table>
|
42 |
+
<table width="540" border="0" cellpadding="0"
|
43 |
+
cellspacing="0">
|
44 |
+
<tbody>
|
45 |
+
<tr>
|
46 |
+
<td align="left">
|
47 |
+
<div style="font-family:arial,sans-serif;
|
48 |
+
color:#2f8bee; font-size:18px; font-weight:bold;
|
49 |
+
margin:0 0 10px 0;">Cet e-mail a été envoyé via Sendinblue SMTP. <br />
|
50 |
+
Félicitations, la fonctionnalité Sendinblue SMTP est bien configurée.
|
51 |
+
</div>
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
</tbody>
|
55 |
+
</table>
|
56 |
+
<table width="570" border="0" cellpadding="0"
|
57 |
+
cellspacing="0">
|
58 |
+
<tbody>
|
59 |
+
<tr>
|
60 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
61 |
+
</tr>
|
62 |
+
<tr>
|
63 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
64 |
+
</tr>
|
65 |
+
</tbody>
|
66 |
+
</table>
|
67 |
+
<table width="540" border="0" cellpadding="0"
|
68 |
+
cellspacing="0">
|
69 |
+
<tbody>
|
70 |
+
<tr>
|
71 |
+
<td align="right">
|
72 |
+
<div style="font-family:arial,sans-serif;
|
73 |
+
font-size:14px; color:#2f8bee; margin:0;
|
74 |
+
font-weight:bold; line-height:18px;"> L'équipe
|
75 |
+
de Sendinblue
|
76 |
+
</div>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
</tbody>
|
80 |
+
</table>
|
81 |
+
<table width="570" border="0" cellpadding="0"
|
82 |
+
cellspacing="0">
|
83 |
+
<tbody>
|
84 |
+
<tr>
|
85 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
86 |
+
</tr>
|
87 |
+
</tbody>
|
88 |
+
</table>
|
89 |
+
<table width="570" border="0" cellpadding="0"
|
90 |
+
cellspacing="0">
|
91 |
+
<tbody>
|
92 |
+
<tr>
|
93 |
+
<td style="font-family:arial,sans-serif;"
|
94 |
+
align="center"><hr /></td>
|
95 |
+
</tr>
|
96 |
+
</tbody>
|
97 |
+
</table>
|
98 |
+
<table width="570" border="0" cellpadding="0"
|
99 |
+
cellspacing="0">
|
100 |
+
<tbody>
|
101 |
+
<tr>
|
102 |
+
<td style="line-height:0; font-size:0;" height="10"> </td>
|
103 |
+
</tr>
|
104 |
+
</tbody>
|
105 |
+
</table>
|
106 |
+
<table width="540" border="0" cellpadding="0"
|
107 |
+
cellspacing="0">
|
108 |
+
<tbody>
|
109 |
+
<tr>
|
110 |
+
<td style="line-height:0; font-size:0;" height="10"> </td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td align="left" valign="top" width="200">
|
114 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
115 |
+
<strong style="color:#2f8bee;">Sendinblue</strong></div>
|
116 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
117 |
+
118, rue de Tocqueville</div>
|
118 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
119 |
+
75017 Paris - France</div>
|
120 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
121 |
+
Tél : 0 899 25 30 61</div>
|
122 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:16px; color:#7e7e7e;">
|
123 |
+
<a href="https://www.sendinblue.com" style="color:#2f8bee;" target="_blank">www.sendinblue.com</a></div>
|
124 |
+
</td>
|
125 |
+
<td align="right" valign="top">
|
126 |
+
<div style="font-family:arial,sans-serif; font-size:12px; margin:0; line-height:20px; color:#7e7e7e;">
|
127 |
+
<a href="http://www.facebook.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Facebook" src="https://my.sendinblue.com/public/upload/14406/images/523693143fe88.gif" style="border:none;"> </a> <a href="https://twitter.com/Sendinblue" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Twitter" src="https://my.sendinblue.com/public/upload/14406/images/5236931746c01.gif" style="border:none;"> </a> <a href="http://www.linkedin.com/company/mailin" style="color:#2f8bee; text-decoration:none;" target="_blank"> <img alt="Linkedin" src="https://my.sendinblue.com/public/upload/14406/images/5236931ad253b.gif" style="border:none;"> </a> <a href="http://sendinblue.tumblr.com/" style="color:#2f8bee; text-decoration:none;" target="_blank">Blog</a></div>
|
128 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> © 2013-2014 Sendinblue, tous droits
|
129 |
+
réservés.
|
130 |
+
</div>
|
131 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> Ceci est un message automatique
|
132 |
+
généré par Sendinblue.
|
133 |
+
</div>
|
134 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"> Ne pas y répondre, vous ne
|
135 |
+
recevriez aucune réponse.
|
136 |
+
</div>
|
137 |
+
<div style="font-family:arial,sans-serif; font-size:10px; margin:0; line-height:14px; color:#7e7e7e;"><a href="https://www.sendinblue.com/legal/antispampolicy" style="color:#7e7e7e;" target="_blank">Politique
|
138 |
+
anti-spam & emailing</a> | <a href="https://www.sendinblue.com/legal/generalterms" style="color:#7e7e7e;" target="_blank">Conditions
|
139 |
+
générales de ventes</a></div>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
</tbody>
|
143 |
+
</table>
|
144 |
+
<table width="570" border="0" cellpadding="0"
|
145 |
+
cellspacing="0">
|
146 |
+
<tbody>
|
147 |
+
<tr>
|
148 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
149 |
+
</tr>
|
150 |
+
<tr>
|
151 |
+
<td style="line-height:0; font-size:0;" height="20"> </td>
|
152 |
+
</tr>
|
153 |
+
</tbody>
|
154 |
+
</table>
|
155 |
+
</td>
|
156 |
+
</tr>
|
157 |
+
</tbody>
|
158 |
+
</table>
|
159 |
+
<br>
|
160 |
+
</div>
|
161 |
+
</body>
|
162 |
</html>
|
index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
js/admin.js
CHANGED
@@ -1,1120 +1,1152 @@
|
|
1 |
-
var $jQ = jQuery.noConflict();
|
2 |
-
$jQ(document).ready(function(){
|
3 |
-
|
4 |
-
var bodyHeight = $jQ(document).height();
|
5 |
-
var adminmenu_height = $jQ('#adminmenuwrap').height();
|
6 |
-
if(bodyHeight > adminmenu_height){
|
7 |
-
$jQ("#datamain").height(bodyHeight);
|
8 |
-
}
|
9 |
-
else
|
10 |
-
{
|
11 |
-
$jQ("#datamain").height(adminmenu_height);
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
var normal_attributes = [];
|
16 |
-
|
17 |
-
var category_attributes = [];
|
18 |
-
|
19 |
-
function isValidEmailAddress(emailAddress) {
|
20 |
-
|
21 |
-
var pattern = new RegExp(/^[#&*\/=?^{!}~'_a-z0-9-\+]+([#&*\/=?^{!}~'_a-z0-9-\+]+)*(\.[#&*\/=?^{!}~'_a-z0-9-\+]+)*[.]?@[_a-z0-9-]+(\.[_a-z0-9-]+)*(\.[a-z0-9]{2,10})$/);
|
22 |
-
return pattern.test(emailAddress);
|
23 |
-
}
|
24 |
-
|
25 |
-
function change_field_attr(){
|
26 |
-
var attr_val = $jQ('#sib_sel_attribute').val();
|
27 |
-
var attr_type, attr_name, attr_text;
|
28 |
-
if (attr_val == 'email' || attr_val == 'submit') {
|
29 |
-
// get all info of attr
|
30 |
-
var hidden_attr = $jQ('#sib_hidden_' + attr_val);
|
31 |
-
attr_type = hidden_attr.attr('data-type');
|
32 |
-
attr_name = hidden_attr.attr('data-name');
|
33 |
-
attr_text = hidden_attr.attr('data-text');
|
34 |
-
}
|
35 |
-
else {
|
36 |
-
$jQ.each(normal_attributes, function(index, value) {
|
37 |
-
if (value['name'] == attr_val) {
|
38 |
-
attr_type = value['type'];
|
39 |
-
attr_name = value['name'];
|
40 |
-
attr_text = attr_name;
|
41 |
-
}
|
42 |
-
});
|
43 |
-
|
44 |
-
$jQ.each(category_attributes, function(index, value) {
|
45 |
-
if (value['name'] == attr_val) {
|
46 |
-
attr_type = value['type'];
|
47 |
-
attr_name = value['name'];
|
48 |
-
attr_text = attr_name;
|
49 |
-
}
|
50 |
-
});
|
51 |
-
}
|
52 |
-
|
53 |
-
// generate attribute html
|
54 |
-
generate_attribute_html(attr_type, attr_name, attr_text);
|
55 |
-
}
|
56 |
-
|
57 |
-
function change_attribute_tag(attr_type, attr_name, attr_text){
|
58 |
-
$jQ('#sib_field_label').attr('value', attr_text);
|
59 |
-
$jQ('#sib_field_placeholder').attr('value', '');
|
60 |
-
$jQ('#sib_field_initial').attr('value', '');
|
61 |
-
$jQ('#sib_field_button_text').attr('value', attr_text);
|
62 |
-
$jQ('.sib-attr-other').hide();
|
63 |
-
$jQ('.sib-attr-normal').hide();
|
64 |
-
$jQ('.sib-attr-category').hide();
|
65 |
-
$jQ('#sib_field_required').removeAttr('checked');
|
66 |
-
var dateformat = $jQ('.sib-dateformat').val();
|
67 |
-
switch(attr_type)
|
68 |
-
{
|
69 |
-
case 'email':
|
70 |
-
$jQ('#sib_field_required').attr('checked', 'true');
|
71 |
-
dateformat = '';
|
72 |
-
case 'date':
|
73 |
-
$jQ('#sib_field_placeholder').val(dateformat);
|
74 |
-
case 'text':
|
75 |
-
case 'float':
|
76 |
-
$jQ('.sib-attr-normal').show();
|
77 |
-
if(attr_name == 'SMS'){
|
78 |
-
$jQ('#sib_field_initial_area').hide();
|
79 |
-
}
|
80 |
-
break;
|
81 |
-
case 'boolean':
|
82 |
-
$jQ('.sib-attr-normal').show();
|
83 |
-
break;
|
84 |
-
case 'category':
|
85 |
-
$jQ('.sib-attr-category').show();
|
86 |
-
break;
|
87 |
-
case 'submit':
|
88 |
-
$jQ('.sib-attr-other').show();
|
89 |
-
break;
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
// generate attribute html
|
94 |
-
function generate_attribute_html(attr_type, attr_name, attr_text){
|
95 |
-
var field_label = $jQ('#sib_field_label').val();
|
96 |
-
var field_placeholder = $jQ('#sib_field_placeholder').val();
|
97 |
-
var field_initial = $jQ('#sib_field_initial').val();
|
98 |
-
var field_buttontext = $jQ('#sib_field_button_text').val();
|
99 |
-
//var field_wrap = $jQ('#sib_field_wrap').is(':checked');
|
100 |
-
var field_required = $jQ('#sib_field_required').is(':checked');
|
101 |
-
if(field_required == true) field_label += '*';
|
102 |
-
var field_type = $jQ('input[name=sib_field_type]:checked').val();
|
103 |
-
var dateformat = $jQ('.sib-dateformat').val();
|
104 |
-
var field_html = '';
|
105 |
-
|
106 |
-
if(attr_type != 'submit') {
|
107 |
-
field_html += '<p class="sib-' + attr_name + '-area"> \n';
|
108 |
-
}
|
109 |
-
else {
|
110 |
-
field_html += '<p> \n';
|
111 |
-
}
|
112 |
-
|
113 |
-
if ((field_label != '') && (attr_type == 'category')) {
|
114 |
-
if (field_type == 'select') {
|
115 |
-
field_html += ' <label class="sib-' + attr_name + '-area">' + field_label + '</label> \n';
|
116 |
-
}
|
117 |
-
else {
|
118 |
-
field_html += ' <div style="display:block;"><label class="sib-' + attr_name + '-area">' + field_label + '</label></div> \n';
|
119 |
-
}
|
120 |
-
}
|
121 |
-
else if((field_label != '') && (attr_type != 'submit')) {
|
122 |
-
field_html += ' <label class="sib-' + attr_name + '-area">' + field_label + '</label> \n';
|
123 |
-
}
|
124 |
-
|
125 |
-
switch (attr_type)
|
126 |
-
{
|
127 |
-
case 'email':
|
128 |
-
field_html += ' <input type="email" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
129 |
-
field_html += 'placeholder="' + field_placeholder + '" ';
|
130 |
-
field_html += 'value="' + field_initial + '" ';
|
131 |
-
if(field_required == true) {
|
132 |
-
field_html += 'required="required" ';
|
133 |
-
}
|
134 |
-
field_html += '> \n';
|
135 |
-
break;
|
136 |
-
case 'date':
|
137 |
-
field_html += ' <input type="text" class="sib-' + attr_name + '-area sib-date" name="' + attr_name + '" placeholder="' + dateformat + '" data-format="' + dateformat + '">';
|
138 |
-
break;
|
139 |
-
case 'boolean':
|
140 |
-
field_html += ' <input type="hidden" name="' + attr_name + '" value="0"><input type="checkbox" value="1" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
141 |
-
if(field_placeholder != '') {
|
142 |
-
field_html += 'placeholder="' + field_placeholder + '" ';
|
143 |
-
}
|
144 |
-
if(field_required == true) {
|
145 |
-
field_html += 'required="required" ';
|
146 |
-
}
|
147 |
-
field_html += '> \n';
|
148 |
-
break;
|
149 |
-
case 'text':
|
150 |
-
if ( attr_name == "SMS" ) {
|
151 |
-
field_html += '<div class="sib-sms-field"><div class="sib-country-block">' +
|
152 |
-
'<div class="sib-toggle sib-country-flg"><div class="sib-cflags"></div> ' +
|
153 |
-
'<div class="sib-icon-arrow"></div></div> '+
|
154 |
-
'</div>' + '<ul class="sib-country-list" style="display: none;"></ul>' +
|
155 |
-
'<input type="hidden" name="sib_SMS_prefix" value="+33"><input type="text" name="SMS" class="sib-sms" value="+33" ';
|
156 |
-
if(field_placeholder != '') {
|
157 |
-
field_html += 'placeholder="' + field_placeholder + '" ';
|
158 |
-
}
|
159 |
-
if(field_required == true) {
|
160 |
-
field_html += 'required="required" ';
|
161 |
-
}
|
162 |
-
field_html += '></div>\n';
|
163 |
-
}
|
164 |
-
else {
|
165 |
-
field_html += ' <input type="text" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
166 |
-
if(field_placeholder != '') {
|
167 |
-
field_html += 'placeholder="' + field_placeholder + '" ';
|
168 |
-
}
|
169 |
-
if(field_initial != '') {
|
170 |
-
field_html += 'value="' + field_initial + '" ';
|
171 |
-
}
|
172 |
-
if(field_required == true) {
|
173 |
-
field_html += 'required="required" ';
|
174 |
-
}
|
175 |
-
field_html += '> \n';
|
176 |
-
}
|
177 |
-
break;
|
178 |
-
case 'float':
|
179 |
-
field_html += ' <input type="text" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
180 |
-
if(field_placeholder != '') {
|
181 |
-
field_html += 'placeholder="' + field_placeholder + '" ';
|
182 |
-
}
|
183 |
-
if(field_initial != '') {
|
184 |
-
field_html += 'value="' + field_initial + '" ';
|
185 |
-
}
|
186 |
-
if(field_required == true) {
|
187 |
-
field_html += 'required="required" ';
|
188 |
-
}
|
189 |
-
field_html += 'pattern="[0-9]+([\\.|,][0-9]+)?" > \n';
|
190 |
-
break;
|
191 |
-
case 'submit':
|
192 |
-
field_html += ' <input type="submit" class="sib-default-btn" name="' + attr_name + '" ';
|
193 |
-
field_html += 'value="' + field_buttontext + '" ';
|
194 |
-
field_html += '> \n';
|
195 |
-
break;
|
196 |
-
case 'category':
|
197 |
-
var enumeration = [];
|
198 |
-
$jQ.each(category_attributes, function(index, value) {
|
199 |
-
if (value['name'] == attr_name) {
|
200 |
-
enumeration = value['enumeration'];
|
201 |
-
}
|
202 |
-
});
|
203 |
-
|
204 |
-
if (field_type == 'select') {
|
205 |
-
field_html += ' <select class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
206 |
-
if (field_required == true) {
|
207 |
-
field_html += 'required="required" ';
|
208 |
-
}
|
209 |
-
field_html += '> \n';
|
210 |
-
}
|
211 |
-
$jQ.each(enumeration, function(index, value) {
|
212 |
-
if (field_type == 'select') {
|
213 |
-
field_html += ' <option value="' + value['value'] + '">' + value['label'] + '</option> \n';
|
214 |
-
}
|
215 |
-
else {
|
216 |
-
field_html += ' <div style="display:block;"><input type="radio" class="sib-' + attr_name + '-area" name="' + attr_name + '" value="' + value['value'] + '" ';
|
217 |
-
if (field_required == true) {
|
218 |
-
field_html += 'required="required" ';
|
219 |
-
}
|
220 |
-
field_html += '>' + value['label'] + '</div> \n';
|
221 |
-
}
|
222 |
-
});
|
223 |
-
if (field_type == 'select') {
|
224 |
-
field_html += ' </select> \n';
|
225 |
-
}
|
226 |
-
break;
|
227 |
-
}
|
228 |
-
|
229 |
-
field_html += '</p>';
|
230 |
-
$jQ('#sib_field_html').html(field_html);
|
231 |
-
}
|
232 |
-
|
233 |
-
function set_select_list() {
|
234 |
-
var selected_list_id = $jQ('#sib_selected_list_id').val();
|
235 |
-
|
236 |
-
var data = {
|
237 |
-
frmid : $jQ('input[name=sib_form_id]').val(),
|
238 |
-
action : 'sib_get_lists',
|
239 |
-
security: ajax_sib_object.ajax_nonce
|
240 |
-
};
|
241 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
242 |
-
var select_html = '';
|
243 |
-
var selected = respond.selected;
|
244 |
-
|
245 |
-
$jQ.each(respond.lists, function(index, value) {
|
246 |
-
if(value['name'] == 'Temp - DOUBLE OPTIN') return true;
|
247 |
-
if ( selected.indexOf(value['id'].toString()) != '-1' ) {
|
248 |
-
select_html += '<option value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
249 |
-
}
|
250 |
-
else {
|
251 |
-
select_html += '<option value="' + value['id'] + '">' + value['name'] + '</option>';
|
252 |
-
}
|
253 |
-
});
|
254 |
-
$jQ('#sib_select_list').html(select_html).trigger("chosen:updated");
|
255 |
-
|
256 |
-
set_select_attributes();
|
257 |
-
|
258 |
-
});
|
259 |
-
}
|
260 |
-
|
261 |
-
function set_select_template() {
|
262 |
-
var selected_template_id = $jQ('#sib_selected_template_id').val();
|
263 |
-
var selected_do_template_id = $jQ('#sib_selected_do_template_id').val();
|
264 |
-
var selected_confirm_template_id = $jQ('#sib_selected_confirm_template_id').val();
|
265 |
-
var default_template_name = $jQ('#sib_default_template_name').val();
|
266 |
-
var data = {
|
267 |
-
action : 'sib_get_templates',
|
268 |
-
security: ajax_sib_object.ajax_nonce
|
269 |
-
};
|
270 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
271 |
-
var select_html = '<select id="sib_template_id" class="col-md-11" name="template_id">';
|
272 |
-
if (selected_template_id == '-1') {
|
273 |
-
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
274 |
-
}
|
275 |
-
else {
|
276 |
-
select_html += '<option value="-1">' + default_template_name + '</option>';
|
277 |
-
}
|
278 |
-
$jQ.each(respond.templates, function(index, value) {
|
279 |
-
if (value['id'] == selected_template_id) {
|
280 |
-
select_html += '<option value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
281 |
-
}
|
282 |
-
else {
|
283 |
-
select_html += '<option value="' + value['id'] + '">' + value['name'] + '</option>';
|
284 |
-
}
|
285 |
-
});
|
286 |
-
select_html += '</select>';
|
287 |
-
$jQ('#sib_template_id_area').html(select_html);
|
288 |
-
|
289 |
-
// For double optin.
|
290 |
-
select_html = '<select class="col-md-11" name="doubleoptin_template_id" id="sib_doubleoptin_template_id">';
|
291 |
-
if (selected_do_template_id == '-1') {
|
292 |
-
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
293 |
-
}
|
294 |
-
else {
|
295 |
-
select_html += '<option value="-1">' + default_template_name + '</option>';
|
296 |
-
}
|
297 |
-
$jQ.each(respond.templates, function(index, value) {
|
298 |
-
if (value['id'] == selected_do_template_id) {
|
299 |
-
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
300 |
-
}
|
301 |
-
else {
|
302 |
-
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '">' + value['name'] + '</option>';
|
303 |
-
}
|
304 |
-
});
|
305 |
-
select_html += '</select>';
|
306 |
-
$jQ('#sib_doubleoptin_template_id_area').html(select_html);
|
307 |
-
|
308 |
-
// For final confirmation emait template
|
309 |
-
select_html = '<select id="sib_confirm_template_id" class="col-md-11" name="confirm_template_id">';
|
310 |
-
if (selected_confirm_template_id == '-1') {
|
311 |
-
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
312 |
-
}
|
313 |
-
else {
|
314 |
-
select_html += '<option value="-1">' + default_template_name + '</option>';
|
315 |
-
}
|
316 |
-
|
317 |
-
$jQ.each(respond.templates, function(index, value) {
|
318 |
-
if (value['id'] == selected_confirm_template_id) {
|
319 |
-
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
320 |
-
}
|
321 |
-
else {
|
322 |
-
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '">' + value['name'] + '</option>';
|
323 |
-
}
|
324 |
-
});
|
325 |
-
select_html += '</select>';
|
326 |
-
$jQ('#sib_final_confirm_template_id_area').html(select_html);
|
327 |
-
|
328 |
-
// double optin template id
|
329 |
-
$jQ('#sib_doubleoptin_template_id').on('change', function() {
|
330 |
-
var shortcode_exist = $jQ(this).find(':selected').attr('is_shortcode');
|
331 |
-
if (shortcode_exist == 0 && $jQ(this).val() != -1) {
|
332 |
-
$jQ('#sib_form_alert_message').show();
|
333 |
-
$jQ('#sib_disclaim_smtp').hide();
|
334 |
-
$jQ('#sib_disclaim_confirm_template').hide();
|
335 |
-
$jQ('#sib_disclaim_do_template').show();
|
336 |
-
$jQ(this).val('-1');
|
337 |
-
}
|
338 |
-
else {
|
339 |
-
$jQ('#sib_form_alert_message').hide();
|
340 |
-
}
|
341 |
-
});
|
342 |
-
|
343 |
-
// Final confirm template id
|
344 |
-
$jQ('#sib_confirm_template_id').on('change', function() {
|
345 |
-
var shortcode_exist = $jQ(this).find(':selected').attr('is_shortcode');
|
346 |
-
if (shortcode_exist == 1 && $jQ(this).val() != -1) {
|
347 |
-
$jQ('#sib_form_alert_message').show();
|
348 |
-
$jQ('#sib_disclaim_smtp').hide();
|
349 |
-
$jQ('#sib_disclaim_confirm_template').show();
|
350 |
-
$jQ('#sib_disclaim_do_template').hide();
|
351 |
-
$jQ(this).val('-1');
|
352 |
-
}
|
353 |
-
else {
|
354 |
-
$jQ('#sib_form_alert_message').hide();
|
355 |
-
}
|
356 |
-
});
|
357 |
-
|
358 |
-
$jQ('#sib_setting_signup_spin').addClass('hide');
|
359 |
-
|
360 |
-
});
|
361 |
-
}
|
362 |
-
|
363 |
-
function set_select_attributes() {
|
364 |
-
var data = {
|
365 |
-
action : 'sib_get_attributes',
|
366 |
-
security: ajax_sib_object.ajax_nonce
|
367 |
-
};
|
368 |
-
|
369 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
370 |
-
|
371 |
-
var iframWidth = $jQ('.form-field').width() - 48;
|
372 |
-
$jQ('#sib-preview-form').width(iframWidth);
|
373 |
-
|
374 |
-
normal_attributes = respond.attrs.attributes.normal_attributes;
|
375 |
-
category_attributes = respond.attrs.attributes.category_attributes;
|
376 |
-
var attr_email_name = $jQ('#sib_hidden_email').attr('data-text');
|
377 |
-
var message_1 = $jQ('#sib_hidden_message_1').val();
|
378 |
-
var message_2 = $jQ('#sib_hidden_message_2').val();
|
379 |
-
var message_3 = $jQ('#sib_hidden_message_3').val();
|
380 |
-
var message_4 = $jQ('#sib_hidden_message_4').val();
|
381 |
-
var message_5 = $jQ('#sib_hidden_message_5').val();
|
382 |
-
var select_html = '<select class="col-md-12" id="sib_sel_attribute">' +
|
383 |
-
'<option value="-1" disabled selected>' + message_1 + '</option>' +
|
384 |
-
'<optgroup label="' + message_2 + '">';
|
385 |
-
select_html += '<option value="email">' + attr_email_name + '*</option>';
|
386 |
-
$jQ.each(normal_attributes, function(index, value) {
|
387 |
-
select_html += '<option value="' + value['name'] + '">' + value['name'] + '</option>';
|
388 |
-
});
|
389 |
-
select_html += '</optgroup>';
|
390 |
-
select_html += '<optgroup label="' + message_3 + '">';
|
391 |
-
$jQ.each(category_attributes, function(index, value) {
|
392 |
-
if(value['name'] == 'DOUBLE_OPT-IN') return;
|
393 |
-
select_html += '<option value="' + value['name'] + '">' + value['name'] + '</option>';
|
394 |
-
});
|
395 |
-
select_html += '</optgroup>';
|
396 |
-
select_html += '<optgroup label="' + message_4 + '">';
|
397 |
-
select_html += '<option value="submit">' + message_5 + '</option>';
|
398 |
-
select_html += '</optgroup>';
|
399 |
-
select_html += '</select>';
|
400 |
-
|
401 |
-
$jQ('#sib_sel_attribute_area').html(select_html);
|
402 |
-
$jQ('#sib_sel_attribute').on('change', function() {
|
403 |
-
//
|
404 |
-
$jQ('#sib-field-content').show();
|
405 |
-
|
406 |
-
var attr_val = $jQ(this).val();
|
407 |
-
var attr_type, attr_name, attr_text;
|
408 |
-
if (attr_val == 'email' || attr_val == 'submit') {
|
409 |
-
// get all info of attr
|
410 |
-
var hidden_attr = $jQ('#sib_hidden_' + attr_val);
|
411 |
-
attr_type = hidden_attr.attr('data-type');
|
412 |
-
attr_name = hidden_attr.attr('data-name');
|
413 |
-
attr_text = hidden_attr.attr('data-text');
|
414 |
-
}
|
415 |
-
else {
|
416 |
-
$jQ.each(normal_attributes, function(index, value) {
|
417 |
-
if (value['name'] == attr_val) {
|
418 |
-
attr_type = value['type'];
|
419 |
-
attr_name = value['name'];
|
420 |
-
attr_text = attr_name;
|
421 |
-
}
|
422 |
-
});
|
423 |
-
|
424 |
-
$jQ.each(category_attributes, function(index, value) {
|
425 |
-
if (value['name'] == attr_val) {
|
426 |
-
attr_type = value['type'];
|
427 |
-
attr_name = value['name'];
|
428 |
-
attr_text = attr_name;
|
429 |
-
}
|
430 |
-
});
|
431 |
-
}
|
432 |
-
// change attribute tags
|
433 |
-
change_attribute_tag(attr_type, attr_name, attr_text);
|
434 |
-
|
435 |
-
// generate attribute html
|
436 |
-
generate_attribute_html(attr_type, attr_name, attr_text);
|
437 |
-
});
|
438 |
-
$jQ('#sib_setting_form_spin').addClass('hide');
|
439 |
-
set_select_template();
|
440 |
-
});
|
441 |
-
}
|
442 |
-
|
443 |
-
function update_preview(){
|
444 |
-
|
445 |
-
var frmid = $jQ('#sib_form_id').val();
|
446 |
-
var formHtml = $jQ('#sibformmarkup').val();
|
447 |
-
var formCss = $jQ('#sibcssmarkup').val();
|
448 |
-
var isDepend = $jQ('input[name=sib_css_type]:checked').val();
|
449 |
-
var gCaptcha = $jQ('input[name=sib_add_captcha]:checked').val();
|
450 |
-
var gCaptchaType = $jQ('input[name=sib_recaptcha_type]:checked').val();
|
451 |
-
var gCaptchaSite = $jQ('#sib_captcha_site').val();
|
452 |
-
var data = {
|
453 |
-
action:'sib_update_form_html',
|
454 |
-
security: ajax_sib_object.ajax_nonce,
|
455 |
-
frmid: frmid,
|
456 |
-
frmData: formHtml,
|
457 |
-
frmCss: formCss,
|
458 |
-
isDepend: isDepend,
|
459 |
-
gCaptcha: gCaptcha,
|
460 |
-
gCaptchaType: gCaptchaType,
|
461 |
-
gCaptchaSite: gCaptchaSite
|
462 |
-
};
|
463 |
-
$jQ.post(ajax_sib_object.ajax_url, data,function() {
|
464 |
-
var preview_form = $jQ('#sib-preview-form');
|
465 |
-
preview_form.attr('src', preview_form.attr('src') + '&action=update');
|
466 |
-
});
|
467 |
-
}
|
468 |
-
// get cursor posistion of text area
|
469 |
-
function get_cursor_position(node) {
|
470 |
-
//node.focus();
|
471 |
-
/* without node.focus() IE will returns -1 when focus is not on node */
|
472 |
-
if(node.selectionStart) return node.selectionStart;
|
473 |
-
else if(!document.selection) return 0;
|
474 |
-
var c = "\001";
|
475 |
-
var sel = document.selection.createRange();
|
476 |
-
var dul = sel.duplicate();
|
477 |
-
dul.moveToElementText(node);
|
478 |
-
sel.text = c;
|
479 |
-
var len = (dul.text.indexOf(c));
|
480 |
-
sel.moveStart('character',-1);
|
481 |
-
sel.text = "";
|
482 |
-
return len;
|
483 |
-
}
|
484 |
-
// set cursor position at top of text area
|
485 |
-
function setSelectionRange(input, selectionStart, selectionEnd) {
|
486 |
-
if (input.setSelectionRange) {
|
487 |
-
input.focus();
|
488 |
-
input.setSelectionRange(selectionStart, selectionEnd);
|
489 |
-
} else if (input.createTextRange) {
|
490 |
-
var range = input.createTextRange();
|
491 |
-
range.collapse(true);
|
492 |
-
range.moveEnd('character', selectionEnd);
|
493 |
-
range.moveStart('character', selectionStart);
|
494 |
-
range.select();
|
495 |
-
}
|
496 |
-
}
|
497 |
-
|
498 |
-
// generate html for multi subscription lists
|
499 |
-
function generate_multi_list_html() {
|
500 |
-
var field_label = $jQ('#sib_multi_field_label').val();
|
501 |
-
var field_html = '<p class="sib-multi-lists-area">\n';
|
502 |
-
var list_id = '';
|
503 |
-
var list_name = '';
|
504 |
-
var required = false;
|
505 |
-
var required_label = '';
|
506 |
-
var required_attr = '';
|
507 |
-
if ( $jQ('#sib_multi_field_required').is(":checked"))
|
508 |
-
{
|
509 |
-
required = true;
|
510 |
-
required_label = '*';
|
511 |
-
required_attr = 'required';
|
512 |
-
}
|
513 |
-
if ( field_label != '' )
|
514 |
-
{
|
515 |
-
field_html += '<label>' + field_label + required_label + '</label>\n';
|
516 |
-
}
|
517 |
-
|
518 |
-
field_html += '<div class="sib-multi-lists" data-require="' + required_attr + '">\n';
|
519 |
-
var selected_lists = $jQ('#sib_select_multi_list').find('option:selected', this);
|
520 |
-
selected_lists.each(function(){
|
521 |
-
list_id = $jQ(this).val();
|
522 |
-
list_name = $jQ(this).data('list');
|
523 |
-
field_html += '<div style="block"><input type="checkbox" class="sib-interesting-lists" value="' + list_id + '" name="listIDs[]">' + list_name + '</div>\n';
|
524 |
-
});
|
525 |
-
field_html += '</div></p>';
|
526 |
-
$jQ('#sib_multi_field_html').html(field_html);
|
527 |
-
}
|
528 |
-
/////////////////////////////////
|
529 |
-
/* home settings */
|
530 |
-
/////////////////////////////////
|
531 |
-
|
532 |
-
// var elements
|
533 |
-
var sib_access_key = $jQ('#sib_access_key');
|
534 |
-
var sib_validate_btn = $jQ('#sib_validate_btn');
|
535 |
-
|
536 |
-
// validate button click process in welcome page
|
537 |
-
sib_validate_btn.on('click', function(){
|
538 |
-
|
539 |
-
var access_key = sib_access_key.val();
|
540 |
-
|
541 |
-
// check validation
|
542 |
-
var error_flag = 0;
|
543 |
-
if(access_key == '') {
|
544 |
-
sib_access_key.addClass('error');
|
545 |
-
error_flag =1;
|
546 |
-
}
|
547 |
-
|
548 |
-
if(error_flag != 0) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
|
552 |
-
// ajax process for validate
|
553 |
-
var data = {
|
554 |
-
action:'sib_validate_process',
|
555 |
-
access_key: access_key,
|
556 |
-
security: ajax_sib_object.ajax_nonce
|
557 |
-
};
|
558 |
-
|
559 |
-
$jQ('.sib_alert').hide();
|
560 |
-
$jQ('.sib-spin').show();
|
561 |
-
sib_access_key.removeClass('error');
|
562 |
-
$jQ(this).attr('disabled', 'true');
|
563 |
-
|
564 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
565 |
-
$jQ('.sib-spin').hide();
|
566 |
-
sib_validate_btn.removeAttr('disabled');
|
567 |
-
if(respond == 'success') {
|
568 |
-
$jQ('#success-alert').show();
|
569 |
-
/*var cur_url = $jQ('#cur_refer_url').val();
|
570 |
-
window.location.href = cur_url;*/
|
571 |
-
window.location.reload();
|
572 |
-
}
|
573 |
-
else if (respond == 'curl_no_installed') {
|
574 |
-
sib_access_key.addClass('error');
|
575 |
-
$jQ('#failure-alert').html($jQ('#curl_no_exist_error').val()).show();
|
576 |
-
}
|
577 |
-
else if (respond == 'curl_error') {
|
578 |
-
sib_access_key.addClass('error');
|
579 |
-
$jQ('#failure-alert').html($jQ('#curl_error').val()).show();
|
580 |
-
}
|
581 |
-
else {
|
582 |
-
sib_access_key.addClass('error');
|
583 |
-
$jQ('#failure-alert').html($jQ('#general_error').val()).show();
|
584 |
-
}
|
585 |
-
});
|
586 |
-
});
|
587 |
-
|
588 |
-
sib_access_key.on('keypress', function(){
|
589 |
-
$jQ(this).removeClass('error');
|
590 |
-
});
|
591 |
-
|
592 |
-
// Transactional emails
|
593 |
-
$jQ('input[name=activate_email]').on('click', function(){
|
594 |
-
var option_val = $jQ(this).val();
|
595 |
-
var data = {
|
596 |
-
action: 'sib_activate_email_change',
|
597 |
-
option_val: option_val,
|
598 |
-
security: ajax_sib_object.ajax_nonce
|
599 |
-
};
|
600 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
601 |
-
if(respond == 'yes')
|
602 |
-
$jQ('#email_send_field').show();
|
603 |
-
else
|
604 |
-
$jQ('#email_send_field').hide();
|
605 |
-
});
|
606 |
-
|
607 |
-
return true;
|
608 |
-
});
|
609 |
-
|
610 |
-
// change sender detail
|
611 |
-
$jQ('#sender_list').on('change',function(){
|
612 |
-
var data = {
|
613 |
-
action: 'sib_sender_change',
|
614 |
-
sender: $jQ(this).val(),
|
615 |
-
security: ajax_sib_object.ajax_nonce
|
616 |
-
};
|
617 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function() {
|
618 |
-
$jQ(this).blur();
|
619 |
-
});
|
620 |
-
|
621 |
-
return true;
|
622 |
-
});
|
623 |
-
|
624 |
-
// validate MA
|
625 |
-
$jQ('#validate_ma_btn').on('click',function(){
|
626 |
-
var option_val = $jQ('input[name=activate_ma]:checked').val();
|
627 |
-
var data = {
|
628 |
-
action:'sib_validate_ma',
|
629 |
-
option_val: option_val,
|
630 |
-
security: ajax_sib_object.ajax_nonce
|
631 |
-
};
|
632 |
-
var uninstall = false;
|
633 |
-
var uninstallMsg = $jQ('#sib-ma-unistall').val();
|
634 |
-
if(option_val != 'yes'){
|
635 |
-
uninstall = confirm(uninstallMsg);
|
636 |
-
}
|
637 |
-
if(option_val == 'yes' || uninstall) {
|
638 |
-
$jQ(this).find('.sib-spin').show();
|
639 |
-
$jQ('.sib-ma-alert').hide();
|
640 |
-
$jQ(this).attr('disabled', 'true');
|
641 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function (respond) {
|
642 |
-
$jQ('.sib-spin').hide();
|
643 |
-
$jQ('#validate_ma_btn').removeAttr('disabled');
|
644 |
-
if (respond == 'yes') {
|
645 |
-
$jQ('.sib-ma-active').show();
|
646 |
-
} else if(respond == 'no') {
|
647 |
-
$jQ('.sib-ma-inactive').show();
|
648 |
-
} else if(respond == 'disabled'){
|
649 |
-
$jQ('.sib-ma-disabled').show();
|
650 |
-
$jQ('#activate_ma_radio_no').prop('checked', true);
|
651 |
-
}
|
652 |
-
setTimeout(function(){
|
653 |
-
if(respond != 'disabled')
|
654 |
-
window.location.reload();
|
655 |
-
},2000);
|
656 |
-
|
657 |
-
});
|
658 |
-
}
|
659 |
-
});
|
660 |
-
|
661 |
-
// send activate email button
|
662 |
-
$jQ('#send_email_btn').on('click',function(){
|
663 |
-
var activate_email = $jQ('#activate_email');
|
664 |
-
var email = activate_email.val();
|
665 |
-
if(email == '' || isValidEmailAddress(email) != true) {
|
666 |
-
activate_email.removeClass('has-success').addClass('error');
|
667 |
-
$jQ('#failure-alert').show();
|
668 |
-
return false;
|
669 |
-
}
|
670 |
-
$jQ(this).attr('disabled', 'true');
|
671 |
-
|
672 |
-
var data = {
|
673 |
-
action:'sib_send_email',
|
674 |
-
email:email,
|
675 |
-
security: ajax_sib_object.ajax_nonce
|
676 |
-
};
|
677 |
-
|
678 |
-
$jQ('.sib_alert').hide();
|
679 |
-
activate_email.removeClass('error');
|
680 |
-
$jQ(this).find('.sib-spin').show();
|
681 |
-
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
682 |
-
$jQ('.sib-spin').hide();
|
683 |
-
$jQ('#send_email_btn').removeAttr('disabled');
|
684 |
-
if(respond != 'success') {
|
685 |
-
$jQ('#activate_email').removeClass('has-success').addClass('error');
|
686 |
-
$jQ('#failure-alert').show();
|
687 |
-
} else {
|
688 |
-
$jQ('#success-alert').show();
|
689 |
-
}
|
690 |
-
});
|
691 |
-
});
|
692 |
-
|
693 |
-
////////////////////////////////
|
694 |
-
/* manage forms */
|
695 |
-
////////////////////////////////
|
696 |
-
|
697 |
-
$jQ('#sib-field-content').hide();
|
698 |
-
|
699 |
-
// check confirm email
|
700 |
-
var is_send_confirm_email = $jQ("input[name=is_confirm_email]:checked").val();
|
701 |
-
|
702 |
-
if(is_send_confirm_email == '1') {
|
703 |
-
$jQ('#sib_confirm_template_area').show();
|
704 |
-
$jQ('#sib_confirm_sender_area').show();
|
705 |
-
} else {
|
706 |
-
$jQ('#sib_confirm_template_area').hide();
|
707 |
-
$jQ('#sib_confirm_sender_area').hide();
|
708 |
-
}
|
709 |
-
|
710 |
-
// check double optin
|
711 |
-
var is_double_optin = $jQ("input[name=is_double_optin]:checked").val();
|
712 |
-
|
713 |
-
if(is_double_optin == '1') {
|
714 |
-
$jQ('#is_confirm_email_no').prop("checked", true);
|
715 |
-
$jQ('#sib_confirm_template_area').hide();
|
716 |
-
$jQ('#sib_confirm_sender_area').hide();
|
717 |
-
$jQ('#sib_double_sender_area').show();
|
718 |
-
$jQ('#sib_doubleoptin_template_area').show();
|
719 |
-
|
720 |
-
} else {
|
721 |
-
$jQ('#sib_double_sender_area').hide();
|
722 |
-
$jQ('#sib_double_redirect_area').hide();
|
723 |
-
$jQ('#sib_doubleoptin_template_area').hide();
|
724 |
-
$jQ('#sib_final_confirm_template_area').hide();
|
725 |
-
}
|
726 |
-
|
727 |
-
if ($jQ('#sib_setting_signup_body').find('#sib_select_list_area').length > 0 ) {
|
728 |
-
set_select_list();
|
729 |
-
$jQ('#sib_select_list').chosen({width:"100%"});
|
730 |
-
}
|
731 |
-
|
732 |
-
// For multi lists subscription
|
733 |
-
if ( $jQ('#sib_setting_form_body').find('#sib_sel_multi_list_area').length > 0 ) {
|
734 |
-
var data = {
|
735 |
-
frmid : $jQ('input[name=sib_form_id]').val(),
|
736 |
-
action : 'sib_get_lists',
|
737 |
-
security: ajax_sib_object.ajax_nonce
|
738 |
-
};
|
739 |
-
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
740 |
-
var select_html = '';
|
741 |
-
$jQ.each(respond.lists, function(index, value) {
|
742 |
-
if(value['name'] == 'Temp - DOUBLE OPTIN') return true;
|
743 |
-
select_html += '<option value="' + value['id'] + '" data-list="' + value['name'] + '">' + value['name'] + '</option>';
|
744 |
-
});
|
745 |
-
$jQ('#sib_select_multi_list').html(select_html).trigger("chosen:updated");
|
746 |
-
$jQ('#sib_select_multi_list').chosen({width:"100%"});
|
747 |
-
});
|
748 |
-
}
|
749 |
-
|
750 |
-
$jQ('#sib_select_multi_list').on('change', function(){
|
751 |
-
if ( $jQ(this).val() != null )
|
752 |
-
{
|
753 |
-
$jQ('#sib_multi_list_field').show();
|
754 |
-
generate_multi_list_html();
|
755 |
-
}
|
756 |
-
else {
|
757 |
-
$jQ('#sib_multi_list_field').hide();
|
758 |
-
}
|
759 |
-
});
|
760 |
-
|
761 |
-
$jQ('#sib_multi_field_label').on('change', function () {
|
762 |
-
generate_multi_list_html();
|
763 |
-
});
|
764 |
-
|
765 |
-
$jQ('#sib_multi_field_required').on('change', function () {
|
766 |
-
generate_multi_list_html();
|
767 |
-
});
|
768 |
-
// keep change of fields
|
769 |
-
$jQ('.sib_field_changes').on('change',function() {
|
770 |
-
change_field_attr();
|
771 |
-
});
|
772 |
-
|
773 |
-
// click confirm email
|
774 |
-
$jQ("input[name=is_confirm_email]").on('click',function() {
|
775 |
-
var confirm_email = $jQ(this).val();
|
776 |
-
var is_activated_smtp = parseInt($jQ("#is_smtp_activated").val());
|
777 |
-
|
778 |
-
if(confirm_email == '1') {
|
779 |
-
$jQ('#sib_doubleoptin_template_id').val('-1');
|
780 |
-
$jQ('#sib_confirm_template_id').val('-1');
|
781 |
-
$jQ('#is_double_optin_no').prop("checked", true);
|
782 |
-
$jQ('#sib_double_sender_area').hide();
|
783 |
-
$jQ('#sib_double_redirect_area').hide();
|
784 |
-
$jQ('#sib_confirm_template_area').show();
|
785 |
-
$jQ('#sib_confirm_sender_area').show();
|
786 |
-
$jQ('#sib_doubleoptin_template_area').hide();
|
787 |
-
$jQ('#sib_final_confirm_template_area').hide();
|
788 |
-
$jQ('#sib_form_alert_message').hide();
|
789 |
-
if (is_activated_smtp == 0) {
|
790 |
-
$jQ('#sib_form_alert_message').show();
|
791 |
-
$jQ('#sib_disclaim_smtp').show();
|
792 |
-
$jQ('#sib_disclaim_do_template').hide();
|
793 |
-
$jQ('#sib_disclaim_confirm_template').hide();
|
794 |
-
}
|
795 |
-
} else {
|
796 |
-
$jQ('#sib_confirm_template_area').hide();
|
797 |
-
$jQ('#sib_confirm_sender_area').hide();
|
798 |
-
$jQ('#sib_form_alert_message').hide();
|
799 |
-
}
|
800 |
-
});
|
801 |
-
|
802 |
-
// click double optin
|
803 |
-
$jQ('input[name=is_double_optin]').on('click', function() {
|
804 |
-
var double_optin = $jQ(this).val();
|
805 |
-
var is_activated_smtp = parseInt($jQ("#is_smtp_activated").val());
|
806 |
-
if(double_optin == '1') {
|
807 |
-
$jQ('#sib_template_id').val('-1');
|
808 |
-
$jQ('#is_confirm_email_no').prop("checked", true);
|
809 |
-
$jQ('#sib_confirm_template_area').hide();
|
810 |
-
$jQ('#sib_confirm_sender_area').hide();
|
811 |
-
$jQ('#sib_double_sender_area').show();
|
812 |
-
$jQ('#sib_double_redirect_area').show();
|
813 |
-
$jQ('#sib_doubleoptin_template_area').show();
|
814 |
-
$jQ('#sib_final_confirm_template_area').show();
|
815 |
-
if (is_activated_smtp == 0) {
|
816 |
-
$jQ('#sib_form_alert_message').show();
|
817 |
-
$jQ('#sib_disclaim_smtp').show();
|
818 |
-
$jQ('#sib_disclaim_do_template').hide();
|
819 |
-
$jQ('#sib_disclaim_confirm_template').hide();
|
820 |
-
}
|
821 |
-
} else {
|
822 |
-
$jQ('#sib_double_sender_area').hide();
|
823 |
-
$jQ('#sib_double_redirect_area').hide();
|
824 |
-
$jQ('#sib_doubleoptin_template_area').hide();
|
825 |
-
$jQ('#sib_form_alert_message').hide();
|
826 |
-
$jQ('#sib_final_confirm_template_area').hide();
|
827 |
-
}
|
828 |
-
});
|
829 |
-
|
830 |
-
// click redirect url
|
831 |
-
$jQ('#is_redirect_url_click_yes').on('click', function () {
|
832 |
-
$jQ('#sib_subscrition_redirect_area').show();
|
833 |
-
});
|
834 |
-
$jQ('#is_redirect_url_click_no').on('click', function () {
|
835 |
-
$jQ('#sib_subscrition_redirect_area').hide();
|
836 |
-
});
|
837 |
-
|
838 |
-
//// refresh iframe to preview form
|
839 |
-
$jQ('#sib-preview-form-refresh').on('click',function(){
|
840 |
-
// ajax to update form html
|
841 |
-
update_preview();
|
842 |
-
});
|
843 |
-
|
844 |
-
//// display popup when delete form
|
845 |
-
$jQ('.sib-form-delete').on('click', function(e) {
|
846 |
-
return confirm('Are you sure you want to delete this form?');
|
847 |
-
});
|
848 |
-
|
849 |
-
//// custom or theme's css
|
850 |
-
$jQ('input[name=sib_css_type]').on('change',function() {
|
851 |
-
$jQ('#sibcssmarkup').toggle();
|
852 |
-
update_preview();
|
853 |
-
});
|
854 |
-
|
855 |
-
// remove all transients
|
856 |
-
$jQ(window).focus(function() {
|
857 |
-
|
858 |
-
var data = {
|
859 |
-
action: 'sib_remove_cache',
|
860 |
-
security: ajax_sib_object.ajax_nonce
|
861 |
-
};
|
862 |
-
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
863 |
-
|
864 |
-
if(respond == 'success') {
|
865 |
-
//
|
866 |
-
}
|
867 |
-
});
|
868 |
-
});
|
869 |
-
|
870 |
-
/* sync wordpress users to sendinblue contact list */
|
871 |
-
// sync popup
|
872 |
-
$jQ('#sib-sync-btn').on('click', function() {
|
873 |
-
var syncModal = $jQ('.sib-sync-modal');
|
874 |
-
syncModal.modal();
|
875 |
-
$jQ('#sync-failure').hide();
|
876 |
-
|
877 |
-
// add to multilist field
|
878 |
-
var list = $jQ('#sib_select_list');
|
879 |
-
list[0].selectedIndex = 0;
|
880 |
-
list.chosen({width:"100%"});
|
881 |
-
|
882 |
-
syncModal.on('hidden.bs.modal', function () {
|
883 |
-
//window.location.reload();
|
884 |
-
});
|
885 |
-
});
|
886 |
-
|
887 |
-
var attrFieldLine = $jQ('.sync-attr-line').html();
|
888 |
-
// sync add attr line filed
|
889 |
-
$jQ('.modal-body').on('click', '.sync-attr-plus', function(){
|
890 |
-
$jQ('.sync-attr-line').append(attrFieldLine);
|
891 |
-
$jQ('.sync-attr-dismiss').show();
|
892 |
-
});
|
893 |
-
// sync dismiss attr line filed
|
894 |
-
$jQ('.modal-body').on('click', '.sync-attr-dismiss', function(){
|
895 |
-
$jQ(this).closest('.sync-attr').remove();
|
896 |
-
var attrCount = $jQ('.sync-attr').length;
|
897 |
-
if(attrCount == 1) $jQ('.sync-attr-dismiss').hide();
|
898 |
-
});
|
899 |
-
|
900 |
-
// set attribute matching
|
901 |
-
$jQ('.modal-body').on('change', 'select', function () {
|
902 |
-
if($jQ(this).attr("class") == 'sync-wp-attr'){
|
903 |
-
$jQ(this).closest('.sync-attr').find('.sync-match').val($jQ(this).val());
|
904 |
-
}else{
|
905 |
-
$jQ(this).closest('.sync-attr').find('.sync-match').attr('name',$jQ(this).val());
|
906 |
-
}
|
907 |
-
});
|
908 |
-
|
909 |
-
// sync users to sendinblue
|
910 |
-
$jQ('#sib_sync_users_btn').on('click', function(){
|
911 |
-
|
912 |
-
$jQ(this).attr('disabled', 'true');
|
913 |
-
var postData = $jQ('#sib-sync-form').serializeObject();
|
914 |
-
$jQ(this).closest('form').find('input[type=hidden]').each(function (index, value) {
|
915 |
-
var attrName = $jQ(this).attr('name');
|
916 |
-
if($jQ('input[name='+attrName+']').length > 1){
|
917 |
-
// the attribute is duplicated !
|
918 |
-
postData['errAttr'] = attrName;
|
919 |
-
}
|
920 |
-
});
|
921 |
-
|
922 |
-
var data = {
|
923 |
-
action:'sib_sync_users',
|
924 |
-
data: postData,
|
925 |
-
security: ajax_sib_object.ajax_nonce
|
926 |
-
};
|
927 |
-
|
928 |
-
$jQ('.sib_alert').hide();
|
929 |
-
$jQ(this).find('.sib-spin').show();
|
930 |
-
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
931 |
-
$jQ('.sib-spin').hide();
|
932 |
-
$jQ('#sib_sync_users_btn').removeAttr('disabled');
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
});
|
957 |
-
|
958 |
-
$jQ('
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
var
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
})
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
{
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jQ = jQuery.noConflict();
|
2 |
+
$jQ(document).ready(function(){
|
3 |
+
|
4 |
+
var bodyHeight = $jQ(document).height();
|
5 |
+
var adminmenu_height = $jQ('#adminmenuwrap').height();
|
6 |
+
if(bodyHeight > adminmenu_height){
|
7 |
+
$jQ("#datamain").height(bodyHeight);
|
8 |
+
}
|
9 |
+
else
|
10 |
+
{
|
11 |
+
$jQ("#datamain").height(adminmenu_height);
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
var normal_attributes = [];
|
16 |
+
|
17 |
+
var category_attributes = [];
|
18 |
+
|
19 |
+
function isValidEmailAddress(emailAddress) {
|
20 |
+
|
21 |
+
var pattern = new RegExp(/^[#&*\/=?^{!}~'_a-z0-9-\+]+([#&*\/=?^{!}~'_a-z0-9-\+]+)*(\.[#&*\/=?^{!}~'_a-z0-9-\+]+)*[.]?@[_a-z0-9-]+(\.[_a-z0-9-]+)*(\.[a-z0-9]{2,10})$/);
|
22 |
+
return pattern.test(emailAddress);
|
23 |
+
}
|
24 |
+
|
25 |
+
function change_field_attr(){
|
26 |
+
var attr_val = $jQ('#sib_sel_attribute').val();
|
27 |
+
var attr_type, attr_name, attr_text;
|
28 |
+
if (attr_val == 'email' || attr_val == 'submit') {
|
29 |
+
// get all info of attr
|
30 |
+
var hidden_attr = $jQ('#sib_hidden_' + attr_val);
|
31 |
+
attr_type = hidden_attr.attr('data-type');
|
32 |
+
attr_name = hidden_attr.attr('data-name');
|
33 |
+
attr_text = hidden_attr.attr('data-text');
|
34 |
+
}
|
35 |
+
else {
|
36 |
+
$jQ.each(normal_attributes, function(index, value) {
|
37 |
+
if (value['name'] == attr_val) {
|
38 |
+
attr_type = value['type'];
|
39 |
+
attr_name = value['name'];
|
40 |
+
attr_text = attr_name;
|
41 |
+
}
|
42 |
+
});
|
43 |
+
|
44 |
+
$jQ.each(category_attributes, function(index, value) {
|
45 |
+
if (value['name'] == attr_val) {
|
46 |
+
attr_type = value['type'];
|
47 |
+
attr_name = value['name'];
|
48 |
+
attr_text = attr_name;
|
49 |
+
}
|
50 |
+
});
|
51 |
+
}
|
52 |
+
|
53 |
+
// generate attribute html
|
54 |
+
generate_attribute_html(attr_type, attr_name, attr_text);
|
55 |
+
}
|
56 |
+
|
57 |
+
function change_attribute_tag(attr_type, attr_name, attr_text){
|
58 |
+
$jQ('#sib_field_label').attr('value', attr_text);
|
59 |
+
$jQ('#sib_field_placeholder').attr('value', '');
|
60 |
+
$jQ('#sib_field_initial').attr('value', '');
|
61 |
+
$jQ('#sib_field_button_text').attr('value', attr_text);
|
62 |
+
$jQ('.sib-attr-other').hide();
|
63 |
+
$jQ('.sib-attr-normal').hide();
|
64 |
+
$jQ('.sib-attr-category').hide();
|
65 |
+
$jQ('#sib_field_required').removeAttr('checked');
|
66 |
+
var dateformat = $jQ('.sib-dateformat').val();
|
67 |
+
switch(attr_type)
|
68 |
+
{
|
69 |
+
case 'email':
|
70 |
+
$jQ('#sib_field_required').attr('checked', 'true');
|
71 |
+
dateformat = '';
|
72 |
+
case 'date':
|
73 |
+
$jQ('#sib_field_placeholder').val(dateformat);
|
74 |
+
case 'text':
|
75 |
+
case 'float':
|
76 |
+
$jQ('.sib-attr-normal').show();
|
77 |
+
if(attr_name == 'SMS'){
|
78 |
+
$jQ('#sib_field_initial_area').hide();
|
79 |
+
}
|
80 |
+
break;
|
81 |
+
case 'boolean':
|
82 |
+
$jQ('.sib-attr-normal').show();
|
83 |
+
break;
|
84 |
+
case 'category':
|
85 |
+
$jQ('.sib-attr-category').show();
|
86 |
+
break;
|
87 |
+
case 'submit':
|
88 |
+
$jQ('.sib-attr-other').show();
|
89 |
+
break;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
// generate attribute html
|
94 |
+
function generate_attribute_html(attr_type, attr_name, attr_text){
|
95 |
+
var field_label = $jQ('#sib_field_label').val();
|
96 |
+
var field_placeholder = $jQ('#sib_field_placeholder').val();
|
97 |
+
var field_initial = $jQ('#sib_field_initial').val();
|
98 |
+
var field_buttontext = $jQ('#sib_field_button_text').val();
|
99 |
+
//var field_wrap = $jQ('#sib_field_wrap').is(':checked');
|
100 |
+
var field_required = $jQ('#sib_field_required').is(':checked');
|
101 |
+
if(field_required == true) field_label += '*';
|
102 |
+
var field_type = $jQ('input[name=sib_field_type]:checked').val();
|
103 |
+
var dateformat = $jQ('.sib-dateformat').val();
|
104 |
+
var field_html = '';
|
105 |
+
|
106 |
+
if(attr_type != 'submit') {
|
107 |
+
field_html += '<p class="sib-' + attr_name + '-area"> \n';
|
108 |
+
}
|
109 |
+
else {
|
110 |
+
field_html += '<p> \n';
|
111 |
+
}
|
112 |
+
|
113 |
+
if ((field_label != '') && (attr_type == 'category')) {
|
114 |
+
if (field_type == 'select') {
|
115 |
+
field_html += ' <label class="sib-' + attr_name + '-area">' + field_label + '</label> \n';
|
116 |
+
}
|
117 |
+
else {
|
118 |
+
field_html += ' <div style="display:block;"><label class="sib-' + attr_name + '-area">' + field_label + '</label></div> \n';
|
119 |
+
}
|
120 |
+
}
|
121 |
+
else if((field_label != '') && (attr_type != 'submit')) {
|
122 |
+
field_html += ' <label class="sib-' + attr_name + '-area">' + field_label + '</label> \n';
|
123 |
+
}
|
124 |
+
|
125 |
+
switch (attr_type)
|
126 |
+
{
|
127 |
+
case 'email':
|
128 |
+
field_html += ' <input type="email" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
129 |
+
field_html += 'placeholder="' + field_placeholder + '" ';
|
130 |
+
field_html += 'value="' + field_initial + '" ';
|
131 |
+
if(field_required == true) {
|
132 |
+
field_html += 'required="required" ';
|
133 |
+
}
|
134 |
+
field_html += '> \n';
|
135 |
+
break;
|
136 |
+
case 'date':
|
137 |
+
field_html += ' <input type="text" class="sib-' + attr_name + '-area sib-date" name="' + attr_name + '" placeholder="' + dateformat + '" data-format="' + dateformat + '">';
|
138 |
+
break;
|
139 |
+
case 'boolean':
|
140 |
+
field_html += ' <input type="hidden" name="' + attr_name + '" value="0"><input type="checkbox" value="1" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
141 |
+
if(field_placeholder != '') {
|
142 |
+
field_html += 'placeholder="' + field_placeholder + '" ';
|
143 |
+
}
|
144 |
+
if(field_required == true) {
|
145 |
+
field_html += 'required="required" ';
|
146 |
+
}
|
147 |
+
field_html += '> \n';
|
148 |
+
break;
|
149 |
+
case 'text':
|
150 |
+
if ( attr_name == "SMS" ) {
|
151 |
+
field_html += '<div class="sib-sms-field"><div class="sib-country-block">' +
|
152 |
+
'<div class="sib-toggle sib-country-flg"><div class="sib-cflags"></div> ' +
|
153 |
+
'<div class="sib-icon-arrow"></div></div> '+
|
154 |
+
'</div>' + '<ul class="sib-country-list" style="display: none;"></ul>' +
|
155 |
+
'<input type="hidden" name="sib_SMS_prefix" value="+33"><input type="text" name="SMS" class="sib-sms" value="+33" ';
|
156 |
+
if(field_placeholder != '') {
|
157 |
+
field_html += 'placeholder="' + field_placeholder + '" ';
|
158 |
+
}
|
159 |
+
if(field_required == true) {
|
160 |
+
field_html += 'required="required" ';
|
161 |
+
}
|
162 |
+
field_html += '></div>\n';
|
163 |
+
}
|
164 |
+
else {
|
165 |
+
field_html += ' <input type="text" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
166 |
+
if(field_placeholder != '') {
|
167 |
+
field_html += 'placeholder="' + field_placeholder + '" ';
|
168 |
+
}
|
169 |
+
if(field_initial != '') {
|
170 |
+
field_html += 'value="' + field_initial + '" ';
|
171 |
+
}
|
172 |
+
if(field_required == true) {
|
173 |
+
field_html += 'required="required" ';
|
174 |
+
}
|
175 |
+
field_html += '> \n';
|
176 |
+
}
|
177 |
+
break;
|
178 |
+
case 'float':
|
179 |
+
field_html += ' <input type="text" class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
180 |
+
if(field_placeholder != '') {
|
181 |
+
field_html += 'placeholder="' + field_placeholder + '" ';
|
182 |
+
}
|
183 |
+
if(field_initial != '') {
|
184 |
+
field_html += 'value="' + field_initial + '" ';
|
185 |
+
}
|
186 |
+
if(field_required == true) {
|
187 |
+
field_html += 'required="required" ';
|
188 |
+
}
|
189 |
+
field_html += 'pattern="[0-9]+([\\.|,][0-9]+)?" > \n';
|
190 |
+
break;
|
191 |
+
case 'submit':
|
192 |
+
field_html += ' <input type="submit" class="sib-default-btn" name="' + attr_name + '" ';
|
193 |
+
field_html += 'value="' + field_buttontext + '" ';
|
194 |
+
field_html += '> \n';
|
195 |
+
break;
|
196 |
+
case 'category':
|
197 |
+
var enumeration = [];
|
198 |
+
$jQ.each(category_attributes, function(index, value) {
|
199 |
+
if (value['name'] == attr_name) {
|
200 |
+
enumeration = value['enumeration'];
|
201 |
+
}
|
202 |
+
});
|
203 |
+
|
204 |
+
if (field_type == 'select') {
|
205 |
+
field_html += ' <select class="sib-' + attr_name + '-area" name="' + attr_name + '" ';
|
206 |
+
if (field_required == true) {
|
207 |
+
field_html += 'required="required" ';
|
208 |
+
}
|
209 |
+
field_html += '> \n';
|
210 |
+
}
|
211 |
+
$jQ.each(enumeration, function(index, value) {
|
212 |
+
if (field_type == 'select') {
|
213 |
+
field_html += ' <option value="' + value['value'] + '">' + value['label'] + '</option> \n';
|
214 |
+
}
|
215 |
+
else {
|
216 |
+
field_html += ' <div style="display:block;"><input type="radio" class="sib-' + attr_name + '-area" name="' + attr_name + '" value="' + value['value'] + '" ';
|
217 |
+
if (field_required == true) {
|
218 |
+
field_html += 'required="required" ';
|
219 |
+
}
|
220 |
+
field_html += '>' + value['label'] + '</div> \n';
|
221 |
+
}
|
222 |
+
});
|
223 |
+
if (field_type == 'select') {
|
224 |
+
field_html += ' </select> \n';
|
225 |
+
}
|
226 |
+
break;
|
227 |
+
}
|
228 |
+
|
229 |
+
field_html += '</p>';
|
230 |
+
$jQ('#sib_field_html').html(field_html);
|
231 |
+
}
|
232 |
+
|
233 |
+
function set_select_list() {
|
234 |
+
var selected_list_id = $jQ('#sib_selected_list_id').val();
|
235 |
+
|
236 |
+
var data = {
|
237 |
+
frmid : $jQ('input[name=sib_form_id]').val(),
|
238 |
+
action : 'sib_get_lists',
|
239 |
+
security: ajax_sib_object.ajax_nonce
|
240 |
+
};
|
241 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
242 |
+
var select_html = '';
|
243 |
+
var selected = respond.selected;
|
244 |
+
|
245 |
+
$jQ.each(respond.lists, function(index, value) {
|
246 |
+
if(value['name'] == 'Temp - DOUBLE OPTIN') return true;
|
247 |
+
if ( selected.indexOf(value['id'].toString()) != '-1' ) {
|
248 |
+
select_html += '<option value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
249 |
+
}
|
250 |
+
else {
|
251 |
+
select_html += '<option value="' + value['id'] + '">' + value['name'] + '</option>';
|
252 |
+
}
|
253 |
+
});
|
254 |
+
$jQ('#sib_select_list').html(select_html).trigger("chosen:updated");
|
255 |
+
|
256 |
+
set_select_attributes();
|
257 |
+
|
258 |
+
});
|
259 |
+
}
|
260 |
+
|
261 |
+
function set_select_template() {
|
262 |
+
var selected_template_id = $jQ('#sib_selected_template_id').val();
|
263 |
+
var selected_do_template_id = $jQ('#sib_selected_do_template_id').val();
|
264 |
+
var selected_confirm_template_id = $jQ('#sib_selected_confirm_template_id').val();
|
265 |
+
var default_template_name = $jQ('#sib_default_template_name').val();
|
266 |
+
var data = {
|
267 |
+
action : 'sib_get_templates',
|
268 |
+
security: ajax_sib_object.ajax_nonce
|
269 |
+
};
|
270 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
271 |
+
var select_html = '<select id="sib_template_id" class="col-md-11" name="template_id">';
|
272 |
+
if (selected_template_id == '-1') {
|
273 |
+
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
274 |
+
}
|
275 |
+
else {
|
276 |
+
select_html += '<option value="-1">' + default_template_name + '</option>';
|
277 |
+
}
|
278 |
+
$jQ.each(respond.templates, function(index, value) {
|
279 |
+
if (value['id'] == selected_template_id) {
|
280 |
+
select_html += '<option value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
281 |
+
}
|
282 |
+
else {
|
283 |
+
select_html += '<option value="' + value['id'] + '">' + value['name'] + '</option>';
|
284 |
+
}
|
285 |
+
});
|
286 |
+
select_html += '</select>';
|
287 |
+
$jQ('#sib_template_id_area').html(select_html);
|
288 |
+
|
289 |
+
// For double optin.
|
290 |
+
select_html = '<select class="col-md-11" name="doubleoptin_template_id" id="sib_doubleoptin_template_id">';
|
291 |
+
if (selected_do_template_id == '-1') {
|
292 |
+
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
293 |
+
}
|
294 |
+
else {
|
295 |
+
select_html += '<option value="-1">' + default_template_name + '</option>';
|
296 |
+
}
|
297 |
+
$jQ.each(respond.templates, function(index, value) {
|
298 |
+
if (value['id'] == selected_do_template_id) {
|
299 |
+
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
300 |
+
}
|
301 |
+
else {
|
302 |
+
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '">' + value['name'] + '</option>';
|
303 |
+
}
|
304 |
+
});
|
305 |
+
select_html += '</select>';
|
306 |
+
$jQ('#sib_doubleoptin_template_id_area').html(select_html);
|
307 |
+
|
308 |
+
// For final confirmation emait template
|
309 |
+
select_html = '<select id="sib_confirm_template_id" class="col-md-11" name="confirm_template_id">';
|
310 |
+
if (selected_confirm_template_id == '-1') {
|
311 |
+
select_html += '<option value="-1" selected>' + default_template_name + '</option>';
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
select_html += '<option value="-1">' + default_template_name + '</option>';
|
315 |
+
}
|
316 |
+
|
317 |
+
$jQ.each(respond.templates, function(index, value) {
|
318 |
+
if (value['id'] == selected_confirm_template_id) {
|
319 |
+
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '" selected>' + value['name'] + '</option>';
|
320 |
+
}
|
321 |
+
else {
|
322 |
+
select_html += '<option is_shortcode="' + value['is_dopt'] + '" value="' + value['id'] + '">' + value['name'] + '</option>';
|
323 |
+
}
|
324 |
+
});
|
325 |
+
select_html += '</select>';
|
326 |
+
$jQ('#sib_final_confirm_template_id_area').html(select_html);
|
327 |
+
|
328 |
+
// double optin template id
|
329 |
+
$jQ('#sib_doubleoptin_template_id').on('change', function() {
|
330 |
+
var shortcode_exist = $jQ(this).find(':selected').attr('is_shortcode');
|
331 |
+
if (shortcode_exist == 0 && $jQ(this).val() != -1) {
|
332 |
+
$jQ('#sib_form_alert_message').show();
|
333 |
+
$jQ('#sib_disclaim_smtp').hide();
|
334 |
+
$jQ('#sib_disclaim_confirm_template').hide();
|
335 |
+
$jQ('#sib_disclaim_do_template').show();
|
336 |
+
$jQ(this).val('-1');
|
337 |
+
}
|
338 |
+
else {
|
339 |
+
$jQ('#sib_form_alert_message').hide();
|
340 |
+
}
|
341 |
+
});
|
342 |
+
|
343 |
+
// Final confirm template id
|
344 |
+
$jQ('#sib_confirm_template_id').on('change', function() {
|
345 |
+
var shortcode_exist = $jQ(this).find(':selected').attr('is_shortcode');
|
346 |
+
if (shortcode_exist == 1 && $jQ(this).val() != -1) {
|
347 |
+
$jQ('#sib_form_alert_message').show();
|
348 |
+
$jQ('#sib_disclaim_smtp').hide();
|
349 |
+
$jQ('#sib_disclaim_confirm_template').show();
|
350 |
+
$jQ('#sib_disclaim_do_template').hide();
|
351 |
+
$jQ(this).val('-1');
|
352 |
+
}
|
353 |
+
else {
|
354 |
+
$jQ('#sib_form_alert_message').hide();
|
355 |
+
}
|
356 |
+
});
|
357 |
+
|
358 |
+
$jQ('#sib_setting_signup_spin').addClass('hide');
|
359 |
+
|
360 |
+
});
|
361 |
+
}
|
362 |
+
|
363 |
+
function set_select_attributes() {
|
364 |
+
var data = {
|
365 |
+
action : 'sib_get_attributes',
|
366 |
+
security: ajax_sib_object.ajax_nonce
|
367 |
+
};
|
368 |
+
|
369 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
370 |
+
|
371 |
+
var iframWidth = $jQ('.form-field').width() - 48;
|
372 |
+
$jQ('#sib-preview-form').width(iframWidth);
|
373 |
+
|
374 |
+
normal_attributes = respond.attrs.attributes.normal_attributes;
|
375 |
+
category_attributes = respond.attrs.attributes.category_attributes;
|
376 |
+
var attr_email_name = $jQ('#sib_hidden_email').attr('data-text');
|
377 |
+
var message_1 = $jQ('#sib_hidden_message_1').val();
|
378 |
+
var message_2 = $jQ('#sib_hidden_message_2').val();
|
379 |
+
var message_3 = $jQ('#sib_hidden_message_3').val();
|
380 |
+
var message_4 = $jQ('#sib_hidden_message_4').val();
|
381 |
+
var message_5 = $jQ('#sib_hidden_message_5').val();
|
382 |
+
var select_html = '<select class="col-md-12" id="sib_sel_attribute">' +
|
383 |
+
'<option value="-1" disabled selected>' + message_1 + '</option>' +
|
384 |
+
'<optgroup label="' + message_2 + '">';
|
385 |
+
select_html += '<option value="email">' + attr_email_name + '*</option>';
|
386 |
+
$jQ.each(normal_attributes, function(index, value) {
|
387 |
+
select_html += '<option value="' + value['name'] + '">' + value['name'] + '</option>';
|
388 |
+
});
|
389 |
+
select_html += '</optgroup>';
|
390 |
+
select_html += '<optgroup label="' + message_3 + '">';
|
391 |
+
$jQ.each(category_attributes, function(index, value) {
|
392 |
+
if(value['name'] == 'DOUBLE_OPT-IN') return;
|
393 |
+
select_html += '<option value="' + value['name'] + '">' + value['name'] + '</option>';
|
394 |
+
});
|
395 |
+
select_html += '</optgroup>';
|
396 |
+
select_html += '<optgroup label="' + message_4 + '">';
|
397 |
+
select_html += '<option value="submit">' + message_5 + '</option>';
|
398 |
+
select_html += '</optgroup>';
|
399 |
+
select_html += '</select>';
|
400 |
+
|
401 |
+
$jQ('#sib_sel_attribute_area').html(select_html);
|
402 |
+
$jQ('#sib_sel_attribute').on('change', function() {
|
403 |
+
//
|
404 |
+
$jQ('#sib-field-content').show();
|
405 |
+
|
406 |
+
var attr_val = $jQ(this).val();
|
407 |
+
var attr_type, attr_name, attr_text;
|
408 |
+
if (attr_val == 'email' || attr_val == 'submit') {
|
409 |
+
// get all info of attr
|
410 |
+
var hidden_attr = $jQ('#sib_hidden_' + attr_val);
|
411 |
+
attr_type = hidden_attr.attr('data-type');
|
412 |
+
attr_name = hidden_attr.attr('data-name');
|
413 |
+
attr_text = hidden_attr.attr('data-text');
|
414 |
+
}
|
415 |
+
else {
|
416 |
+
$jQ.each(normal_attributes, function(index, value) {
|
417 |
+
if (value['name'] == attr_val) {
|
418 |
+
attr_type = value['type'];
|
419 |
+
attr_name = value['name'];
|
420 |
+
attr_text = attr_name;
|
421 |
+
}
|
422 |
+
});
|
423 |
+
|
424 |
+
$jQ.each(category_attributes, function(index, value) {
|
425 |
+
if (value['name'] == attr_val) {
|
426 |
+
attr_type = value['type'];
|
427 |
+
attr_name = value['name'];
|
428 |
+
attr_text = attr_name;
|
429 |
+
}
|
430 |
+
});
|
431 |
+
}
|
432 |
+
// change attribute tags
|
433 |
+
change_attribute_tag(attr_type, attr_name, attr_text);
|
434 |
+
|
435 |
+
// generate attribute html
|
436 |
+
generate_attribute_html(attr_type, attr_name, attr_text);
|
437 |
+
});
|
438 |
+
$jQ('#sib_setting_form_spin').addClass('hide');
|
439 |
+
set_select_template();
|
440 |
+
});
|
441 |
+
}
|
442 |
+
|
443 |
+
function update_preview(){
|
444 |
+
|
445 |
+
var frmid = $jQ('#sib_form_id').val();
|
446 |
+
var formHtml = $jQ('#sibformmarkup').val();
|
447 |
+
var formCss = $jQ('#sibcssmarkup').val();
|
448 |
+
var isDepend = $jQ('input[name=sib_css_type]:checked').val();
|
449 |
+
var gCaptcha = $jQ('input[name=sib_add_captcha]:checked').val();
|
450 |
+
var gCaptchaType = $jQ('input[name=sib_recaptcha_type]:checked').val();
|
451 |
+
var gCaptchaSite = $jQ('#sib_captcha_site').val();
|
452 |
+
var data = {
|
453 |
+
action:'sib_update_form_html',
|
454 |
+
security: ajax_sib_object.ajax_nonce,
|
455 |
+
frmid: frmid,
|
456 |
+
frmData: formHtml,
|
457 |
+
frmCss: formCss,
|
458 |
+
isDepend: isDepend,
|
459 |
+
gCaptcha: gCaptcha,
|
460 |
+
gCaptchaType: gCaptchaType,
|
461 |
+
gCaptchaSite: gCaptchaSite
|
462 |
+
};
|
463 |
+
$jQ.post(ajax_sib_object.ajax_url, data,function() {
|
464 |
+
var preview_form = $jQ('#sib-preview-form');
|
465 |
+
preview_form.attr('src', preview_form.attr('src') + '&action=update');
|
466 |
+
});
|
467 |
+
}
|
468 |
+
// get cursor posistion of text area
|
469 |
+
function get_cursor_position(node) {
|
470 |
+
//node.focus();
|
471 |
+
/* without node.focus() IE will returns -1 when focus is not on node */
|
472 |
+
if(node.selectionStart) return node.selectionStart;
|
473 |
+
else if(!document.selection) return 0;
|
474 |
+
var c = "\001";
|
475 |
+
var sel = document.selection.createRange();
|
476 |
+
var dul = sel.duplicate();
|
477 |
+
dul.moveToElementText(node);
|
478 |
+
sel.text = c;
|
479 |
+
var len = (dul.text.indexOf(c));
|
480 |
+
sel.moveStart('character',-1);
|
481 |
+
sel.text = "";
|
482 |
+
return len;
|
483 |
+
}
|
484 |
+
// set cursor position at top of text area
|
485 |
+
function setSelectionRange(input, selectionStart, selectionEnd) {
|
486 |
+
if (input.setSelectionRange) {
|
487 |
+
input.focus();
|
488 |
+
input.setSelectionRange(selectionStart, selectionEnd);
|
489 |
+
} else if (input.createTextRange) {
|
490 |
+
var range = input.createTextRange();
|
491 |
+
range.collapse(true);
|
492 |
+
range.moveEnd('character', selectionEnd);
|
493 |
+
range.moveStart('character', selectionStart);
|
494 |
+
range.select();
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
// generate html for multi subscription lists
|
499 |
+
function generate_multi_list_html() {
|
500 |
+
var field_label = $jQ('#sib_multi_field_label').val();
|
501 |
+
var field_html = '<p class="sib-multi-lists-area">\n';
|
502 |
+
var list_id = '';
|
503 |
+
var list_name = '';
|
504 |
+
var required = false;
|
505 |
+
var required_label = '';
|
506 |
+
var required_attr = '';
|
507 |
+
if ( $jQ('#sib_multi_field_required').is(":checked"))
|
508 |
+
{
|
509 |
+
required = true;
|
510 |
+
required_label = '*';
|
511 |
+
required_attr = 'required';
|
512 |
+
}
|
513 |
+
if ( field_label != '' )
|
514 |
+
{
|
515 |
+
field_html += '<label>' + field_label + required_label + '</label>\n';
|
516 |
+
}
|
517 |
+
|
518 |
+
field_html += '<div class="sib-multi-lists" data-require="' + required_attr + '">\n';
|
519 |
+
var selected_lists = $jQ('#sib_select_multi_list').find('option:selected', this);
|
520 |
+
selected_lists.each(function(){
|
521 |
+
list_id = $jQ(this).val();
|
522 |
+
list_name = $jQ(this).data('list');
|
523 |
+
field_html += '<div style="block"><input type="checkbox" class="sib-interesting-lists" value="' + list_id + '" name="listIDs[]">' + list_name + '</div>\n';
|
524 |
+
});
|
525 |
+
field_html += '</div></p>';
|
526 |
+
$jQ('#sib_multi_field_html').html(field_html);
|
527 |
+
}
|
528 |
+
/////////////////////////////////
|
529 |
+
/* home settings */
|
530 |
+
/////////////////////////////////
|
531 |
+
|
532 |
+
// var elements
|
533 |
+
var sib_access_key = $jQ('#sib_access_key');
|
534 |
+
var sib_validate_btn = $jQ('#sib_validate_btn');
|
535 |
+
|
536 |
+
// validate button click process in welcome page
|
537 |
+
sib_validate_btn.on('click', function(){
|
538 |
+
|
539 |
+
var access_key = sib_access_key.val();
|
540 |
+
|
541 |
+
// check validation
|
542 |
+
var error_flag = 0;
|
543 |
+
if(access_key == '') {
|
544 |
+
sib_access_key.addClass('error');
|
545 |
+
error_flag =1;
|
546 |
+
}
|
547 |
+
|
548 |
+
if(error_flag != 0) {
|
549 |
+
return false;
|
550 |
+
}
|
551 |
+
|
552 |
+
// ajax process for validate
|
553 |
+
var data = {
|
554 |
+
action:'sib_validate_process',
|
555 |
+
access_key: access_key,
|
556 |
+
security: ajax_sib_object.ajax_nonce
|
557 |
+
};
|
558 |
+
|
559 |
+
$jQ('.sib_alert').hide();
|
560 |
+
$jQ('.sib-spin').show();
|
561 |
+
sib_access_key.removeClass('error');
|
562 |
+
$jQ(this).attr('disabled', 'true');
|
563 |
+
|
564 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
565 |
+
$jQ('.sib-spin').hide();
|
566 |
+
sib_validate_btn.removeAttr('disabled');
|
567 |
+
if(respond == 'success') {
|
568 |
+
$jQ('#success-alert').show();
|
569 |
+
/*var cur_url = $jQ('#cur_refer_url').val();
|
570 |
+
window.location.href = cur_url;*/
|
571 |
+
window.location.reload();
|
572 |
+
}
|
573 |
+
else if (respond == 'curl_no_installed') {
|
574 |
+
sib_access_key.addClass('error');
|
575 |
+
$jQ('#failure-alert').html($jQ('#curl_no_exist_error').val()).show();
|
576 |
+
}
|
577 |
+
else if (respond == 'curl_error') {
|
578 |
+
sib_access_key.addClass('error');
|
579 |
+
$jQ('#failure-alert').html($jQ('#curl_error').val()).show();
|
580 |
+
}
|
581 |
+
else {
|
582 |
+
sib_access_key.addClass('error');
|
583 |
+
$jQ('#failure-alert').html($jQ('#general_error').val()).show();
|
584 |
+
}
|
585 |
+
});
|
586 |
+
});
|
587 |
+
|
588 |
+
sib_access_key.on('keypress', function(){
|
589 |
+
$jQ(this).removeClass('error');
|
590 |
+
});
|
591 |
+
|
592 |
+
// Transactional emails
|
593 |
+
$jQ('input[name=activate_email]').on('click', function(){
|
594 |
+
var option_val = $jQ(this).val();
|
595 |
+
var data = {
|
596 |
+
action: 'sib_activate_email_change',
|
597 |
+
option_val: option_val,
|
598 |
+
security: ajax_sib_object.ajax_nonce
|
599 |
+
};
|
600 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
601 |
+
if(respond == 'yes')
|
602 |
+
$jQ('#email_send_field').show();
|
603 |
+
else
|
604 |
+
$jQ('#email_send_field').hide();
|
605 |
+
});
|
606 |
+
|
607 |
+
return true;
|
608 |
+
});
|
609 |
+
|
610 |
+
// change sender detail
|
611 |
+
$jQ('#sender_list').on('change',function(){
|
612 |
+
var data = {
|
613 |
+
action: 'sib_sender_change',
|
614 |
+
sender: $jQ(this).val(),
|
615 |
+
security: ajax_sib_object.ajax_nonce
|
616 |
+
};
|
617 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function() {
|
618 |
+
$jQ(this).blur();
|
619 |
+
});
|
620 |
+
|
621 |
+
return true;
|
622 |
+
});
|
623 |
+
|
624 |
+
// validate MA
|
625 |
+
$jQ('#validate_ma_btn').on('click',function(){
|
626 |
+
var option_val = $jQ('input[name=activate_ma]:checked').val();
|
627 |
+
var data = {
|
628 |
+
action:'sib_validate_ma',
|
629 |
+
option_val: option_val,
|
630 |
+
security: ajax_sib_object.ajax_nonce
|
631 |
+
};
|
632 |
+
var uninstall = false;
|
633 |
+
var uninstallMsg = $jQ('#sib-ma-unistall').val();
|
634 |
+
if(option_val != 'yes'){
|
635 |
+
uninstall = confirm(uninstallMsg);
|
636 |
+
}
|
637 |
+
if(option_val == 'yes' || uninstall) {
|
638 |
+
$jQ(this).find('.sib-spin').show();
|
639 |
+
$jQ('.sib-ma-alert').hide();
|
640 |
+
$jQ(this).attr('disabled', 'true');
|
641 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function (respond) {
|
642 |
+
$jQ('.sib-spin').hide();
|
643 |
+
$jQ('#validate_ma_btn').removeAttr('disabled');
|
644 |
+
if (respond == 'yes') {
|
645 |
+
$jQ('.sib-ma-active').show();
|
646 |
+
} else if(respond == 'no') {
|
647 |
+
$jQ('.sib-ma-inactive').show();
|
648 |
+
} else if(respond == 'disabled'){
|
649 |
+
$jQ('.sib-ma-disabled').show();
|
650 |
+
$jQ('#activate_ma_radio_no').prop('checked', true);
|
651 |
+
}
|
652 |
+
setTimeout(function(){
|
653 |
+
if(respond != 'disabled')
|
654 |
+
window.location.reload();
|
655 |
+
},2000);
|
656 |
+
|
657 |
+
});
|
658 |
+
}
|
659 |
+
});
|
660 |
+
|
661 |
+
// send activate email button
|
662 |
+
$jQ('#send_email_btn').on('click',function(){
|
663 |
+
var activate_email = $jQ('#activate_email');
|
664 |
+
var email = activate_email.val();
|
665 |
+
if(email == '' || isValidEmailAddress(email) != true) {
|
666 |
+
activate_email.removeClass('has-success').addClass('error');
|
667 |
+
$jQ('#failure-alert').show();
|
668 |
+
return false;
|
669 |
+
}
|
670 |
+
$jQ(this).attr('disabled', 'true');
|
671 |
+
|
672 |
+
var data = {
|
673 |
+
action:'sib_send_email',
|
674 |
+
email:email,
|
675 |
+
security: ajax_sib_object.ajax_nonce
|
676 |
+
};
|
677 |
+
|
678 |
+
$jQ('.sib_alert').hide();
|
679 |
+
activate_email.removeClass('error');
|
680 |
+
$jQ(this).find('.sib-spin').show();
|
681 |
+
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
682 |
+
$jQ('.sib-spin').hide();
|
683 |
+
$jQ('#send_email_btn').removeAttr('disabled');
|
684 |
+
if(respond != 'success') {
|
685 |
+
$jQ('#activate_email').removeClass('has-success').addClass('error');
|
686 |
+
$jQ('#failure-alert').show();
|
687 |
+
} else {
|
688 |
+
$jQ('#success-alert').show();
|
689 |
+
}
|
690 |
+
});
|
691 |
+
});
|
692 |
+
|
693 |
+
////////////////////////////////
|
694 |
+
/* manage forms */
|
695 |
+
////////////////////////////////
|
696 |
+
|
697 |
+
$jQ('#sib-field-content').hide();
|
698 |
+
|
699 |
+
// check confirm email
|
700 |
+
var is_send_confirm_email = $jQ("input[name=is_confirm_email]:checked").val();
|
701 |
+
|
702 |
+
if(is_send_confirm_email == '1') {
|
703 |
+
$jQ('#sib_confirm_template_area').show();
|
704 |
+
$jQ('#sib_confirm_sender_area').show();
|
705 |
+
} else {
|
706 |
+
$jQ('#sib_confirm_template_area').hide();
|
707 |
+
$jQ('#sib_confirm_sender_area').hide();
|
708 |
+
}
|
709 |
+
|
710 |
+
// check double optin
|
711 |
+
var is_double_optin = $jQ("input[name=is_double_optin]:checked").val();
|
712 |
+
|
713 |
+
if(is_double_optin == '1') {
|
714 |
+
$jQ('#is_confirm_email_no').prop("checked", true);
|
715 |
+
$jQ('#sib_confirm_template_area').hide();
|
716 |
+
$jQ('#sib_confirm_sender_area').hide();
|
717 |
+
$jQ('#sib_double_sender_area').show();
|
718 |
+
$jQ('#sib_doubleoptin_template_area').show();
|
719 |
+
|
720 |
+
} else {
|
721 |
+
$jQ('#sib_double_sender_area').hide();
|
722 |
+
$jQ('#sib_double_redirect_area').hide();
|
723 |
+
$jQ('#sib_doubleoptin_template_area').hide();
|
724 |
+
$jQ('#sib_final_confirm_template_area').hide();
|
725 |
+
}
|
726 |
+
|
727 |
+
if ($jQ('#sib_setting_signup_body').find('#sib_select_list_area').length > 0 ) {
|
728 |
+
set_select_list();
|
729 |
+
$jQ('#sib_select_list').chosen({width:"100%"});
|
730 |
+
}
|
731 |
+
|
732 |
+
// For multi lists subscription
|
733 |
+
if ( $jQ('#sib_setting_form_body').find('#sib_sel_multi_list_area').length > 0 ) {
|
734 |
+
var data = {
|
735 |
+
frmid : $jQ('input[name=sib_form_id]').val(),
|
736 |
+
action : 'sib_get_lists',
|
737 |
+
security: ajax_sib_object.ajax_nonce
|
738 |
+
};
|
739 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
740 |
+
var select_html = '';
|
741 |
+
$jQ.each(respond.lists, function(index, value) {
|
742 |
+
if(value['name'] == 'Temp - DOUBLE OPTIN') return true;
|
743 |
+
select_html += '<option value="' + value['id'] + '" data-list="' + value['name'] + '">' + value['name'] + '</option>';
|
744 |
+
});
|
745 |
+
$jQ('#sib_select_multi_list').html(select_html).trigger("chosen:updated");
|
746 |
+
$jQ('#sib_select_multi_list').chosen({width:"100%"});
|
747 |
+
});
|
748 |
+
}
|
749 |
+
|
750 |
+
$jQ('#sib_select_multi_list').on('change', function(){
|
751 |
+
if ( $jQ(this).val() != null )
|
752 |
+
{
|
753 |
+
$jQ('#sib_multi_list_field').show();
|
754 |
+
generate_multi_list_html();
|
755 |
+
}
|
756 |
+
else {
|
757 |
+
$jQ('#sib_multi_list_field').hide();
|
758 |
+
}
|
759 |
+
});
|
760 |
+
|
761 |
+
$jQ('#sib_multi_field_label').on('change', function () {
|
762 |
+
generate_multi_list_html();
|
763 |
+
});
|
764 |
+
|
765 |
+
$jQ('#sib_multi_field_required').on('change', function () {
|
766 |
+
generate_multi_list_html();
|
767 |
+
});
|
768 |
+
// keep change of fields
|
769 |
+
$jQ('.sib_field_changes').on('change',function() {
|
770 |
+
change_field_attr();
|
771 |
+
});
|
772 |
+
|
773 |
+
// click confirm email
|
774 |
+
$jQ("input[name=is_confirm_email]").on('click',function() {
|
775 |
+
var confirm_email = $jQ(this).val();
|
776 |
+
var is_activated_smtp = parseInt($jQ("#is_smtp_activated").val());
|
777 |
+
|
778 |
+
if(confirm_email == '1') {
|
779 |
+
$jQ('#sib_doubleoptin_template_id').val('-1');
|
780 |
+
$jQ('#sib_confirm_template_id').val('-1');
|
781 |
+
$jQ('#is_double_optin_no').prop("checked", true);
|
782 |
+
$jQ('#sib_double_sender_area').hide();
|
783 |
+
$jQ('#sib_double_redirect_area').hide();
|
784 |
+
$jQ('#sib_confirm_template_area').show();
|
785 |
+
$jQ('#sib_confirm_sender_area').show();
|
786 |
+
$jQ('#sib_doubleoptin_template_area').hide();
|
787 |
+
$jQ('#sib_final_confirm_template_area').hide();
|
788 |
+
$jQ('#sib_form_alert_message').hide();
|
789 |
+
if (is_activated_smtp == 0) {
|
790 |
+
$jQ('#sib_form_alert_message').show();
|
791 |
+
$jQ('#sib_disclaim_smtp').show();
|
792 |
+
$jQ('#sib_disclaim_do_template').hide();
|
793 |
+
$jQ('#sib_disclaim_confirm_template').hide();
|
794 |
+
}
|
795 |
+
} else {
|
796 |
+
$jQ('#sib_confirm_template_area').hide();
|
797 |
+
$jQ('#sib_confirm_sender_area').hide();
|
798 |
+
$jQ('#sib_form_alert_message').hide();
|
799 |
+
}
|
800 |
+
});
|
801 |
+
|
802 |
+
// click double optin
|
803 |
+
$jQ('input[name=is_double_optin]').on('click', function() {
|
804 |
+
var double_optin = $jQ(this).val();
|
805 |
+
var is_activated_smtp = parseInt($jQ("#is_smtp_activated").val());
|
806 |
+
if(double_optin == '1') {
|
807 |
+
$jQ('#sib_template_id').val('-1');
|
808 |
+
$jQ('#is_confirm_email_no').prop("checked", true);
|
809 |
+
$jQ('#sib_confirm_template_area').hide();
|
810 |
+
$jQ('#sib_confirm_sender_area').hide();
|
811 |
+
$jQ('#sib_double_sender_area').show();
|
812 |
+
$jQ('#sib_double_redirect_area').show();
|
813 |
+
$jQ('#sib_doubleoptin_template_area').show();
|
814 |
+
$jQ('#sib_final_confirm_template_area').show();
|
815 |
+
if (is_activated_smtp == 0) {
|
816 |
+
$jQ('#sib_form_alert_message').show();
|
817 |
+
$jQ('#sib_disclaim_smtp').show();
|
818 |
+
$jQ('#sib_disclaim_do_template').hide();
|
819 |
+
$jQ('#sib_disclaim_confirm_template').hide();
|
820 |
+
}
|
821 |
+
} else {
|
822 |
+
$jQ('#sib_double_sender_area').hide();
|
823 |
+
$jQ('#sib_double_redirect_area').hide();
|
824 |
+
$jQ('#sib_doubleoptin_template_area').hide();
|
825 |
+
$jQ('#sib_form_alert_message').hide();
|
826 |
+
$jQ('#sib_final_confirm_template_area').hide();
|
827 |
+
}
|
828 |
+
});
|
829 |
+
|
830 |
+
// click redirect url
|
831 |
+
$jQ('#is_redirect_url_click_yes').on('click', function () {
|
832 |
+
$jQ('#sib_subscrition_redirect_area').show();
|
833 |
+
});
|
834 |
+
$jQ('#is_redirect_url_click_no').on('click', function () {
|
835 |
+
$jQ('#sib_subscrition_redirect_area').hide();
|
836 |
+
});
|
837 |
+
|
838 |
+
//// refresh iframe to preview form
|
839 |
+
$jQ('#sib-preview-form-refresh').on('click',function(){
|
840 |
+
// ajax to update form html
|
841 |
+
update_preview();
|
842 |
+
});
|
843 |
+
|
844 |
+
//// display popup when delete form
|
845 |
+
$jQ('.sib-form-delete').on('click', function(e) {
|
846 |
+
return confirm('Are you sure you want to delete this form?');
|
847 |
+
});
|
848 |
+
|
849 |
+
//// custom or theme's css
|
850 |
+
$jQ('input[name=sib_css_type]').on('change',function() {
|
851 |
+
$jQ('#sibcssmarkup').toggle();
|
852 |
+
update_preview();
|
853 |
+
});
|
854 |
+
|
855 |
+
// remove all transients
|
856 |
+
$jQ(window).focus(function() {
|
857 |
+
|
858 |
+
var data = {
|
859 |
+
action: 'sib_remove_cache',
|
860 |
+
security: ajax_sib_object.ajax_nonce
|
861 |
+
};
|
862 |
+
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
863 |
+
|
864 |
+
if(respond == 'success') {
|
865 |
+
//
|
866 |
+
}
|
867 |
+
});
|
868 |
+
});
|
869 |
+
|
870 |
+
/* sync wordpress users to sendinblue contact list */
|
871 |
+
// sync popup
|
872 |
+
$jQ('#sib-sync-btn').on('click', function() {
|
873 |
+
var syncModal = $jQ('.sib-sync-modal');
|
874 |
+
syncModal.modal();
|
875 |
+
$jQ('#sync-failure').hide();
|
876 |
+
|
877 |
+
// add to multilist field
|
878 |
+
var list = $jQ('#sib_select_list');
|
879 |
+
list[0].selectedIndex = 0;
|
880 |
+
list.chosen({width:"100%"});
|
881 |
+
|
882 |
+
syncModal.on('hidden.bs.modal', function () {
|
883 |
+
//window.location.reload();
|
884 |
+
});
|
885 |
+
});
|
886 |
+
|
887 |
+
var attrFieldLine = $jQ('.sync-attr-line').html();
|
888 |
+
// sync add attr line filed
|
889 |
+
$jQ('.modal-body').on('click', '.sync-attr-plus', function(){
|
890 |
+
$jQ('.sync-attr-line').append(attrFieldLine);
|
891 |
+
$jQ('.sync-attr-dismiss').show();
|
892 |
+
});
|
893 |
+
// sync dismiss attr line filed
|
894 |
+
$jQ('.modal-body').on('click', '.sync-attr-dismiss', function(){
|
895 |
+
$jQ(this).closest('.sync-attr').remove();
|
896 |
+
var attrCount = $jQ('.sync-attr').length;
|
897 |
+
if(attrCount == 1) $jQ('.sync-attr-dismiss').hide();
|
898 |
+
});
|
899 |
+
|
900 |
+
// set attribute matching
|
901 |
+
$jQ('.modal-body').on('change', 'select', function () {
|
902 |
+
if($jQ(this).attr("class") == 'sync-wp-attr'){
|
903 |
+
$jQ(this).closest('.sync-attr').find('.sync-match').val($jQ(this).val());
|
904 |
+
}else{
|
905 |
+
$jQ(this).closest('.sync-attr').find('.sync-match').attr('name',$jQ(this).val());
|
906 |
+
}
|
907 |
+
});
|
908 |
+
|
909 |
+
// sync users to sendinblue
|
910 |
+
$jQ('#sib_sync_users_btn').on('click', function(){
|
911 |
+
|
912 |
+
$jQ(this).attr('disabled', 'true');
|
913 |
+
var postData = $jQ('#sib-sync-form').serializeObject();
|
914 |
+
$jQ(this).closest('form').find('input[type=hidden]').each(function (index, value) {
|
915 |
+
var attrName = $jQ(this).attr('name');
|
916 |
+
if($jQ('input[name='+attrName+']').length > 1){
|
917 |
+
// the attribute is duplicated !
|
918 |
+
postData['errAttr'] = attrName;
|
919 |
+
}
|
920 |
+
});
|
921 |
+
|
922 |
+
var data = {
|
923 |
+
action:'sib_sync_users',
|
924 |
+
data: postData,
|
925 |
+
security: ajax_sib_object.ajax_nonce
|
926 |
+
};
|
927 |
+
|
928 |
+
$jQ('.sib_alert').hide();
|
929 |
+
$jQ(this).find('.sib-spin').show();
|
930 |
+
$jQ.post(ajax_sib_object.ajax_url, data,function(respond) {
|
931 |
+
$jQ('.sib-spin').hide();
|
932 |
+
$jQ('#sib_sync_users_btn').removeAttr('disabled');
|
933 |
+
let messageBox = '';
|
934 |
+
if(respond.code != 'success') {
|
935 |
+
messageBox = 'sync-failure';
|
936 |
+
$jQ('#sync-failure').show().html(respond.message);
|
937 |
+
} else {
|
938 |
+
// success to sync wp users
|
939 |
+
$jQ('.sib-sync-modal').modal('toggle');
|
940 |
+
$jQ('#sib-message-body').html(respond.message);
|
941 |
+
$jQ('#sib-message-box').show();
|
942 |
+
}
|
943 |
+
});
|
944 |
+
|
945 |
+
});
|
946 |
+
$jQ('.sib-add-captcha').on('click', function(){
|
947 |
+
var add_captcha = $jQ(this).val();
|
948 |
+
if(add_captcha == '1')
|
949 |
+
{
|
950 |
+
$jQ('.sib-captcha-key').show('slow');
|
951 |
+
}
|
952 |
+
else
|
953 |
+
{
|
954 |
+
$jQ('.sib-captcha-key').hide('slow');
|
955 |
+
}
|
956 |
+
});
|
957 |
+
|
958 |
+
$jQ('.popover-help-form').popover({
|
959 |
+
});
|
960 |
+
$jQ('.sib-spin').hide();
|
961 |
+
$jQ('body').on('click', function(e) {
|
962 |
+
if(!$jQ(e.target).hasClass('popover-help-form')) {
|
963 |
+
$jQ('.popover-help-form').popover('hide');
|
964 |
+
}
|
965 |
+
});
|
966 |
+
|
967 |
+
$jQ('.sib-add-terms').on('click', function(){
|
968 |
+
var add_terms = $jQ(this).val();
|
969 |
+
if(add_terms == '1')
|
970 |
+
{
|
971 |
+
$jQ('.sib-terms-url').show('slow');
|
972 |
+
}
|
973 |
+
else
|
974 |
+
{
|
975 |
+
$jQ('.sib-terms-url').hide('slow');
|
976 |
+
}
|
977 |
+
});
|
978 |
+
|
979 |
+
$jQ('.sib-add-to-form').on('click', function(){
|
980 |
+
var btn_id = $jQ(this).attr('id');
|
981 |
+
var field_html = '';
|
982 |
+
if(btn_id == 'sib_add_to_form_btn')
|
983 |
+
{
|
984 |
+
field_html = $jQ('#sib_field_html').val();
|
985 |
+
}
|
986 |
+
else if(btn_id == 'sib_multi_lists_add_form_btn')
|
987 |
+
{
|
988 |
+
field_html = $jQ('#sib_multi_field_html').val();
|
989 |
+
$jQ('#sib_multi_list_field').hide();
|
990 |
+
}
|
991 |
+
else if(btn_id == 'sib_add_captcha_btn')
|
992 |
+
{
|
993 |
+
var site_key = $jQ('#sib_captcha_site').val();
|
994 |
+
var secret_key = $jQ('#sib_captcha_secret').val();
|
995 |
+
var gCaptcha_type = $jQ('input[name=sib_recaptcha_type]:checked').val();
|
996 |
+
|
997 |
+
if(gCaptcha_type == '0')
|
998 |
+
{
|
999 |
+
field_html = '<div id="sib_captcha"></div>';
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
if(site_key == '')
|
1003 |
+
{
|
1004 |
+
$jQ('#sib_form_captcha .alert-danger').html('You should input <strong>Site Key</strong>').show(300);
|
1005 |
+
return false;
|
1006 |
+
}
|
1007 |
+
else if(secret_key == '')
|
1008 |
+
{
|
1009 |
+
$jQ('#sib_form_captcha .alert-danger').html('You should input <strong>Secrete Key</strong>').show(300);
|
1010 |
+
return false;
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
else if(btn_id == 'sib_add_termsUrl_btn')
|
1014 |
+
{
|
1015 |
+
var terms_url = $jQ('#sib_terms_url').val();
|
1016 |
+
field_html = '<input type="checkbox" name="terms" required="required">I accept the <a href="' + terms_url + '">terms and conditions</a> ';
|
1017 |
+
if(terms_url == '')
|
1018 |
+
{
|
1019 |
+
$jQ('#sib_form_terms .alert-danger').html('You should input <strong>Terms URL</strong>').show(300);
|
1020 |
+
return false;
|
1021 |
+
}
|
1022 |
+
}
|
1023 |
+
else if(btn_id == 'sib_add_compliance_note')
|
1024 |
+
{
|
1025 |
+
var compliance_note = $jQ('#sib_gdpr_text').val();
|
1026 |
+
field_html = '<p>' + compliance_note + '</p>';
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
var formMarkup = $jQ("#sibformmarkup");
|
1030 |
+
|
1031 |
+
var cursorPosition = get_cursor_position(formMarkup[0]);
|
1032 |
+
var html = formMarkup.val();
|
1033 |
+
if(html.charCodeAt(cursorPosition) == 10 || html.charCodeAt(cursorPosition) == 13){ // 10 is value of new line
|
1034 |
+
field_html = "\n" + field_html;
|
1035 |
+
}else{
|
1036 |
+
field_html = field_html + "\n";
|
1037 |
+
}
|
1038 |
+
var formData = [html.slice(0, cursorPosition), field_html, html.slice(cursorPosition)].join('');
|
1039 |
+
formMarkup.val(formData);
|
1040 |
+
|
1041 |
+
// hide field edit after add the field to form
|
1042 |
+
$jQ('#sib-field-content').hide();
|
1043 |
+
$jQ("#sib_sel_attribute").val('-1');
|
1044 |
+
|
1045 |
+
/*/ refresh iframe form /*/
|
1046 |
+
// ajax to update form html
|
1047 |
+
update_preview();
|
1048 |
+
// set cursor position at top
|
1049 |
+
setSelectionRange(formMarkup[0], 0, 0);
|
1050 |
+
return false;
|
1051 |
+
});
|
1052 |
+
|
1053 |
+
var redirect = '';
|
1054 |
+
$jQ('.sib-form-redirect').on('click', function(e){
|
1055 |
+
e.preventDefault();
|
1056 |
+
redirect = $jQ(this).attr('href');
|
1057 |
+
$jQ('#sib_modal').modal();
|
1058 |
+
});
|
1059 |
+
|
1060 |
+
$jQ('#sib_form_lang').on('change', function(){
|
1061 |
+
$jQ('#sib_modal').modal();
|
1062 |
+
});
|
1063 |
+
|
1064 |
+
$jQ('#sib_modal_cancel').on('click', function(){
|
1065 |
+
$jQ('#sib_modal').modal('hide');
|
1066 |
+
$jQ('#sib_form_lang').val("");
|
1067 |
+
});
|
1068 |
+
$jQ('#sib_modal_ok').on('click', function(){
|
1069 |
+
var url = (redirect != '')? redirect :$jQ('#sib_form_lang').val();
|
1070 |
+
window.location.href = url;
|
1071 |
+
});
|
1072 |
+
|
1073 |
+
// duplicate content from origin form in translation
|
1074 |
+
$jQ('.sib-duplicate-btn').on('click', function(){
|
1075 |
+
$jQ('.sib-spin').show();
|
1076 |
+
var pid = $jQ('input[name="pid"]').val();
|
1077 |
+
var data = {
|
1078 |
+
action: 'sib_copy_origin_form',
|
1079 |
+
pid: pid,
|
1080 |
+
security: ajax_sib_object.ajax_nonce
|
1081 |
+
};
|
1082 |
+
$jQ.post(ajax_sib_object.ajax_url, data, function(respond) {
|
1083 |
+
$jQ('.sib-spin').hide();
|
1084 |
+
$jQ('#sibformmarkup').val(respond);
|
1085 |
+
});
|
1086 |
+
|
1087 |
+
});
|
1088 |
+
|
1089 |
+
$jQ('.sib-add-compliant-note').on('click', function () {
|
1090 |
+
var add_notes = $jQ(this).val();
|
1091 |
+
if(add_notes == '1')
|
1092 |
+
{
|
1093 |
+
$jQ('.sib-gdpr-block-area').show('slow');
|
1094 |
+
$jQ('.sib-gdpr-block-btn').show('slow');
|
1095 |
+
}
|
1096 |
+
else
|
1097 |
+
{
|
1098 |
+
$jQ('.sib-gdpr-block-area').hide('slow');
|
1099 |
+
$jQ('.sib-gdpr-block-btn').hide('slow');
|
1100 |
+
}
|
1101 |
+
});
|
1102 |
+
$jQ('#set_gdpr_default').on('click', function () {
|
1103 |
+
$jQ('#sib_gdpr_text').val(ajax_sib_object.compliance_note);
|
1104 |
+
})
|
1105 |
+
|
1106 |
+
if($jQ("#sib-statistics-date").length) {
|
1107 |
+
$jQ("#sib-statistics-date").datepicker({
|
1108 |
+
dateFormat: 'yy-mm-dd',
|
1109 |
+
numberOfMonths: 1,
|
1110 |
+
onSelect: function( selectedDate ) {
|
1111 |
+
if(!$jQ(this).data().datepicker.first){
|
1112 |
+
$jQ(this).data().datepicker.inline = true
|
1113 |
+
$jQ(this).data().datepicker.first = selectedDate;
|
1114 |
+
}else{
|
1115 |
+
if(selectedDate > $jQ(this).data().datepicker.first){
|
1116 |
+
$jQ(this).val($jQ(this).data().datepicker.first+" - "+selectedDate);
|
1117 |
+
}else{
|
1118 |
+
$jQ(this).val(selectedDate+" - "+$jQ(this).data().datepicker.first);
|
1119 |
+
}
|
1120 |
+
$jQ(this).data().datepicker.inline = false;
|
1121 |
+
}
|
1122 |
+
},
|
1123 |
+
onClose:function(){
|
1124 |
+
delete $jQ(this).data().datepicker.first;
|
1125 |
+
$jQ(this).data().datepicker.inline = false;
|
1126 |
+
}
|
1127 |
+
})
|
1128 |
+
}
|
1129 |
+
$jQ('#sib-statistics-form').on('submit', function (data) {
|
1130 |
+
$jQ("#apply-date-range").attr("disabled", true);
|
1131 |
+
$jQ('.sib-spinner').addClass('is-active');
|
1132 |
+
return true;
|
1133 |
+
});
|
1134 |
+
});
|
1135 |
+
|
1136 |
+
// get serialized data form sync users form
|
1137 |
+
$jQ.fn.serializeObject = function()
|
1138 |
+
{
|
1139 |
+
var o = {};
|
1140 |
+
var a = this.serializeArray();
|
1141 |
+
$jQ.each(a, function() {
|
1142 |
+
if (o[this.name] !== undefined) {
|
1143 |
+
if (!o[this.name].push) {
|
1144 |
+
o[this.name] = [o[this.name]];
|
1145 |
+
}
|
1146 |
+
o[this.name].push(this.value || '');
|
1147 |
+
} else {
|
1148 |
+
o[this.name] = this.value || '';
|
1149 |
+
}
|
1150 |
+
});
|
1151 |
+
return o;
|
1152 |
+
};
|
js/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
js/mailin-front.js
CHANGED
@@ -1,320 +1,297 @@
|
|
1 |
-
var captchaRes = '';
|
2 |
-
var sibVerifyCallback = function(response){
|
3 |
-
captchaRes = response;
|
4 |
-
if(captchaRes)
|
5 |
-
{
|
6 |
-
var validationErr = 0;
|
7 |
-
jQuery.each(jQuery('.sib_signup_form').find('input[required=required]'), function(){
|
8 |
-
|
9 |
-
{
|
10 |
-
validationErr++;
|
11 |
-
var form = jQuery(this).closest('form');
|
12 |
-
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.requiredField + '</p>').show();
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
});
|
16 |
-
}
|
17 |
-
if(validationErr == 0) {
|
18 |
-
jQuery('.sib_signup_form').trigger('submit');
|
19 |
-
}
|
20 |
-
};
|
21 |
-
|
22 |
-
jQuery(document).ready(function(){
|
23 |
-
jQuery('.sib_signup_form').find('input[required=required]').on("invalid", function () {
|
24 |
-
if(jQuery(this).val().trim() == '')
|
25 |
-
{
|
26 |
-
var alert_msg = jQuery(this).closest('form').find('input[name="sib_form_alert_notice"]').val();
|
27 |
-
this.setCustomValidity(alert_msg);
|
28 |
-
}
|
29 |
-
else {
|
30 |
-
this.setCustomValidity('');
|
31 |
-
}
|
32 |
-
});
|
33 |
-
// run MA script identify() when submit on any forms with email field
|
34 |
-
jQuery(document).on('submit', 'form', function(e){
|
35 |
-
if(!jQuery(this).hasClass('sib_signup_form')) {
|
36 |
-
var email = jQuery(this).find('input[type=email]').val();
|
37 |
-
var emailPattern = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
38 |
-
if (typeof sendinblue != 'undefined' && email != null && emailPattern.test(email)) {
|
39 |
-
var postData = jQuery(this).serializeObject();
|
40 |
-
sendinblue.identify(email, postData);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
else
|
44 |
-
{
|
45 |
-
e.preventDefault();
|
46 |
-
var form = jQuery(this).closest('form');
|
47 |
-
// for sms field
|
48 |
-
jQuery.each(form.find('.sib-sms'), function () {
|
49 |
-
var sms = jQuery(this).val();
|
50 |
-
var sms_prefix = jQuery(this).closest('.sib-sms-field').find('input[name="sib_SMS_prefix"]').val();
|
51 |
-
if ( sms == sms_prefix && !jQuery(this).prop('required')) {
|
52 |
-
jQuery(this).val('');
|
53 |
-
}
|
54 |
-
});
|
55 |
-
|
56 |
-
/**
|
57 |
-
* For safari
|
58 |
-
* Not support required attribute
|
59 |
-
*/
|
60 |
-
|
61 |
-
var required_fileds = [];
|
62 |
-
var err_index = 0;
|
63 |
-
|
64 |
-
var multi_lists = form.find(jQuery('.sib-multi-lists'));
|
65 |
-
if( multi_lists != undefined && multi_lists.data('require') == 'required' )
|
66 |
-
{
|
67 |
-
if ( multi_lists.find('input:checked').length == 0 )
|
68 |
-
{
|
69 |
-
err_index++;
|
70 |
-
multi_lists.addClass('sib_error');
|
71 |
-
}
|
72 |
-
}
|
73 |
-
if(err_index > 0)
|
74 |
-
{
|
75 |
-
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.requiredField + '</p>').show();
|
76 |
-
return;
|
77 |
-
}
|
78 |
-
err_index=0;
|
79 |
-
jQuery.each(form.find('input[type="email"]'), function(){
|
80 |
-
var Email = /^([a-zA-Z0-9_.+-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/i;
|
81 |
-
if (!Email.test(jQuery(this).val()))
|
82 |
-
{
|
83 |
-
err_index++;
|
84 |
-
}
|
85 |
-
});
|
86 |
-
if(err_index > 0)
|
87 |
-
{
|
88 |
-
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.invalidMail + '</p>').show();
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Check dateformat
|
94 |
-
*/
|
95 |
-
err_index = 0;
|
96 |
-
jQuery.each(form.find('.sib-date') , function(){
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
{
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
{
|
175 |
-
|
176 |
-
}
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
var
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
if (
|
202 |
-
{
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
jQuery('.sib-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
}
|
299 |
-
|
300 |
-
|
301 |
-
});
|
302 |
-
// get serialized data form subscribe form
|
303 |
-
jQuery.fn.serializeObject = function()
|
304 |
-
{
|
305 |
-
var o = {};
|
306 |
-
var a = this.serializeArray();
|
307 |
-
jQuery.each(a, function() {
|
308 |
-
if(this.name == 'sib_form_action' || this.name == 'sib_form_id' || this.name == 'email')
|
309 |
-
return true; // continue
|
310 |
-
if (o[this.name] !== undefined) {
|
311 |
-
if (!o[this.name].push) {
|
312 |
-
o[this.name] = [o[this.name]];
|
313 |
-
}
|
314 |
-
o[this.name].push(this.value || '');
|
315 |
-
} else {
|
316 |
-
o[this.name] = this.value || '';
|
317 |
-
}
|
318 |
-
});
|
319 |
-
return o;
|
320 |
-
};
|
1 |
+
var captchaRes = '';
|
2 |
+
var sibVerifyCallback = function(response){
|
3 |
+
captchaRes = response;
|
4 |
+
if(captchaRes)
|
5 |
+
{
|
6 |
+
var validationErr = 0;
|
7 |
+
jQuery.each(jQuery('.sib_signup_form').find('input[required=required]'), function(){
|
8 |
+
if(jQuery(this).val().trim() == '' || (jQuery(this).attr('type') == "checkbox" && jQuery(this).prop("checked") == false))
|
9 |
+
{
|
10 |
+
validationErr++;
|
11 |
+
var form = jQuery(this).closest('form');
|
12 |
+
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.requiredField + '</p>').show();
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
});
|
16 |
+
}
|
17 |
+
if(validationErr == 0) {
|
18 |
+
jQuery('.sib_signup_form').trigger('submit');
|
19 |
+
}
|
20 |
+
};
|
21 |
+
|
22 |
+
jQuery(document).ready(function(){
|
23 |
+
jQuery('.sib_signup_form').find('input[required=required]').on("invalid", function () {
|
24 |
+
if(jQuery(this).val().trim() == '')
|
25 |
+
{
|
26 |
+
var alert_msg = jQuery(this).closest('form').find('input[name="sib_form_alert_notice"]').val();
|
27 |
+
this.setCustomValidity(alert_msg);
|
28 |
+
}
|
29 |
+
else {
|
30 |
+
this.setCustomValidity('');
|
31 |
+
}
|
32 |
+
});
|
33 |
+
// run MA script identify() when submit on any forms with email field
|
34 |
+
jQuery(document).on('submit', 'form', function(e){
|
35 |
+
if(!jQuery(this).hasClass('sib_signup_form')) {
|
36 |
+
var email = jQuery(this).find('input[type=email]').val();
|
37 |
+
var emailPattern = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
38 |
+
if (typeof sendinblue != 'undefined' && email != null && emailPattern.test(email)) {
|
39 |
+
var postData = jQuery(this).serializeObject();
|
40 |
+
sendinblue.identify(email, postData);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
else
|
44 |
+
{
|
45 |
+
e.preventDefault();
|
46 |
+
var form = jQuery(this).closest('form');
|
47 |
+
// for sms field
|
48 |
+
jQuery.each(form.find('.sib-sms'), function () {
|
49 |
+
var sms = jQuery(this).val();
|
50 |
+
var sms_prefix = jQuery(this).closest('.sib-sms-field').find('input[name="sib_SMS_prefix"]').val();
|
51 |
+
if ( sms == sms_prefix && !jQuery(this).prop('required')) {
|
52 |
+
jQuery(this).val('');
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
/**
|
57 |
+
* For safari
|
58 |
+
* Not support required attribute
|
59 |
+
*/
|
60 |
+
|
61 |
+
var required_fileds = [];
|
62 |
+
var err_index = 0;
|
63 |
+
|
64 |
+
var multi_lists = form.find(jQuery('.sib-multi-lists'));
|
65 |
+
if( multi_lists != undefined && multi_lists.data('require') == 'required' )
|
66 |
+
{
|
67 |
+
if ( multi_lists.find('input:checked').length == 0 )
|
68 |
+
{
|
69 |
+
err_index++;
|
70 |
+
multi_lists.addClass('sib_error');
|
71 |
+
}
|
72 |
+
}
|
73 |
+
if(err_index > 0)
|
74 |
+
{
|
75 |
+
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.requiredField + '</p>').show();
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
err_index=0;
|
79 |
+
jQuery.each(form.find('input[type="email"]'), function(){
|
80 |
+
var Email = /^([a-zA-Z0-9_.+-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/i;
|
81 |
+
if (!Email.test(jQuery(this).val()))
|
82 |
+
{
|
83 |
+
err_index++;
|
84 |
+
}
|
85 |
+
});
|
86 |
+
if(err_index > 0)
|
87 |
+
{
|
88 |
+
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.invalidMail + '</p>').show();
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Check dateformat
|
94 |
+
*/
|
95 |
+
err_index = 0;
|
96 |
+
jQuery.each(form.find('.sib-date') , function(){
|
97 |
+
var date = jQuery(this).val();
|
98 |
+
//pattern for yyyy-mm-dd
|
99 |
+
var validatePattern = /^(\d{4})(-)(\d{1,2})(-)(\d{1,2})$/;
|
100 |
+
if (date !== '' && !validatePattern.test(date))
|
101 |
+
{
|
102 |
+
err_index++;
|
103 |
+
}
|
104 |
+
});
|
105 |
+
if(err_index > 0)
|
106 |
+
{
|
107 |
+
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.invalidDateFormat + '</p>').show();
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Check sms validation
|
112 |
+
err_index = 0;
|
113 |
+
jQuery.each(form.find('.sib-sms'), function () {
|
114 |
+
var sms = jQuery(this).val();
|
115 |
+
if ( is_valid_sms(sms) == false && sms != '' ) {
|
116 |
+
err_index ++;
|
117 |
+
}
|
118 |
+
});
|
119 |
+
if(err_index > 0)
|
120 |
+
{
|
121 |
+
form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.invalidSMSFormat + '</p>').show();
|
122 |
+
return;
|
123 |
+
}
|
124 |
+
form.find('.sib_loader').show();
|
125 |
+
jQuery('.sib_msg_disp').hide();
|
126 |
+
var postData = form.serializeArray();
|
127 |
+
if( captchaRes != '' )
|
128 |
+
{
|
129 |
+
postData.push({"name": "g-recaptcha-response", "value": captchaRes});
|
130 |
+
}
|
131 |
+
|
132 |
+
if( jQuery('.sib-multi-lists').length )
|
133 |
+
{
|
134 |
+
var interesting_lists = [];
|
135 |
+
jQuery('.sib-interesting-lists').each(function () {
|
136 |
+
postData.push({"name":"interestingLists[]", "value": jQuery(this).val()})
|
137 |
+
});
|
138 |
+
}
|
139 |
+
var formURL = form.attr("action");
|
140 |
+
form.addClass('sib_processing');
|
141 |
+
|
142 |
+
postData.push({ "name": "security", "value": ajax_sib_front_object.ajax_nonce });
|
143 |
+
jQuery.ajax({
|
144 |
+
url: formURL,
|
145 |
+
type: "POST",
|
146 |
+
dataType: "json",
|
147 |
+
data: postData,
|
148 |
+
success: function (data, textStatus, jqXHR) {
|
149 |
+
jQuery('.sib_loader').hide();
|
150 |
+
if( jQuery('.sib-multi-lists').length )
|
151 |
+
{
|
152 |
+
jQuery('.sib-multi-lists').removeClass('sib_error');
|
153 |
+
}
|
154 |
+
if (data.status === 'success' || data.status === 'update') {
|
155 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-success ">' + data.msg.successMsg + '</p>';
|
156 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
157 |
+
} else if (data.status === 'failure') {
|
158 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-error ">' + data.msg.errorMsg + '</p>';
|
159 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
160 |
+
} else if (data.status === 'already_exist') {
|
161 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-warning ">' + data.msg.existMsg + '</p>';
|
162 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
163 |
+
} else if (data.status === 'invalid') {
|
164 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-error ">' + data.msg.invalidMsg + '</p>';
|
165 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
166 |
+
} else if (data.status === 'gcaptchaEmpty') {
|
167 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-error ">' + data.msg + '</p>';
|
168 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
169 |
+
} else if (data.status === 'gcaptchaFail') {
|
170 |
+
var cdata = '<p class="sib-alert-message sib-alert-message-error ">' + data.msg + '</p>';
|
171 |
+
form.find('.sib_msg_disp').html(cdata).show();
|
172 |
+
}
|
173 |
+
form[0].reset();
|
174 |
+
if (data.redirect && (data.status === 'success' || data.status === 'update')) {
|
175 |
+
window.location.href = data.redirect;
|
176 |
+
}
|
177 |
+
var previous_code = form.find('.sib-cflags').data('dial-code');
|
178 |
+
if ( previous_code )
|
179 |
+
{
|
180 |
+
form.find('.sib-sms').val('+' + previous_code);
|
181 |
+
form.find('input[name="sib_SMS_prefix"]').val('+' + previous_code);
|
182 |
+
}
|
183 |
+
|
184 |
+
// run MA script identify() when subscribe on SIB forms
|
185 |
+
if (typeof sendinblue != 'undefined') {
|
186 |
+
var email = form.find('input[name=email]').val();
|
187 |
+
var postData = form.serializeObject();
|
188 |
+
if (data.status === 'success' || data.status === 'update' || data.status === 'already_exist') {
|
189 |
+
sendinblue.identify(email, postData);
|
190 |
+
}
|
191 |
+
}
|
192 |
+
jQuery(".sib-alert-message").delay(2000).hide('slow');
|
193 |
+
form.removeClass('sib_processing');
|
194 |
+
if (typeof grecaptcha != 'undefined')
|
195 |
+
{
|
196 |
+
grecaptcha.reset(gCaptchaSibWidget);
|
197 |
+
}
|
198 |
+
},
|
199 |
+
error: function (jqXHR, textStatus, errorThrown) {
|
200 |
+
form.find('.sib_msg_disp').html(jqXHR).show();
|
201 |
+
if (typeof grecaptcha != 'undefined')
|
202 |
+
{
|
203 |
+
grecaptcha.reset(gCaptchaSibWidget);
|
204 |
+
}
|
205 |
+
}
|
206 |
+
});
|
207 |
+
}
|
208 |
+
});
|
209 |
+
jQuery('.sib-country-block').on('click', function () {
|
210 |
+
jQuery('.sib-country-list').toggle();
|
211 |
+
});
|
212 |
+
if (jQuery('.sib-country-list').length > 0)
|
213 |
+
{
|
214 |
+
jQuery('.sib-country-list').ready( function () {
|
215 |
+
var data = {
|
216 |
+
action : 'sib_get_country_prefix',
|
217 |
+
security: ajax_sib_front_object.ajax_nonce,
|
218 |
+
};
|
219 |
+
jQuery.post( ajax_sib_front_object.ajax_url, data, function (respond) {
|
220 |
+
jQuery('.sib-country-list').html(respond);
|
221 |
+
});
|
222 |
+
});
|
223 |
+
}
|
224 |
+
|
225 |
+
jQuery('body').on('click', function(e){
|
226 |
+
if ( jQuery('.sib-sms-field .sib-country-list').length > 0 && !jQuery('.sib-sms-field .sib-country-list').is(e.target) && jQuery('.sib-sms-field .sib-country-list').has(e.target).length === 0 && jQuery('.sib-sms-field .sib-country-block').has(e.target).length === 0 ) {
|
227 |
+
jQuery('.sib-sms-field .sib-country-list').hide();
|
228 |
+
}
|
229 |
+
});
|
230 |
+
|
231 |
+
jQuery('.sib-country-list').on( 'click', 'li' , function () {
|
232 |
+
var country_code = jQuery(this).data('country-code').toLowerCase();
|
233 |
+
var dial_code = jQuery(this).data('dial-code');
|
234 |
+
jQuery(this).closest('.sib-sms-field').find('.sib-sms').val('+' + dial_code );
|
235 |
+
jQuery(this).closest('.sib-sms-field').find('input[name="sib_SMS_prefix"]').val('+' + dial_code );
|
236 |
+
jQuery(this).closest('.sib-sms-field').find('.sib-cflags').css('background-image', 'url(' + ajax_sib_front_object.flag_url + country_code + '.png)');
|
237 |
+
jQuery(this).closest('.sib-sms-field').find('.sib-cflags').data('dial-code', dial_code);
|
238 |
+
jQuery(this).closest('.sib-country-list').hide();
|
239 |
+
});
|
240 |
+
jQuery(".sib-sms").on('keypress', function (event){
|
241 |
+
validateInteger(event, 'sms');
|
242 |
+
});
|
243 |
+
|
244 |
+
// allow to input 0-9 and - only for date field
|
245 |
+
jQuery(".sib-date").on('keypress', function(event) {
|
246 |
+
validateInteger(event, 'date');
|
247 |
+
});
|
248 |
+
function is_valid_sms( sms ) {
|
249 |
+
sms = sms.replace(/\b(0(?!\b))+/g, "");
|
250 |
+
|
251 |
+
var tempSms = sms.replace(/( |\(|\)|\.|\-)/g, '');
|
252 |
+
|
253 |
+
if (tempSms.length > 19 || tempSms.length < 6 || tempSms.charAt(0) != '+'){
|
254 |
+
return false;
|
255 |
+
}
|
256 |
+
return true;
|
257 |
+
}
|
258 |
+
function validateInteger(evt,type) {
|
259 |
+
var theEvent = evt || window.event;
|
260 |
+
var key = theEvent.charCode || theEvent.which;
|
261 |
+
|
262 |
+
key = String.fromCharCode( key );
|
263 |
+
// 0-9, +/-, space, brackets
|
264 |
+
var regex = /[ +0-9()-]/;
|
265 |
+
var smsLength = 0;
|
266 |
+
if( type == 'date' ) {
|
267 |
+
regex = /[ 0-9-/]/;
|
268 |
+
}
|
269 |
+
if( !regex.test(key)) {
|
270 |
+
theEvent.returnValue = false;
|
271 |
+
key = theEvent.keyCode;
|
272 |
+
// ignore input for del,tab, back, left, right, home amd end
|
273 |
+
if(theEvent.preventDefault && key != 9 && key != 8 ) theEvent.preventDefault();
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
|
278 |
+
});
|
279 |
+
// get serialized data form subscribe form
|
280 |
+
jQuery.fn.serializeObject = function()
|
281 |
+
{
|
282 |
+
var o = {};
|
283 |
+
var a = this.serializeArray();
|
284 |
+
jQuery.each(a, function() {
|
285 |
+
if(this.name == 'sib_form_action' || this.name == 'sib_form_id' || this.name == 'email')
|
286 |
+
return true; // continue
|
287 |
+
if (o[this.name] !== undefined) {
|
288 |
+
if (!o[this.name].push) {
|
289 |
+
o[this.name] = [o[this.name]];
|
290 |
+
}
|
291 |
+
o[this.name].push(this.value || '');
|
292 |
+
} else {
|
293 |
+
o[this.name] = this.value || '';
|
294 |
+
}
|
295 |
+
});
|
296 |
+
return o;
|
297 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
lang/sib_lang-fr_FR.po
CHANGED
@@ -1,1281 +1,1281 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Sendinblue plugin\n"
|
4 |
-
"POT-Creation-Date: 2016-07-29 16:45+0700\n"
|
5 |
-
"PO-Revision-Date: 2016-07-29 16:45+0700\n"
|
6 |
-
"Last-Translator: \n"
|
7 |
-
"Language-Team: \n"
|
8 |
-
"Language: fr\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.8.8\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../inc/sib-api-manager.php:444
|
19 |
-
msgid "Subscription confirmed"
|
20 |
-
msgstr "Inscription newsletter confirmée"
|
21 |
-
|
22 |
-
#: ../inc/sib-api-manager.php:446
|
23 |
-
msgid "Please confirm subscription"
|
24 |
-
msgstr "Confirmer l'inscription "
|
25 |
-
|
26 |
-
#: ../inc/sib-api-manager.php:459 ../page/page-home.php:616
|
27 |
-
msgid "no-reply@sendinblue.com"
|
28 |
-
msgstr "no-reply@sendinblue.com"
|
29 |
-
|
30 |
-
#: ../inc/sib-api-manager.php:460 ../page/page-home.php:39
|
31 |
-
#: ../page/page-home.php:465 ../page/page-home.php:617
|
32 |
-
msgid "Sendinblue"
|
33 |
-
msgstr "Sendinblue"
|
34 |
-
|
35 |
-
#: ../inc/sib-api-manager.php:616
|
36 |
-
msgid "Thank you for subscribing"
|
37 |
-
msgstr "Merci pour votre inscription"
|
38 |
-
|
39 |
-
#: ../inc/sib-api-manager.php:636
|
40 |
-
msgid "You have just subscribed to the newsletter of "
|
41 |
-
msgstr "Vous vous êtes inscrit à la newsletter de "
|
42 |
-
|
43 |
-
#: ../inc/sib-api-manager.php:638
|
44 |
-
msgid "-Sendinblue"
|
45 |
-
msgstr "-Sendinblue"
|
46 |
-
|
47 |
-
#: ../inc/sib-api-manager.php:716
|
48 |
-
msgid "Unsubscribe"
|
49 |
-
msgstr "Se désabonner"
|
50 |
-
|
51 |
-
#: ../inc/sib-api-manager.php:736
|
52 |
-
msgid "Your request has been taken into account."
|
53 |
-
msgstr "Votre demande a bien été prise en compte."
|
54 |
-
|
55 |
-
#: ../inc/sib-api-manager.php:738
|
56 |
-
msgid "The user has been unsubscribed"
|
57 |
-
msgstr "L'utilisateur s'est désinscrit"
|
58 |
-
|
59 |
-
#: ../inc/table-forms.php:15
|
60 |
-
msgid "Form"
|
61 |
-
msgstr "Formulaire"
|
62 |
-
|
63 |
-
#: ../inc/table-forms.php:16 ../page/page-form.php:34 ../page/page-form.php:120
|
64 |
-
msgid "Forms"
|
65 |
-
msgstr "Formulaires"
|
66 |
-
|
67 |
-
#: ../inc/table-forms.php:50
|
68 |
-
msgid "No forms avaliable."
|
69 |
-
msgstr "Aucun formulaire"
|
70 |
-
|
71 |
-
#: ../inc/table-forms.php:119
|
72 |
-
msgid "Form Name"
|
73 |
-
msgstr "Nom du Formulaire"
|
74 |
-
|
75 |
-
#: ../inc/table-forms.php:120
|
76 |
-
msgid "Shortcode"
|
77 |
-
msgstr "Shortcode"
|
78 |
-
|
79 |
-
#: ../inc/table-forms.php:121
|
80 |
-
msgid "Visible attributes"
|
81 |
-
msgstr "Attributs affichés"
|
82 |
-
|
83 |
-
#: ../inc/table-forms.php:122 ../page/page-form.php:338
|
84 |
-
#: ../page/page-form.php:339
|
85 |
-
msgid "Linked List"
|
86 |
-
msgstr "Liste liée"
|
87 |
-
|
88 |
-
#: ../inc/table-forms.php:123
|
89 |
-
msgid "Last Update"
|
90 |
-
msgstr "Dernière modification"
|
91 |
-
|
92 |
-
#: ../inc/table-forms.php:214
|
93 |
-
msgid "Add New Form"
|
94 |
-
msgstr "Ajouter un nouveau formulaire"
|
95 |
-
|
96 |
-
#: ../model/model-forms.php:268
|
97 |
-
msgid "Thank you, you have successfully registered !"
|
98 |
-
msgstr "Vous êtes désormais inscrit !"
|
99 |
-
|
100 |
-
#: ../model/model-forms.php:269
|
101 |
-
msgid "Something wrong occured"
|
102 |
-
msgstr "Une erreur est survenue"
|
103 |
-
|
104 |
-
#: ../model/model-forms.php:270
|
105 |
-
msgid "You have already registered"
|
106 |
-
msgstr "Vous êtes déjà inscrit"
|
107 |
-
|
108 |
-
#: ../model/model-forms.php:271
|
109 |
-
msgid "Your email address is invalid"
|
110 |
-
msgstr "Cette adresse email n'est pas valide"
|
111 |
-
|
112 |
-
#: ../page/page-campaigns.php:39 ../page/page-home.php:220
|
113 |
-
msgid "Campaigns"
|
114 |
-
msgstr "Campagnes"
|
115 |
-
|
116 |
-
#: ../page/page-form.php:90
|
117 |
-
msgid "Back to form's list"
|
118 |
-
msgstr "Retour à la liste de formulaires"
|
119 |
-
|
120 |
-
#: ../page/page-form.php:150 ../page/page-form.php:550
|
121 |
-
msgid "Subscription form"
|
122 |
-
msgstr "Formulaire d'inscription"
|
123 |
-
|
124 |
-
#: ../page/page-form.php:157
|
125 |
-
msgid "Form Name : "
|
126 |
-
msgstr "Nom du formulaire"
|
127 |
-
|
128 |
-
#: ../page/page-form.php:174
|
129 |
-
msgid "Use the shortcode"
|
130 |
-
msgstr "Utiliser le shortcode"
|
131 |
-
|
132 |
-
#: ../page/page-form.php:180
|
133 |
-
msgid "inside a post, page or text widget to display your sign-up form."
|
134 |
-
msgstr ""
|
135 |
-
"à l'intérieur d'un article, d'une page ou d'un widget de texte afin d'y "
|
136 |
-
"ajouter votre formulaire d'inscription"
|
137 |
-
|
138 |
-
#: ../page/page-form.php:181
|
139 |
-
msgid "Do not copy and paste the above form mark up, that will not work"
|
140 |
-
msgstr "Ne copiez coller pas le code ci-dessus, cela ne fonctionnera pas"
|
141 |
-
|
142 |
-
#: ../page/page-form.php:186 ../page/page-form.php:187
|
143 |
-
msgid "Form Style"
|
144 |
-
msgstr "Style du formulaire"
|
145 |
-
|
146 |
-
#: ../page/page-form.php:187
|
147 |
-
msgid ""
|
148 |
-
"Select the style you favorite. Your custom css will be applied to form only."
|
149 |
-
msgstr ""
|
150 |
-
"Sélectionnez votre style favori. Votre css personnalisé ne sera appliqué "
|
151 |
-
"qu'à votre formulaire"
|
152 |
-
|
153 |
-
#: ../page/page-form.php:190
|
154 |
-
msgid "Current Theme"
|
155 |
-
msgstr "Theme courant"
|
156 |
-
|
157 |
-
#: ../page/page-form.php:192
|
158 |
-
msgid "Custom style"
|
159 |
-
msgstr "Theme personnalisé"
|
160 |
-
|
161 |
-
#: ../page/page-form.php:204
|
162 |
-
msgid "Email Address"
|
163 |
-
msgstr "Adresse email"
|
164 |
-
|
165 |
-
#: ../page/page-form.php:206
|
166 |
-
msgid "Subscribe"
|
167 |
-
msgstr "S'inscrire"
|
168 |
-
|
169 |
-
#: ../page/page-form.php:208
|
170 |
-
msgid "Select Sendinblue Attribute"
|
171 |
-
msgstr "Sélectionner un attribut Sendinblue"
|
172 |
-
|
173 |
-
#: ../page/page-form.php:210
|
174 |
-
msgid "Sendinblue merge fields : Normal"
|
175 |
-
msgstr "Champs synchronisé avec Sendinblue : normal"
|
176 |
-
|
177 |
-
#: ../page/page-form.php:212
|
178 |
-
msgid "Sendinblue merge fields : Category"
|
179 |
-
msgstr "Champs synchronisé avec Sendinblue : catégorie"
|
180 |
-
|
181 |
-
#: ../page/page-form.php:214
|
182 |
-
msgid "Other"
|
183 |
-
msgstr "Autre"
|
184 |
-
|
185 |
-
#: ../page/page-form.php:216
|
186 |
-
msgid "Submit Button"
|
187 |
-
msgstr "Bouton de validation"
|
188 |
-
|
189 |
-
#: ../page/page-form.php:222
|
190 |
-
msgid "Add a new Field"
|
191 |
-
msgstr "Ajouter un nouveau champ"
|
192 |
-
|
193 |
-
#: ../page/page-form.php:223
|
194 |
-
msgid "Add a New Field"
|
195 |
-
msgstr "Ajouter un nouveau champ"
|
196 |
-
|
197 |
-
#: ../page/page-form.php:223
|
198 |
-
msgid "Choose an attribute and add it to the subscription form of your Website"
|
199 |
-
msgstr ""
|
200 |
-
"Choisir un attribut et l'ajouter au formulaire d'inscription de votre site"
|
201 |
-
|
202 |
-
#: ../page/page-form.php:232
|
203 |
-
msgid "Label"
|
204 |
-
msgstr "Intitulé"
|
205 |
-
|
206 |
-
#: ../page/page-form.php:233 ../page/page-form.php:239
|
207 |
-
#: ../page/page-form.php:246
|
208 |
-
msgid "Optional"
|
209 |
-
msgstr "Optionnel"
|
210 |
-
|
211 |
-
#: ../page/page-form.php:238
|
212 |
-
msgid "Place holder"
|
213 |
-
msgstr "Ordre"
|
214 |
-
|
215 |
-
#: ../page/page-form.php:245
|
216 |
-
msgid "Initial value"
|
217 |
-
msgstr "Valeur initiale"
|
218 |
-
|
219 |
-
#: ../page/page-form.php:252
|
220 |
-
msgid "Button Text"
|
221 |
-
msgstr "Bouton de texte"
|
222 |
-
|
223 |
-
#: ../page/page-form.php:259
|
224 |
-
msgid "Required field ?"
|
225 |
-
msgstr "Champ obligatoire ?"
|
226 |
-
|
227 |
-
#: ../page/page-form.php:265
|
228 |
-
msgid "Drop-down List"
|
229 |
-
msgstr "Liste déroulante"
|
230 |
-
|
231 |
-
#: ../page/page-form.php:268
|
232 |
-
msgid "Radio List"
|
233 |
-
msgstr "boutons radio"
|
234 |
-
|
235 |
-
#: ../page/page-form.php:276 ../page/page-form.php:278
|
236 |
-
msgid "Add to form"
|
237 |
-
msgstr "Ajouter au formulaire"
|
238 |
-
|
239 |
-
#: ../page/page-form.php:278
|
240 |
-
msgid ""
|
241 |
-
"Please click where you want to insert the field and click on this button. By "
|
242 |
-
"default, the new field will be added at top."
|
243 |
-
msgstr ""
|
244 |
-
"Cliquez où vous souhaitez insérer le champ puis cliquez sur le bouton. Par "
|
245 |
-
"défaut le nouveau champ sera ajouté au début"
|
246 |
-
|
247 |
-
#: ../page/page-form.php:282
|
248 |
-
msgid "Generated HTML"
|
249 |
-
msgstr "HTML généré"
|
250 |
-
|
251 |
-
#: ../page/page-form.php:295
|
252 |
-
msgid "Preview"
|
253 |
-
msgstr "Aperçu"
|
254 |
-
|
255 |
-
#: ../page/page-form.php:309 ../page/page-form.php:474
|
256 |
-
#: ../page/page-form.php:525
|
257 |
-
msgid "Save"
|
258 |
-
msgstr "Sauvegarder"
|
259 |
-
|
260 |
-
#: ../page/page-form.php:323
|
261 |
-
msgid "Sign up process"
|
262 |
-
msgstr "Processus d'inscription"
|
263 |
-
|
264 |
-
#: ../page/page-form.php:330
|
265 |
-
msgid ""
|
266 |
-
"Confirmation emails will be sent through your own email server, but you have "
|
267 |
-
"no guarantees on their deliverability. <br/> <a href=\"https://app-smtp."
|
268 |
-
"sendinblue.com/\" target=\"_blank\">Click here</a> to send your emails "
|
269 |
-
"through Sendinblue in order to improve your deliverability and get statistics"
|
270 |
-
msgstr ""
|
271 |
-
"Les emails de confirmations seront envoyé via votre propre serveur mail, "
|
272 |
-
"mais vous n'aurez pasde garanties concernant la délivrabilité <br/> <a href="
|
273 |
-
"\"https://app-smtp.sendinblue.com/\" target=\"_blank\">Cliquez ici</a> pour "
|
274 |
-
"envoyer vos mailsvia Sendinblue pour améliorer votre délivrabilité et "
|
275 |
-
"obtenir des statistiques."
|
276 |
-
|
277 |
-
#: ../page/page-form.php:332
|
278 |
-
msgid ""
|
279 |
-
"The template you selected does not include a link [DOUBLEOPTIN] to allow "
|
280 |
-
"subscribers to confirm their subscription. <br/> Please edit the template to "
|
281 |
-
"include a link with [DOUBLEOPTIN] as URL."
|
282 |
-
msgstr ""
|
283 |
-
"Le template choisi ne contient pas de lien [DOUBLEOPTIN] qui permet aux "
|
284 |
-
"inscrits de confirmer leur inscription. <br/> Vous devez modifier votre "
|
285 |
-
"template pour inclure le shortcode [DOUBLEOPTIN] à la place d'une URL avant "
|
286 |
-
"de pouvoir le choisir."
|
287 |
-
|
288 |
-
#: ../page/page-form.php:339
|
289 |
-
msgid "Select the list where you want to add your new subscribers"
|
290 |
-
msgstr "Sélectionner la liste ou vous voulez enregistrer vos contacts"
|
291 |
-
|
292 |
-
#: ../page/page-form.php:350
|
293 |
-
msgid ""
|
294 |
-
"You can use Marketing Automation to create specific workflow when a user is "
|
295 |
-
"added to the list."
|
296 |
-
msgstr ""
|
297 |
-
"Vous pouvez utiliser le Marketing Automation pour créer des scénarios "
|
298 |
-
"spécifiques lorsqu'un utilisateur est ajouté à la liste"
|
299 |
-
|
300 |
-
#: ../page/page-form.php:356
|
301 |
-
msgid "Send a confirmation email"
|
302 |
-
msgstr "Envoyer un message de confirmation"
|
303 |
-
|
304 |
-
#: ../page/page-form.php:356 ../page/page-form.php:484
|
305 |
-
msgid "Confirmation message"
|
306 |
-
msgstr "Message de confirmation"
|
307 |
-
|
308 |
-
#: ../page/page-form.php:356
|
309 |
-
msgid ""
|
310 |
-
"You can choose to send a confirmation email. You will be able to set up the "
|
311 |
-
"template that will be sent to your new suscribers"
|
312 |
-
msgstr ""
|
313 |
-
"Vous pouvez choisir d'envoyer un message de confirmation. Vous serez ainsi "
|
314 |
-
"capable de paramétrer le template qui sera envoyé à vos nouveaux inscrits"
|
315 |
-
|
316 |
-
#: ../page/page-form.php:362 ../page/page-form.php:400
|
317 |
-
#: ../page/page-form.php:445
|
318 |
-
msgid "Yes"
|
319 |
-
msgstr "Oui"
|
320 |
-
|
321 |
-
#: ../page/page-form.php:367 ../page/page-form.php:405
|
322 |
-
#: ../page/page-form.php:450
|
323 |
-
msgid "No"
|
324 |
-
msgstr "Non"
|
325 |
-
|
326 |
-
#: ../page/page-form.php:372
|
327 |
-
msgid ""
|
328 |
-
"Select \"Yes\" if you want your subscribers to receive a confirmation email"
|
329 |
-
msgstr ""
|
330 |
-
"Sélectionner \"Oui\" si vous souhaitez que vous nouveaux inscrits reçoivent "
|
331 |
-
"un email de confirmation"
|
332 |
-
|
333 |
-
#: ../page/page-form.php:380
|
334 |
-
msgid "Default"
|
335 |
-
msgstr "Défaut"
|
336 |
-
|
337 |
-
#: ../page/page-form.php:387 ../page/page-form.php:423
|
338 |
-
msgid "Set up my templates"
|
339 |
-
msgstr "Paramétrer mes templates"
|
340 |
-
|
341 |
-
#: ../page/page-form.php:394
|
342 |
-
msgid "Double Opt-In"
|
343 |
-
msgstr "Double Opt-In"
|
344 |
-
|
345 |
-
#: ../page/page-form.php:394
|
346 |
-
msgid ""
|
347 |
-
"Your subscribers will receive an email inviting them to confirm their "
|
348 |
-
"subscription. Be careful, your subscribers are not saved in your list before "
|
349 |
-
"confirming their subscription."
|
350 |
-
msgstr ""
|
351 |
-
"Les inscrits à votre newsletter recevront un email pour confirmer leur "
|
352 |
-
"inscription. Attention, les inscrits ne sont pas rajoutés à votre liste de "
|
353 |
-
"contact tant que leur inscription n'est pas confirmée."
|
354 |
-
|
355 |
-
#: ../page/page-form.php:410
|
356 |
-
msgid ""
|
357 |
-
"Select \"Yes\" if you want your subscribers to confirm their email address"
|
358 |
-
msgstr ""
|
359 |
-
"Sélectionner \"Oui\" si vous souhaitez que vous nouveaux inscrits confirment "
|
360 |
-
"leurs adresses emails"
|
361 |
-
|
362 |
-
#: ../page/page-form.php:429
|
363 |
-
msgid "Redirect to this URL after clicking in the email"
|
364 |
-
msgstr "Rediriger sur cette URL après avoir cliqué sur le lien dans l'email"
|
365 |
-
|
366 |
-
#: ../page/page-form.php:439
|
367 |
-
msgid "Redirect to this URL after subscription"
|
368 |
-
msgstr "Rediriger vers ce lien après inscription"
|
369 |
-
|
370 |
-
#: ../page/page-form.php:456
|
371 |
-
msgid ""
|
372 |
-
"Select \"Yes\" if you want to redirect your subscribers to a specific page "
|
373 |
-
"after they fullfill the form"
|
374 |
-
msgstr ""
|
375 |
-
"Sélectionner \"Oui\" si vous voulez rediriger vos nouveaux inscrits sur une "
|
376 |
-
"page après inscription"
|
377 |
-
|
378 |
-
#: ../page/page-form.php:488 ../page/page-form.php:493
|
379 |
-
msgid "Success message"
|
380 |
-
msgstr "Message de validation"
|
381 |
-
|
382 |
-
#: ../page/page-form.php:493
|
383 |
-
msgid ""
|
384 |
-
"Set up the success message that will appear when one of your visitors "
|
385 |
-
"surccessfully signs up"
|
386 |
-
msgstr "Paramétrer le message qui apparaît lorsque l'inscription est réussie"
|
387 |
-
|
388 |
-
#: ../page/page-form.php:497
|
389 |
-
msgid "General error message"
|
390 |
-
msgstr "Message d'erreur"
|
391 |
-
|
392 |
-
#: ../page/page-form.php:502
|
393 |
-
msgid "General message error"
|
394 |
-
msgstr "Message d'erreur"
|
395 |
-
|
396 |
-
#: ../page/page-form.php:502
|
397 |
-
msgid ""
|
398 |
-
"Set up the message that will appear when an error occurs during the "
|
399 |
-
"subscritpion process"
|
400 |
-
msgstr "Paramétrer le message qui apparaît lorsqu'une erreur survient"
|
401 |
-
|
402 |
-
#: ../page/page-form.php:506
|
403 |
-
msgid "Existing subscribers"
|
404 |
-
msgstr "Contact existant déjà"
|
405 |
-
|
406 |
-
#: ../page/page-form.php:511
|
407 |
-
msgid "Existing Suscribers"
|
408 |
-
msgstr "Contact existant déjà"
|
409 |
-
|
410 |
-
#: ../page/page-form.php:511
|
411 |
-
msgid ""
|
412 |
-
"Set up the message that will appear when a suscriber is already in your "
|
413 |
-
"database"
|
414 |
-
msgstr ""
|
415 |
-
"Paramétrer le message qui apparaît lorsque le contact est déjà présent dans "
|
416 |
-
"votre base de données"
|
417 |
-
|
418 |
-
#: ../page/page-form.php:515
|
419 |
-
msgid "Invalid email address"
|
420 |
-
msgstr "Adresse email invalide"
|
421 |
-
|
422 |
-
#: ../page/page-form.php:520
|
423 |
-
msgid "Invalid email address"
|
424 |
-
msgstr "Adresse email invalide"
|
425 |
-
|
426 |
-
#: ../page/page-form.php:520
|
427 |
-
msgid ""
|
428 |
-
"Set up the message that will appear when the email address used to sign up "
|
429 |
-
"is not valid"
|
430 |
-
msgstr ""
|
431 |
-
"Paramétrer le message qui apparaît lorsque l'adresse utilisée pour "
|
432 |
-
"l'inscription n'est pas valide"
|
433 |
-
|
434 |
-
#: ../page/page-form.php:553
|
435 |
-
msgid ""
|
436 |
-
"Sorry, you selected invalid form ID. Please check again if the ID is right"
|
437 |
-
msgstr ""
|
438 |
-
"Désolé, l'ID de fomulaire sélectionné n'est pas valide. Veuillez vérifier la "
|
439 |
-
"validité de l'ID"
|
440 |
-
|
441 |
-
#: ../page/page-home.php:40
|
442 |
-
msgid "Home"
|
443 |
-
msgstr "Page d'accueil"
|
444 |
-
|
445 |
-
#: ../page/page-home.php:112 ../page/page-home.php:130
|
446 |
-
msgid "Step"
|
447 |
-
msgstr "Etape"
|
448 |
-
|
449 |
-
#: ../page/page-home.php:112
|
450 |
-
msgid "Create a Sendinblue Account"
|
451 |
-
msgstr "Créer un compte Sendinblue"
|
452 |
-
|
453 |
-
#: ../page/page-home.php:116
|
454 |
-
msgid "By creating a free Sendinblue account, you will be able to send confirmation emails and:"
|
455 |
-
msgstr "En créant un compte gratuit Sendinblue, vous pourrez envoyer vos emails de confirmations d'inscription et :"
|
456 |
-
|
457 |
-
#: ../page/page-home.php:118
|
458 |
-
msgid "Collect your contacts and upload your lists"
|
459 |
-
msgstr "Collecter vos contacts et importer vos listes"
|
460 |
-
|
461 |
-
#: ../page/page-home.php:119
|
462 |
-
msgid "Use Sendinblue SMTP to send your transactional emails"
|
463 |
-
msgstr "Utiliser le SMTP Sendinblue pour vos emails transactionnels"
|
464 |
-
|
465 |
-
#: ../page/page-home.php:120
|
466 |
-
msgid "Email marketing builders"
|
467 |
-
msgstr "Editeurs d'Email Marketing"
|
468 |
-
|
469 |
-
#: ../page/page-home.php:121
|
470 |
-
msgid "Create and schedule your email marketing campaigns"
|
471 |
-
msgstr "Créer et programmer vos campagnes d'email marketing"
|
472 |
-
|
473 |
-
#: ../page/page-home.php:122
|
474 |
-
msgid "Try all of"
|
475 |
-
msgstr "Essayer toutes les"
|
476 |
-
|
477 |
-
#: ../page/page-home.php:122
|
478 |
-
msgid "Sendinblue's features"
|
479 |
-
msgstr "fonctionnalités de Sendinblue"
|
480 |
-
|
481 |
-
#: ../page/page-home.php:124
|
482 |
-
msgid "Create an account"
|
483 |
-
msgstr "Créer un compte"
|
484 |
-
|
485 |
-
#: ../page/page-home.php:130
|
486 |
-
msgid "Activate your account with your API key"
|
487 |
-
msgstr "Activez votre compte avec votre clé API"
|
488 |
-
|
489 |
-
#: ../page/page-home.php:134
|
490 |
-
msgid "You successfully activate your account."
|
491 |
-
msgstr "Voter compte a bien été activé"
|
492 |
-
|
493 |
-
#: ../page/page-home.php:135 ../page/page-home.php:138
|
494 |
-
msgid "Please input
|
495 |
-
msgstr "Merci de rentrer des clés valides"
|
496 |
-
|
497 |
-
#: ../page/page-home.php:136
|
498 |
-
msgid "Please install curl on site to use sendinblue plugin."
|
499 |
-
msgstr "S'il vous plaît installer CURL sur le serveur"
|
500 |
-
|
501 |
-
#: ../page/page-home.php:137
|
502 |
-
msgid "Curl error."
|
503 |
-
msgstr "Erreur Curl."
|
504 |
-
|
505 |
-
#: ../page/page-home.php:140
|
506 |
-
msgid "Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox."
|
507 |
-
msgstr "Une fois votre compte Sendinblue créé, activez ce plugin pour envoyer tous vos emails transactionnels avec Sendinblue SMTP afin d'optimiser la délivrabilité de vos emails."
|
508 |
-
|
509 |
-
#: ../page/page-home.php:141
|
510 |
-
msgid "To activate your plugin, enter your API Access key."
|
511 |
-
msgstr "Pour activer ce plugin, entrez votre clé API d'accès. "
|
512 |
-
|
513 |
-
#: ../page/page-home.php:144
|
514 |
-
msgid "Get your API key from your account"
|
515 |
-
msgstr "Obtenez la clé API de votre compte"
|
516 |
-
|
517 |
-
#: ../page/page-home.php:148
|
518 |
-
msgid "Access Key"
|
519 |
-
msgstr "Clé d'accès"
|
520 |
-
|
521 |
-
#: ../page/page-home.php:149
|
522 |
-
msgid "Login"
|
523 |
-
msgstr "Se connecter"
|
524 |
-
|
525 |
-
#: ../page/page-home.php:195
|
526 |
-
msgid "My Account"
|
527 |
-
msgstr "Mon Compte"
|
528 |
-
|
529 |
-
#: ../page/page-home.php:198
|
530 |
-
msgid "You are currently logged in as : "
|
531 |
-
msgstr "Vous êtes actuellement connecté comme : "
|
532 |
-
|
533 |
-
#: ../page/page-home.php:206
|
534 |
-
msgid "credits"
|
535 |
-
msgstr "crédits"
|
536 |
-
|
537 |
-
#: ../page/page-home.php:209
|
538 |
-
msgid "Log out"
|
539 |
-
msgstr "Se déconnecter"
|
540 |
-
|
541 |
-
#: ../page/page-home.php:213
|
542 |
-
msgid "Contacts"
|
543 |
-
msgstr "Contacts"
|
544 |
-
|
545 |
-
#: ../page/page-home.php:216
|
546 |
-
msgid "You have"
|
547 |
-
msgstr "Vous avez"
|
548 |
-
|
549 |
-
#: ../page/page-home.php:216
|
550 |
-
msgid "contacts."
|
551 |
-
msgstr "contacts."
|
552 |
-
|
553 |
-
#: ../page/page-home.php:217
|
554 |
-
msgid "Access to the list of all my contacts"
|
555 |
-
msgstr "Accéder à la liste de tous mes contacts"
|
556 |
-
|
557 |
-
#: ../page/page-home.php:225
|
558 |
-
msgid "Email Campaigns"
|
559 |
-
msgstr "Campagnes Email"
|
560 |
-
|
561 |
-
#: ../page/page-home.php:231 ../page/page-home.php:257
|
562 |
-
#: ../page/page-home.php:283
|
563 |
-
msgid "Sent"
|
564 |
-
msgstr "Envoyées"
|
565 |
-
|
566 |
-
#: ../page/page-home.php:236 ../page/page-home.php:262
|
567 |
-
#: ../page/page-home.php:288
|
568 |
-
msgid "Draft"
|
569 |
-
msgstr "Brouillons"
|
570 |
-
|
571 |
-
#: ../page/page-home.php:241 ../page/page-home.php:267
|
572 |
-
#: ../page/page-home.php:293
|
573 |
-
msgid "Scheduled"
|
574 |
-
msgstr "Programmées"
|
575 |
-
|
576 |
-
#: ../page/page-home.php:244
|
577 |
-
msgid "Create new email campaign"
|
578 |
-
msgstr "Créer une nouvelle campagne email"
|
579 |
-
|
580 |
-
#: ../page/page-home.php:251
|
581 |
-
msgid "SMS Campaigns"
|
582 |
-
msgstr "Campagnes SMS"
|
583 |
-
|
584 |
-
#: ../page/page-home.php:270
|
585 |
-
msgid "Create new sms campaign"
|
586 |
-
msgstr "Créer une nouvelle campagne SMS"
|
587 |
-
|
588 |
-
#: ../page/page-home.php:277
|
589 |
-
msgid "Trigger Marketing"
|
590 |
-
msgstr "Trigger Marketing"
|
591 |
-
|
592 |
-
#: ../page/page-home.php:296
|
593 |
-
msgid "Create new trigger campaign"
|
594 |
-
msgstr "Créer une nouvelle campagne de trigger "
|
595 |
-
|
596 |
-
#: ../page/page-home.php:306
|
597 |
-
msgid "Transactional emails"
|
598 |
-
msgstr "Emails transactionnels"
|
599 |
-
|
600 |
-
#: ../page/page-home.php:312
|
601 |
-
msgid ""
|
602 |
-
"Unfortunately, your \"Transactional emails\" are not activated because your "
|
603 |
-
"Sendinblue SMTP account is not active. Please send an email to "
|
604 |
-
"contact@sendinblue.com in order to ask for SMTP account activation"
|
605 |
-
msgstr ""
|
606 |
-
"Malheureusement, vous ne pouvez pas activer \"Emails transactionnels\" parce "
|
607 |
-
"que votre compte SMTP Sendinblue n'a pas été validé. Merci d'envoyer un "
|
608 |
-
"email à contact@sendinblue.com afin de demander l'activation de votre compte "
|
609 |
-
"SMTP"
|
610 |
-
|
611 |
-
#: ../page/page-home.php:316
|
612 |
-
msgid "Mail Sent."
|
613 |
-
msgstr "Email envoyé"
|
614 |
-
|
615 |
-
#: ../page/page-home.php:317
|
616 |
-
msgid "Please input valid email."
|
617 |
-
msgstr "Insérer une adresse valide"
|
618 |
-
|
619 |
-
#: ../page/page-home.php:319
|
620 |
-
msgid "Activate email through Sendinblue"
|
621 |
-
msgstr "Activer les emails avec Sendinblue "
|
622 |
-
|
623 |
-
#: ../page/page-home.php:329
|
624 |
-
msgid ""
|
625 |
-
"Choose \"Yes\" if you want to use Sendinblue SMTP to send transactional "
|
626 |
-
"emails"
|
627 |
-
msgstr ""
|
628 |
-
"Choisir \"Oui\" pour utiliser SMTP Sendinblue pour envoyer vos emails "
|
629 |
-
"transactionnels"
|
630 |
-
|
631 |
-
#: ../page/page-home.php:338
|
632 |
-
msgid "Choose your sender"
|
633 |
-
msgstr "Choisissez votre expéditeur"
|
634 |
-
|
635 |
-
#: ../page/page-home.php:349
|
636 |
-
msgid "Create a new sender"
|
637 |
-
msgstr "Créez un nouvel expéditeur"
|
638 |
-
|
639 |
-
#: ../page/page-home.php:353
|
640 |
-
msgid "Enter email to send a test"
|
641 |
-
msgstr "Entrer une adresse email pour envoyer un test"
|
642 |
-
|
643 |
-
#: ../page/page-home.php:356
|
644 |
-
msgid "Send email"
|
645 |
-
msgstr "Envoyer l'email"
|
646 |
-
|
647 |
-
#: ../page/page-home.php:359
|
648 |
-
msgid "Select here the email address you want to send a test email to."
|
649 |
-
msgstr ""
|
650 |
-
"Sélectionner ici l'adresse email à qui vous souhaitez envoyer un email de "
|
651 |
-
"test"
|
652 |
-
|
653 |
-
#: ../page/page-home.php:368
|
654 |
-
msgid "Automation"
|
655 |
-
msgstr "Automation"
|
656 |
-
|
657 |
-
#: ../page/page-home.php:371
|
658 |
-
msgid "Your Marketing Automation script is installed correctly."
|
659 |
-
msgstr "Le script Marketing Automation a été installé avec succès."
|
660 |
-
|
661 |
-
#: ../page/page-home.php:372
|
662 |
-
msgid "Your Marketing Automation script has been uninstalled"
|
663 |
-
msgstr "Le script Marketing Automation a été désinstallé"
|
664 |
-
|
665 |
-
#: ../page/page-home.php:373
|
666 |
-
msgid ""
|
667 |
-
"To activate Marketing Automation (beta), please go to your Sendinblue's "
|
668 |
-
"account or contact us at contact@sendinblue.com"
|
669 |
-
msgstr ""
|
670 |
-
"Pour activer Marketing Automation (beta), veuillez vous connecter à votre "
|
671 |
-
"compte Sendinblue ou contactez-nous à contact@sendinblue.com"
|
672 |
-
|
673 |
-
#: ../page/page-home.php:374
|
674 |
-
msgid ""
|
675 |
-
"Your Marketing Automation script will be uninstalled, you won't have access "
|
676 |
-
"to any Marketing Automation data and workflows"
|
677 |
-
msgstr ""
|
678 |
-
"Le script Marketing Automation va etre désinstallé. Vous n'aurez plus accès "
|
679 |
-
"aux données Marketing Automation et aux scénarios."
|
680 |
-
|
681 |
-
#: ../page/page-home.php:376
|
682 |
-
msgid "Activate Marketing Automation through Sendinblue"
|
683 |
-
msgstr "Activer Marketing Automation via Sendinblue"
|
684 |
-
|
685 |
-
#: ../page/page-home.php:383
|
686 |
-
msgid ""
|
687 |
-
"Choose \"Yes\" if you want to use Sendinblue Automation to track your "
|
688 |
-
"website activity"
|
689 |
-
msgstr ""
|
690 |
-
"Choisissez \"Oui\" si vous souhaitez utiliser Sendinblue Automation "
|
691 |
-
"poursuivre l'activité de votre site web"
|
692 |
-
|
693 |
-
#: ../page/page-home.php:387
|
694 |
-
#, php-format
|
695 |
-
msgid "%s Explore our resource %s to learn more about Sendinblue Automation"
|
696 |
-
msgstr ""
|
697 |
-
"%s Explorez nos resources %s pour en savoir plus sur l'Automation Sendinblue"
|
698 |
-
|
699 |
-
#: ../page/page-home.php:407
|
700 |
-
msgid "About Sendinblue"
|
701 |
-
msgstr "A propos de Sendinblue"
|
702 |
-
|
703 |
-
#: ../page/page-home.php:409
|
704 |
-
msgid "Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages."
|
705 |
-
msgstr "Sendinblue est une plateforme tout-en-un qui permet de gérer votre marketing relationnel : gérez de manière simple et efficace vos campagnes marketing, SMS et emails transactionnels."
|
706 |
-
|
707 |
-
#: ../page/page-home.php:412
|
708 |
-
msgid "Who we are"
|
709 |
-
msgstr "Qui sommes nous"
|
710 |
-
|
711 |
-
#: ../page/page-home.php:415
|
712 |
-
msgid "Pricing"
|
713 |
-
msgstr "Tarifs"
|
714 |
-
|
715 |
-
#: ../page/page-home.php:418
|
716 |
-
msgid "Features"
|
717 |
-
msgstr "Fonctionnalités"
|
718 |
-
|
719 |
-
#: ../page/page-home.php:425
|
720 |
-
msgid "Need Help?"
|
721 |
-
msgstr "Besoin d'aide ?"
|
722 |
-
|
723 |
-
#: ../page/page-home.php:427
|
724 |
-
msgid "Do you have a question or need more information?"
|
725 |
-
msgstr "Vous avez une question, ou avez besoin de plus d'information ?"
|
726 |
-
|
727 |
-
#: ../page/page-home.php:429
|
728 |
-
msgid "Tutorials"
|
729 |
-
msgstr "Tutoriels"
|
730 |
-
|
731 |
-
#: ../page/page-home.php:430
|
732 |
-
msgid "FAQ"
|
733 |
-
msgstr "FAQ"
|
734 |
-
|
735 |
-
#: ../page/page-home.php:433
|
736 |
-
msgid ""
|
737 |
-
"Please click on below link if you can't see updated setting on Sendinblue."
|
738 |
-
msgstr ""
|
739 |
-
"Veuillez cliquez sur le lien ci-dessous si vous ne voyez pas vos settings "
|
740 |
-
"mis à jour sur Sendinblue"
|
741 |
-
|
742 |
-
#: ../page/page-home.php:434
|
743 |
-
msgid "Sync"
|
744 |
-
msgstr "Sync"
|
745 |
-
|
746 |
-
#: ../page/page-home.php:440
|
747 |
-
msgid "You like this plugin? Let everybody knows and review it"
|
748 |
-
msgstr "Vous aimez ce plugin ? Faites-le savoir et notez le"
|
749 |
-
|
750 |
-
#: ../page/page-home.php:442
|
751 |
-
msgid "Review this plugin"
|
752 |
-
msgstr "Noter ce plugin"
|
753 |
-
|
754 |
-
#: ../page/page-home.php:469
|
755 |
-
msgid ""
|
756 |
-
"You are currently not logged in. Create an account or log in to benefit from "
|
757 |
-
"all of Sendinblue's features an your Wordpress site."
|
758 |
-
msgstr ""
|
759 |
-
"Vous n'êtes actuellement pas connecté. Créez un compte ou connectez vous "
|
760 |
-
"pour bénéficier de toutes les fonctionnalités de Sendinblue pour votre site "
|
761 |
-
"Wordpress"
|
762 |
-
|
763 |
-
#: ../page/page-home.php:472
|
764 |
-
msgid "Collect and manage your contacts"
|
765 |
-
msgstr "Collectez et gérez vos contacts"
|
766 |
-
|
767 |
-
#: ../page/page-home.php:473
|
768 |
-
msgid "Send transactional emails via SMTP or API"
|
769 |
-
msgstr "Envoyer des emails transactionnels via SMTP ou API"
|
770 |
-
|
771 |
-
#: ../page/page-home.php:474
|
772 |
-
msgid "Real time statistics and email tracking"
|
773 |
-
msgstr "Statistiques en temps réel et tracking des emails"
|
774 |
-
|
775 |
-
#: ../page/page-home.php:475
|
776 |
-
msgid "Edit and send email marketing"
|
777 |
-
msgstr "Editer et envoyer des emails marketings"
|
778 |
-
|
779 |
-
#: ../page/page-home.php:479
|
780 |
-
msgid "Have an account?"
|
781 |
-
msgstr "Vous avez un compte ?"
|
782 |
-
|
783 |
-
#: ../page/page-home.php:482
|
784 |
-
msgid "Free Subscribe Now"
|
785 |
-
msgstr "S'inscrire gratuitement"
|
786 |
-
|
787 |
-
#: ../page/page-home.php:609
|
788 |
-
msgid "[Sendinblue SMTP] test email"
|
789 |
-
msgstr "email de test [Sendinblue SMTP]"
|
790 |
-
|
791 |
-
#: ../page/page-lists.php:39
|
792 |
-
msgid "Lists"
|
793 |
-
msgstr "Listes"
|
794 |
-
|
795 |
-
#: ../page/page-scenarios.php:39
|
796 |
-
msgid "Workflows"
|
797 |
-
msgstr "Scenarios"
|
798 |
-
|
799 |
-
#: ../page/page-scenarios.php:121
|
800 |
-
msgid "Create your workflow"
|
801 |
-
msgstr "Créez votre scénario"
|
802 |
-
|
803 |
-
#: ../page/page-scenarios.php:126
|
804 |
-
msgid "Custom workflow"
|
805 |
-
msgstr "Scénario pérsonnalisé"
|
806 |
-
|
807 |
-
#: ../page/page-scenarios.php:130
|
808 |
-
msgid ""
|
809 |
-
"Mix and match triggers, conditions, and actions to create a custom workflow."
|
810 |
-
msgstr ""
|
811 |
-
"Mélangez les triggers, conditions et actions pour créer un scénario "
|
812 |
-
"personnalisé"
|
813 |
-
|
814 |
-
#: ../page/page-scenarios.php:137
|
815 |
-
msgid "Welcome Message"
|
816 |
-
msgstr "Message de Bienvenue"
|
817 |
-
|
818 |
-
#: ../page/page-scenarios.php:141
|
819 |
-
msgid "Send a welcome email after a subscriber joins your list."
|
820 |
-
msgstr ""
|
821 |
-
"Envoyez un message de bienvenue après qu'un contact ait rejoint votre liste"
|
822 |
-
|
823 |
-
#: ../page/page-scenarios.php:148
|
824 |
-
msgid "Anniversary Date"
|
825 |
-
msgstr "Date d'anniversaire"
|
826 |
-
|
827 |
-
#: ../page/page-scenarios.php:152
|
828 |
-
msgid ""
|
829 |
-
"Send an annual email or series of emails based on a special event or "
|
830 |
-
"birthday."
|
831 |
-
msgstr ""
|
832 |
-
"Envoyez un email annuel ou une série d'email basé sur un évènement spécial "
|
833 |
-
"ouun anniversaire."
|
834 |
-
|
835 |
-
#: ../page/page-scenarios.php:159
|
836 |
-
msgid "Page Visit"
|
837 |
-
msgstr "Visite de Page"
|
838 |
-
|
839 |
-
#: ../page/page-scenarios.php:163
|
840 |
-
msgid "Send emails after a contact visits a specific page on your website."
|
841 |
-
msgstr ""
|
842 |
-
"Envoyez des emails après qu'un contact ait visité une page spécifique sur "
|
843 |
-
"votre site web"
|
844 |
-
|
845 |
-
#: ../page/page-scenarios.php:170
|
846 |
-
msgid "Website Event"
|
847 |
-
msgstr "Evènement du site"
|
848 |
-
|
849 |
-
#: ../page/page-scenarios.php:174
|
850 |
-
msgid "Send emails after a contact performs a specific action on your website."
|
851 |
-
msgstr ""
|
852 |
-
"Envoyez des email après qu'un contact ait fait une action spécifique sur "
|
853 |
-
"votre site web"
|
854 |
-
|
855 |
-
#: ../page/page-scenarios.php:181
|
856 |
-
msgid "Product Purchase"
|
857 |
-
msgstr "Achat de produit"
|
858 |
-
|
859 |
-
#: ../page/page-scenarios.php:185
|
860 |
-
msgid "Send emails when a product is purchased on your website."
|
861 |
-
msgstr "Envoyez des emails lors de l'achat d'un produit sur votre webstore"
|
862 |
-
|
863 |
-
#: ../page/page-scenarios.php:192
|
864 |
-
msgid "Marketing Activity"
|
865 |
-
msgstr "Activité Marketing"
|
866 |
-
|
867 |
-
#: ../page/page-scenarios.php:196
|
868 |
-
msgid ""
|
869 |
-
"Send emails based on whether contacts open or click on an email campaign."
|
870 |
-
msgstr ""
|
871 |
-
"Envoyez un email basé sur les actions ouverture/clic d'une campagne email"
|
872 |
-
|
873 |
-
#: ../page/page-scenarios.php:203
|
874 |
-
msgid "Transactional Activity"
|
875 |
-
msgstr "Activité transactionnelle"
|
876 |
-
|
877 |
-
#: ../page/page-scenarios.php:207
|
878 |
-
msgid ""
|
879 |
-
"Send an email based whether contacts open or click on transactional emails."
|
880 |
-
msgstr ""
|
881 |
-
"Envoyer un email basé sur les actions d'ouverture/click de vos emails "
|
882 |
-
"transactionnels."
|
883 |
-
|
884 |
-
#: ../page/page-scenarios.php:214
|
885 |
-
msgid "View my existing workflows"
|
886 |
-
msgstr "Voir mes scénarios existants"
|
887 |
-
|
888 |
-
#: ../page/page-scenarios.php:217
|
889 |
-
msgid "View logs"
|
890 |
-
msgstr "Voir les logs"
|
891 |
-
|
892 |
-
#: ../page/page-statistics.php:39
|
893 |
-
msgid "Statistics"
|
894 |
-
msgstr "Statistiques"
|
895 |
-
|
896 |
-
#: ../sendinblue.php:767
|
897 |
-
msgid ""
|
898 |
-
"You cannot to use Sendinblue SMTP now because wp_mail has been declared by "
|
899 |
-
"another process or plugin. "
|
900 |
-
msgstr ""
|
901 |
-
"Vous ne pouvez pas utilisez le SMTP Sendinblue car wp_mail a été déclaré par "
|
902 |
-
"un autre process ou plugin"
|
903 |
-
|
904 |
-
#: ../widget/widget_form.php:31
|
905 |
-
msgid "Sendinblue Newsletter"
|
906 |
-
msgstr "Newsletter Sendinblue"
|
907 |
-
|
908 |
-
#: ../widget/widget_form.php:43
|
909 |
-
msgid "Widget Title"
|
910 |
-
msgstr "Titre du Widget"
|
911 |
-
|
912 |
-
#: ../widget/widget_form.php:49
|
913 |
-
msgid "Form to use"
|
914 |
-
msgstr "Formulaire à utiliser"
|
915 |
-
|
916 |
-
#: ../page/page-form.php:299
|
917 |
-
msgid "Add Captcha"
|
918 |
-
msgstr "Ajouter un Captcha"
|
919 |
-
|
920 |
-
#: ../page/page-form.php:300
|
921 |
-
msgid "We are using Google reCaptcha for this form. To use Google reCaptcha on this form, you should input site key and secret key."
|
922 |
-
msgstr "Pour activer le Google reCaptcha pour ce formulaire, veuillez compléter votre clé de site et votre clé secrète."
|
923 |
-
|
924 |
-
#: ../page/page-form.php:307
|
925 |
-
msgid "Site Key"
|
926 |
-
msgstr "Clé Site"
|
927 |
-
|
928 |
-
#: ../page/page-form.php:318
|
929 |
-
msgid "Secret Key"
|
930 |
-
msgstr "Clé Secrète"
|
931 |
-
|
932 |
-
#: ../page/page-form.php:338
|
933 |
-
msgid "Add a Term acceptance checkbox"
|
934 |
-
msgstr "Ajouter une Checkbox pour l'acceptation des CGU"
|
935 |
-
|
936 |
-
#: ../page/page-form.php:339
|
937 |
-
msgid ""
|
938 |
-
"If the terms and condition checkbox is added to the form, the field "
|
939 |
-
"will be mandatory for subscription."
|
940 |
-
msgstr ""
|
941 |
-
"si la checkbox des conditions d'utilisation est ajoutée, elle sera "
|
942 |
-
"obligatoire pour la souscription du contact"
|
943 |
-
|
944 |
-
#: ../page/page-form.php:346
|
945 |
-
msgid "URL to terms and conditions"
|
946 |
-
msgstr "URL de consultation des CGU"
|
947 |
-
|
948 |
-
#: ../page/page-form.php:361
|
949 |
-
msgid "Add Terms URL"
|
950 |
-
msgstr "Ajouter l'URL de consultation des CGU"
|
951 |
-
|
952 |
-
#: ../page/page-form.php:123
|
953 |
-
msgid "Note: Forms created in Sendinblue plugin for WordPress won't be displayed in Forms section in Sendinblue application"
|
954 |
-
msgstr "Note : Les formulaires créés avec le plugin Sendinblue pour Wordpress ne seront pas présents sur la page Formulaires de votre compte Sendinblue"
|
955 |
-
|
956 |
-
#: ../page/page-home.php:464
|
957 |
-
msgid "Let everyone know you like this plugin through a review!"
|
958 |
-
msgstr "Partagez votre avis sur le plugin en laissant un commentaire !"
|
959 |
-
|
960 |
-
#: ../page/page-home.php:389
|
961 |
-
msgid "Activate"
|
962 |
-
msgstr "Activer"
|
963 |
-
|
964 |
-
#: ../page/page-home.php:438
|
965 |
-
msgid "Recommend this plugin"
|
966 |
-
msgstr "Recommander ce plugin"
|
967 |
-
|
968 |
-
#: ../page/page-home.php:466
|
969 |
-
msgid "Recommend the Sendinblue plugin"
|
970 |
-
msgstr "Recommander le plugin Sendinblue"
|
971 |
-
|
972 |
-
#: ../sendinblue.php:311
|
973 |
-
msgid "Please fill out valid email address"
|
974 |
-
msgstr "Veuillez entrer une adresse e-mail valide."
|
975 |
-
|
976 |
-
#: ../sendinblue.php:312
|
977 |
-
msgid "Please fill out required fields"
|
978 |
-
msgstr "Veuillez compléter les champs obligatoires."
|
979 |
-
|
980 |
-
#: ../sendinblue.php:313
|
981 |
-
msgid "Please fill out valid date format"
|
982 |
-
msgstr "Veuillez entrer une date valide."
|
983 |
-
|
984 |
-
#: ../page/page-form.php:122
|
985 |
-
msgid "You are about to change the language"
|
986 |
-
msgstr "Vous êtes sur le point de changer de langue."
|
987 |
-
|
988 |
-
#: ../page/page-form.php:125
|
989 |
-
msgid "Please make sure that you've saved all the changes. We will have to reload the page."
|
990 |
-
msgstr "Veuillez vous assurer que vos modifications ont bien été enregistrées. La page sera rechargée."
|
991 |
-
|
992 |
-
#: ../page/page-form.php:126
|
993 |
-
msgid "Do you want to continue?"
|
994 |
-
msgstr "Voulez-vous continuer ?"
|
995 |
-
|
996 |
-
#: ../sendinblue.php:1000
|
997 |
-
msgid "Copy content from origin form"
|
998 |
-
msgstr "Copier le contenu du formulaire original"
|
999 |
-
|
1000 |
-
#: ../sendinblue.php:1000
|
1001 |
-
msgid "You can copy contents from origin form. You need to translate the contents by this language."
|
1002 |
-
msgstr "Vous pouvez copier le contenu du formulaire original. Vous devrez le traduire dans cette nouvelle langue."
|
1003 |
-
|
1004 |
-
#: ../page/page-form.php:616
|
1005 |
-
msgid "Select final confirmation email template"
|
1006 |
-
msgstr "Veuillez sélectionner l'email de confirmation finale"
|
1007 |
-
|
1008 |
-
#: ../page/page-form.php:618
|
1009 |
-
msgid ""
|
1010 |
-
"This is the final confirmation email your contacts will receive once they click on the double opt-in confirmation link."
|
1011 |
-
"You can select one of the default templates we have created for you, e.g. 'Default template - Final confirmation'."
|
1012 |
-
"For your information, you cannot select a template with the tag [DOUBLEOPTIN]."
|
1013 |
-
msgstr ""
|
1014 |
-
"Cecli est l'email de confirmation finale que vos contacts recevront lorsqu'ils auront cliqué sur le lien de confirmation double opt-in."
|
1015 |
-
"Vous pouvez sélectionner l'un des templates par défaut que nous avons générés pour vous. Par exemple 'Default template - Final confirmation'."
|
1016 |
-
"Pour information, vous ne pouvez pas sélectionner un template contenant le tag [DOUBLEOPTIN]."
|
1017 |
-
|
1018 |
-
#: ../page/page-form.php:618
|
1019 |
-
msgid "Final confirmation"
|
1020 |
-
msgstr "Confirmation finale"
|
1021 |
-
|
1022 |
-
#: ../page/page-form.php:343
|
1023 |
-
msgid "Add Multi-List Subscription"
|
1024 |
-
msgstr "Ajouter une inscription multi-liste"
|
1025 |
-
|
1026 |
-
#: ../page/page-form.php:344
|
1027 |
-
msgid "Enable your contacts to subscribe to content based on specific interests or preferences. Create a contact list for each interest and allow them to subscribe using this field"
|
1028 |
-
msgstr "Donner la possibilité à vos contacts de s’abonner au contenu selon leurs préférences et leurs centres d’intérêt. Pour se faire, créer une liste pour chaque centre d’intérêt et inviter votre contact à s’y abonner en utilisant ce champ"
|
1029 |
-
|
1030 |
-
#: ../page/page-form.php:350
|
1031 |
-
msgid "Please select the lists"
|
1032 |
-
msgstr "Veuillez sélectionner une ou plusieurs listes"
|
1033 |
-
|
1034 |
-
#: ../page/page-form.php:390
|
1035 |
-
msgid "Compliance Note"
|
1036 |
-
msgstr "Note de conformité"
|
1037 |
-
|
1038 |
-
#: ../page/page-form.php:391
|
1039 |
-
msgid "Add compliance note"
|
1040 |
-
msgstr "Ajouter une note de conformité"
|
1041 |
-
|
1042 |
-
#: ../page/page-form.php:391
|
1043 |
-
msgid "Create GDPR-compliant subscription forms for collecting email addresses."
|
1044 |
-
msgstr "Créer un formulaire d’inscription pour collecter les adresses emails conformément à la loi RGPD"
|
1045 |
-
|
1046 |
-
#: ../page/page-form.php:406
|
1047 |
-
msgid "Reset to Default"
|
1048 |
-
msgstr "Charger le formulaire par défaut"
|
1049 |
-
|
1050 |
-
#: ../page/page-form.php:50
|
1051 |
-
msgid "Your e-mail address is only used to send you our newsletter and information about the activities of %s. You can always use the unsubscribe link included in the newsletter."
|
1052 |
-
msgstr "Votre adresse email est utilisée uniquement pour vous envoyer notre newsletter ainsi que les activités concernant %s. Vous pouvez toujours vous désinscrire en cliquant sur le lien de désinscription se trouvant dans la newsletter."
|
1053 |
-
|
1054 |
-
msgid "Settings"
|
1055 |
-
msgstr "Paramètres"
|
1056 |
-
|
1057 |
-
msgid ""
|
1058 |
-
"Confirmation emails will be sent through your own email server, but you "
|
1059 |
-
"have no guarantees on their deliverability. <br/> <a href=\"https://app-"
|
1060 |
-
"smtp.sendinblue.com\" target=\"_blank\">Click here</a> to send your "
|
1061 |
-
"emails through Sendinblue in order to improve your deliverability and get "
|
1062 |
-
"statistics"
|
1063 |
-
msgstr ""
|
1064 |
-
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1065 |
-
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. <br/"
|
1066 |
-
"> Pour améliorer la délivrabilité et obtenir des statistiques, activez "
|
1067 |
-
"l'envoi des emails via le serveur SMTP de Sendinblue en <a href=\"https://"
|
1068 |
-
"app-smtp.sendinblue.com\" target=\"_blank\">cliquant ici</a>"
|
1069 |
-
|
1070 |
-
msgid "Sign up"
|
1071 |
-
msgstr "S'inscrire"
|
1072 |
-
|
1073 |
-
msgid "Wrap in Paragraph (<p>) tags ?"
|
1074 |
-
msgstr "Entourer de balise <p> ?"
|
1075 |
-
|
1076 |
-
msgid "Display"
|
1077 |
-
msgstr "Afficher"
|
1078 |
-
|
1079 |
-
msgid "Input"
|
1080 |
-
msgstr "Saisir"
|
1081 |
-
|
1082 |
-
msgid "List"
|
1083 |
-
msgstr "Liste"
|
1084 |
-
|
1085 |
-
msgid ""
|
1086 |
-
"Unfortunately, you wannot activate \"Transactional emails\" because your "
|
1087 |
-
"Sendinblue SMTP account is not valid. Please send an email to "
|
1088 |
-
"contact@sendinblue.com in order to ask for SMTP account activation"
|
1089 |
-
msgstr ""
|
1090 |
-
"Malheureusement, vous ne pouvez pas activer \"Emails transactionnels\" "
|
1091 |
-
"parce que votre compte SMTP Sendinblue n'a pas été validé. Merci "
|
1092 |
-
"d'envoyer un email à contact@sendinblue.com afin de demander l'activation "
|
1093 |
-
"de votre compte SMTP"
|
1094 |
-
|
1095 |
-
msgid "Sendinblue merge fields"
|
1096 |
-
msgstr "Champs synchronisé avec Sendinblue"
|
1097 |
-
|
1098 |
-
msgid "Double Optin"
|
1099 |
-
msgstr "Double Optin"
|
1100 |
-
|
1101 |
-
msgid ""
|
1102 |
-
"The template you selected does not include a link [DOUBLEOPTIN] to allow "
|
1103 |
-
"subscribers to confirm their subscription. Please edit the template to "
|
1104 |
-
"include a link with [DOUBLEOPTIN] as URL."
|
1105 |
-
msgstr ""
|
1106 |
-
"Le template choisi ne contient pas de lien [DOUBLEOPTIN] qui permet aux "
|
1107 |
-
"inscrits de confirmer leur inscription. Vous devez modifier votre "
|
1108 |
-
"template pour inclure le shortcode [DOUBLEOPTIN] à la place d'une URL "
|
1109 |
-
"avant de pouvoir le choisir."
|
1110 |
-
|
1111 |
-
msgid "Close"
|
1112 |
-
msgstr "Fermer"
|
1113 |
-
|
1114 |
-
msgid "Confirmation email"
|
1115 |
-
msgstr "Les emails de confirmation"
|
1116 |
-
|
1117 |
-
msgid ""
|
1118 |
-
"Confirmation emails will be sent through your own email server, but you "
|
1119 |
-
"have no guarantees on their deliverability. <a href=\"https://app-smtp."
|
1120 |
-
"sendinblue.com\" target=\"_blank\">Click here</a> to send your emails "
|
1121 |
-
"through Sendinblue in order to improve your deliverability and get "
|
1122 |
-
"statistics"
|
1123 |
-
msgstr ""
|
1124 |
-
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1125 |
-
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. Pour "
|
1126 |
-
"améliorer la délivrabilité et obtenir des statistiques, activez l'envoi "
|
1127 |
-
"des emails via le serveur SMTP de Sendinblue en <a href=\"https://app-"
|
1128 |
-
"smtp.sendinblue.com\" target=\"_blank\">cliquant ici</a>"
|
1129 |
-
|
1130 |
-
msgid ""
|
1131 |
-
"You can choose to add a step in the confirmation process, by requiring a "
|
1132 |
-
"new suscriber to click on a link sent to the registered email adress. By "
|
1133 |
-
"doing so, he will be added to your contact"
|
1134 |
-
msgstr ""
|
1135 |
-
"Vous pouvez choisir d'ajouter une étape dans le processus d'inscription, "
|
1136 |
-
"en demandant à vos nouveaux inscrits de cliquer sur un lien envoyé à "
|
1137 |
-
"l'adresse email déclarée. Ils seront ensuite ajoutés à votre liste de "
|
1138 |
-
"contact. "
|
1139 |
-
|
1140 |
-
msgid ""
|
1141 |
-
"Confirmation emails will be sent through your own email servers. This "
|
1142 |
-
"means no guarantees on emails deliverability. If you want to improve your "
|
1143 |
-
"deliverability and get statistics,"
|
1144 |
-
msgstr ""
|
1145 |
-
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1146 |
-
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. Pour "
|
1147 |
-
"améliorer la délivrabilité et obtenir des statistiques, activez l'envoi "
|
1148 |
-
"des emails via le serveur SMTP de Sendinblue en"
|
1149 |
-
|
1150 |
-
msgid "click here"
|
1151 |
-
msgstr "cliquant ici"
|
1152 |
-
|
1153 |
-
msgid "Set up my senders"
|
1154 |
-
msgstr "Paramétrer mes expéditeurs"
|
1155 |
-
|
1156 |
-
msgid "To activate your plugin, enter your API Access key and Secret key."
|
1157 |
-
msgstr ""
|
1158 |
-
"Pour activer ce plugin, entrez votre clé API d'accès et votre clé API "
|
1159 |
-
"secrète"
|
1160 |
-
|
1161 |
-
msgid "Secret Key"
|
1162 |
-
msgstr "Clé secrète"
|
1163 |
-
|
1164 |
-
msgid "Choose Template"
|
1165 |
-
msgstr "Choisir un Template"
|
1166 |
-
|
1167 |
-
msgid "Choose Sender"
|
1168 |
-
msgstr "Choisir l'expéditeur"
|
1169 |
-
|
1170 |
-
msgid "And more"
|
1171 |
-
msgstr "Et bien plus"
|
1172 |
-
|
1173 |
-
msgid "Yes, subscribe me to this list."
|
1174 |
-
msgstr "Oui, je souhaite m'inscrire à cette liste"
|
1175 |
-
|
1176 |
-
msgid ""
|
1177 |
-
"If you received this email by mistake, simply delete it. You will not be "
|
1178 |
-
"subscribed to this list if you don't click the confirmation link above."
|
1179 |
-
msgstr ""
|
1180 |
-
"SI vous avez reçu cet email par erreur, merci de le supprimer. Vous ne "
|
1181 |
-
"serez pas inscrit si vous ne cliquez pas sur le lien de confirmation ci-"
|
1182 |
-
"dessus"
|
1183 |
-
|
1184 |
-
msgid "Campaign"
|
1185 |
-
msgstr "Campagne"
|
1186 |
-
|
1187 |
-
msgid "Welcome"
|
1188 |
-
msgstr "Bienvenue "
|
1189 |
-
|
1190 |
-
msgid "Get it from"
|
1191 |
-
msgstr "Obtenez les depuis"
|
1192 |
-
|
1193 |
-
msgid "your account"
|
1194 |
-
msgstr "votre compte"
|
1195 |
-
|
1196 |
-
msgid "Sendinblue API Access Key"
|
1197 |
-
msgstr "Clé API d'accès"
|
1198 |
-
|
1199 |
-
msgid "Please input Access key to activate."
|
1200 |
-
msgstr "Insérez votre clé API d'accès pour l'activation"
|
1201 |
-
|
1202 |
-
msgid "Sendinblue API Secret Key"
|
1203 |
-
msgstr "Clé API secrète"
|
1204 |
-
|
1205 |
-
msgid "My account "
|
1206 |
-
msgstr "Mon compte"
|
1207 |
-
|
1208 |
-
msgid "Users Synchronisation"
|
1209 |
-
msgstr "Synchronisation des utilisateurs"
|
1210 |
-
|
1211 |
-
msgid "You have"
|
1212 |
-
msgstr "Vous avez"
|
1213 |
-
|
1214 |
-
msgid "existing users."
|
1215 |
-
msgstr "utilisateurs existants."
|
1216 |
-
|
1217 |
-
msgid "Do you want to add them to Sendinblue?"
|
1218 |
-
msgstr "Souhaitez-vous les ajouter à Sendinblue ?"
|
1219 |
-
|
1220 |
-
msgid "Sync my users"
|
1221 |
-
msgstr "Synchroniser"
|
1222 |
-
|
1223 |
-
msgid "Sync my users"
|
1224 |
-
msgstr "Synchroniser"
|
1225 |
-
|
1226 |
-
msgid "Roles to sync"
|
1227 |
-
msgstr "Rôles à synchroniser"
|
1228 |
-
|
1229 |
-
msgid "Administrator"
|
1230 |
-
msgstr "Administrateur"
|
1231 |
-
|
1232 |
-
msgid "Author"
|
1233 |
-
msgstr "Auteur"
|
1234 |
-
|
1235 |
-
msgid "Subscriber"
|
1236 |
-
msgstr "Abonné"
|
1237 |
-
|
1238 |
-
msgid "Shop manager"
|
1239 |
-
msgstr "Gestionnaire boutique"
|
1240 |
-
|
1241 |
-
msgid "Editor"
|
1242 |
-
msgstr "Editeur"
|
1243 |
-
|
1244 |
-
msgid "Contributor"
|
1245 |
-
msgstr "Contributeur"
|
1246 |
-
|
1247 |
-
msgid "Customer"
|
1248 |
-
msgstr "Client"
|
1249 |
-
|
1250 |
-
msgid "Sync Lists"
|
1251 |
-
msgstr "Listes de synchronisation"
|
1252 |
-
|
1253 |
-
msgid "Choose the Sendinblue list in which you want to add your existing customers:"
|
1254 |
-
msgstr "Choisissez à quelle(s) liste(s) vos contacts existants seront ajoutés :"
|
1255 |
-
|
1256 |
-
msgid "Match Attributes"
|
1257 |
-
msgstr "Mapping des champs"
|
1258 |
-
|
1259 |
-
msgid "WordPress Users Attributes"
|
1260 |
-
msgstr "Attributs des utilisateurs WordPress"
|
1261 |
-
|
1262 |
-
msgid "Sendinblue Contact Attributes"
|
1263 |
-
msgstr "Attributs de contact Sendinblue"
|
1264 |
-
|
1265 |
-
msgid "You have %s existing users. Do you want to add them to Sendinblue?"
|
1266 |
-
msgstr "Vous avez %s utilisateurs existants. Souhaitez-vous les ajouter à Sendinblue ?"
|
1267 |
-
|
1268 |
-
msgid "Set up the message that will appear when the required field is empty"
|
1269 |
-
msgstr "Configurez le message qui apparaîtra lorsque le champ requis est vide"
|
1270 |
-
|
1271 |
-
msgid "Apply"
|
1272 |
-
msgstr "Appliquer"
|
1273 |
-
|
1274 |
-
msgid "Required Field"
|
1275 |
-
msgstr "Champ obligatoire"
|
1276 |
-
|
1277 |
-
msgid "Please fill out this field"
|
1278 |
-
msgstr "Remplissez ce champ s’il vous plaît"
|
1279 |
-
|
1280 |
-
msgid "Default Form"
|
1281 |
msgstr "Formulaire par défaut"
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Sendinblue plugin\n"
|
4 |
+
"POT-Creation-Date: 2016-07-29 16:45+0700\n"
|
5 |
+
"PO-Revision-Date: 2016-07-29 16:45+0700\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: fr\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.8\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../inc/sib-api-manager.php:444
|
19 |
+
msgid "Subscription confirmed"
|
20 |
+
msgstr "Inscription newsletter confirmée"
|
21 |
+
|
22 |
+
#: ../inc/sib-api-manager.php:446
|
23 |
+
msgid "Please confirm subscription"
|
24 |
+
msgstr "Confirmer l'inscription "
|
25 |
+
|
26 |
+
#: ../inc/sib-api-manager.php:459 ../page/page-home.php:616
|
27 |
+
msgid "no-reply@sendinblue.com"
|
28 |
+
msgstr "no-reply@sendinblue.com"
|
29 |
+
|
30 |
+
#: ../inc/sib-api-manager.php:460 ../page/page-home.php:39
|
31 |
+
#: ../page/page-home.php:465 ../page/page-home.php:617
|
32 |
+
msgid "Sendinblue"
|
33 |
+
msgstr "Sendinblue"
|
34 |
+
|
35 |
+
#: ../inc/sib-api-manager.php:616
|
36 |
+
msgid "Thank you for subscribing"
|
37 |
+
msgstr "Merci pour votre inscription"
|
38 |
+
|
39 |
+
#: ../inc/sib-api-manager.php:636
|
40 |
+
msgid "You have just subscribed to the newsletter of "
|
41 |
+
msgstr "Vous vous êtes inscrit à la newsletter de "
|
42 |
+
|
43 |
+
#: ../inc/sib-api-manager.php:638
|
44 |
+
msgid "-Sendinblue"
|
45 |
+
msgstr "-Sendinblue"
|
46 |
+
|
47 |
+
#: ../inc/sib-api-manager.php:716
|
48 |
+
msgid "Unsubscribe"
|
49 |
+
msgstr "Se désabonner"
|
50 |
+
|
51 |
+
#: ../inc/sib-api-manager.php:736
|
52 |
+
msgid "Your request has been taken into account."
|
53 |
+
msgstr "Votre demande a bien été prise en compte."
|
54 |
+
|
55 |
+
#: ../inc/sib-api-manager.php:738
|
56 |
+
msgid "The user has been unsubscribed"
|
57 |
+
msgstr "L'utilisateur s'est désinscrit"
|
58 |
+
|
59 |
+
#: ../inc/table-forms.php:15
|
60 |
+
msgid "Form"
|
61 |
+
msgstr "Formulaire"
|
62 |
+
|
63 |
+
#: ../inc/table-forms.php:16 ../page/page-form.php:34 ../page/page-form.php:120
|
64 |
+
msgid "Forms"
|
65 |
+
msgstr "Formulaires"
|
66 |
+
|
67 |
+
#: ../inc/table-forms.php:50
|
68 |
+
msgid "No forms avaliable."
|
69 |
+
msgstr "Aucun formulaire"
|
70 |
+
|
71 |
+
#: ../inc/table-forms.php:119
|
72 |
+
msgid "Form Name"
|
73 |
+
msgstr "Nom du Formulaire"
|
74 |
+
|
75 |
+
#: ../inc/table-forms.php:120
|
76 |
+
msgid "Shortcode"
|
77 |
+
msgstr "Shortcode"
|
78 |
+
|
79 |
+
#: ../inc/table-forms.php:121
|
80 |
+
msgid "Visible attributes"
|
81 |
+
msgstr "Attributs affichés"
|
82 |
+
|
83 |
+
#: ../inc/table-forms.php:122 ../page/page-form.php:338
|
84 |
+
#: ../page/page-form.php:339
|
85 |
+
msgid "Linked List"
|
86 |
+
msgstr "Liste liée"
|
87 |
+
|
88 |
+
#: ../inc/table-forms.php:123
|
89 |
+
msgid "Last Update"
|
90 |
+
msgstr "Dernière modification"
|
91 |
+
|
92 |
+
#: ../inc/table-forms.php:214
|
93 |
+
msgid "Add New Form"
|
94 |
+
msgstr "Ajouter un nouveau formulaire"
|
95 |
+
|
96 |
+
#: ../model/model-forms.php:268
|
97 |
+
msgid "Thank you, you have successfully registered !"
|
98 |
+
msgstr "Vous êtes désormais inscrit !"
|
99 |
+
|
100 |
+
#: ../model/model-forms.php:269
|
101 |
+
msgid "Something wrong occured"
|
102 |
+
msgstr "Une erreur est survenue"
|
103 |
+
|
104 |
+
#: ../model/model-forms.php:270
|
105 |
+
msgid "You have already registered"
|
106 |
+
msgstr "Vous êtes déjà inscrit"
|
107 |
+
|
108 |
+
#: ../model/model-forms.php:271
|
109 |
+
msgid "Your email address is invalid"
|
110 |
+
msgstr "Cette adresse email n'est pas valide"
|
111 |
+
|
112 |
+
#: ../page/page-campaigns.php:39 ../page/page-home.php:220
|
113 |
+
msgid "Campaigns"
|
114 |
+
msgstr "Campagnes"
|
115 |
+
|
116 |
+
#: ../page/page-form.php:90
|
117 |
+
msgid "Back to form's list"
|
118 |
+
msgstr "Retour à la liste de formulaires"
|
119 |
+
|
120 |
+
#: ../page/page-form.php:150 ../page/page-form.php:550
|
121 |
+
msgid "Subscription form"
|
122 |
+
msgstr "Formulaire d'inscription"
|
123 |
+
|
124 |
+
#: ../page/page-form.php:157
|
125 |
+
msgid "Form Name : "
|
126 |
+
msgstr "Nom du formulaire"
|
127 |
+
|
128 |
+
#: ../page/page-form.php:174
|
129 |
+
msgid "Use the shortcode"
|
130 |
+
msgstr "Utiliser le shortcode"
|
131 |
+
|
132 |
+
#: ../page/page-form.php:180
|
133 |
+
msgid "inside a post, page or text widget to display your sign-up form."
|
134 |
+
msgstr ""
|
135 |
+
"à l'intérieur d'un article, d'une page ou d'un widget de texte afin d'y "
|
136 |
+
"ajouter votre formulaire d'inscription"
|
137 |
+
|
138 |
+
#: ../page/page-form.php:181
|
139 |
+
msgid "Do not copy and paste the above form mark up, that will not work"
|
140 |
+
msgstr "Ne copiez coller pas le code ci-dessus, cela ne fonctionnera pas"
|
141 |
+
|
142 |
+
#: ../page/page-form.php:186 ../page/page-form.php:187
|
143 |
+
msgid "Form Style"
|
144 |
+
msgstr "Style du formulaire"
|
145 |
+
|
146 |
+
#: ../page/page-form.php:187
|
147 |
+
msgid ""
|
148 |
+
"Select the style you favorite. Your custom css will be applied to form only."
|
149 |
+
msgstr ""
|
150 |
+
"Sélectionnez votre style favori. Votre css personnalisé ne sera appliqué "
|
151 |
+
"qu'à votre formulaire"
|
152 |
+
|
153 |
+
#: ../page/page-form.php:190
|
154 |
+
msgid "Current Theme"
|
155 |
+
msgstr "Theme courant"
|
156 |
+
|
157 |
+
#: ../page/page-form.php:192
|
158 |
+
msgid "Custom style"
|
159 |
+
msgstr "Theme personnalisé"
|
160 |
+
|
161 |
+
#: ../page/page-form.php:204
|
162 |
+
msgid "Email Address"
|
163 |
+
msgstr "Adresse email"
|
164 |
+
|
165 |
+
#: ../page/page-form.php:206
|
166 |
+
msgid "Subscribe"
|
167 |
+
msgstr "S'inscrire"
|
168 |
+
|
169 |
+
#: ../page/page-form.php:208
|
170 |
+
msgid "Select Sendinblue Attribute"
|
171 |
+
msgstr "Sélectionner un attribut Sendinblue"
|
172 |
+
|
173 |
+
#: ../page/page-form.php:210
|
174 |
+
msgid "Sendinblue merge fields : Normal"
|
175 |
+
msgstr "Champs synchronisé avec Sendinblue : normal"
|
176 |
+
|
177 |
+
#: ../page/page-form.php:212
|
178 |
+
msgid "Sendinblue merge fields : Category"
|
179 |
+
msgstr "Champs synchronisé avec Sendinblue : catégorie"
|
180 |
+
|
181 |
+
#: ../page/page-form.php:214
|
182 |
+
msgid "Other"
|
183 |
+
msgstr "Autre"
|
184 |
+
|
185 |
+
#: ../page/page-form.php:216
|
186 |
+
msgid "Submit Button"
|
187 |
+
msgstr "Bouton de validation"
|
188 |
+
|
189 |
+
#: ../page/page-form.php:222
|
190 |
+
msgid "Add a new Field"
|
191 |
+
msgstr "Ajouter un nouveau champ"
|
192 |
+
|
193 |
+
#: ../page/page-form.php:223
|
194 |
+
msgid "Add a New Field"
|
195 |
+
msgstr "Ajouter un nouveau champ"
|
196 |
+
|
197 |
+
#: ../page/page-form.php:223
|
198 |
+
msgid "Choose an attribute and add it to the subscription form of your Website"
|
199 |
+
msgstr ""
|
200 |
+
"Choisir un attribut et l'ajouter au formulaire d'inscription de votre site"
|
201 |
+
|
202 |
+
#: ../page/page-form.php:232
|
203 |
+
msgid "Label"
|
204 |
+
msgstr "Intitulé"
|
205 |
+
|
206 |
+
#: ../page/page-form.php:233 ../page/page-form.php:239
|
207 |
+
#: ../page/page-form.php:246
|
208 |
+
msgid "Optional"
|
209 |
+
msgstr "Optionnel"
|
210 |
+
|
211 |
+
#: ../page/page-form.php:238
|
212 |
+
msgid "Place holder"
|
213 |
+
msgstr "Ordre"
|
214 |
+
|
215 |
+
#: ../page/page-form.php:245
|
216 |
+
msgid "Initial value"
|
217 |
+
msgstr "Valeur initiale"
|
218 |
+
|
219 |
+
#: ../page/page-form.php:252
|
220 |
+
msgid "Button Text"
|
221 |
+
msgstr "Bouton de texte"
|
222 |
+
|
223 |
+
#: ../page/page-form.php:259
|
224 |
+
msgid "Required field ?"
|
225 |
+
msgstr "Champ obligatoire ?"
|
226 |
+
|
227 |
+
#: ../page/page-form.php:265
|
228 |
+
msgid "Drop-down List"
|
229 |
+
msgstr "Liste déroulante"
|
230 |
+
|
231 |
+
#: ../page/page-form.php:268
|
232 |
+
msgid "Radio List"
|
233 |
+
msgstr "boutons radio"
|
234 |
+
|
235 |
+
#: ../page/page-form.php:276 ../page/page-form.php:278
|
236 |
+
msgid "Add to form"
|
237 |
+
msgstr "Ajouter au formulaire"
|
238 |
+
|
239 |
+
#: ../page/page-form.php:278
|
240 |
+
msgid ""
|
241 |
+
"Please click where you want to insert the field and click on this button. By "
|
242 |
+
"default, the new field will be added at top."
|
243 |
+
msgstr ""
|
244 |
+
"Cliquez où vous souhaitez insérer le champ puis cliquez sur le bouton. Par "
|
245 |
+
"défaut le nouveau champ sera ajouté au début"
|
246 |
+
|
247 |
+
#: ../page/page-form.php:282
|
248 |
+
msgid "Generated HTML"
|
249 |
+
msgstr "HTML généré"
|
250 |
+
|
251 |
+
#: ../page/page-form.php:295
|
252 |
+
msgid "Preview"
|
253 |
+
msgstr "Aperçu"
|
254 |
+
|
255 |
+
#: ../page/page-form.php:309 ../page/page-form.php:474
|
256 |
+
#: ../page/page-form.php:525
|
257 |
+
msgid "Save"
|
258 |
+
msgstr "Sauvegarder"
|
259 |
+
|
260 |
+
#: ../page/page-form.php:323
|
261 |
+
msgid "Sign up process"
|
262 |
+
msgstr "Processus d'inscription"
|
263 |
+
|
264 |
+
#: ../page/page-form.php:330
|
265 |
+
msgid ""
|
266 |
+
"Confirmation emails will be sent through your own email server, but you have "
|
267 |
+
"no guarantees on their deliverability. <br/> <a href=\"https://app-smtp."
|
268 |
+
"sendinblue.com/\" target=\"_blank\">Click here</a> to send your emails "
|
269 |
+
"through Sendinblue in order to improve your deliverability and get statistics"
|
270 |
+
msgstr ""
|
271 |
+
"Les emails de confirmations seront envoyé via votre propre serveur mail, "
|
272 |
+
"mais vous n'aurez pasde garanties concernant la délivrabilité <br/> <a href="
|
273 |
+
"\"https://app-smtp.sendinblue.com/\" target=\"_blank\">Cliquez ici</a> pour "
|
274 |
+
"envoyer vos mailsvia Sendinblue pour améliorer votre délivrabilité et "
|
275 |
+
"obtenir des statistiques."
|
276 |
+
|
277 |
+
#: ../page/page-form.php:332
|
278 |
+
msgid ""
|
279 |
+
"The template you selected does not include a link [DOUBLEOPTIN] to allow "
|
280 |
+
"subscribers to confirm their subscription. <br/> Please edit the template to "
|
281 |
+
"include a link with [DOUBLEOPTIN] as URL."
|
282 |
+
msgstr ""
|
283 |
+
"Le template choisi ne contient pas de lien [DOUBLEOPTIN] qui permet aux "
|
284 |
+
"inscrits de confirmer leur inscription. <br/> Vous devez modifier votre "
|
285 |
+
"template pour inclure le shortcode [DOUBLEOPTIN] à la place d'une URL avant "
|
286 |
+
"de pouvoir le choisir."
|
287 |
+
|
288 |
+
#: ../page/page-form.php:339
|
289 |
+
msgid "Select the list where you want to add your new subscribers"
|
290 |
+
msgstr "Sélectionner la liste ou vous voulez enregistrer vos contacts"
|
291 |
+
|
292 |
+
#: ../page/page-form.php:350
|
293 |
+
msgid ""
|
294 |
+
"You can use Marketing Automation to create specific workflow when a user is "
|
295 |
+
"added to the list."
|
296 |
+
msgstr ""
|
297 |
+
"Vous pouvez utiliser le Marketing Automation pour créer des scénarios "
|
298 |
+
"spécifiques lorsqu'un utilisateur est ajouté à la liste"
|
299 |
+
|
300 |
+
#: ../page/page-form.php:356
|
301 |
+
msgid "Send a confirmation email"
|
302 |
+
msgstr "Envoyer un message de confirmation"
|
303 |
+
|
304 |
+
#: ../page/page-form.php:356 ../page/page-form.php:484
|
305 |
+
msgid "Confirmation message"
|
306 |
+
msgstr "Message de confirmation"
|
307 |
+
|
308 |
+
#: ../page/page-form.php:356
|
309 |
+
msgid ""
|
310 |
+
"You can choose to send a confirmation email. You will be able to set up the "
|
311 |
+
"template that will be sent to your new suscribers"
|
312 |
+
msgstr ""
|
313 |
+
"Vous pouvez choisir d'envoyer un message de confirmation. Vous serez ainsi "
|
314 |
+
"capable de paramétrer le template qui sera envoyé à vos nouveaux inscrits"
|
315 |
+
|
316 |
+
#: ../page/page-form.php:362 ../page/page-form.php:400
|
317 |
+
#: ../page/page-form.php:445
|
318 |
+
msgid "Yes"
|
319 |
+
msgstr "Oui"
|
320 |
+
|
321 |
+
#: ../page/page-form.php:367 ../page/page-form.php:405
|
322 |
+
#: ../page/page-form.php:450
|
323 |
+
msgid "No"
|
324 |
+
msgstr "Non"
|
325 |
+
|
326 |
+
#: ../page/page-form.php:372
|
327 |
+
msgid ""
|
328 |
+
"Select \"Yes\" if you want your subscribers to receive a confirmation email"
|
329 |
+
msgstr ""
|
330 |
+
"Sélectionner \"Oui\" si vous souhaitez que vous nouveaux inscrits reçoivent "
|
331 |
+
"un email de confirmation"
|
332 |
+
|
333 |
+
#: ../page/page-form.php:380
|
334 |
+
msgid "Default"
|
335 |
+
msgstr "Défaut"
|
336 |
+
|
337 |
+
#: ../page/page-form.php:387 ../page/page-form.php:423
|
338 |
+
msgid "Set up my templates"
|
339 |
+
msgstr "Paramétrer mes templates"
|
340 |
+
|
341 |
+
#: ../page/page-form.php:394
|
342 |
+
msgid "Double Opt-In"
|
343 |
+
msgstr "Double Opt-In"
|
344 |
+
|
345 |
+
#: ../page/page-form.php:394
|
346 |
+
msgid ""
|
347 |
+
"Your subscribers will receive an email inviting them to confirm their "
|
348 |
+
"subscription. Be careful, your subscribers are not saved in your list before "
|
349 |
+
"confirming their subscription."
|
350 |
+
msgstr ""
|
351 |
+
"Les inscrits à votre newsletter recevront un email pour confirmer leur "
|
352 |
+
"inscription. Attention, les inscrits ne sont pas rajoutés à votre liste de "
|
353 |
+
"contact tant que leur inscription n'est pas confirmée."
|
354 |
+
|
355 |
+
#: ../page/page-form.php:410
|
356 |
+
msgid ""
|
357 |
+
"Select \"Yes\" if you want your subscribers to confirm their email address"
|
358 |
+
msgstr ""
|
359 |
+
"Sélectionner \"Oui\" si vous souhaitez que vous nouveaux inscrits confirment "
|
360 |
+
"leurs adresses emails"
|
361 |
+
|
362 |
+
#: ../page/page-form.php:429
|
363 |
+
msgid "Redirect to this URL after clicking in the email"
|
364 |
+
msgstr "Rediriger sur cette URL après avoir cliqué sur le lien dans l'email"
|
365 |
+
|
366 |
+
#: ../page/page-form.php:439
|
367 |
+
msgid "Redirect to this URL after subscription"
|
368 |
+
msgstr "Rediriger vers ce lien après inscription"
|
369 |
+
|
370 |
+
#: ../page/page-form.php:456
|
371 |
+
msgid ""
|
372 |
+
"Select \"Yes\" if you want to redirect your subscribers to a specific page "
|
373 |
+
"after they fullfill the form"
|
374 |
+
msgstr ""
|
375 |
+
"Sélectionner \"Oui\" si vous voulez rediriger vos nouveaux inscrits sur une "
|
376 |
+
"page après inscription"
|
377 |
+
|
378 |
+
#: ../page/page-form.php:488 ../page/page-form.php:493
|
379 |
+
msgid "Success message"
|
380 |
+
msgstr "Message de validation"
|
381 |
+
|
382 |
+
#: ../page/page-form.php:493
|
383 |
+
msgid ""
|
384 |
+
"Set up the success message that will appear when one of your visitors "
|
385 |
+
"surccessfully signs up"
|
386 |
+
msgstr "Paramétrer le message qui apparaît lorsque l'inscription est réussie"
|
387 |
+
|
388 |
+
#: ../page/page-form.php:497
|
389 |
+
msgid "General error message"
|
390 |
+
msgstr "Message d'erreur"
|
391 |
+
|
392 |
+
#: ../page/page-form.php:502
|
393 |
+
msgid "General message error"
|
394 |
+
msgstr "Message d'erreur"
|
395 |
+
|
396 |
+
#: ../page/page-form.php:502
|
397 |
+
msgid ""
|
398 |
+
"Set up the message that will appear when an error occurs during the "
|
399 |
+
"subscritpion process"
|
400 |
+
msgstr "Paramétrer le message qui apparaît lorsqu'une erreur survient"
|
401 |
+
|
402 |
+
#: ../page/page-form.php:506
|
403 |
+
msgid "Existing subscribers"
|
404 |
+
msgstr "Contact existant déjà"
|
405 |
+
|
406 |
+
#: ../page/page-form.php:511
|
407 |
+
msgid "Existing Suscribers"
|
408 |
+
msgstr "Contact existant déjà"
|
409 |
+
|
410 |
+
#: ../page/page-form.php:511
|
411 |
+
msgid ""
|
412 |
+
"Set up the message that will appear when a suscriber is already in your "
|
413 |
+
"database"
|
414 |
+
msgstr ""
|
415 |
+
"Paramétrer le message qui apparaît lorsque le contact est déjà présent dans "
|
416 |
+
"votre base de données"
|
417 |
+
|
418 |
+
#: ../page/page-form.php:515
|
419 |
+
msgid "Invalid email address"
|
420 |
+
msgstr "Adresse email invalide"
|
421 |
+
|
422 |
+
#: ../page/page-form.php:520
|
423 |
+
msgid "Invalid email address"
|
424 |
+
msgstr "Adresse email invalide"
|
425 |
+
|
426 |
+
#: ../page/page-form.php:520
|
427 |
+
msgid ""
|
428 |
+
"Set up the message that will appear when the email address used to sign up "
|
429 |
+
"is not valid"
|
430 |
+
msgstr ""
|
431 |
+
"Paramétrer le message qui apparaît lorsque l'adresse utilisée pour "
|
432 |
+
"l'inscription n'est pas valide"
|
433 |
+
|
434 |
+
#: ../page/page-form.php:553
|
435 |
+
msgid ""
|
436 |
+
"Sorry, you selected invalid form ID. Please check again if the ID is right"
|
437 |
+
msgstr ""
|
438 |
+
"Désolé, l'ID de fomulaire sélectionné n'est pas valide. Veuillez vérifier la "
|
439 |
+
"validité de l'ID"
|
440 |
+
|
441 |
+
#: ../page/page-home.php:40
|
442 |
+
msgid "Home"
|
443 |
+
msgstr "Page d'accueil"
|
444 |
+
|
445 |
+
#: ../page/page-home.php:112 ../page/page-home.php:130
|
446 |
+
msgid "Step"
|
447 |
+
msgstr "Etape"
|
448 |
+
|
449 |
+
#: ../page/page-home.php:112
|
450 |
+
msgid "Create a Sendinblue Account"
|
451 |
+
msgstr "Créer un compte Sendinblue"
|
452 |
+
|
453 |
+
#: ../page/page-home.php:116
|
454 |
+
msgid "By creating a free Sendinblue account, you will be able to send confirmation emails and:"
|
455 |
+
msgstr "En créant un compte gratuit Sendinblue, vous pourrez envoyer vos emails de confirmations d'inscription et :"
|
456 |
+
|
457 |
+
#: ../page/page-home.php:118
|
458 |
+
msgid "Collect your contacts and upload your lists"
|
459 |
+
msgstr "Collecter vos contacts et importer vos listes"
|
460 |
+
|
461 |
+
#: ../page/page-home.php:119
|
462 |
+
msgid "Use Sendinblue SMTP to send your transactional emails"
|
463 |
+
msgstr "Utiliser le SMTP Sendinblue pour vos emails transactionnels"
|
464 |
+
|
465 |
+
#: ../page/page-home.php:120
|
466 |
+
msgid "Email marketing builders"
|
467 |
+
msgstr "Editeurs d'Email Marketing"
|
468 |
+
|
469 |
+
#: ../page/page-home.php:121
|
470 |
+
msgid "Create and schedule your email marketing campaigns"
|
471 |
+
msgstr "Créer et programmer vos campagnes d'email marketing"
|
472 |
+
|
473 |
+
#: ../page/page-home.php:122
|
474 |
+
msgid "Try all of"
|
475 |
+
msgstr "Essayer toutes les"
|
476 |
+
|
477 |
+
#: ../page/page-home.php:122
|
478 |
+
msgid "Sendinblue's features"
|
479 |
+
msgstr "fonctionnalités de Sendinblue"
|
480 |
+
|
481 |
+
#: ../page/page-home.php:124
|
482 |
+
msgid "Create an account"
|
483 |
+
msgstr "Créer un compte"
|
484 |
+
|
485 |
+
#: ../page/page-home.php:130
|
486 |
+
msgid "Activate your account with your API key v3"
|
487 |
+
msgstr "Activez votre compte avec votre clé API v3"
|
488 |
+
|
489 |
+
#: ../page/page-home.php:134
|
490 |
+
msgid "You successfully activate your account."
|
491 |
+
msgstr "Voter compte a bien été activé"
|
492 |
+
|
493 |
+
#: ../page/page-home.php:135 ../page/page-home.php:138
|
494 |
+
msgid "Please input a valid API v3 key."
|
495 |
+
msgstr "Merci de rentrer des clés valides"
|
496 |
+
|
497 |
+
#: ../page/page-home.php:136
|
498 |
+
msgid "Please install curl on site to use sendinblue plugin."
|
499 |
+
msgstr "S'il vous plaît installer CURL sur le serveur"
|
500 |
+
|
501 |
+
#: ../page/page-home.php:137
|
502 |
+
msgid "Curl error."
|
503 |
+
msgstr "Erreur Curl."
|
504 |
+
|
505 |
+
#: ../page/page-home.php:140
|
506 |
+
msgid "Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox."
|
507 |
+
msgstr "Une fois votre compte Sendinblue créé, activez ce plugin pour envoyer tous vos emails transactionnels avec Sendinblue SMTP afin d'optimiser la délivrabilité de vos emails."
|
508 |
+
|
509 |
+
#: ../page/page-home.php:141
|
510 |
+
msgid "To activate your plugin, enter your API Access key."
|
511 |
+
msgstr "Pour activer ce plugin, entrez votre clé API d'accès. "
|
512 |
+
|
513 |
+
#: ../page/page-home.php:144
|
514 |
+
msgid "Get your API key from your account"
|
515 |
+
msgstr "Obtenez la clé API de votre compte"
|
516 |
+
|
517 |
+
#: ../page/page-home.php:148
|
518 |
+
msgid "Access Key"
|
519 |
+
msgstr "Clé d'accès"
|
520 |
+
|
521 |
+
#: ../page/page-home.php:149
|
522 |
+
msgid "Login"
|
523 |
+
msgstr "Se connecter"
|
524 |
+
|
525 |
+
#: ../page/page-home.php:195
|
526 |
+
msgid "My Account"
|
527 |
+
msgstr "Mon Compte"
|
528 |
+
|
529 |
+
#: ../page/page-home.php:198
|
530 |
+
msgid "You are currently logged in as : "
|
531 |
+
msgstr "Vous êtes actuellement connecté comme : "
|
532 |
+
|
533 |
+
#: ../page/page-home.php:206
|
534 |
+
msgid "credits"
|
535 |
+
msgstr "crédits"
|
536 |
+
|
537 |
+
#: ../page/page-home.php:209
|
538 |
+
msgid "Log out"
|
539 |
+
msgstr "Se déconnecter"
|
540 |
+
|
541 |
+
#: ../page/page-home.php:213
|
542 |
+
msgid "Contacts"
|
543 |
+
msgstr "Contacts"
|
544 |
+
|
545 |
+
#: ../page/page-home.php:216
|
546 |
+
msgid "You have"
|
547 |
+
msgstr "Vous avez"
|
548 |
+
|
549 |
+
#: ../page/page-home.php:216
|
550 |
+
msgid "contacts."
|
551 |
+
msgstr "contacts."
|
552 |
+
|
553 |
+
#: ../page/page-home.php:217
|
554 |
+
msgid "Access to the list of all my contacts"
|
555 |
+
msgstr "Accéder à la liste de tous mes contacts"
|
556 |
+
|
557 |
+
#: ../page/page-home.php:225
|
558 |
+
msgid "Email Campaigns"
|
559 |
+
msgstr "Campagnes Email"
|
560 |
+
|
561 |
+
#: ../page/page-home.php:231 ../page/page-home.php:257
|
562 |
+
#: ../page/page-home.php:283
|
563 |
+
msgid "Sent"
|
564 |
+
msgstr "Envoyées"
|
565 |
+
|
566 |
+
#: ../page/page-home.php:236 ../page/page-home.php:262
|
567 |
+
#: ../page/page-home.php:288
|
568 |
+
msgid "Draft"
|
569 |
+
msgstr "Brouillons"
|
570 |
+
|
571 |
+
#: ../page/page-home.php:241 ../page/page-home.php:267
|
572 |
+
#: ../page/page-home.php:293
|
573 |
+
msgid "Scheduled"
|
574 |
+
msgstr "Programmées"
|
575 |
+
|
576 |
+
#: ../page/page-home.php:244
|
577 |
+
msgid "Create new email campaign"
|
578 |
+
msgstr "Créer une nouvelle campagne email"
|
579 |
+
|
580 |
+
#: ../page/page-home.php:251
|
581 |
+
msgid "SMS Campaigns"
|
582 |
+
msgstr "Campagnes SMS"
|
583 |
+
|
584 |
+
#: ../page/page-home.php:270
|
585 |
+
msgid "Create new sms campaign"
|
586 |
+
msgstr "Créer une nouvelle campagne SMS"
|
587 |
+
|
588 |
+
#: ../page/page-home.php:277
|
589 |
+
msgid "Trigger Marketing"
|
590 |
+
msgstr "Trigger Marketing"
|
591 |
+
|
592 |
+
#: ../page/page-home.php:296
|
593 |
+
msgid "Create new trigger campaign"
|
594 |
+
msgstr "Créer une nouvelle campagne de trigger "
|
595 |
+
|
596 |
+
#: ../page/page-home.php:306
|
597 |
+
msgid "Transactional emails"
|
598 |
+
msgstr "Emails transactionnels"
|
599 |
+
|
600 |
+
#: ../page/page-home.php:312
|
601 |
+
msgid ""
|
602 |
+
"Unfortunately, your \"Transactional emails\" are not activated because your "
|
603 |
+
"Sendinblue SMTP account is not active. Please send an email to "
|
604 |
+
"contact@sendinblue.com in order to ask for SMTP account activation"
|
605 |
+
msgstr ""
|
606 |
+
"Malheureusement, vous ne pouvez pas activer \"Emails transactionnels\" parce "
|
607 |
+
"que votre compte SMTP Sendinblue n'a pas été validé. Merci d'envoyer un "
|
608 |
+
"email à contact@sendinblue.com afin de demander l'activation de votre compte "
|
609 |
+
"SMTP"
|
610 |
+
|
611 |
+
#: ../page/page-home.php:316
|
612 |
+
msgid "Mail Sent."
|
613 |
+
msgstr "Email envoyé"
|
614 |
+
|
615 |
+
#: ../page/page-home.php:317
|
616 |
+
msgid "Please input valid email."
|
617 |
+
msgstr "Insérer une adresse valide"
|
618 |
+
|
619 |
+
#: ../page/page-home.php:319
|
620 |
+
msgid "Activate email through Sendinblue"
|
621 |
+
msgstr "Activer les emails avec Sendinblue "
|
622 |
+
|
623 |
+
#: ../page/page-home.php:329
|
624 |
+
msgid ""
|
625 |
+
"Choose \"Yes\" if you want to use Sendinblue SMTP to send transactional "
|
626 |
+
"emails"
|
627 |
+
msgstr ""
|
628 |
+
"Choisir \"Oui\" pour utiliser SMTP Sendinblue pour envoyer vos emails "
|
629 |
+
"transactionnels"
|
630 |
+
|
631 |
+
#: ../page/page-home.php:338
|
632 |
+
msgid "Choose your sender"
|
633 |
+
msgstr "Choisissez votre expéditeur"
|
634 |
+
|
635 |
+
#: ../page/page-home.php:349
|
636 |
+
msgid "Create a new sender"
|
637 |
+
msgstr "Créez un nouvel expéditeur"
|
638 |
+
|
639 |
+
#: ../page/page-home.php:353
|
640 |
+
msgid "Enter email to send a test"
|
641 |
+
msgstr "Entrer une adresse email pour envoyer un test"
|
642 |
+
|
643 |
+
#: ../page/page-home.php:356
|
644 |
+
msgid "Send email"
|
645 |
+
msgstr "Envoyer l'email"
|
646 |
+
|
647 |
+
#: ../page/page-home.php:359
|
648 |
+
msgid "Select here the email address you want to send a test email to."
|
649 |
+
msgstr ""
|
650 |
+
"Sélectionner ici l'adresse email à qui vous souhaitez envoyer un email de "
|
651 |
+
"test"
|
652 |
+
|
653 |
+
#: ../page/page-home.php:368
|
654 |
+
msgid "Automation"
|
655 |
+
msgstr "Automation"
|
656 |
+
|
657 |
+
#: ../page/page-home.php:371
|
658 |
+
msgid "Your Marketing Automation script is installed correctly."
|
659 |
+
msgstr "Le script Marketing Automation a été installé avec succès."
|
660 |
+
|
661 |
+
#: ../page/page-home.php:372
|
662 |
+
msgid "Your Marketing Automation script has been uninstalled"
|
663 |
+
msgstr "Le script Marketing Automation a été désinstallé"
|
664 |
+
|
665 |
+
#: ../page/page-home.php:373
|
666 |
+
msgid ""
|
667 |
+
"To activate Marketing Automation (beta), please go to your Sendinblue's "
|
668 |
+
"account or contact us at contact@sendinblue.com"
|
669 |
+
msgstr ""
|
670 |
+
"Pour activer Marketing Automation (beta), veuillez vous connecter à votre "
|
671 |
+
"compte Sendinblue ou contactez-nous à contact@sendinblue.com"
|
672 |
+
|
673 |
+
#: ../page/page-home.php:374
|
674 |
+
msgid ""
|
675 |
+
"Your Marketing Automation script will be uninstalled, you won't have access "
|
676 |
+
"to any Marketing Automation data and workflows"
|
677 |
+
msgstr ""
|
678 |
+
"Le script Marketing Automation va etre désinstallé. Vous n'aurez plus accès "
|
679 |
+
"aux données Marketing Automation et aux scénarios."
|
680 |
+
|
681 |
+
#: ../page/page-home.php:376
|
682 |
+
msgid "Activate Marketing Automation through Sendinblue"
|
683 |
+
msgstr "Activer Marketing Automation via Sendinblue"
|
684 |
+
|
685 |
+
#: ../page/page-home.php:383
|
686 |
+
msgid ""
|
687 |
+
"Choose \"Yes\" if you want to use Sendinblue Automation to track your "
|
688 |
+
"website activity"
|
689 |
+
msgstr ""
|
690 |
+
"Choisissez \"Oui\" si vous souhaitez utiliser Sendinblue Automation "
|
691 |
+
"poursuivre l'activité de votre site web"
|
692 |
+
|
693 |
+
#: ../page/page-home.php:387
|
694 |
+
#, php-format
|
695 |
+
msgid "%s Explore our resource %s to learn more about Sendinblue Automation"
|
696 |
+
msgstr ""
|
697 |
+
"%s Explorez nos resources %s pour en savoir plus sur l'Automation Sendinblue"
|
698 |
+
|
699 |
+
#: ../page/page-home.php:407
|
700 |
+
msgid "About Sendinblue"
|
701 |
+
msgstr "A propos de Sendinblue"
|
702 |
+
|
703 |
+
#: ../page/page-home.php:409
|
704 |
+
msgid "Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages."
|
705 |
+
msgstr "Sendinblue est une plateforme tout-en-un qui permet de gérer votre marketing relationnel : gérez de manière simple et efficace vos campagnes marketing, SMS et emails transactionnels."
|
706 |
+
|
707 |
+
#: ../page/page-home.php:412
|
708 |
+
msgid "Who we are"
|
709 |
+
msgstr "Qui sommes nous"
|
710 |
+
|
711 |
+
#: ../page/page-home.php:415
|
712 |
+
msgid "Pricing"
|
713 |
+
msgstr "Tarifs"
|
714 |
+
|
715 |
+
#: ../page/page-home.php:418
|
716 |
+
msgid "Features"
|
717 |
+
msgstr "Fonctionnalités"
|
718 |
+
|
719 |
+
#: ../page/page-home.php:425
|
720 |
+
msgid "Need Help?"
|
721 |
+
msgstr "Besoin d'aide ?"
|
722 |
+
|
723 |
+
#: ../page/page-home.php:427
|
724 |
+
msgid "Do you have a question or need more information?"
|
725 |
+
msgstr "Vous avez une question, ou avez besoin de plus d'information ?"
|
726 |
+
|
727 |
+
#: ../page/page-home.php:429
|
728 |
+
msgid "Tutorials"
|
729 |
+
msgstr "Tutoriels"
|
730 |
+
|
731 |
+
#: ../page/page-home.php:430
|
732 |
+
msgid "FAQ"
|
733 |
+
msgstr "FAQ"
|
734 |
+
|
735 |
+
#: ../page/page-home.php:433
|
736 |
+
msgid ""
|
737 |
+
"Please click on below link if you can't see updated setting on Sendinblue."
|
738 |
+
msgstr ""
|
739 |
+
"Veuillez cliquez sur le lien ci-dessous si vous ne voyez pas vos settings "
|
740 |
+
"mis à jour sur Sendinblue"
|
741 |
+
|
742 |
+
#: ../page/page-home.php:434
|
743 |
+
msgid "Sync"
|
744 |
+
msgstr "Sync"
|
745 |
+
|
746 |
+
#: ../page/page-home.php:440
|
747 |
+
msgid "You like this plugin? Let everybody knows and review it"
|
748 |
+
msgstr "Vous aimez ce plugin ? Faites-le savoir et notez le"
|
749 |
+
|
750 |
+
#: ../page/page-home.php:442
|
751 |
+
msgid "Review this plugin"
|
752 |
+
msgstr "Noter ce plugin"
|
753 |
+
|
754 |
+
#: ../page/page-home.php:469
|
755 |
+
msgid ""
|
756 |
+
"You are currently not logged in. Create an account or log in to benefit from "
|
757 |
+
"all of Sendinblue's features an your Wordpress site."
|
758 |
+
msgstr ""
|
759 |
+
"Vous n'êtes actuellement pas connecté. Créez un compte ou connectez vous "
|
760 |
+
"pour bénéficier de toutes les fonctionnalités de Sendinblue pour votre site "
|
761 |
+
"Wordpress"
|
762 |
+
|
763 |
+
#: ../page/page-home.php:472
|
764 |
+
msgid "Collect and manage your contacts"
|
765 |
+
msgstr "Collectez et gérez vos contacts"
|
766 |
+
|
767 |
+
#: ../page/page-home.php:473
|
768 |
+
msgid "Send transactional emails via SMTP or API"
|
769 |
+
msgstr "Envoyer des emails transactionnels via SMTP ou API"
|
770 |
+
|
771 |
+
#: ../page/page-home.php:474
|
772 |
+
msgid "Real time statistics and email tracking"
|
773 |
+
msgstr "Statistiques en temps réel et tracking des emails"
|
774 |
+
|
775 |
+
#: ../page/page-home.php:475
|
776 |
+
msgid "Edit and send email marketing"
|
777 |
+
msgstr "Editer et envoyer des emails marketings"
|
778 |
+
|
779 |
+
#: ../page/page-home.php:479
|
780 |
+
msgid "Have an account?"
|
781 |
+
msgstr "Vous avez un compte ?"
|
782 |
+
|
783 |
+
#: ../page/page-home.php:482
|
784 |
+
msgid "Free Subscribe Now"
|
785 |
+
msgstr "S'inscrire gratuitement"
|
786 |
+
|
787 |
+
#: ../page/page-home.php:609
|
788 |
+
msgid "[Sendinblue SMTP] test email"
|
789 |
+
msgstr "email de test [Sendinblue SMTP]"
|
790 |
+
|
791 |
+
#: ../page/page-lists.php:39
|
792 |
+
msgid "Lists"
|
793 |
+
msgstr "Listes"
|
794 |
+
|
795 |
+
#: ../page/page-scenarios.php:39
|
796 |
+
msgid "Workflows"
|
797 |
+
msgstr "Scenarios"
|
798 |
+
|
799 |
+
#: ../page/page-scenarios.php:121
|
800 |
+
msgid "Create your workflow"
|
801 |
+
msgstr "Créez votre scénario"
|
802 |
+
|
803 |
+
#: ../page/page-scenarios.php:126
|
804 |
+
msgid "Custom workflow"
|
805 |
+
msgstr "Scénario pérsonnalisé"
|
806 |
+
|
807 |
+
#: ../page/page-scenarios.php:130
|
808 |
+
msgid ""
|
809 |
+
"Mix and match triggers, conditions, and actions to create a custom workflow."
|
810 |
+
msgstr ""
|
811 |
+
"Mélangez les triggers, conditions et actions pour créer un scénario "
|
812 |
+
"personnalisé"
|
813 |
+
|
814 |
+
#: ../page/page-scenarios.php:137
|
815 |
+
msgid "Welcome Message"
|
816 |
+
msgstr "Message de Bienvenue"
|
817 |
+
|
818 |
+
#: ../page/page-scenarios.php:141
|
819 |
+
msgid "Send a welcome email after a subscriber joins your list."
|
820 |
+
msgstr ""
|
821 |
+
"Envoyez un message de bienvenue après qu'un contact ait rejoint votre liste"
|
822 |
+
|
823 |
+
#: ../page/page-scenarios.php:148
|
824 |
+
msgid "Anniversary Date"
|
825 |
+
msgstr "Date d'anniversaire"
|
826 |
+
|
827 |
+
#: ../page/page-scenarios.php:152
|
828 |
+
msgid ""
|
829 |
+
"Send an annual email or series of emails based on a special event or "
|
830 |
+
"birthday."
|
831 |
+
msgstr ""
|
832 |
+
"Envoyez un email annuel ou une série d'email basé sur un évènement spécial "
|
833 |
+
"ouun anniversaire."
|
834 |
+
|
835 |
+
#: ../page/page-scenarios.php:159
|
836 |
+
msgid "Page Visit"
|
837 |
+
msgstr "Visite de Page"
|
838 |
+
|
839 |
+
#: ../page/page-scenarios.php:163
|
840 |
+
msgid "Send emails after a contact visits a specific page on your website."
|
841 |
+
msgstr ""
|
842 |
+
"Envoyez des emails après qu'un contact ait visité une page spécifique sur "
|
843 |
+
"votre site web"
|
844 |
+
|
845 |
+
#: ../page/page-scenarios.php:170
|
846 |
+
msgid "Website Event"
|
847 |
+
msgstr "Evènement du site"
|
848 |
+
|
849 |
+
#: ../page/page-scenarios.php:174
|
850 |
+
msgid "Send emails after a contact performs a specific action on your website."
|
851 |
+
msgstr ""
|
852 |
+
"Envoyez des email après qu'un contact ait fait une action spécifique sur "
|
853 |
+
"votre site web"
|
854 |
+
|
855 |
+
#: ../page/page-scenarios.php:181
|
856 |
+
msgid "Product Purchase"
|
857 |
+
msgstr "Achat de produit"
|
858 |
+
|
859 |
+
#: ../page/page-scenarios.php:185
|
860 |
+
msgid "Send emails when a product is purchased on your website."
|
861 |
+
msgstr "Envoyez des emails lors de l'achat d'un produit sur votre webstore"
|
862 |
+
|
863 |
+
#: ../page/page-scenarios.php:192
|
864 |
+
msgid "Marketing Activity"
|
865 |
+
msgstr "Activité Marketing"
|
866 |
+
|
867 |
+
#: ../page/page-scenarios.php:196
|
868 |
+
msgid ""
|
869 |
+
"Send emails based on whether contacts open or click on an email campaign."
|
870 |
+
msgstr ""
|
871 |
+
"Envoyez un email basé sur les actions ouverture/clic d'une campagne email"
|
872 |
+
|
873 |
+
#: ../page/page-scenarios.php:203
|
874 |
+
msgid "Transactional Activity"
|
875 |
+
msgstr "Activité transactionnelle"
|
876 |
+
|
877 |
+
#: ../page/page-scenarios.php:207
|
878 |
+
msgid ""
|
879 |
+
"Send an email based whether contacts open or click on transactional emails."
|
880 |
+
msgstr ""
|
881 |
+
"Envoyer un email basé sur les actions d'ouverture/click de vos emails "
|
882 |
+
"transactionnels."
|
883 |
+
|
884 |
+
#: ../page/page-scenarios.php:214
|
885 |
+
msgid "View my existing workflows"
|
886 |
+
msgstr "Voir mes scénarios existants"
|
887 |
+
|
888 |
+
#: ../page/page-scenarios.php:217
|
889 |
+
msgid "View logs"
|
890 |
+
msgstr "Voir les logs"
|
891 |
+
|
892 |
+
#: ../page/page-statistics.php:39
|
893 |
+
msgid "Statistics"
|
894 |
+
msgstr "Statistiques"
|
895 |
+
|
896 |
+
#: ../sendinblue.php:767
|
897 |
+
msgid ""
|
898 |
+
"You cannot to use Sendinblue SMTP now because wp_mail has been declared by "
|
899 |
+
"another process or plugin. "
|
900 |
+
msgstr ""
|
901 |
+
"Vous ne pouvez pas utilisez le SMTP Sendinblue car wp_mail a été déclaré par "
|
902 |
+
"un autre process ou plugin"
|
903 |
+
|
904 |
+
#: ../widget/widget_form.php:31
|
905 |
+
msgid "Sendinblue Newsletter"
|
906 |
+
msgstr "Newsletter Sendinblue"
|
907 |
+
|
908 |
+
#: ../widget/widget_form.php:43
|
909 |
+
msgid "Widget Title"
|
910 |
+
msgstr "Titre du Widget"
|
911 |
+
|
912 |
+
#: ../widget/widget_form.php:49
|
913 |
+
msgid "Form to use"
|
914 |
+
msgstr "Formulaire à utiliser"
|
915 |
+
|
916 |
+
#: ../page/page-form.php:299
|
917 |
+
msgid "Add Captcha"
|
918 |
+
msgstr "Ajouter un Captcha"
|
919 |
+
|
920 |
+
#: ../page/page-form.php:300
|
921 |
+
msgid "We are using Google reCaptcha for this form. To use Google reCaptcha on this form, you should input site key and secret key."
|
922 |
+
msgstr "Pour activer le Google reCaptcha pour ce formulaire, veuillez compléter votre clé de site et votre clé secrète."
|
923 |
+
|
924 |
+
#: ../page/page-form.php:307
|
925 |
+
msgid "Site Key"
|
926 |
+
msgstr "Clé Site"
|
927 |
+
|
928 |
+
#: ../page/page-form.php:318
|
929 |
+
msgid "Secret Key"
|
930 |
+
msgstr "Clé Secrète"
|
931 |
+
|
932 |
+
#: ../page/page-form.php:338
|
933 |
+
msgid "Add a Term acceptance checkbox"
|
934 |
+
msgstr "Ajouter une Checkbox pour l'acceptation des CGU"
|
935 |
+
|
936 |
+
#: ../page/page-form.php:339
|
937 |
+
msgid ""
|
938 |
+
"If the terms and condition checkbox is added to the form, the field "
|
939 |
+
"will be mandatory for subscription."
|
940 |
+
msgstr ""
|
941 |
+
"si la checkbox des conditions d'utilisation est ajoutée, elle sera "
|
942 |
+
"obligatoire pour la souscription du contact"
|
943 |
+
|
944 |
+
#: ../page/page-form.php:346
|
945 |
+
msgid "URL to terms and conditions"
|
946 |
+
msgstr "URL de consultation des CGU"
|
947 |
+
|
948 |
+
#: ../page/page-form.php:361
|
949 |
+
msgid "Add Terms URL"
|
950 |
+
msgstr "Ajouter l'URL de consultation des CGU"
|
951 |
+
|
952 |
+
#: ../page/page-form.php:123
|
953 |
+
msgid "Note: Forms created in Sendinblue plugin for WordPress won't be displayed in Forms section in Sendinblue application"
|
954 |
+
msgstr "Note : Les formulaires créés avec le plugin Sendinblue pour Wordpress ne seront pas présents sur la page Formulaires de votre compte Sendinblue"
|
955 |
+
|
956 |
+
#: ../page/page-home.php:464
|
957 |
+
msgid "Let everyone know you like this plugin through a review!"
|
958 |
+
msgstr "Partagez votre avis sur le plugin en laissant un commentaire !"
|
959 |
+
|
960 |
+
#: ../page/page-home.php:389
|
961 |
+
msgid "Activate"
|
962 |
+
msgstr "Activer"
|
963 |
+
|
964 |
+
#: ../page/page-home.php:438
|
965 |
+
msgid "Recommend this plugin"
|
966 |
+
msgstr "Recommander ce plugin"
|
967 |
+
|
968 |
+
#: ../page/page-home.php:466
|
969 |
+
msgid "Recommend the Sendinblue plugin"
|
970 |
+
msgstr "Recommander le plugin Sendinblue"
|
971 |
+
|
972 |
+
#: ../sendinblue.php:311
|
973 |
+
msgid "Please fill out valid email address"
|
974 |
+
msgstr "Veuillez entrer une adresse e-mail valide."
|
975 |
+
|
976 |
+
#: ../sendinblue.php:312
|
977 |
+
msgid "Please fill out required fields"
|
978 |
+
msgstr "Veuillez compléter les champs obligatoires."
|
979 |
+
|
980 |
+
#: ../sendinblue.php:313
|
981 |
+
msgid "Please fill out valid date format"
|
982 |
+
msgstr "Veuillez entrer une date valide."
|
983 |
+
|
984 |
+
#: ../page/page-form.php:122
|
985 |
+
msgid "You are about to change the language"
|
986 |
+
msgstr "Vous êtes sur le point de changer de langue."
|
987 |
+
|
988 |
+
#: ../page/page-form.php:125
|
989 |
+
msgid "Please make sure that you've saved all the changes. We will have to reload the page."
|
990 |
+
msgstr "Veuillez vous assurer que vos modifications ont bien été enregistrées. La page sera rechargée."
|
991 |
+
|
992 |
+
#: ../page/page-form.php:126
|
993 |
+
msgid "Do you want to continue?"
|
994 |
+
msgstr "Voulez-vous continuer ?"
|
995 |
+
|
996 |
+
#: ../sendinblue.php:1000
|
997 |
+
msgid "Copy content from origin form"
|
998 |
+
msgstr "Copier le contenu du formulaire original"
|
999 |
+
|
1000 |
+
#: ../sendinblue.php:1000
|
1001 |
+
msgid "You can copy contents from origin form. You need to translate the contents by this language."
|
1002 |
+
msgstr "Vous pouvez copier le contenu du formulaire original. Vous devrez le traduire dans cette nouvelle langue."
|
1003 |
+
|
1004 |
+
#: ../page/page-form.php:616
|
1005 |
+
msgid "Select final confirmation email template"
|
1006 |
+
msgstr "Veuillez sélectionner l'email de confirmation finale"
|
1007 |
+
|
1008 |
+
#: ../page/page-form.php:618
|
1009 |
+
msgid ""
|
1010 |
+
"This is the final confirmation email your contacts will receive once they click on the double opt-in confirmation link."
|
1011 |
+
"You can select one of the default templates we have created for you, e.g. 'Default template - Final confirmation'."
|
1012 |
+
"For your information, you cannot select a template with the tag [DOUBLEOPTIN]."
|
1013 |
+
msgstr ""
|
1014 |
+
"Cecli est l'email de confirmation finale que vos contacts recevront lorsqu'ils auront cliqué sur le lien de confirmation double opt-in."
|
1015 |
+
"Vous pouvez sélectionner l'un des templates par défaut que nous avons générés pour vous. Par exemple 'Default template - Final confirmation'."
|
1016 |
+
"Pour information, vous ne pouvez pas sélectionner un template contenant le tag [DOUBLEOPTIN]."
|
1017 |
+
|
1018 |
+
#: ../page/page-form.php:618
|
1019 |
+
msgid "Final confirmation"
|
1020 |
+
msgstr "Confirmation finale"
|
1021 |
+
|
1022 |
+
#: ../page/page-form.php:343
|
1023 |
+
msgid "Add Multi-List Subscription"
|
1024 |
+
msgstr "Ajouter une inscription multi-liste"
|
1025 |
+
|
1026 |
+
#: ../page/page-form.php:344
|
1027 |
+
msgid "Enable your contacts to subscribe to content based on specific interests or preferences. Create a contact list for each interest and allow them to subscribe using this field"
|
1028 |
+
msgstr "Donner la possibilité à vos contacts de s’abonner au contenu selon leurs préférences et leurs centres d’intérêt. Pour se faire, créer une liste pour chaque centre d’intérêt et inviter votre contact à s’y abonner en utilisant ce champ"
|
1029 |
+
|
1030 |
+
#: ../page/page-form.php:350
|
1031 |
+
msgid "Please select the lists"
|
1032 |
+
msgstr "Veuillez sélectionner une ou plusieurs listes"
|
1033 |
+
|
1034 |
+
#: ../page/page-form.php:390
|
1035 |
+
msgid "Compliance Note"
|
1036 |
+
msgstr "Note de conformité"
|
1037 |
+
|
1038 |
+
#: ../page/page-form.php:391
|
1039 |
+
msgid "Add compliance note"
|
1040 |
+
msgstr "Ajouter une note de conformité"
|
1041 |
+
|
1042 |
+
#: ../page/page-form.php:391
|
1043 |
+
msgid "Create GDPR-compliant subscription forms for collecting email addresses."
|
1044 |
+
msgstr "Créer un formulaire d’inscription pour collecter les adresses emails conformément à la loi RGPD"
|
1045 |
+
|
1046 |
+
#: ../page/page-form.php:406
|
1047 |
+
msgid "Reset to Default"
|
1048 |
+
msgstr "Charger le formulaire par défaut"
|
1049 |
+
|
1050 |
+
#: ../page/page-form.php:50
|
1051 |
+
msgid "Your e-mail address is only used to send you our newsletter and information about the activities of %s. You can always use the unsubscribe link included in the newsletter."
|
1052 |
+
msgstr "Votre adresse email est utilisée uniquement pour vous envoyer notre newsletter ainsi que les activités concernant %s. Vous pouvez toujours vous désinscrire en cliquant sur le lien de désinscription se trouvant dans la newsletter."
|
1053 |
+
|
1054 |
+
msgid "Settings"
|
1055 |
+
msgstr "Paramètres"
|
1056 |
+
|
1057 |
+
msgid ""
|
1058 |
+
"Confirmation emails will be sent through your own email server, but you "
|
1059 |
+
"have no guarantees on their deliverability. <br/> <a href=\"https://app-"
|
1060 |
+
"smtp.sendinblue.com\" target=\"_blank\">Click here</a> to send your "
|
1061 |
+
"emails through Sendinblue in order to improve your deliverability and get "
|
1062 |
+
"statistics"
|
1063 |
+
msgstr ""
|
1064 |
+
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1065 |
+
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. <br/"
|
1066 |
+
"> Pour améliorer la délivrabilité et obtenir des statistiques, activez "
|
1067 |
+
"l'envoi des emails via le serveur SMTP de Sendinblue en <a href=\"https://"
|
1068 |
+
"app-smtp.sendinblue.com\" target=\"_blank\">cliquant ici</a>"
|
1069 |
+
|
1070 |
+
msgid "Sign up"
|
1071 |
+
msgstr "S'inscrire"
|
1072 |
+
|
1073 |
+
msgid "Wrap in Paragraph (<p>) tags ?"
|
1074 |
+
msgstr "Entourer de balise <p> ?"
|
1075 |
+
|
1076 |
+
msgid "Display"
|
1077 |
+
msgstr "Afficher"
|
1078 |
+
|
1079 |
+
msgid "Input"
|
1080 |
+
msgstr "Saisir"
|
1081 |
+
|
1082 |
+
msgid "List"
|
1083 |
+
msgstr "Liste"
|
1084 |
+
|
1085 |
+
msgid ""
|
1086 |
+
"Unfortunately, you wannot activate \"Transactional emails\" because your "
|
1087 |
+
"Sendinblue SMTP account is not valid. Please send an email to "
|
1088 |
+
"contact@sendinblue.com in order to ask for SMTP account activation"
|
1089 |
+
msgstr ""
|
1090 |
+
"Malheureusement, vous ne pouvez pas activer \"Emails transactionnels\" "
|
1091 |
+
"parce que votre compte SMTP Sendinblue n'a pas été validé. Merci "
|
1092 |
+
"d'envoyer un email à contact@sendinblue.com afin de demander l'activation "
|
1093 |
+
"de votre compte SMTP"
|
1094 |
+
|
1095 |
+
msgid "Sendinblue merge fields"
|
1096 |
+
msgstr "Champs synchronisé avec Sendinblue"
|
1097 |
+
|
1098 |
+
msgid "Double Optin"
|
1099 |
+
msgstr "Double Optin"
|
1100 |
+
|
1101 |
+
msgid ""
|
1102 |
+
"The template you selected does not include a link [DOUBLEOPTIN] to allow "
|
1103 |
+
"subscribers to confirm their subscription. Please edit the template to "
|
1104 |
+
"include a link with [DOUBLEOPTIN] as URL."
|
1105 |
+
msgstr ""
|
1106 |
+
"Le template choisi ne contient pas de lien [DOUBLEOPTIN] qui permet aux "
|
1107 |
+
"inscrits de confirmer leur inscription. Vous devez modifier votre "
|
1108 |
+
"template pour inclure le shortcode [DOUBLEOPTIN] à la place d'une URL "
|
1109 |
+
"avant de pouvoir le choisir."
|
1110 |
+
|
1111 |
+
msgid "Close"
|
1112 |
+
msgstr "Fermer"
|
1113 |
+
|
1114 |
+
msgid "Confirmation email"
|
1115 |
+
msgstr "Les emails de confirmation"
|
1116 |
+
|
1117 |
+
msgid ""
|
1118 |
+
"Confirmation emails will be sent through your own email server, but you "
|
1119 |
+
"have no guarantees on their deliverability. <a href=\"https://app-smtp."
|
1120 |
+
"sendinblue.com\" target=\"_blank\">Click here</a> to send your emails "
|
1121 |
+
"through Sendinblue in order to improve your deliverability and get "
|
1122 |
+
"statistics"
|
1123 |
+
msgstr ""
|
1124 |
+
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1125 |
+
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. Pour "
|
1126 |
+
"améliorer la délivrabilité et obtenir des statistiques, activez l'envoi "
|
1127 |
+
"des emails via le serveur SMTP de Sendinblue en <a href=\"https://app-"
|
1128 |
+
"smtp.sendinblue.com\" target=\"_blank\">cliquant ici</a>"
|
1129 |
+
|
1130 |
+
msgid ""
|
1131 |
+
"You can choose to add a step in the confirmation process, by requiring a "
|
1132 |
+
"new suscriber to click on a link sent to the registered email adress. By "
|
1133 |
+
"doing so, he will be added to your contact"
|
1134 |
+
msgstr ""
|
1135 |
+
"Vous pouvez choisir d'ajouter une étape dans le processus d'inscription, "
|
1136 |
+
"en demandant à vos nouveaux inscrits de cliquer sur un lien envoyé à "
|
1137 |
+
"l'adresse email déclarée. Ils seront ensuite ajoutés à votre liste de "
|
1138 |
+
"contact. "
|
1139 |
+
|
1140 |
+
msgid ""
|
1141 |
+
"Confirmation emails will be sent through your own email servers. This "
|
1142 |
+
"means no guarantees on emails deliverability. If you want to improve your "
|
1143 |
+
"deliverability and get statistics,"
|
1144 |
+
msgstr ""
|
1145 |
+
"Les emails de confirmation seront envoyés par votre propre serveur email. "
|
1146 |
+
"Vous n'avez donc aucune garantie sur la délivrabilité de vos emails. Pour "
|
1147 |
+
"améliorer la délivrabilité et obtenir des statistiques, activez l'envoi "
|
1148 |
+
"des emails via le serveur SMTP de Sendinblue en"
|
1149 |
+
|
1150 |
+
msgid "click here"
|
1151 |
+
msgstr "cliquant ici"
|
1152 |
+
|
1153 |
+
msgid "Set up my senders"
|
1154 |
+
msgstr "Paramétrer mes expéditeurs"
|
1155 |
+
|
1156 |
+
msgid "To activate your plugin, enter your API Access key and Secret key."
|
1157 |
+
msgstr ""
|
1158 |
+
"Pour activer ce plugin, entrez votre clé API d'accès et votre clé API "
|
1159 |
+
"secrète"
|
1160 |
+
|
1161 |
+
msgid "Secret Key"
|
1162 |
+
msgstr "Clé secrète"
|
1163 |
+
|
1164 |
+
msgid "Choose Template"
|
1165 |
+
msgstr "Choisir un Template"
|
1166 |
+
|
1167 |
+
msgid "Choose Sender"
|
1168 |
+
msgstr "Choisir l'expéditeur"
|
1169 |
+
|
1170 |
+
msgid "And more"
|
1171 |
+
msgstr "Et bien plus"
|
1172 |
+
|
1173 |
+
msgid "Yes, subscribe me to this list."
|
1174 |
+
msgstr "Oui, je souhaite m'inscrire à cette liste"
|
1175 |
+
|
1176 |
+
msgid ""
|
1177 |
+
"If you received this email by mistake, simply delete it. You will not be "
|
1178 |
+
"subscribed to this list if you don't click the confirmation link above."
|
1179 |
+
msgstr ""
|
1180 |
+
"SI vous avez reçu cet email par erreur, merci de le supprimer. Vous ne "
|
1181 |
+
"serez pas inscrit si vous ne cliquez pas sur le lien de confirmation ci-"
|
1182 |
+
"dessus"
|
1183 |
+
|
1184 |
+
msgid "Campaign"
|
1185 |
+
msgstr "Campagne"
|
1186 |
+
|
1187 |
+
msgid "Welcome"
|
1188 |
+
msgstr "Bienvenue "
|
1189 |
+
|
1190 |
+
msgid "Get it from"
|
1191 |
+
msgstr "Obtenez les depuis"
|
1192 |
+
|
1193 |
+
msgid "your account"
|
1194 |
+
msgstr "votre compte"
|
1195 |
+
|
1196 |
+
msgid "Sendinblue API Access Key"
|
1197 |
+
msgstr "Clé API d'accès"
|
1198 |
+
|
1199 |
+
msgid "Please input Access key to activate."
|
1200 |
+
msgstr "Insérez votre clé API d'accès pour l'activation"
|
1201 |
+
|
1202 |
+
msgid "Sendinblue API Secret Key"
|
1203 |
+
msgstr "Clé API secrète"
|
1204 |
+
|
1205 |
+
msgid "My account "
|
1206 |
+
msgstr "Mon compte"
|
1207 |
+
|
1208 |
+
msgid "Users Synchronisation"
|
1209 |
+
msgstr "Synchronisation des utilisateurs"
|
1210 |
+
|
1211 |
+
msgid "You have"
|
1212 |
+
msgstr "Vous avez"
|
1213 |
+
|
1214 |
+
msgid "existing users."
|
1215 |
+
msgstr "utilisateurs existants."
|
1216 |
+
|
1217 |
+
msgid "Do you want to add them to Sendinblue?"
|
1218 |
+
msgstr "Souhaitez-vous les ajouter à Sendinblue ?"
|
1219 |
+
|
1220 |
+
msgid "Sync my users"
|
1221 |
+
msgstr "Synchroniser"
|
1222 |
+
|
1223 |
+
msgid "Sync my users"
|
1224 |
+
msgstr "Synchroniser"
|
1225 |
+
|
1226 |
+
msgid "Roles to sync"
|
1227 |
+
msgstr "Rôles à synchroniser"
|
1228 |
+
|
1229 |
+
msgid "Administrator"
|
1230 |
+
msgstr "Administrateur"
|
1231 |
+
|
1232 |
+
msgid "Author"
|
1233 |
+
msgstr "Auteur"
|
1234 |
+
|
1235 |
+
msgid "Subscriber"
|
1236 |
+
msgstr "Abonné"
|
1237 |
+
|
1238 |
+
msgid "Shop manager"
|
1239 |
+
msgstr "Gestionnaire boutique"
|
1240 |
+
|
1241 |
+
msgid "Editor"
|
1242 |
+
msgstr "Editeur"
|
1243 |
+
|
1244 |
+
msgid "Contributor"
|
1245 |
+
msgstr "Contributeur"
|
1246 |
+
|
1247 |
+
msgid "Customer"
|
1248 |
+
msgstr "Client"
|
1249 |
+
|
1250 |
+
msgid "Sync Lists"
|
1251 |
+
msgstr "Listes de synchronisation"
|
1252 |
+
|
1253 |
+
msgid "Choose the Sendinblue list in which you want to add your existing customers:"
|
1254 |
+
msgstr "Choisissez à quelle(s) liste(s) vos contacts existants seront ajoutés :"
|
1255 |
+
|
1256 |
+
msgid "Match Attributes"
|
1257 |
+
msgstr "Mapping des champs"
|
1258 |
+
|
1259 |
+
msgid "WordPress Users Attributes"
|
1260 |
+
msgstr "Attributs des utilisateurs WordPress"
|
1261 |
+
|
1262 |
+
msgid "Sendinblue Contact Attributes"
|
1263 |
+
msgstr "Attributs de contact Sendinblue"
|
1264 |
+
|
1265 |
+
msgid "You have %s existing users. Do you want to add them to Sendinblue?"
|
1266 |
+
msgstr "Vous avez %s utilisateurs existants. Souhaitez-vous les ajouter à Sendinblue ?"
|
1267 |
+
|
1268 |
+
msgid "Set up the message that will appear when the required field is empty"
|
1269 |
+
msgstr "Configurez le message qui apparaîtra lorsque le champ requis est vide"
|
1270 |
+
|
1271 |
+
msgid "Apply"
|
1272 |
+
msgstr "Appliquer"
|
1273 |
+
|
1274 |
+
msgid "Required Field"
|
1275 |
+
msgstr "Champ obligatoire"
|
1276 |
+
|
1277 |
+
msgid "Please fill out this field"
|
1278 |
+
msgstr "Remplissez ce champ s’il vous plaît"
|
1279 |
+
|
1280 |
+
msgid "Default Form"
|
1281 |
msgstr "Formulaire par défaut"
|
model/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
model/model-contacts.php
CHANGED
@@ -30,7 +30,7 @@ class SIB_Model_Contact {
|
|
30 |
global $wpdb;
|
31 |
// create list table
|
32 |
$creation_query =
|
33 |
-
'CREATE TABLE IF NOT EXISTS ' . self::TABLE_NAME . ' (
|
34 |
`id` int(20) NOT NULL AUTO_INCREMENT,
|
35 |
`email` varchar(255),
|
36 |
`info` TEXT,
|
@@ -47,18 +47,18 @@ class SIB_Model_Contact {
|
|
47 |
*/
|
48 |
public static function remove_table() {
|
49 |
global $wpdb;
|
50 |
-
$query = 'DROP TABLE IF EXISTS ' . self::TABLE_NAME . ';';
|
51 |
$wpdb->query( $query );
|
52 |
}
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$query = $wpdb->prepare('select * from ' . self::TABLE_NAME . ' where id= %d ', array(esc_sql($id)));
|
62 |
$results = $wpdb->get_results($query, ARRAY_A);
|
63 |
|
64 |
if ( is_array( $results ) ) {
|
@@ -68,12 +68,12 @@ class SIB_Model_Contact {
|
|
68 |
}
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
$query = $wpdb->prepare('select * from ' . self::TABLE_NAME . ' where code like %s', array(esc_sql($code)));
|
77 |
$results = $wpdb->get_results($query, ARRAY_A);
|
78 |
|
79 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
@@ -83,12 +83,12 @@ class SIB_Model_Contact {
|
|
83 |
}
|
84 |
}
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
$query = $wpdb->prepare('select * from ' . self::TABLE_NAME . ' where email like %s', array(esc_sql($email)));
|
92 |
$results = $wpdb->get_results($query, ARRAY_A);
|
93 |
|
94 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
@@ -107,7 +107,7 @@ class SIB_Model_Contact {
|
|
107 |
}
|
108 |
|
109 |
$query = $wpdb->prepare(
|
110 |
-
'INSERT INTO ' . self::TABLE_NAME . ' (email,info,code,is_activate,extra) VALUES (%s, %s, %s, %d, %s);',
|
111 |
array(
|
112 |
esc_sql($data['email']),
|
113 |
esc_sql($data['info']),
|
@@ -127,7 +127,7 @@ class SIB_Model_Contact {
|
|
127 |
public static function is_exist_same_email( $email, $id = '' ) {
|
128 |
global $wpdb;
|
129 |
|
130 |
-
$query = $wpdb->prepare('select * from ' . self::TABLE_NAME . ' where email like %s ', array(esc_sql($email)));
|
131 |
$results = $wpdb->get_results($query, ARRAY_A);
|
132 |
|
133 |
if ( is_array( $results ) && (count( $results ) > 0) ) {
|
@@ -150,17 +150,17 @@ class SIB_Model_Contact {
|
|
150 |
public static function remove_record( $id ) {
|
151 |
global $wpdb;
|
152 |
|
153 |
-
$query = $wpdb->prepare('delete from ' . self::TABLE_NAME . ' where id= %d ', array(esc_sql($id)));
|
154 |
-
|
155 |
-
|
156 |
|
157 |
/** Get all guests by pagenum, per_page*/
|
158 |
public static function get_all( $orderby = 'email', $order = 'asc', $pagenum = 1, $per_page = 15 ) {
|
159 |
global $wpdb;
|
160 |
|
161 |
-
|
162 |
$query = $wpdb->prepare(
|
163 |
-
'SELECT * FROM ' . self::TABLE_NAME . ' ORDER BY %s %s LIMIT %d, %d;',
|
164 |
array(
|
165 |
esc_sql($orderby),
|
166 |
esc_sql($order),
|
@@ -168,8 +168,8 @@ class SIB_Model_Contact {
|
|
168 |
esc_sql($per_page)
|
169 |
)
|
170 |
);
|
171 |
-
|
172 |
-
|
173 |
|
174 |
if ( ! is_array( $results ) ) {
|
175 |
$results = array();
|
@@ -182,7 +182,9 @@ class SIB_Model_Contact {
|
|
182 |
/** get all records of table */
|
183 |
public static function get_all_records() {
|
184 |
global $wpdb;
|
185 |
-
|
|
|
|
|
186 |
$results = $wpdb->get_results( $query, ARRAY_A );
|
187 |
|
188 |
if ( ! is_array( $results ) ) {
|
@@ -197,7 +199,7 @@ class SIB_Model_Contact {
|
|
197 |
public static function get_count_element() {
|
198 |
global $wpdb;
|
199 |
|
200 |
-
return $wpdb->get_var( 'Select count(*) from ' . self::TABLE_NAME . ';' );
|
201 |
}
|
202 |
|
203 |
/** update record */
|
@@ -208,7 +210,7 @@ class SIB_Model_Contact {
|
|
208 |
return false;
|
209 |
}
|
210 |
|
211 |
-
|
212 |
'update ' . self::TABLE_NAME . ' set email= %s, info= %s, code= %s, is_activate= %d, extra= %s where id= %d;',
|
213 |
array(
|
214 |
esc_sql($data['email']),
|
@@ -220,7 +222,7 @@ class SIB_Model_Contact {
|
|
220 |
)
|
221 |
);
|
222 |
|
223 |
-
$wpdb->query($query);
|
224 |
|
225 |
return true;
|
226 |
}
|
30 |
global $wpdb;
|
31 |
// create list table
|
32 |
$creation_query =
|
33 |
+
'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . self::TABLE_NAME . ' (
|
34 |
`id` int(20) NOT NULL AUTO_INCREMENT,
|
35 |
`email` varchar(255),
|
36 |
`info` TEXT,
|
47 |
*/
|
48 |
public static function remove_table() {
|
49 |
global $wpdb;
|
50 |
+
$query = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . self::TABLE_NAME . ';';
|
51 |
$wpdb->query( $query );
|
52 |
}
|
53 |
|
54 |
+
/**
|
55 |
+
* Get data by id
|
56 |
+
*
|
57 |
+
* @param $id
|
58 |
+
*/
|
59 |
+
public static function get_data( $id ) {
|
60 |
+
global $wpdb;
|
61 |
+
$query = $wpdb->prepare('select * from ' . $wpdb->prefix . self::TABLE_NAME . ' where id= %d ', array(esc_sql($id)));
|
62 |
$results = $wpdb->get_results($query, ARRAY_A);
|
63 |
|
64 |
if ( is_array( $results ) ) {
|
68 |
}
|
69 |
}
|
70 |
|
71 |
+
/**
|
72 |
+
* Get data by code
|
73 |
+
*/
|
74 |
+
public static function get_data_by_code( $code ) {
|
75 |
+
global $wpdb;
|
76 |
+
$query = $wpdb->prepare('select * from ' . $wpdb->prefix . self::TABLE_NAME . ' where code like %s', array(esc_sql($code)));
|
77 |
$results = $wpdb->get_results($query, ARRAY_A);
|
78 |
|
79 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
83 |
}
|
84 |
}
|
85 |
|
86 |
+
/**
|
87 |
+
* Get code by email
|
88 |
+
*/
|
89 |
+
public static function get_data_by_email( $email ) {
|
90 |
+
global $wpdb;
|
91 |
+
$query = $wpdb->prepare('select * from ' . $wpdb->prefix . self::TABLE_NAME . ' where email like %s', array(esc_sql($email)));
|
92 |
$results = $wpdb->get_results($query, ARRAY_A);
|
93 |
|
94 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
107 |
}
|
108 |
|
109 |
$query = $wpdb->prepare(
|
110 |
+
'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' (email,info,code,is_activate,extra) VALUES (%s, %s, %s, %d, %s);',
|
111 |
array(
|
112 |
esc_sql($data['email']),
|
113 |
esc_sql($data['info']),
|
127 |
public static function is_exist_same_email( $email, $id = '' ) {
|
128 |
global $wpdb;
|
129 |
|
130 |
+
$query = $wpdb->prepare('select * from ' . $wpdb->prefix . self::TABLE_NAME . ' where email like %s ', array(esc_sql($email)));
|
131 |
$results = $wpdb->get_results($query, ARRAY_A);
|
132 |
|
133 |
if ( is_array( $results ) && (count( $results ) > 0) ) {
|
150 |
public static function remove_record( $id ) {
|
151 |
global $wpdb;
|
152 |
|
153 |
+
$query = $wpdb->prepare('delete from ' . $wpdb->prefix . self::TABLE_NAME . ' where id= %d ', array(esc_sql($id)));
|
154 |
+
$wpdb->query( $query );
|
155 |
+
}
|
156 |
|
157 |
/** Get all guests by pagenum, per_page*/
|
158 |
public static function get_all( $orderby = 'email', $order = 'asc', $pagenum = 1, $per_page = 15 ) {
|
159 |
global $wpdb;
|
160 |
|
161 |
+
$limit = ($pagenum - 1) * $per_page;
|
162 |
$query = $wpdb->prepare(
|
163 |
+
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' ORDER BY %s %s LIMIT %d, %d;',
|
164 |
array(
|
165 |
esc_sql($orderby),
|
166 |
esc_sql($order),
|
168 |
esc_sql($per_page)
|
169 |
)
|
170 |
);
|
171 |
+
$results = $wpdb->get_results( $query, ARRAY_A );
|
172 |
+
self::$found_count = self::get_count_element();
|
173 |
|
174 |
if ( ! is_array( $results ) ) {
|
175 |
$results = array();
|
182 |
/** get all records of table */
|
183 |
public static function get_all_records() {
|
184 |
global $wpdb;
|
185 |
+
|
186 |
+
$query = 'select * from ' . $wpdb->prefix . self::TABLE_NAME . ' order by email asc;';
|
187 |
+
|
188 |
$results = $wpdb->get_results( $query, ARRAY_A );
|
189 |
|
190 |
if ( ! is_array( $results ) ) {
|
199 |
public static function get_count_element() {
|
200 |
global $wpdb;
|
201 |
|
202 |
+
return $wpdb->get_var( 'Select count(*) from ' . $wpdb->prefix . self::TABLE_NAME . ';' );
|
203 |
}
|
204 |
|
205 |
/** update record */
|
210 |
return false;
|
211 |
}
|
212 |
|
213 |
+
$query = $wpdb->prepare(
|
214 |
'update ' . self::TABLE_NAME . ' set email= %s, info= %s, code= %s, is_activate= %d, extra= %s where id= %d;',
|
215 |
array(
|
216 |
esc_sql($data['email']),
|
222 |
)
|
223 |
);
|
224 |
|
225 |
+
$wpdb->query( $query );
|
226 |
|
227 |
return true;
|
228 |
}
|
model/model-forms.php
CHANGED
@@ -41,7 +41,7 @@ if ( ! class_exists( 'SIB_Forms' ) ) {
|
|
41 |
`existMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
42 |
`invalidMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
43 |
`requiredMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
44 |
-
`attributes`
|
45 |
`date` DATE NOT NULL,
|
46 |
`isDefault` int(1) NOT NULL DEFAULT 0,
|
47 |
`gCaptcha` int(1) NOT NULL DEFAULT 0,
|
@@ -150,7 +150,7 @@ if ( ! class_exists( 'SIB_Forms' ) ) {
|
|
150 |
'attributes' => 'email,NAME',
|
151 |
);
|
152 |
} else {
|
153 |
-
|
154 |
$results = $wpdb->get_row( $query, ARRAY_A ); // db call ok; no-cache ok.
|
155 |
}
|
156 |
|
@@ -209,18 +209,18 @@ if ( ! class_exists( 'SIB_Forms' ) ) {
|
|
209 |
|
210 |
$current_date = date( 'Y-m-d' );
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
|
225 |
/**
|
226 |
* Update form
|
@@ -234,21 +234,21 @@ if ( ! class_exists( 'SIB_Forms' ) ) {
|
|
234 |
|
235 |
$current_date = date( 'Y-m-d' );
|
236 |
|
237 |
-
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
$query = $wpdb->prepare( $query ,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'],
|
244 |
-
$formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'],
|
245 |
-
$formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'], esc_sql($formID)));
|
246 |
|
|
|
|
|
|
|
247 |
|
248 |
-
$wpdb->query( $query ); // db call ok; no-cache ok.
|
249 |
|
250 |
-
|
251 |
-
|
|
|
|
|
252 |
|
253 |
/**
|
254 |
* Remove form
|
@@ -443,5 +443,16 @@ EOD;
|
|
443 |
}
|
444 |
}
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
447 |
-
}
|
41 |
`existMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
42 |
`invalidMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
43 |
`requiredMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
44 |
+
`attributes` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci,
|
45 |
`date` DATE NOT NULL,
|
46 |
`isDefault` int(1) NOT NULL DEFAULT 0,
|
47 |
`gCaptcha` int(1) NOT NULL DEFAULT 0,
|
150 |
'attributes' => 'email,NAME',
|
151 |
);
|
152 |
} else {
|
153 |
+
$query = $wpdb->prepare('SELECT * from ' . $wpdb->prefix . self::TABLE_NAME . ' where id = %d',array(esc_sql($frmID)));
|
154 |
$results = $wpdb->get_row( $query, ARRAY_A ); // db call ok; no-cache ok.
|
155 |
}
|
156 |
|
209 |
|
210 |
$current_date = date( 'Y-m-d' );
|
211 |
|
212 |
+
global $wpdb;
|
213 |
+
$query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME.' (title,html,css,dependTheme,listID,templateID,confirmID,isOpt,isDopt,redirectInEmail,redirectInForm,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,gCaptcha,gCaptcha_secret,gCaptcha_site,termAccept,termsURL) VALUES ';
|
214 |
+
$query .= ' (%s, %s, %s, %d, %s, %d, %d, %d, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %d, %s)';
|
215 |
|
216 |
+
$query = $wpdb->prepare($query,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'],
|
217 |
+
$formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'],
|
218 |
+
$formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL']));
|
219 |
|
220 |
+
$wpdb->query( $query ); // db call ok; no-cache ok.
|
221 |
+
$index = $wpdb->get_var( 'SELECT LAST_INSERT_ID();' ); // db call ok; no-cache ok.
|
222 |
+
return $index;
|
223 |
+
}
|
224 |
|
225 |
/**
|
226 |
* Update form
|
234 |
|
235 |
$current_date = date( 'Y-m-d' );
|
236 |
|
237 |
+
global $wpdb;
|
238 |
|
239 |
+
$query = 'UPDATE ' . $wpdb->prefix . self::TABLE_NAME ;
|
240 |
+
$query .= " set title = %s, html = %s, css = %s, dependTheme = %d, listID = %s, templateID = %d, confirmID = %d, isOpt = %d, isDopt = %d, redirectInEmail = %s, redirectInForm = %s, successMsg = %s, errorMsg = %s, existMsg = %s, invalidMsg = %s, requiredMsg = %s, attributes = %s, date = %s, gCaptcha = %d, gCaptcha_secret = %s, gCaptcha_site = %s, termAccept = %d, termsURL = %s";
|
241 |
+
$query .= ' where id= %d';
|
|
|
|
|
|
|
|
|
242 |
|
243 |
+
$query = $wpdb->prepare( $query ,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'],
|
244 |
+
$formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'],
|
245 |
+
$formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'], esc_sql($formID)));
|
246 |
|
|
|
247 |
|
248 |
+
$wpdb->query( $query ); // db call ok; no-cache ok.
|
249 |
+
|
250 |
+
return true;
|
251 |
+
}
|
252 |
|
253 |
/**
|
254 |
* Remove form
|
443 |
}
|
444 |
}
|
445 |
|
446 |
+
/** Change datatype of attribute column*/
|
447 |
+
public static function modify_datatype() {
|
448 |
+
global $wpdb;
|
449 |
+
$tableStructure = $wpdb->get_results( "DESC " . $wpdb->prefix . self::TABLE_NAME );
|
450 |
+
foreach ($tableStructure as $key => $value)
|
451 |
+
{
|
452 |
+
if($value->Field == "attributes" && $value->Type == "varchar(255)")
|
453 |
+
$wpdb->query("ALTER TABLE ". $wpdb->prefix . self::TABLE_NAME." MODIFY ".$value->Field." TEXT DEFAULT NULL");
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
}
|
458 |
+
}
|
model/model-lang.php
CHANGED
@@ -52,14 +52,14 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
52 |
global $wpdb;
|
53 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
54 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
55 |
-
|
56 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE pID = %d AND lang= %s',
|
57 |
array(
|
58 |
esc_sql($pID),
|
59 |
esc_sql($lang)
|
60 |
)
|
61 |
);
|
62 |
-
|
63 |
if ( ! empty( $results ) ) {
|
64 |
return $results->frmID;
|
65 |
} else {
|
@@ -81,7 +81,7 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
81 |
global $wpdb;
|
82 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
83 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
84 |
-
|
85 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE frmID = %d AND pID= %d',
|
86 |
array(
|
87 |
esc_sql($frmID),
|
@@ -110,7 +110,7 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
110 |
public static function add_form_ID( $frmID, $pid, $lang ) {
|
111 |
// insert.
|
112 |
global $wpdb;
|
113 |
-
|
114 |
'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' (frmID,pID,lang) VALUES (%d, %d, %s)',
|
115 |
array(
|
116 |
esc_sql($frmID),
|
@@ -133,7 +133,7 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
133 |
global $wpdb;
|
134 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
135 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
136 |
-
|
137 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE frmID = %d',
|
138 |
array(esc_sql($frmID))
|
139 |
);
|
@@ -147,7 +147,7 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
147 |
return false;
|
148 |
}
|
149 |
|
150 |
-
|
151 |
|
152 |
/**
|
153 |
* Remove forms
|
@@ -158,11 +158,11 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
158 |
global $wpdb;
|
159 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
160 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
161 |
-
|
162 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE pID= %d',
|
163 |
array(esc_sql($pID))
|
164 |
);
|
165 |
-
|
166 |
if ( $trans ) {
|
167 |
foreach ( $trans as $tran ) {
|
168 |
SIB_Forms::deleteForm( $tran->frmID );
|
@@ -174,8 +174,6 @@ if ( ! class_exists( 'SIB_Forms_Lang' ) ) {
|
|
174 |
'pID' => $pID,
|
175 |
)
|
176 |
);
|
177 |
-
|
178 |
-
|
179 |
}
|
180 |
|
181 |
}
|
52 |
global $wpdb;
|
53 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
54 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
55 |
+
$query = $wpdb->prepare(
|
56 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE pID = %d AND lang= %s',
|
57 |
array(
|
58 |
esc_sql($pID),
|
59 |
esc_sql($lang)
|
60 |
)
|
61 |
);
|
62 |
+
$results = $wpdb->get_row( $query ); // db call ok; no-cache ok.
|
63 |
if ( ! empty( $results ) ) {
|
64 |
return $results->frmID;
|
65 |
} else {
|
81 |
global $wpdb;
|
82 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
83 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
84 |
+
$sql = $wpdb->prepare(
|
85 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE frmID = %d AND pID= %d',
|
86 |
array(
|
87 |
esc_sql($frmID),
|
110 |
public static function add_form_ID( $frmID, $pid, $lang ) {
|
111 |
// insert.
|
112 |
global $wpdb;
|
113 |
+
$query = $wpdb->prepare(
|
114 |
'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' (frmID,pID,lang) VALUES (%d, %d, %s)',
|
115 |
array(
|
116 |
esc_sql($frmID),
|
133 |
global $wpdb;
|
134 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
135 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
136 |
+
$sql = $wpdb->prepare(
|
137 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE frmID = %d',
|
138 |
array(esc_sql($frmID))
|
139 |
);
|
147 |
return false;
|
148 |
}
|
149 |
|
150 |
+
}
|
151 |
|
152 |
/**
|
153 |
* Remove forms
|
158 |
global $wpdb;
|
159 |
$query = "SHOW TABLES LIKE '" . $wpdb->prefix . self::TABLE_NAME . "'; ";
|
160 |
if ( $wpdb->get_var( $query ) == $wpdb->prefix . self::TABLE_NAME ) {
|
161 |
+
$query_forms = $wpdb->prepare(
|
162 |
'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' WHERE pID= %d',
|
163 |
array(esc_sql($pID))
|
164 |
);
|
165 |
+
$trans = $wpdb->get_results( $query_forms ); // db call ok; no-cache ok.
|
166 |
if ( $trans ) {
|
167 |
foreach ( $trans as $tran ) {
|
168 |
SIB_Forms::deleteForm( $tran->frmID );
|
174 |
'pID' => $pID,
|
175 |
)
|
176 |
);
|
|
|
|
|
177 |
}
|
178 |
|
179 |
}
|
model/model-users.php
CHANGED
@@ -61,9 +61,8 @@ class SIB_Model_Users {
|
|
61 |
*/
|
62 |
public static function get_data( $id ) {
|
63 |
global $wpdb;
|
64 |
-
|
65 |
-
|
66 |
-
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
67 |
|
68 |
if ( is_array( $results ) ) {
|
69 |
return $results[0];
|
@@ -79,10 +78,9 @@ class SIB_Model_Users {
|
|
79 |
* @return array|bool|null|object|void
|
80 |
*/
|
81 |
public static function get_data_by_code( $code ) {
|
82 |
-
global $wpdb;
|
83 |
-
|
84 |
-
|
85 |
-
$results = $wpdb->get_row( $query,ARRAY_A ); // db call ok; no-cache ok.
|
86 |
|
87 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
88 |
return $results;
|
@@ -100,10 +98,8 @@ class SIB_Model_Users {
|
|
100 |
*/
|
101 |
public static function get_data_by_email( $email, $formID ) {
|
102 |
global $wpdb;
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
$results = $wpdb->get_row( $query,ARRAY_A ); // db call ok; no-cache ok.
|
107 |
|
108 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
109 |
return $results;
|
@@ -121,16 +117,16 @@ class SIB_Model_Users {
|
|
121 |
public static function add_record( $data ) {
|
122 |
global $wpdb;
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
$query = $wpdb->prepare('INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' (email,code,info,frmid,listIDs,redirectUrl) VALUES (%s, %s, %s, %d, %s, %s) ',array( $data["email"], $data["code"], $data["info"], $data["frmid"], $data["listIDs"], $data["redirectUrl"] ));
|
130 |
|
131 |
-
|
|
|
132 |
$index = $wpdb->get_var( 'SELECT LAST_INSERT_ID();' ); // db call ok; no-cache ok.
|
133 |
-
|
|
|
134 |
}
|
135 |
|
136 |
/**
|
@@ -143,11 +139,9 @@ class SIB_Model_Users {
|
|
143 |
public static function is_exist_same_email( $email, $id = '' ) {
|
144 |
global $wpdb;
|
145 |
|
146 |
-
|
147 |
-
|
148 |
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
149 |
|
150 |
-
|
151 |
if ( is_array( $results ) && (count( $results ) > 0) ) {
|
152 |
if ( '' === $id ) {
|
153 |
return true;
|
@@ -172,8 +166,7 @@ class SIB_Model_Users {
|
|
172 |
public static function remove_record( $id ) {
|
173 |
global $wpdb;
|
174 |
|
175 |
-
|
176 |
-
|
177 |
$wpdb->query( $query ); // db call ok; no-cache ok.
|
178 |
}
|
179 |
|
@@ -189,12 +182,9 @@ class SIB_Model_Users {
|
|
189 |
public static function get_all( $orderby = 'email', $order = 'asc', $pagenum = 1, $per_page = 15 ) {
|
190 |
global $wpdb;
|
191 |
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
$query .= 'LIMIT %d,%d';
|
196 |
-
|
197 |
-
$query = $wpdb->prepare($query,array(esc_sql($orderby), esc_sql($order), esc_sql($limit), esc_sql($per_page)));
|
198 |
|
199 |
|
200 |
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
@@ -212,10 +202,8 @@ class SIB_Model_Users {
|
|
212 |
public static function get_all_records() {
|
213 |
global $wpdb;
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
$query = $wpdb->prepare($query,array("email","asc"));
|
218 |
-
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
219 |
|
220 |
if ( ! is_array( $results ) ) {
|
221 |
$results = array();
|
61 |
*/
|
62 |
public static function get_data( $id ) {
|
63 |
global $wpdb;
|
64 |
+
$query = $wpdb->prepare("SELECT * from " . $wpdb->prefix . self::TABLE_NAME . " where id = %d",array(esc_sql($id)));
|
65 |
+
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
|
|
66 |
|
67 |
if ( is_array( $results ) ) {
|
68 |
return $results[0];
|
78 |
* @return array|bool|null|object|void
|
79 |
*/
|
80 |
public static function get_data_by_code( $code ) {
|
81 |
+
global $wpdb;
|
82 |
+
$query = $wpdb->prepare("SELECT * from " . $wpdb->prefix . self::TABLE_NAME . " where code like %s",array(esc_sql($code)));
|
83 |
+
$results = $wpdb->get_row( $query,ARRAY_A ); // db call ok; no-cache ok.
|
|
|
84 |
|
85 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
86 |
return $results;
|
98 |
*/
|
99 |
public static function get_data_by_email( $email, $formID ) {
|
100 |
global $wpdb;
|
101 |
+
$query = $wpdb->prepare("SELECT * from " . $wpdb->prefix . self::TABLE_NAME . " where email = %s and frmid = %d",array(esc_sql($email),esc_sql($formID)));
|
102 |
+
$results = $wpdb->get_row( $query,ARRAY_A ); // db call ok; no-cache ok.
|
|
|
|
|
103 |
|
104 |
if ( is_array( $results ) && count( $results ) > 0 ) {
|
105 |
return $results;
|
117 |
public static function add_record( $data ) {
|
118 |
global $wpdb;
|
119 |
|
120 |
+
foreach ($data as $key => $value) {
|
121 |
+
if(!in_array($key, array("listIDs","info")))
|
122 |
+
$data[$key] = esc_sql($value);
|
123 |
+
}
|
|
|
|
|
124 |
|
125 |
+
$query = $wpdb->prepare('INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' (email,code,info,frmid,listIDs,redirectUrl) VALUES (%s, %s, %s, %d, %s, %s) ',array( $data["email"], $data["code"], $data["info"], $data["frmid"], $data["listIDs"], $data["redirectUrl"] ));
|
126 |
+
$wpdb->query( $query ); // db call ok; no-cache ok.
|
127 |
$index = $wpdb->get_var( 'SELECT LAST_INSERT_ID();' ); // db call ok; no-cache ok.
|
128 |
+
|
129 |
+
return $index;
|
130 |
}
|
131 |
|
132 |
/**
|
139 |
public static function is_exist_same_email( $email, $id = '' ) {
|
140 |
global $wpdb;
|
141 |
|
142 |
+
$query = $wpdb->prepare("SELECT * from " . $wpdb->prefix . self::TABLE_NAME . " where email like %s",array(esc_sql($email)));
|
|
|
143 |
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
144 |
|
|
|
145 |
if ( is_array( $results ) && (count( $results ) > 0) ) {
|
146 |
if ( '' === $id ) {
|
147 |
return true;
|
166 |
public static function remove_record( $id ) {
|
167 |
global $wpdb;
|
168 |
|
169 |
+
$query = $wpdb->prepare("DELETE from " . $wpdb->prefix . self::TABLE_NAME . " where id = %d",array(esc_sql($id)));
|
|
|
170 |
$wpdb->query( $query ); // db call ok; no-cache ok.
|
171 |
}
|
172 |
|
182 |
public static function get_all( $orderby = 'email', $order = 'asc', $pagenum = 1, $per_page = 15 ) {
|
183 |
global $wpdb;
|
184 |
|
185 |
+
$limit = ($pagenum - 1) * $per_page;
|
186 |
+
$query = 'SELECT * FROM ' . $wpdb->prefix . self::TABLE_NAME . ' ORDER BY %s %s LIMIT %d,%d';
|
187 |
+
$query = $wpdb->prepare($query,array(esc_sql($orderby), esc_sql($order), esc_sql($limit), esc_sql($per_page)));
|
|
|
|
|
|
|
188 |
|
189 |
|
190 |
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
202 |
public static function get_all_records() {
|
203 |
global $wpdb;
|
204 |
|
205 |
+
$query = $wpdb->prepare('select * from ' . $wpdb->prefix . self::TABLE_NAME . ' order by %s %s;', array("email","asc"));
|
206 |
+
$results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
|
|
|
|
|
207 |
|
208 |
if ( ! is_array( $results ) ) {
|
209 |
$results = array();
|
page/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|
page/page-campaigns.php
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin page : dashboard
|
4 |
-
*
|
5 |
-
* @package SIB_Page_Campaigns
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'SIB_Page_Campaigns' ) ) {
|
9 |
-
/**
|
10 |
-
* Page class that handles backend page <i>dashboard ( for admin )</i> with form generation and processing
|
11 |
-
*
|
12 |
-
* @package SIB_Page_Campaigns
|
13 |
-
*/
|
14 |
-
class SIB_Page_Campaigns {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Page slug
|
18 |
-
*/
|
19 |
-
const PAGE_ID = 'sib_page_campaigns';
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Page hook
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
protected $page_hook;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Page tabs
|
30 |
-
*
|
31 |
-
* @var mixed
|
32 |
-
*/
|
33 |
-
protected $tabs;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
-
*/
|
38 |
-
function __construct() {
|
39 |
-
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Campaigns', 'sib_lang' ), __( 'Campaigns', 'sib_lang' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
40 |
-
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
41 |
-
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
42 |
-
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Init Process
|
47 |
-
*/
|
48 |
-
function Init() {
|
49 |
-
add_action( 'admin_notices', array( 'SIB_Manager', 'language_admin_notice' ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Enqueue scripts of plugin
|
54 |
-
*/
|
55 |
-
function enqueue_scripts() {
|
56 |
-
wp_enqueue_script( 'sib-admin-js' );
|
57 |
-
wp_enqueue_script( 'sib-bootstrap-js' );
|
58 |
-
wp_localize_script(
|
59 |
-
'sib-admin-js', 'ajax_sib_object',
|
60 |
-
array(
|
61 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
62 |
-
)
|
63 |
-
);
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Enqueue style sheets of plugin
|
68 |
-
*/
|
69 |
-
function enqueue_styles() {
|
70 |
-
wp_enqueue_style( 'sib-admin-css' );
|
71 |
-
wp_enqueue_style( 'sib-bootstrap-css' );
|
72 |
-
wp_enqueue_style( 'sib-fontawesome-css' );
|
73 |
-
wp_enqueue_style( 'thickbox' );
|
74 |
-
}
|
75 |
-
|
76 |
-
/** Generate page script */
|
77 |
-
function generate() {
|
78 |
-
?>
|
79 |
-
<div id="wrap1" class="box-border-box container-fluid">
|
80 |
-
<div id="main-content" class="row">
|
81 |
-
<?php
|
82 |
-
if ( SIB_Manager::is_done_validation() ) {
|
83 |
-
$this->generate_main_page();
|
84 |
-
} else {
|
85 |
-
$this->generate_welcome_page();
|
86 |
-
}
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
</div>
|
90 |
-
<style>
|
91 |
-
#wpcontent {
|
92 |
-
margin-left: 160px !important;
|
93 |
-
}
|
94 |
-
|
95 |
-
@media only screen and (max-width: 918px) {
|
96 |
-
#wpcontent {
|
97 |
-
margin-left: 40px !important;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
</style>
|
101 |
-
<?php
|
102 |
-
}
|
103 |
-
|
104 |
-
/** Generate main page */
|
105 |
-
function generate_main_page() {
|
106 |
-
$access_token = SIB_API_Manager::update_access_token();
|
107 |
-
$lang = substr( get_bloginfo( 'language' ),0,2 );
|
108 |
-
|
109 |
-
$sort = isset( $_GET['sort'] ) ? sanitize_text_field( $_GET['sort'] ) : 'sent_c';
|
110 |
-
|
111 |
-
if ( '' === $access_token ) {
|
112 |
-
?>
|
113 |
-
<p>Sorry Inconvenience. Please refresh</p>
|
114 |
-
<?php
|
115 |
-
} else {
|
116 |
-
if ( 'create' === $sort ) {
|
117 |
-
$type = isset( $_GET['type'] ) ? sanitize_text_field( $_GET['type'] ) : 'classic';
|
118 |
-
?>
|
119 |
-
<iframe id="datamain"
|
120 |
-
src="https://my.sendinblue.com/camp/step1/type/<?php echo esc_attr( $type ); ?>/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>"
|
121 |
-
width="100%" height="750" scrolling="yes"></iframe>
|
122 |
-
<?php
|
123 |
-
} else {
|
124 |
-
?>
|
125 |
-
<iframe id="datamain"
|
126 |
-
src="https://my.sendinblue.com/camp/lists/email/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>#<?php echo esc_attr( $sort ); ?>"
|
127 |
-
width="100%" height="750" scrolling="yes"></iframe>
|
128 |
-
|
129 |
-
<?php
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
/** Generate welcome page */
|
135 |
-
function generate_welcome_page() {
|
136 |
-
?>
|
137 |
-
<img src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/background/campaigns.png' ); ?>" style="width: 100%;">
|
138 |
-
<?php
|
139 |
-
SIB_Page_Home::print_disable_popup();
|
140 |
-
}
|
141 |
-
|
142 |
-
}
|
143 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page/page-form.php
CHANGED
@@ -97,8 +97,6 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
97 |
|
98 |
/** Generate page script */
|
99 |
function generate() {
|
100 |
-
$mailin = new SibMailin( SIB_Manager::SENDINBLUE_API_URL, SIB_Manager::$access_key );
|
101 |
-
$config = $mailin->getPluginConfig();
|
102 |
?>
|
103 |
<div id="wrap" class="wrap box-border-box container-fluid">
|
104 |
<h1><img id="logo-img" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/logo.png' ); ?>">
|
@@ -111,10 +109,10 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
111 |
<a href="<?php echo esc_url( add_query_arg( 'page', self::PAGE_ID, admin_url( 'admin.php' ) ) ); ?>" class="button" style="margin-top: 6px; display: <?php echo esc_attr( $return_btn ); ?>;"><?php esc_attr_e( 'Back to form\'s list' ,'sib_lang' ); ?></a>
|
112 |
</h1>
|
113 |
<div id="wrap-left" class="box-border-box col-md-9 ">
|
114 |
-
<input type="hidden" class="sib-dateformat" value="<?php echo esc_attr(
|
115 |
<?php
|
116 |
if ( SIB_Manager::is_done_validation() ) {
|
117 |
-
if ( ( isset( $_GET['action'] ) && 'edit' === $_GET['action'] ) || ( isset( $_GET['action'] ) && 'duplicate' === $_GET['action'] ) ) {
|
118 |
$this->formID = isset( $_GET['id'] ) ? sanitize_text_field( $_GET['id'] ) : 'new';
|
119 |
$this->generate_form_edit();
|
120 |
} else {
|
@@ -156,7 +154,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
156 |
function generate_forms_page() {
|
157 |
?>
|
158 |
<div id="main-content" class="sib-content">
|
159 |
-
<div class="panel panel-default row small-content">
|
160 |
<div class="page-header"><strong><?php esc_attr_e( 'Forms', 'sib_lang' ); ?></strong></div>
|
161 |
|
162 |
<form method="post" class="sib-forms-wrapper" style="padding:20px;min-height: 500px;">
|
@@ -175,7 +173,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
175 |
$formData = SIB_Forms::getForm( $this->formID );
|
176 |
$invisibleCaptcha = '1';
|
177 |
if ( ! empty( $formData ) ) {
|
178 |
-
if ( isset( $_GET['action'] ) && 'duplicate' === $_GET['action'] ) {
|
179 |
$this->formID = 'new';
|
180 |
$formData['title'] = '';
|
181 |
}
|
@@ -213,16 +211,16 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
213 |
<?php
|
214 |
if ( isset( $_GET['pid'] ) ) {
|
215 |
?>
|
216 |
-
<input type="hidden" name="pid" value="<?php echo
|
217 |
<?php if ( isset( $_GET['lang'] ) ) { ?>
|
218 |
-
<input type="hidden" name="lang" value="<?php echo
|
219 |
<?php
|
220 |
}
|
221 |
}
|
222 |
?>
|
223 |
<?php wp_nonce_field( 'sib_setting_subscription' ); ?>
|
224 |
<!-- Subscription form -->
|
225 |
-
<div class="panel panel-default row small-content">
|
226 |
<div class="page-header">
|
227 |
<strong><?php esc_attr_e( 'Subscription form', 'sib_lang' ); ?></strong> <i
|
228 |
id="sib_setting_form_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
@@ -241,7 +239,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
241 |
<?php
|
242 |
if ( function_exists( 'wp_editor' ) ) {
|
243 |
wp_editor(
|
244 |
-
$formData['html'], 'sibformmarkup', array(
|
245 |
'tinymce' => false,
|
246 |
'media_buttons' => true,
|
247 |
'textarea_name' => 'sib_form_html',
|
@@ -251,7 +249,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
251 |
} else {
|
252 |
?>
|
253 |
<textarea class="widefat" cols="160" rows="20" id="sibformmarkup"
|
254 |
-
name="sib_form_html"><?php echo
|
255 |
<?php
|
256 |
}
|
257 |
?>
|
@@ -570,7 +568,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
570 |
</div>
|
571 |
</div>
|
572 |
</div>
|
573 |
-
<div class="row small-content" style="margin-top: 30px;">
|
574 |
<div class="col-md-3">
|
575 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
576 |
</div>
|
@@ -580,7 +578,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
580 |
|
581 |
<!-- Sign up Process -->
|
582 |
|
583 |
-
<div class="panel panel-default row small-content">
|
584 |
|
585 |
<!-- Adding security through hidden referrer field -->
|
586 |
<div class="page-header">
|
@@ -599,7 +597,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
599 |
</div>
|
600 |
|
601 |
<!-- Linked List -->
|
602 |
-
<div class="row small-content">
|
603 |
<span class="col-md-3">
|
604 |
<?php esc_attr_e( 'Linked List', 'sib_lang' ); ?>
|
605 |
<?php SIB_Page_Home::get_narration_script( __( 'Linked List', 'sib_lang' ), __( 'Select the list where you want to add your new subscribers', 'sib_lang' ) ); ?>
|
@@ -648,14 +646,14 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
648 |
<div class="col-md-3" id="sib_template_id_area">
|
649 |
</div>
|
650 |
<div class="col-md-4">
|
651 |
-
<a href="https://my.sendinblue.com/camp/
|
652 |
target="_blank"><i
|
653 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
654 |
</a>
|
655 |
</div>
|
656 |
</div>
|
657 |
<!-- double optin confirmation email -->
|
658 |
-
<div class="row small-content">
|
659 |
<span
|
660 |
class="col-md-3"><?php esc_attr_e( 'Double Opt-In', 'sib_lang' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Double Opt-In', 'sib_lang' ), __( 'Your subscribers will receive an email inviting them to confirm their subscription. Be careful, your subscribers are not saved in your list before confirming their subscription.', 'sib_lang' ) ) ); ?></span>
|
661 |
|
@@ -682,20 +680,20 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
682 |
<div class="col-md-3" id="sib_doubleoptin_template_id_area">
|
683 |
</div>
|
684 |
<div class="col-md-4">
|
685 |
-
<a href="https://my.sendinblue.com/camp/
|
686 |
class="col-md-12" target="_blank"><i
|
687 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
688 |
</a>
|
689 |
</div>
|
690 |
</div>
|
691 |
-
<div class="row small-content" id="sib_double_redirect_area">
|
692 |
<span class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after clicking in the email', 'sib_lang' ); ?></span>
|
693 |
|
694 |
<div class="col-md-8">
|
695 |
<input type="url" class="col-md-11" name="redirect_url" value="<?php echo esc_attr( $formData['redirectInEmail'] ); ?>">
|
696 |
</div>
|
697 |
</div>
|
698 |
-
<div class="row small-content" id="sib_final_confirm_template_area">
|
699 |
<span class="col-md-3"><?php esc_attr_e( 'Select final confirmation email template', 'sib_lang' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Final confirmation', 'sib_lang' ), __( 'This is the final confirmation email your contacts will receive once they click on the double opt-in confirmation link. You can select one of the default templates we have created for you, e.g. \'Default template - Final confirmation\'.
|
700 |
For your information, you cannot select a template with the tag [DOUBLEOPTIN].', 'sib_lang' ) ) ); ?></span>
|
701 |
<div class="col-md-8">
|
@@ -703,7 +701,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
703 |
<div class="col-md-5" id="sib_final_confirm_template_id_area">
|
704 |
</div>
|
705 |
<div class="col-md-4">
|
706 |
-
<a href="https://my.sendinblue.com/camp/
|
707 |
class="col-md-12" target="_blank"><i
|
708 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
709 |
</a>
|
@@ -711,7 +709,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
711 |
</div>
|
712 |
</div>
|
713 |
|
714 |
-
<div class="row small-content">
|
715 |
<span
|
716 |
class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after subscription', 'sib_lang' ); ?></span>
|
717 |
|
@@ -748,7 +746,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
748 |
</div>
|
749 |
</div>
|
750 |
|
751 |
-
<div class="row small-content" style="margin-top: 30px;">
|
752 |
<div class="col-md-3">
|
753 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
754 |
</div>
|
@@ -758,12 +756,12 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
758 |
</div><!-- End Sign up process form-->
|
759 |
|
760 |
<!-- Confirmation message form -->
|
761 |
-
<div class="panel panel-default row small-content">
|
762 |
<div class="page-header">
|
763 |
<strong><?php esc_attr_e( 'Confirmation message', 'sib_lang' ); ?></strong>
|
764 |
</div>
|
765 |
<div class="panel-body">
|
766 |
-
<div class="row small-content">
|
767 |
<span class="col-md-3"><?php esc_attr_e( 'Success message', 'sib_lang' ); ?></span>
|
768 |
|
769 |
<div class="col-md-8">
|
@@ -772,7 +770,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
772 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Success message', 'sib_lang' ), __( 'Set up the success message that will appear when one of your visitors surccessfully signs up', 'sib_lang' ) ) ); ?>
|
773 |
</div>
|
774 |
</div>
|
775 |
-
<div class="row small-content">
|
776 |
<span class="col-md-3"><?php esc_attr_e( 'General error message', 'sib_lang' ); ?></span>
|
777 |
|
778 |
<div class="col-md-8">
|
@@ -781,7 +779,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
781 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'General message error', 'sib_lang' ), __( 'Set up the message that will appear when an error occurs during the subscritpion process', 'sib_lang' ) ) ); ?>
|
782 |
</div>
|
783 |
</div>
|
784 |
-
<div class="row small-content">
|
785 |
<span class="col-md-3"><?php esc_attr_e( 'Existing subscribers', 'sib_lang' ); ?></span>
|
786 |
|
787 |
<div class="col-md-8">
|
@@ -790,7 +788,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
790 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Existing Suscribers', 'sib_lang' ), __( 'Set up the message that will appear when a suscriber is already in your database', 'sib_lang' ) ) ); ?>
|
791 |
</div>
|
792 |
</div>
|
793 |
-
<div class="row small-content">
|
794 |
<span class="col-md-3"><?php esc_attr_e( 'Invalid email address', 'sib_lang' ); ?></span>
|
795 |
|
796 |
<div class="col-md-8">
|
@@ -799,7 +797,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
799 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Invalid email address', 'sib_lang' ), __( 'Set up the message that will appear when the email address used to sign up is not valid', 'sib_lang' ) ) ); ?>
|
800 |
</div>
|
801 |
</div>
|
802 |
-
<div class="row small-content">
|
803 |
<span class="col-md-3"><?php esc_attr_e( 'Required Field', 'sib_lang' ); ?></span>
|
804 |
|
805 |
<div class="col-md-8">
|
@@ -808,7 +806,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
808 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Required Field', 'sib_lang' ), __( 'Set up the message that will appear when the required field is empty', 'sib_lang' ) ) ); ?>
|
809 |
</div>
|
810 |
</div>
|
811 |
-
<div class="row small-content" style="margin-top: 30px;">
|
812 |
<div class="col-md-3">
|
813 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
814 |
</div>
|
@@ -833,7 +831,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
833 |
// If empty?
|
834 |
?>
|
835 |
<div id="main-content" class="sib-content">
|
836 |
-
<div class="panel panel-default row small-content">
|
837 |
<div class="page-header">
|
838 |
<strong><?php esc_attr_e( 'Subscription form', 'sib_lang' ); ?></strong>
|
839 |
</div>
|
@@ -929,7 +927,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
929 |
$requiredMsg = isset( $_POST['alert_required_message']) ? sanitize_text_field( esc_attr($_POST['alert_required_message'])) : '';
|
930 |
$formData = array(
|
931 |
'title' => $form_name,
|
932 |
-
'html' =>
|
933 |
'css' => $customCss,
|
934 |
'listID' => $list_ids,
|
935 |
'dependTheme' => $dependTheme,
|
@@ -990,16 +988,17 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
990 |
* Get template lists of sendinblue
|
991 |
*/
|
992 |
public static function get_template_lists() {
|
993 |
-
$mailin = new
|
994 |
$data = array(
|
995 |
-
'
|
996 |
-
'status' => 'temp_active',
|
997 |
);
|
998 |
-
$response = $mailin->
|
999 |
-
if (
|
|
|
|
|
|
|
1000 |
return null;
|
1001 |
}
|
1002 |
-
return $response['data']['campaign_records'];
|
1003 |
}
|
1004 |
|
1005 |
|
@@ -1007,15 +1006,15 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
1007 |
public static function ajax_change_template() {
|
1008 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
1009 |
$template_id = isset( $_POST['template_id'] ) ? sanitize_text_field( $_POST['template_id'] ) : '';
|
1010 |
-
$mailin = new
|
1011 |
$data = array(
|
1012 |
'id' => $template_id,
|
1013 |
);
|
1014 |
-
$response = $mailin->
|
1015 |
|
1016 |
$ret_email = '-1';
|
1017 |
-
if (
|
1018 |
-
$from_email = $response['
|
1019 |
if ( '[DEFAULT_FROM_EMAIL]' == $from_email ) {
|
1020 |
$ret_email = '-1';
|
1021 |
} else {
|
@@ -1069,8 +1068,8 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
1069 |
*/
|
1070 |
public static function ajax_update_html() {
|
1071 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
1072 |
-
$gCaptchaType = isset( $_POST['gCaptchaType']) ? $_POST['gCaptchaType'] : '1';
|
1073 |
-
$gCaptcha = isset( $_POST['gCaptcha'] ) ? $_POST['gCaptcha'] : '0';
|
1074 |
if ( $gCaptcha != '0' ) {
|
1075 |
if( $gCaptchaType == '1' ) {
|
1076 |
$gCaptcha = '2';
|
@@ -1081,10 +1080,10 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
1081 |
}
|
1082 |
$formData = array(
|
1083 |
'html' => isset( $_POST['frmData'] ) ? $_POST['frmData'] : '',
|
1084 |
-
'css' => isset( $_POST['frmCss'] ) ? $_POST['frmCss'] : '',
|
1085 |
-
'dependTheme' => isset( $_POST['isDepend'] ) ? $_POST['isDepend'] : '',
|
1086 |
'gCaptcha' => $gCaptcha,
|
1087 |
-
'gCaptcha_site' => isset( $_POST['gCaptchaSite'] ) ? $_POST['gCaptchaSite'] : ''
|
1088 |
);
|
1089 |
|
1090 |
update_option( SIB_Manager::PREVIEW_OPTION_NAME, $formData );
|
97 |
|
98 |
/** Generate page script */
|
99 |
function generate() {
|
|
|
|
|
100 |
?>
|
101 |
<div id="wrap" class="wrap box-border-box container-fluid">
|
102 |
<h1><img id="logo-img" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/logo.png' ); ?>">
|
109 |
<a href="<?php echo esc_url( add_query_arg( 'page', self::PAGE_ID, admin_url( 'admin.php' ) ) ); ?>" class="button" style="margin-top: 6px; display: <?php echo esc_attr( $return_btn ); ?>;"><?php esc_attr_e( 'Back to form\'s list' ,'sib_lang' ); ?></a>
|
110 |
</h1>
|
111 |
<div id="wrap-left" class="box-border-box col-md-9 ">
|
112 |
+
<input type="hidden" class="sib-dateformat" value="<?php echo esc_attr( 'yyyy-mm-dd' ); ?>">
|
113 |
<?php
|
114 |
if ( SIB_Manager::is_done_validation() ) {
|
115 |
+
if ( ( isset( $_GET['action'] ) && 'edit' === sanitize_text_field($_GET['action'] )) || ( isset( $_GET['action'] ) && 'duplicate' === sanitize_text_field($_GET['action'] )) ) {
|
116 |
$this->formID = isset( $_GET['id'] ) ? sanitize_text_field( $_GET['id'] ) : 'new';
|
117 |
$this->generate_form_edit();
|
118 |
} else {
|
154 |
function generate_forms_page() {
|
155 |
?>
|
156 |
<div id="main-content" class="sib-content">
|
157 |
+
<div class="panel panel-default row sib-small-content">
|
158 |
<div class="page-header"><strong><?php esc_attr_e( 'Forms', 'sib_lang' ); ?></strong></div>
|
159 |
|
160 |
<form method="post" class="sib-forms-wrapper" style="padding:20px;min-height: 500px;">
|
173 |
$formData = SIB_Forms::getForm( $this->formID );
|
174 |
$invisibleCaptcha = '1';
|
175 |
if ( ! empty( $formData ) ) {
|
176 |
+
if ( isset( $_GET['action'] ) && 'duplicate' === esc_attr($_GET['action']) ) {
|
177 |
$this->formID = 'new';
|
178 |
$formData['title'] = '';
|
179 |
}
|
211 |
<?php
|
212 |
if ( isset( $_GET['pid'] ) ) {
|
213 |
?>
|
214 |
+
<input type="hidden" name="pid" value="<?php echo sanitize_text_field( $_GET['pid'] ); ?>">
|
215 |
<?php if ( isset( $_GET['lang'] ) ) { ?>
|
216 |
+
<input type="hidden" name="lang" value="<?php echo sanitize_text_field( $_GET['lang'] ); ?>">
|
217 |
<?php
|
218 |
}
|
219 |
}
|
220 |
?>
|
221 |
<?php wp_nonce_field( 'sib_setting_subscription' ); ?>
|
222 |
<!-- Subscription form -->
|
223 |
+
<div class="panel panel-default row sib-small-content">
|
224 |
<div class="page-header">
|
225 |
<strong><?php esc_attr_e( 'Subscription form', 'sib_lang' ); ?></strong> <i
|
226 |
id="sib_setting_form_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
239 |
<?php
|
240 |
if ( function_exists( 'wp_editor' ) ) {
|
241 |
wp_editor(
|
242 |
+
esc_html(stripcslashes($formData['html'])), 'sibformmarkup', array(
|
243 |
'tinymce' => false,
|
244 |
'media_buttons' => true,
|
245 |
'textarea_name' => 'sib_form_html',
|
249 |
} else {
|
250 |
?>
|
251 |
<textarea class="widefat" cols="160" rows="20" id="sibformmarkup"
|
252 |
+
name="sib_form_html"><?php echo stripcslashes( $formData['html'] ); ?></textarea>
|
253 |
<?php
|
254 |
}
|
255 |
?>
|
568 |
</div>
|
569 |
</div>
|
570 |
</div>
|
571 |
+
<div class="row sib-small-content" style="margin-top: 30px;">
|
572 |
<div class="col-md-3">
|
573 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
574 |
</div>
|
578 |
|
579 |
<!-- Sign up Process -->
|
580 |
|
581 |
+
<div class="panel panel-default row sib-small-content">
|
582 |
|
583 |
<!-- Adding security through hidden referrer field -->
|
584 |
<div class="page-header">
|
597 |
</div>
|
598 |
|
599 |
<!-- Linked List -->
|
600 |
+
<div class="row sib-small-content">
|
601 |
<span class="col-md-3">
|
602 |
<?php esc_attr_e( 'Linked List', 'sib_lang' ); ?>
|
603 |
<?php SIB_Page_Home::get_narration_script( __( 'Linked List', 'sib_lang' ), __( 'Select the list where you want to add your new subscribers', 'sib_lang' ) ); ?>
|
646 |
<div class="col-md-3" id="sib_template_id_area">
|
647 |
</div>
|
648 |
<div class="col-md-4">
|
649 |
+
<a href="https://my.sendinblue.com/camp/lists/template" class="col-md-12"
|
650 |
target="_blank"><i
|
651 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
652 |
</a>
|
653 |
</div>
|
654 |
</div>
|
655 |
<!-- double optin confirmation email -->
|
656 |
+
<div class="row sib-small-content">
|
657 |
<span
|
658 |
class="col-md-3"><?php esc_attr_e( 'Double Opt-In', 'sib_lang' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Double Opt-In', 'sib_lang' ), __( 'Your subscribers will receive an email inviting them to confirm their subscription. Be careful, your subscribers are not saved in your list before confirming their subscription.', 'sib_lang' ) ) ); ?></span>
|
659 |
|
680 |
<div class="col-md-3" id="sib_doubleoptin_template_id_area">
|
681 |
</div>
|
682 |
<div class="col-md-4">
|
683 |
+
<a href="https://my.sendinblue.com/camp/lists/template"
|
684 |
class="col-md-12" target="_blank"><i
|
685 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
686 |
</a>
|
687 |
</div>
|
688 |
</div>
|
689 |
+
<div class="row sib-small-content" id="sib_double_redirect_area">
|
690 |
<span class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after clicking in the email', 'sib_lang' ); ?></span>
|
691 |
|
692 |
<div class="col-md-8">
|
693 |
<input type="url" class="col-md-11" name="redirect_url" value="<?php echo esc_attr( $formData['redirectInEmail'] ); ?>">
|
694 |
</div>
|
695 |
</div>
|
696 |
+
<div class="row sib-small-content" id="sib_final_confirm_template_area">
|
697 |
<span class="col-md-3"><?php esc_attr_e( 'Select final confirmation email template', 'sib_lang' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Final confirmation', 'sib_lang' ), __( 'This is the final confirmation email your contacts will receive once they click on the double opt-in confirmation link. You can select one of the default templates we have created for you, e.g. \'Default template - Final confirmation\'.
|
698 |
For your information, you cannot select a template with the tag [DOUBLEOPTIN].', 'sib_lang' ) ) ); ?></span>
|
699 |
<div class="col-md-8">
|
701 |
<div class="col-md-5" id="sib_final_confirm_template_id_area">
|
702 |
</div>
|
703 |
<div class="col-md-4">
|
704 |
+
<a href="https://my.sendinblue.com/camp/lists/template"
|
705 |
class="col-md-12" target="_blank"><i
|
706 |
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'sib_lang' ); ?>
|
707 |
</a>
|
709 |
</div>
|
710 |
</div>
|
711 |
|
712 |
+
<div class="row sib-small-content">
|
713 |
<span
|
714 |
class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after subscription', 'sib_lang' ); ?></span>
|
715 |
|
746 |
</div>
|
747 |
</div>
|
748 |
|
749 |
+
<div class="row sib-small-content" style="margin-top: 30px;">
|
750 |
<div class="col-md-3">
|
751 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
752 |
</div>
|
756 |
</div><!-- End Sign up process form-->
|
757 |
|
758 |
<!-- Confirmation message form -->
|
759 |
+
<div class="panel panel-default row sib-small-content">
|
760 |
<div class="page-header">
|
761 |
<strong><?php esc_attr_e( 'Confirmation message', 'sib_lang' ); ?></strong>
|
762 |
</div>
|
763 |
<div class="panel-body">
|
764 |
+
<div class="row sib-small-content">
|
765 |
<span class="col-md-3"><?php esc_attr_e( 'Success message', 'sib_lang' ); ?></span>
|
766 |
|
767 |
<div class="col-md-8">
|
770 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Success message', 'sib_lang' ), __( 'Set up the success message that will appear when one of your visitors surccessfully signs up', 'sib_lang' ) ) ); ?>
|
771 |
</div>
|
772 |
</div>
|
773 |
+
<div class="row sib-small-content">
|
774 |
<span class="col-md-3"><?php esc_attr_e( 'General error message', 'sib_lang' ); ?></span>
|
775 |
|
776 |
<div class="col-md-8">
|
779 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'General message error', 'sib_lang' ), __( 'Set up the message that will appear when an error occurs during the subscritpion process', 'sib_lang' ) ) ); ?>
|
780 |
</div>
|
781 |
</div>
|
782 |
+
<div class="row sib-small-content">
|
783 |
<span class="col-md-3"><?php esc_attr_e( 'Existing subscribers', 'sib_lang' ); ?></span>
|
784 |
|
785 |
<div class="col-md-8">
|
788 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Existing Suscribers', 'sib_lang' ), __( 'Set up the message that will appear when a suscriber is already in your database', 'sib_lang' ) ) ); ?>
|
789 |
</div>
|
790 |
</div>
|
791 |
+
<div class="row sib-small-content">
|
792 |
<span class="col-md-3"><?php esc_attr_e( 'Invalid email address', 'sib_lang' ); ?></span>
|
793 |
|
794 |
<div class="col-md-8">
|
797 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Invalid email address', 'sib_lang' ), __( 'Set up the message that will appear when the email address used to sign up is not valid', 'sib_lang' ) ) ); ?>
|
798 |
</div>
|
799 |
</div>
|
800 |
+
<div class="row sib-small-content">
|
801 |
<span class="col-md-3"><?php esc_attr_e( 'Required Field', 'sib_lang' ); ?></span>
|
802 |
|
803 |
<div class="col-md-8">
|
806 |
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Required Field', 'sib_lang' ), __( 'Set up the message that will appear when the required field is empty', 'sib_lang' ) ) ); ?>
|
807 |
</div>
|
808 |
</div>
|
809 |
+
<div class="row sib-small-content" style="margin-top: 30px;">
|
810 |
<div class="col-md-3">
|
811 |
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'sib_lang' ); ?></button>
|
812 |
</div>
|
831 |
// If empty?
|
832 |
?>
|
833 |
<div id="main-content" class="sib-content">
|
834 |
+
<div class="panel panel-default row sib-small-content">
|
835 |
<div class="page-header">
|
836 |
<strong><?php esc_attr_e( 'Subscription form', 'sib_lang' ); ?></strong>
|
837 |
</div>
|
927 |
$requiredMsg = isset( $_POST['alert_required_message']) ? sanitize_text_field( esc_attr($_POST['alert_required_message'])) : '';
|
928 |
$formData = array(
|
929 |
'title' => $form_name,
|
930 |
+
'html' => $form_html,
|
931 |
'css' => $customCss,
|
932 |
'listID' => $list_ids,
|
933 |
'dependTheme' => $dependTheme,
|
988 |
* Get template lists of sendinblue
|
989 |
*/
|
990 |
public static function get_template_lists() {
|
991 |
+
$mailin = new SendinblueApiClient();
|
992 |
$data = array(
|
993 |
+
'templateStatus' => true
|
|
|
994 |
);
|
995 |
+
$response = $mailin->getEmailTemplates( $data );
|
996 |
+
if ( $mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK) {
|
997 |
+
return $response['templates'];
|
998 |
+
}
|
999 |
+
else {
|
1000 |
return null;
|
1001 |
}
|
|
|
1002 |
}
|
1003 |
|
1004 |
|
1006 |
public static function ajax_change_template() {
|
1007 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
1008 |
$template_id = isset( $_POST['template_id'] ) ? sanitize_text_field( $_POST['template_id'] ) : '';
|
1009 |
+
$mailin = new SendinblueApiClient( );
|
1010 |
$data = array(
|
1011 |
'id' => $template_id,
|
1012 |
);
|
1013 |
+
$response = $mailin->getEmailTemplate( $data["id"] );
|
1014 |
|
1015 |
$ret_email = '-1';
|
1016 |
+
if ( $mailin->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK) {
|
1017 |
+
$from_email = $response[0]['sender']['email'];
|
1018 |
if ( '[DEFAULT_FROM_EMAIL]' == $from_email ) {
|
1019 |
$ret_email = '-1';
|
1020 |
} else {
|
1068 |
*/
|
1069 |
public static function ajax_update_html() {
|
1070 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
1071 |
+
$gCaptchaType = isset( $_POST['gCaptchaType']) ? sanitize_text_field($_POST['gCaptchaType']) : '1';
|
1072 |
+
$gCaptcha = isset( $_POST['gCaptcha'] ) ? sanitize_text_field($_POST['gCaptcha']) : '0';
|
1073 |
if ( $gCaptcha != '0' ) {
|
1074 |
if( $gCaptchaType == '1' ) {
|
1075 |
$gCaptcha = '2';
|
1080 |
}
|
1081 |
$formData = array(
|
1082 |
'html' => isset( $_POST['frmData'] ) ? $_POST['frmData'] : '',
|
1083 |
+
'css' => isset( $_POST['frmCss'] ) ? esc_attr($_POST['frmCss']) : '',
|
1084 |
+
'dependTheme' => isset( $_POST['isDepend'] ) ? sanitize_text_field($_POST['isDepend']) : '',
|
1085 |
'gCaptcha' => $gCaptcha,
|
1086 |
+
'gCaptcha_site' => isset( $_POST['gCaptchaSite'] ) ? sanitize_text_field($_POST['gCaptchaSite']) : ''
|
1087 |
);
|
1088 |
|
1089 |
update_option( SIB_Manager::PREVIEW_OPTION_NAME, $formData );
|
page/page-home.php
CHANGED
@@ -47,7 +47,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
47 |
* Init Process
|
48 |
*/
|
49 |
function Init() {
|
50 |
-
if ( ( isset( $_GET['sib_action'] ) ) && ( 'logout' === $_GET['sib_action'] ) ) {
|
51 |
$this->logout();
|
52 |
}
|
53 |
}
|
@@ -84,7 +84,10 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
84 |
<div id="wrap" class="box-border-box container-fluid">
|
85 |
<h2><img id="logo-img" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/logo.png' ); ?>"></h2>
|
86 |
<div id="wrap-left" class="box-border-box col-md-9">
|
87 |
-
|
|
|
|
|
|
|
88 |
if ( SIB_Manager::is_done_validation() == true ) {
|
89 |
$this->generate_main_content();
|
90 |
} else {
|
@@ -107,7 +110,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
107 |
|
108 |
<div id="main-content" class="sib-content">
|
109 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
110 |
-
<div class="panel panel-default row small-content">
|
111 |
<div class="page-header">
|
112 |
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'sib_lang' ); ?> 1 | </span><strong><?php esc_attr_e( 'Create a Sendinblue Account', 'sib_lang' ); ?></strong>
|
113 |
</div>
|
@@ -125,27 +128,27 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
125 |
</div>
|
126 |
</div>
|
127 |
</div>
|
128 |
-
<div class="panel panel-default row small-content">
|
129 |
<div class="page-header">
|
130 |
-
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'sib_lang' ); ?> 2 | </span><strong><?php esc_attr_e( 'Activate your account with your API key', 'sib_lang' ); ?></strong>
|
131 |
</div>
|
132 |
<div class="panel-body">
|
133 |
<div class="col-md-9 row">
|
134 |
<div id="success-alert" class="alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'You successfully activate your account.', 'sib_lang' ); ?></div>
|
135 |
-
<input type="hidden" id="general_error" value="<?php esc_attr_e( 'Please input
|
136 |
<input type="hidden" id="curl_no_exist_error" value="<?php esc_attr_e( 'Please install curl on site to use sendinblue plugin.', 'sib_lang' ); ?>">
|
137 |
<input type="hidden" id="curl_error" value="<?php esc_attr_e( 'Curl error.', 'sib_lang' ); ?>">
|
138 |
-
<div id="failure-alert" class="alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input
|
139 |
<p>
|
140 |
<?php esc_attr_e( 'Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox.', 'sib_lang' ); ?><br>
|
141 |
-
<?php esc_attr_e( 'To activate your plugin, enter your API Access key.', 'sib_lang' ); ?><br>
|
142 |
</p>
|
143 |
<p>
|
144 |
<a href="https://my.sendinblue.com/advanced/apikey/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Get your API key from your account', 'sib_lang' ); ?></a>
|
145 |
</p>
|
146 |
<p>
|
147 |
<div class="col-md-7 row">
|
148 |
-
<p class="col-md-12 row"><input id="sib_access_key" type="text" class="col-md-10" style="margin-top: 10px;" placeholder="
|
149 |
<p class="col-md-12 row"><button type="button" id="sib_validate_btn" class="col-md-4 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Login', 'sib_lang' ); ?></button></p>
|
150 |
</div>
|
151 |
</p>
|
@@ -158,14 +161,10 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
158 |
|
159 |
/** Generate main home page after validation */
|
160 |
function generate_main_content() {
|
161 |
-
$total_subscribers = SIB_API_Manager::get_totalusers();
|
162 |
-
|
163 |
-
// get campaigns.
|
164 |
-
$campaign_stat = SIB_API_Manager::get_campaign_stats();
|
165 |
|
166 |
// display account info.
|
167 |
$account_settings = SIB_API_Manager::get_account_info();
|
168 |
-
$account_email =
|
169 |
$account_user_name = isset( $account_settings['account_user_name'] ) ? $account_settings['account_user_name'] : '';
|
170 |
$account_data = isset( $account_settings['account_data'] ) ? $account_settings['account_data'] : '';
|
171 |
// check smtp available.
|
@@ -202,7 +201,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
202 |
<div id="main-content" class="sib-content">
|
203 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
204 |
<!-- Account Info -->
|
205 |
-
<div class="panel panel-default row small-content">
|
206 |
<div class="page-header">
|
207 |
<strong><?php esc_attr_e( 'My Account', 'sib_lang' ); ?></strong>
|
208 |
</div>
|
@@ -214,9 +213,9 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
214 |
<?php
|
215 |
$count = count( $account_data );
|
216 |
for ( $i = 0; $i < $count; $i ++ ) {
|
217 |
-
if ( isset($account_data[$i]['
|
218 |
{
|
219 |
-
echo esc_attr( $account_data[ $i ]['
|
220 |
}
|
221 |
}
|
222 |
?>
|
@@ -228,7 +227,6 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
228 |
<div class="col-md-12 row" style="padding-top: 10px;">
|
229 |
<div class="col-md-6" style="margin-bottom: 10px;">
|
230 |
<p style="margin-top: 5px;">
|
231 |
-
<?php echo esc_attr__( 'You have', 'sib_lang' ) . ' <span id="sib_total_contacts">' . esc_attr( $total_subscribers ) . '</span> ' . esc_attr__( 'contacts.', 'sib_lang' ); ?><br>
|
232 |
<a id="sib_list_link" href="https://my.sendinblue.com/users/list/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Access to the list of all my contacts', 'sib_lang' ); ?></a>
|
233 |
</p>
|
234 |
</div>
|
@@ -244,126 +242,10 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
244 |
|
245 |
</div>
|
246 |
</div>
|
247 |
-
|
248 |
-
<span class="col-md-12"><b><?php esc_attr_e( 'Campaigns', 'sib_lang' ); ?></b></span>
|
249 |
-
<div class="col-md-12 row" style="padding-top: 10px;">
|
250 |
-
<div class="col-md-4">
|
251 |
-
<span style="line-height: 200%;">
|
252 |
-
<span class="glyphicon glyphicon-envelope"></span>
|
253 |
-
<?php esc_attr_e( 'Email Campaigns', 'sib_lang' ); ?>
|
254 |
-
</span>
|
255 |
-
<div class="list-group" id="list-group-email-campaign">
|
256 |
-
<a class="list-group-item" href="
|
257 |
-
<?php
|
258 |
-
echo esc_url(
|
259 |
-
add_query_arg(
|
260 |
-
array(
|
261 |
-
'page' => 'sib_page_campaigns',
|
262 |
-
'sort' => 'sent_c',
|
263 |
-
), admin_url( 'admin.php' )
|
264 |
-
)
|
265 |
-
);
|
266 |
-
?>
|
267 |
-
">
|
268 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['classic']['Sent'] ); ?></span>
|
269 |
-
<span class="glyphicon glyphicon-send"></span>
|
270 |
-
<?php esc_attr_e( 'Sent', 'sib_lang' ); ?>
|
271 |
-
</a>
|
272 |
-
<a class="list-group-item" href="
|
273 |
-
<?php
|
274 |
-
echo esc_url(
|
275 |
-
add_query_arg(
|
276 |
-
array(
|
277 |
-
'page' => 'sib_page_campaigns',
|
278 |
-
'sort' => 'draft_c',
|
279 |
-
), admin_url( 'admin.php' )
|
280 |
-
)
|
281 |
-
);
|
282 |
-
?>
|
283 |
-
">
|
284 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['classic']['Draft'] ); ?></span>
|
285 |
-
<span class="glyphicon glyphicon-edit"></span>
|
286 |
-
<?php esc_attr_e( 'Draft', 'sib_lang' ); ?>
|
287 |
-
</a>
|
288 |
-
<a class="list-group-item" href="
|
289 |
-
<?php
|
290 |
-
echo esc_url(
|
291 |
-
add_query_arg(
|
292 |
-
array(
|
293 |
-
'page' => 'sib_page_campaigns',
|
294 |
-
'sort' => 'submitted_c',
|
295 |
-
), admin_url( 'admin.php' )
|
296 |
-
)
|
297 |
-
);
|
298 |
-
?>
|
299 |
-
">
|
300 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['classic']['Queued'] ); ?></span>
|
301 |
-
<span class="glyphicon glyphicon-dashboard"></span>
|
302 |
-
<?php esc_attr_e( 'Scheduled', 'sib_lang' ); ?>
|
303 |
-
</a>
|
304 |
-
</div>
|
305 |
-
</div>
|
306 |
-
<div class="col-md-4">
|
307 |
-
<span style="line-height: 200%;">
|
308 |
-
<span class="glyphicon glyphicon-phone"></span>
|
309 |
-
<?php esc_attr_e( 'SMS Campaigns', 'sib_lang' ); ?>
|
310 |
-
</span>
|
311 |
-
<div class="list-group" id="list-group-email-campaign">
|
312 |
-
<a class="list-group-item" href="
|
313 |
-
<?php
|
314 |
-
echo esc_url(
|
315 |
-
add_query_arg(
|
316 |
-
array(
|
317 |
-
'page' => 'sib_page_campaigns',
|
318 |
-
'sort' => 'sent_s',
|
319 |
-
), admin_url( 'admin.php' )
|
320 |
-
)
|
321 |
-
);
|
322 |
-
?>
|
323 |
-
">
|
324 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['sms']['Sent'] ); ?></span>
|
325 |
-
<span class="glyphicon glyphicon-send"></span>
|
326 |
-
<?php esc_attr_e( 'Sent', 'sib_lang' ); ?>
|
327 |
-
</a>
|
328 |
-
<a class="list-group-item" href="
|
329 |
-
<?php
|
330 |
-
echo esc_url(
|
331 |
-
add_query_arg(
|
332 |
-
array(
|
333 |
-
'page' => 'sib_page_campaigns',
|
334 |
-
'sort' => 'draft_s',
|
335 |
-
), admin_url( 'admin.php' )
|
336 |
-
)
|
337 |
-
);
|
338 |
-
?>
|
339 |
-
">
|
340 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['sms']['Draft'] ); ?></span>
|
341 |
-
<span class="glyphicon glyphicon-edit"></span>
|
342 |
-
<?php esc_attr_e( 'Draft', 'sib_lang' ); ?>
|
343 |
-
</a>
|
344 |
-
<a class="list-group-item" href="
|
345 |
-
<?php
|
346 |
-
echo esc_url(
|
347 |
-
add_query_arg(
|
348 |
-
array(
|
349 |
-
'page' => 'sib_page_campaigns',
|
350 |
-
'sort' => 'submitted_s',
|
351 |
-
), admin_url( 'admin.php' )
|
352 |
-
)
|
353 |
-
);
|
354 |
-
?>
|
355 |
-
">
|
356 |
-
<span class="badge"><?php echo esc_attr( $campaign_stat['sms']['Queued'] ); ?></span>
|
357 |
-
<span class="glyphicon glyphicon-dashboard"></span>
|
358 |
-
<?php esc_attr_e( 'Scheduled', 'sib_lang' ); ?>
|
359 |
-
</a>
|
360 |
-
</div>
|
361 |
-
</div>
|
362 |
-
</div>
|
363 |
</div>
|
364 |
</div>
|
365 |
<!-- Transactional Email -->
|
366 |
-
<div class="panel panel-default row small-content">
|
367 |
<div class="page-header">
|
368 |
<strong><?php esc_attr_e( 'Transactional emails', 'sib_lang' ); ?></strong>
|
369 |
</div>
|
@@ -414,7 +296,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
414 |
</select>
|
415 |
</div>
|
416 |
<div class="col-md-5">
|
417 |
-
<a href="https://
|
418 |
</div>
|
419 |
</div>
|
420 |
<div class="row" style="margin-left: 0px;">
|
@@ -431,7 +313,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
431 |
</div>
|
432 |
</div>
|
433 |
<!-- Marketing Automation -->
|
434 |
-
<div class="panel panel-default row small-content">
|
435 |
<div class="page-header">
|
436 |
<strong><?php esc_attr_e( 'Automation', 'sib_lang' ); ?></strong>
|
437 |
</div>
|
@@ -476,7 +358,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
476 |
do_action( 'sib_language_sidebar' );
|
477 |
?>
|
478 |
|
479 |
-
<div class="panel panel-default text-left box-border-box small-content">
|
480 |
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'sib_lang' ); ?></strong></div>
|
481 |
<div class="panel-body">
|
482 |
<p><?php esc_attr_e( 'Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages.', 'sib_lang' ); ?></p>
|
@@ -494,7 +376,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
494 |
</div>
|
495 |
|
496 |
</div>
|
497 |
-
<div class="panel panel-default text-left box-border-box small-content">
|
498 |
<div class="panel-heading"><strong><?php esc_attr_e( 'Need Help?', 'sib_lang' ); ?></strong></div>
|
499 |
<div class="panel-body">
|
500 |
<p><?php esc_attr_e( 'Do you have a question or need more information?', 'sib_lang' ); ?></p>
|
@@ -505,7 +387,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
505 |
<hr>
|
506 |
</div>
|
507 |
</div>
|
508 |
-
<div class="panel panel-default text-left box-border-box small-content">
|
509 |
<div class="panel-heading"><strong><?php esc_attr_e( 'Recommend this plugin', 'sib_lang' ); ?></strong></div>
|
510 |
<div class="panel-body">
|
511 |
<p><?php esc_attr_e( 'Let everyone know you like this plugin through a review!' ,'sib_lang' ); ?></p>
|
@@ -682,49 +564,27 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
682 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
683 |
$access_key = isset( $_POST['access_key'] ) ? sanitize_text_field( wp_unslash( $_POST['access_key'] ) ) : '';
|
684 |
try {
|
685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
} catch ( Exception $e ) {
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
}
|
693 |
-
|
694 |
-
$response = $mailin->get_access_tokens();
|
695 |
-
if ( is_array( $response ) ) {
|
696 |
-
if ( 'success' == $response['code'] ) {
|
697 |
-
|
698 |
-
// store api info.
|
699 |
-
$settings = array(
|
700 |
-
'access_key' => $access_key,
|
701 |
-
);
|
702 |
-
update_option( SIB_Manager::MAIN_OPTION_NAME, $settings );
|
703 |
-
|
704 |
-
SIB_Manager::$access_key = $access_key;
|
705 |
-
|
706 |
-
$access_token = $response['data']['access_token'];
|
707 |
-
$token_settings = array(
|
708 |
-
'access_token' => $access_token,
|
709 |
-
);
|
710 |
-
update_option( SIB_Manager::ACCESS_TOKEN_OPTION_NAME, $token_settings );
|
711 |
-
|
712 |
-
// get default language at Sendinblue.
|
713 |
-
$mailin->partnerWordpress();
|
714 |
-
|
715 |
-
// create tables for users and forms.
|
716 |
-
SIB_Model_Users::createTable();
|
717 |
-
SIB_Forms::createTable(); // create default form also
|
718 |
-
// If the client don't have attributes regarding Double OptIn then we will create these.
|
719 |
-
SIB_API_Manager::create_default_dopt();
|
720 |
-
|
721 |
-
wp_send_json( 'success' );
|
722 |
-
} else {
|
723 |
-
wp_send_json( $response['code'] );
|
724 |
-
}
|
725 |
-
} else {
|
726 |
-
wp_send_json( 'fail' );
|
727 |
-
}
|
728 |
}
|
729 |
|
730 |
/** Ajax module to change activate marketing automation option */
|
@@ -775,9 +635,6 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
775 |
/** Ajax module for send a test email */
|
776 |
public static function ajax_send_email() {
|
777 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
778 |
-
$to = array(
|
779 |
-
$_POST['email'] => '',
|
780 |
-
);
|
781 |
|
782 |
$subject = __( '[Sendinblue SMTP] test email', 'sib_lang' );
|
783 |
// Get sender info.
|
@@ -797,20 +654,25 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
797 |
|
798 |
$html = str_replace( '{title}', $subject, $html );
|
799 |
|
800 |
-
$mailin = new
|
801 |
-
|
802 |
-
$
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
|
|
|
|
|
|
|
|
|
|
814 |
|
815 |
wp_send_json( 'success' );
|
816 |
}
|
@@ -842,7 +704,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
842 |
);}
|
843 |
|
844 |
$roles = (array) $postData['sync_role']; // array or string.
|
845 |
-
$listIDs = (array) $postData['list_id'];
|
846 |
|
847 |
unset( $postData['sync_role'] );
|
848 |
unset( $postData['list_id'] );
|
@@ -892,10 +754,6 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
892 |
|
893 |
$usersData .= $contentData;
|
894 |
$result = SIB_API_Manager::sync_users( $usersData, $listIDs );
|
895 |
-
$currentUsers = count_users();
|
896 |
-
if ( 'success' == $result['code'] ) {
|
897 |
-
update_option( 'sib_sync_users', $currentUsers );
|
898 |
-
}
|
899 |
wp_send_json( $result );
|
900 |
}
|
901 |
|
@@ -903,6 +761,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
903 |
function logout() {
|
904 |
$setting = array();
|
905 |
update_option( SIB_Manager::MAIN_OPTION_NAME, $setting );
|
|
|
906 |
|
907 |
$home_settings = array(
|
908 |
'activate_email' => 'no',
|
47 |
* Init Process
|
48 |
*/
|
49 |
function Init() {
|
50 |
+
if ( ( isset( $_GET['sib_action'] ) ) && ( 'logout' === esc_attr($_GET['sib_action'] )) ) {
|
51 |
$this->logout();
|
52 |
}
|
53 |
}
|
84 |
<div id="wrap" class="box-border-box container-fluid">
|
85 |
<h2><img id="logo-img" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/logo.png' ); ?>"></h2>
|
86 |
<div id="wrap-left" class="box-border-box col-md-9">
|
87 |
+
<div id="sib-message-box" class="row alert alert-success" style="display: none;">
|
88 |
+
<p id="sib-message-body"></p>
|
89 |
+
</div>
|
90 |
+
<?php
|
91 |
if ( SIB_Manager::is_done_validation() == true ) {
|
92 |
$this->generate_main_content();
|
93 |
} else {
|
110 |
|
111 |
<div id="main-content" class="sib-content">
|
112 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
113 |
+
<div class="panel panel-default row sib-small-content">
|
114 |
<div class="page-header">
|
115 |
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'sib_lang' ); ?> 1 | </span><strong><?php esc_attr_e( 'Create a Sendinblue Account', 'sib_lang' ); ?></strong>
|
116 |
</div>
|
128 |
</div>
|
129 |
</div>
|
130 |
</div>
|
131 |
+
<div class="panel panel-default row sib-small-content">
|
132 |
<div class="page-header">
|
133 |
+
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'sib_lang' ); ?> 2 | </span><strong><?php esc_attr_e( 'Activate your account with your API key v3', 'sib_lang' ); ?></strong>
|
134 |
</div>
|
135 |
<div class="panel-body">
|
136 |
<div class="col-md-9 row">
|
137 |
<div id="success-alert" class="alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'You successfully activate your account.', 'sib_lang' ); ?></div>
|
138 |
+
<input type="hidden" id="general_error" value="<?php esc_attr_e( 'Please input a valid API v3 key', 'sib_lang' ); ?>">
|
139 |
<input type="hidden" id="curl_no_exist_error" value="<?php esc_attr_e( 'Please install curl on site to use sendinblue plugin.', 'sib_lang' ); ?>">
|
140 |
<input type="hidden" id="curl_error" value="<?php esc_attr_e( 'Curl error.', 'sib_lang' ); ?>">
|
141 |
+
<div id="failure-alert" class="alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input a valid API v3 key.', 'sib_lang' ); ?></div>
|
142 |
<p>
|
143 |
<?php esc_attr_e( 'Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox.', 'sib_lang' ); ?><br>
|
144 |
+
<?php esc_attr_e( 'To activate your plugin, enter your API v3 Access key.', 'sib_lang' ); ?><br>
|
145 |
</p>
|
146 |
<p>
|
147 |
<a href="https://my.sendinblue.com/advanced/apikey/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Get your API key from your account', 'sib_lang' ); ?></a>
|
148 |
</p>
|
149 |
<p>
|
150 |
<div class="col-md-7 row">
|
151 |
+
<p class="col-md-12 row"><input id="sib_access_key" type="text" class="col-md-10" style="margin-top: 10px;" placeholder="xkeysib-xxxxxx"></p>
|
152 |
<p class="col-md-12 row"><button type="button" id="sib_validate_btn" class="col-md-4 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Login', 'sib_lang' ); ?></button></p>
|
153 |
</div>
|
154 |
</p>
|
161 |
|
162 |
/** Generate main home page after validation */
|
163 |
function generate_main_content() {
|
|
|
|
|
|
|
|
|
164 |
|
165 |
// display account info.
|
166 |
$account_settings = SIB_API_Manager::get_account_info();
|
167 |
+
$account_email = $account_settings['account_email'];
|
168 |
$account_user_name = isset( $account_settings['account_user_name'] ) ? $account_settings['account_user_name'] : '';
|
169 |
$account_data = isset( $account_settings['account_data'] ) ? $account_settings['account_data'] : '';
|
170 |
// check smtp available.
|
201 |
<div id="main-content" class="sib-content">
|
202 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
203 |
<!-- Account Info -->
|
204 |
+
<div class="panel panel-default row sib-small-content">
|
205 |
<div class="page-header">
|
206 |
<strong><?php esc_attr_e( 'My Account', 'sib_lang' ); ?></strong>
|
207 |
</div>
|
213 |
<?php
|
214 |
$count = count( $account_data );
|
215 |
for ( $i = 0; $i < $count; $i ++ ) {
|
216 |
+
if ( isset($account_data[$i]['type']) )
|
217 |
{
|
218 |
+
echo esc_attr( $account_data[ $i ]['type'] ) . ' - ' . esc_attr( $account_data[ $i ]['credits'] ) . ' ' . esc_attr__( 'credits', 'sib_lang' ) . '<br>';
|
219 |
}
|
220 |
}
|
221 |
?>
|
227 |
<div class="col-md-12 row" style="padding-top: 10px;">
|
228 |
<div class="col-md-6" style="margin-bottom: 10px;">
|
229 |
<p style="margin-top: 5px;">
|
|
|
230 |
<a id="sib_list_link" href="https://my.sendinblue.com/users/list/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Access to the list of all my contacts', 'sib_lang' ); ?></a>
|
231 |
</p>
|
232 |
</div>
|
242 |
|
243 |
</div>
|
244 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
</div>
|
246 |
</div>
|
247 |
<!-- Transactional Email -->
|
248 |
+
<div class="panel panel-default row sib-small-content">
|
249 |
<div class="page-header">
|
250 |
<strong><?php esc_attr_e( 'Transactional emails', 'sib_lang' ); ?></strong>
|
251 |
</div>
|
296 |
</select>
|
297 |
</div>
|
298 |
<div class="col-md-5">
|
299 |
+
<a href="https://account.sendinblue.com/senders/" style="font-style: italic;" target="_blank" ><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Create a new sender', 'sib_lang' ); ?></a>
|
300 |
</div>
|
301 |
</div>
|
302 |
<div class="row" style="margin-left: 0px;">
|
313 |
</div>
|
314 |
</div>
|
315 |
<!-- Marketing Automation -->
|
316 |
+
<div class="panel panel-default row sib-small-content">
|
317 |
<div class="page-header">
|
318 |
<strong><?php esc_attr_e( 'Automation', 'sib_lang' ); ?></strong>
|
319 |
</div>
|
358 |
do_action( 'sib_language_sidebar' );
|
359 |
?>
|
360 |
|
361 |
+
<div class="panel panel-default text-left box-border-box sib-small-content">
|
362 |
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'sib_lang' ); ?></strong></div>
|
363 |
<div class="panel-body">
|
364 |
<p><?php esc_attr_e( 'Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages.', 'sib_lang' ); ?></p>
|
376 |
</div>
|
377 |
|
378 |
</div>
|
379 |
+
<div class="panel panel-default text-left box-border-box sib-small-content">
|
380 |
<div class="panel-heading"><strong><?php esc_attr_e( 'Need Help?', 'sib_lang' ); ?></strong></div>
|
381 |
<div class="panel-body">
|
382 |
<p><?php esc_attr_e( 'Do you have a question or need more information?', 'sib_lang' ); ?></p>
|
387 |
<hr>
|
388 |
</div>
|
389 |
</div>
|
390 |
+
<div class="panel panel-default text-left box-border-box sib-small-content">
|
391 |
<div class="panel-heading"><strong><?php esc_attr_e( 'Recommend this plugin', 'sib_lang' ); ?></strong></div>
|
392 |
<div class="panel-body">
|
393 |
<p><?php esc_attr_e( 'Let everyone know you like this plugin through a review!' ,'sib_lang' ); ?></p>
|
564 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
565 |
$access_key = isset( $_POST['access_key'] ) ? sanitize_text_field( wp_unslash( $_POST['access_key'] ) ) : '';
|
566 |
try {
|
567 |
+
update_option(SIB_Manager::API_KEY_V3_OPTION_NAME, $access_key);
|
568 |
+
$apiClient = new SendinblueApiClient();
|
569 |
+
$apiClient->getAccount();
|
570 |
+
if ( $apiClient->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK ) {
|
571 |
+
// create tables for users and forms.
|
572 |
+
SIB_Model_Users::createTable();
|
573 |
+
SIB_Forms::createTable(); // create default form also
|
574 |
+
|
575 |
+
// If the client don't have attributes regarding Double OptIn then we will create these.
|
576 |
+
SIB_API_Manager::create_default_dopt();
|
577 |
+
$message = 'success';
|
578 |
+
} else {
|
579 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
580 |
+
$message = 'fail';
|
581 |
+
}
|
582 |
} catch ( Exception $e ) {
|
583 |
+
$message = $e->getMessage();
|
584 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
585 |
+
} finally {
|
586 |
+
wp_send_json($message);
|
587 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
}
|
589 |
|
590 |
/** Ajax module to change activate marketing automation option */
|
635 |
/** Ajax module for send a test email */
|
636 |
public static function ajax_send_email() {
|
637 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
|
|
|
|
|
|
638 |
|
639 |
$subject = __( '[Sendinblue SMTP] test email', 'sib_lang' );
|
640 |
// Get sender info.
|
654 |
|
655 |
$html = str_replace( '{title}', $subject, $html );
|
656 |
|
657 |
+
$mailin = new SendinblueApiClient();
|
658 |
+
|
659 |
+
$data = [
|
660 |
+
'sender' => [
|
661 |
+
'name' => $fromname,
|
662 |
+
'email' => $from_email,
|
663 |
+
],
|
664 |
+
'replyTo' => [
|
665 |
+
'email' => $from_email,
|
666 |
+
],
|
667 |
+
'to' => [
|
668 |
+
[
|
669 |
+
'email' => sanitize_email($_POST['email'])
|
670 |
+
]
|
671 |
+
],
|
672 |
+
'subject' => $subject,
|
673 |
+
'htmlContent' => $html
|
674 |
+
];
|
675 |
+
$mailin->sendEmail( $data );
|
676 |
|
677 |
wp_send_json( 'success' );
|
678 |
}
|
704 |
);}
|
705 |
|
706 |
$roles = (array) $postData['sync_role']; // array or string.
|
707 |
+
$listIDs = array_map('intval', (array) $postData['list_id']);
|
708 |
|
709 |
unset( $postData['sync_role'] );
|
710 |
unset( $postData['list_id'] );
|
754 |
|
755 |
$usersData .= $contentData;
|
756 |
$result = SIB_API_Manager::sync_users( $usersData, $listIDs );
|
|
|
|
|
|
|
|
|
757 |
wp_send_json( $result );
|
758 |
}
|
759 |
|
761 |
function logout() {
|
762 |
$setting = array();
|
763 |
update_option( SIB_Manager::MAIN_OPTION_NAME, $setting );
|
764 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
765 |
|
766 |
$home_settings = array(
|
767 |
'activate_email' => 'no',
|
page/page-lists.php
DELETED
@@ -1,130 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin page : dashboard
|
4 |
-
*
|
5 |
-
* @package SIB_Page_Lists
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! class_exists( 'SIB_Page_Lists' ) ) {
|
9 |
-
/**
|
10 |
-
* Page class that handles backend page <i>dashboard ( for admin )</i> with form generation and processing
|
11 |
-
*
|
12 |
-
* @package SIB_Page_Lists
|
13 |
-
*/
|
14 |
-
class SIB_Page_Lists {
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Page slug
|
18 |
-
*/
|
19 |
-
const PAGE_ID = 'sib_page_lists';
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Page hook
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
protected $page_hook;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Page tabs
|
30 |
-
*
|
31 |
-
* @var mixed
|
32 |
-
*/
|
33 |
-
protected $tabs;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
-
*/
|
38 |
-
function __construct() {
|
39 |
-
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Lists', 'sib_lang' ), __( 'Lists', 'sib_lang' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
40 |
-
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
41 |
-
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
42 |
-
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Init Process
|
47 |
-
*/
|
48 |
-
function Init() {
|
49 |
-
add_action( 'admin_notices', array( 'SIB_Manager', 'language_admin_notice' ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Enqueue scripts of plugin
|
54 |
-
*/
|
55 |
-
function enqueue_scripts() {
|
56 |
-
wp_enqueue_script( 'sib-admin-js' );
|
57 |
-
wp_enqueue_script( 'sib-bootstrap-js' );
|
58 |
-
wp_localize_script(
|
59 |
-
'sib-admin-js', 'ajax_sib_object',
|
60 |
-
array(
|
61 |
-
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
62 |
-
)
|
63 |
-
);
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Enqueue style sheets of plugin
|
68 |
-
*/
|
69 |
-
function enqueue_styles() {
|
70 |
-
wp_enqueue_style( 'sib-admin-css' );
|
71 |
-
wp_enqueue_style( 'sib-bootstrap-css' );
|
72 |
-
wp_enqueue_style( 'sib-fontawesome-css' );
|
73 |
-
wp_enqueue_style( 'thickbox' );
|
74 |
-
}
|
75 |
-
|
76 |
-
/** Generate page script */
|
77 |
-
function generate() {
|
78 |
-
?>
|
79 |
-
<div id="wrap1" class="box-border-box container-fluid">
|
80 |
-
<div id="main-content" class="row">
|
81 |
-
<?php
|
82 |
-
if ( SIB_Manager::is_done_validation() ) {
|
83 |
-
$this->generate_main_page();
|
84 |
-
} else {
|
85 |
-
$this->generate_welcome_page();
|
86 |
-
}
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
</div>
|
90 |
-
<style>
|
91 |
-
#wpcontent {
|
92 |
-
margin-left: 160px !important;
|
93 |
-
}
|
94 |
-
|
95 |
-
@media only screen and (max-width: 918px) {
|
96 |
-
#wpcontent {
|
97 |
-
margin-left: 40px !important;
|
98 |
-
}
|
99 |
-
}
|
100 |
-
</style>
|
101 |
-
<?php
|
102 |
-
}
|
103 |
-
|
104 |
-
/** Generate main page */
|
105 |
-
function generate_main_page() {
|
106 |
-
$access_token = SIB_API_Manager::update_access_token();
|
107 |
-
$lang = substr( get_bloginfo( 'language' ),0,2 );
|
108 |
-
if ( '' == $access_token ) {
|
109 |
-
?>
|
110 |
-
<p>Sorry Inconvenience. Please refresh</p>
|
111 |
-
<?php
|
112 |
-
} else {
|
113 |
-
?>
|
114 |
-
<iframe id="datamain"
|
115 |
-
src="https://my.sendinblue.com/lists/index/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>"
|
116 |
-
width="100%" height="800" scrolling="yes"></iframe>
|
117 |
-
<?php
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
/** Generate welcome page */
|
122 |
-
function generate_welcome_page() {
|
123 |
-
?>
|
124 |
-
<img src="<?php echo esc_attr( SIB_Manager::$plugin_url ) . '/img/background/lists.png'; ?>" style="width: 100%;">
|
125 |
-
<?php
|
126 |
-
SIB_Page_Home::print_disable_popup();
|
127 |
-
}
|
128 |
-
|
129 |
-
}
|
130 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page/page-statistics.php
CHANGED
@@ -18,6 +18,9 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
18 |
*/
|
19 |
const PAGE_ID = 'sib_page_statistics';
|
20 |
|
|
|
|
|
|
|
21 |
/**
|
22 |
* Page hook
|
23 |
*
|
@@ -103,11 +106,112 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
103 |
|
104 |
/** Generate main page */
|
105 |
function generate_main_page() {
|
106 |
-
$
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
/** Generate welcome page */
|
@@ -117,5 +221,40 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
117 |
<?php
|
118 |
SIB_Page_Home::print_disable_popup();
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
}
|
18 |
*/
|
19 |
const PAGE_ID = 'sib_page_statistics';
|
20 |
|
21 |
+
const START_DATE_FORMAT = 'Y-m-d\T00:00:00\Z';
|
22 |
+
const END_DATE_FORMAT = 'Y-m-d\T23:59:59\Z';
|
23 |
+
const END_DATE_FORMAT_NOW = 'Y-m-d\TH:i:s\Z';
|
24 |
/**
|
25 |
* Page hook
|
26 |
*
|
106 |
|
107 |
/** Generate main page */
|
108 |
function generate_main_page() {
|
109 |
+
$client = new SendinblueApiClient();
|
110 |
+
|
111 |
+
$date = $this->get_selected_statistics_dates();
|
112 |
+
$data = [
|
113 |
+
'type' => 'classic',
|
114 |
+
'status' => 'sent',
|
115 |
+
'startDate' => $date['startDate'],
|
116 |
+
'endDate' => $date['endDate'],
|
117 |
+
'offset' => 0,
|
118 |
+
];
|
119 |
+
|
120 |
+
$emailCampaigns = $client->getAllCampaignsByType(SendinblueApiClient::CAMPAIGN_TYPE_EMAIL, $data);
|
121 |
+
$smsCampaigns = $client->getAllCampaignsByType(SendinblueApiClient::CAMPAIGN_TYPE_SMS, $data);
|
122 |
+
/**
|
123 |
+
* Statistics on general options
|
124 |
+
*/
|
125 |
+
?>
|
126 |
+
<h3><?php _e('Statistics', 'wc_sendinblue'); ?></h3>
|
127 |
+
<div id="sib-statistics-date-container">
|
128 |
+
<form method="POST" id="sib-statistics-form">
|
129 |
+
<label for="sib-statistics-date"><?php esc_attr_e( 'Date', 'sib_lang' );?>: </label>
|
130 |
+
<input id="sib-statistics-date" name="sib-statistics-date" value="<?php echo $date['statisticsDate']; ?>" autocomplete="off" class="button show-settings">
|
131 |
+
<button id="apply-date-range" class="button action"><?php esc_attr_e( 'Apply', 'sib_lang'); ?></button>
|
132 |
+
<span class="sib-spinner spinner"></span>
|
133 |
+
</form>
|
134 |
+
</div>
|
135 |
+
<?php
|
136 |
+
if (!empty($emailCampaigns)) {
|
137 |
+
?>
|
138 |
+
<table id="ws_statistics_table" class="wc_shipping widefat wp-list-table" cellspacing="0">
|
139 |
+
<thead>
|
140 |
+
<tr>
|
141 |
+
<th class="sort"> </th>
|
142 |
+
<th class=""><?php esc_attr_e( 'Name', 'sib_lang' );?></th>
|
143 |
+
<th class=""><?php esc_attr_e('Recipients','sib_lang');?></th>
|
144 |
+
<th class=""><?php esc_attr_e('Deliverability Rate','sib_lang');?></th>
|
145 |
+
<th class=""><?php esc_attr_e('Opens','sib_lang');?></th>
|
146 |
+
<th class=""><?php esc_attr_e('Clicks','sib_lang');?></th>
|
147 |
+
<th class=""><?php esc_attr_e('Unsubscriptions','sib_lang');?></th>
|
148 |
+
<th class=""><?php esc_attr_e('Bounces','sib_lang');?></th>
|
149 |
+
<th class=""><?php esc_attr_e('Date','sib_lang');?></th>
|
150 |
+
</tr>
|
151 |
+
</thead>
|
152 |
+
<tbody class="ui-sortable">
|
153 |
+
|
154 |
+
<div>
|
155 |
+
<h3 class="title"><?php esc_attr_e( 'Email Campaigns', 'sib_lang' );?></h3>
|
156 |
+
</div>
|
157 |
+
<?php
|
158 |
+
foreach($emailCampaigns as $campaign){ ?>
|
159 |
+
<tr id="<?php echo str_replace(' ', '-', $campaign['name']);?>">
|
160 |
+
<td width="1%" class="sort ui-sortable-handle">
|
161 |
+
<input type="hidden" name="method_order[flat_rate]" value="">
|
162 |
+
</td>
|
163 |
+
<td class=""><?php echo $campaign['name'];?></td>
|
164 |
+
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['sent'];?></td>
|
165 |
+
<td class="sib-statistics-data-value"><?php echo empty($campaign['statistics']['globalStats']['sent']) ? 0 : round($campaign['statistics']['globalStats']['delivered'] * 100 / $campaign['statistics']['globalStats']['sent'], 2);?>%</td>
|
166 |
+
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['viewed'];?></td>
|
167 |
+
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['clickers'];?></td>
|
168 |
+
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['unsubscriptions'];?></td>
|
169 |
+
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['softBounces'] + $campaign['statistics']['globalStats']['hardBounces'];?></td>
|
170 |
+
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($campaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
171 |
+
</tr>
|
172 |
+
<?php } ?>
|
173 |
+
</tbody>
|
174 |
+
</table>
|
175 |
+
<?php }?>
|
176 |
+
<?php
|
177 |
+
if (!empty($smsCampaigns)) {
|
178 |
+
?>
|
179 |
+
<table id="ws_statistics_table" class="wc_shipping widefat wp-list-table" cellspacing="0">
|
180 |
+
<thead>
|
181 |
+
<tr>
|
182 |
+
<th class="sort"> </th>
|
183 |
+
<th class=""><?php esc_attr_e( 'Name', 'sib_lang' );?></th>
|
184 |
+
<th class=""><?php esc_attr_e('Recipients','sib_lang');?></th>
|
185 |
+
<th class=""><?php esc_attr_e('Deliverability Rate','sib_lang');?></th>
|
186 |
+
<th class=""><?php esc_attr_e('Answeres','sib_lang');?></th>
|
187 |
+
<th class=""><?php esc_attr_e('Unsubscriptions','sib_lang');?></th>
|
188 |
+
<th class=""><?php esc_attr_e('Bounces','sib_lang');?></th>
|
189 |
+
<th class=""><?php esc_attr_e('Date','sib_lang');?></th>
|
190 |
+
</tr>
|
191 |
+
</thead>
|
192 |
+
<tbody class="ui-sortable">
|
193 |
+
|
194 |
+
<div>
|
195 |
+
<h3 class="title"><?php esc_attr_e( 'SMS Campaigns', 'sib_lang' );?></h3>
|
196 |
+
</div>
|
197 |
+
<?php
|
198 |
+
foreach($smsCampaigns as $smsCampaign){ ?>
|
199 |
+
<tr id="<?php echo str_replace(' ', '-', $smsCampaign['name']);?>">
|
200 |
+
<td width="1%" class="sort ui-sortable-handle">
|
201 |
+
<input type="hidden" name="method_order[flat_rate]" value="">
|
202 |
+
</td>
|
203 |
+
<td class=""><?php echo $smsCampaign['name'];?></td>
|
204 |
+
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['sent'];?></td>
|
205 |
+
<td class="sib-statistics-data-value"><?php echo empty($smsCampaign['statistics']['sent']) ? 0 : round($smsCampaign['statistics']['delivered'] * 100 / $smsCampaign['statistics']['sent'], 2);?>%</td>
|
206 |
+
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['answered'];?></td>
|
207 |
+
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['unsubscriptions'];?></td>
|
208 |
+
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['softBounces'] + $campaign['statistics']['hardBounces'];?></td>
|
209 |
+
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($smsCampaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
210 |
+
</tr>
|
211 |
+
<?php } ?>
|
212 |
+
</tbody>
|
213 |
+
</table>
|
214 |
+
<?php }
|
215 |
}
|
216 |
|
217 |
/** Generate welcome page */
|
221 |
<?php
|
222 |
SIB_Page_Home::print_disable_popup();
|
223 |
}
|
224 |
+
|
225 |
+
function get_selected_statistics_dates() {
|
226 |
+
$startDate = (new DateTime())->format(self::START_DATE_FORMAT);
|
227 |
+
$endDate = (new DateTime())->format(self::END_DATE_FORMAT_NOW);
|
228 |
+
|
229 |
+
if (empty($_POST['sib-statistics-date'])) {
|
230 |
+
$statisticsDate = date('Y-m-d');
|
231 |
+
} else {
|
232 |
+
$statisticsDate = sanitize_text_field($_POST['sib-statistics-date']);
|
233 |
+
$date = explode(' - ', $statisticsDate);
|
234 |
+
|
235 |
+
if (count($date) === 1) {
|
236 |
+
$date[] = $date[0];
|
237 |
+
}
|
238 |
+
|
239 |
+
$startDate = (new DateTime($date[0]));
|
240 |
+
$endDate = (new DateTime($date[1]));
|
241 |
+
if ($date[0] >= date('Y-m-d') || $date[1] >= date('Y-m-d')) {
|
242 |
+
$startDate = $startDate->format(self::START_DATE_FORMAT);
|
243 |
+
$endDate = (new DateTime())->format(self::END_DATE_FORMAT_NOW);
|
244 |
+
} elseif ($date[0] === $date[1]) {
|
245 |
+
$startDate = $startDate->format(self::START_DATE_FORMAT);
|
246 |
+
$endDate = $endDate->format(self::END_DATE_FORMAT);
|
247 |
+
} else {
|
248 |
+
$startDate = $startDate->format(self::START_DATE_FORMAT);
|
249 |
+
$endDate = $endDate->format(self::END_DATE_FORMAT);
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
return [
|
254 |
+
'statisticsDate' => $statisticsDate,
|
255 |
+
'startDate' => $startDate,
|
256 |
+
'endDate' => $endDate,
|
257 |
+
];
|
258 |
+
}
|
259 |
}
|
260 |
}
|
readme.txt
CHANGED
@@ -1,475 +1,453 @@
|
|
1 |
-
===
|
2 |
-
Contributors: neeraj_slit
|
3 |
-
Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
|
4 |
-
Requires at least: 4.4
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: trunk
|
7 |
-
License: GPLv2 or later
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
<a href="https://www.sendinblue.com/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=addons_page" target="_blank">Sendinblue</a>’s official plugin for WordPress is a powerful all-in-one email marketing plugin. At a glance:
|
15 |
-
<ul>
|
16 |
-
<li><b>Subscription forms</b>
|
17 |
-
<li><b>Contact lists</b>
|
18 |
-
<li><b>
|
19 |
-
<li><b>Transactional emails</b>
|
20 |
-
<li><b>Statistics</b>
|
21 |
-
<li><b>Marketing automation</b>
|
22 |
-
</ul>
|
23 |
-
|
24 |
-
=
|
25 |
-
<ul>
|
26 |
-
<li>
|
27 |
-
<li>Integration as widget or shortcode [sibwp_form]</li>
|
28 |
-
<li>Send a confirmation email
|
29 |
-
<li>Use a double opt-in
|
30 |
-
<li>URL redirection</li>
|
31 |
-
<li>Confirmation / error message customization</li>
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
<
|
37 |
-
<li>
|
38 |
-
<li>
|
39 |
-
<li>
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
<
|
44 |
-
</
|
45 |
-
|
46 |
-
|
47 |
-
<
|
48 |
-
<li>
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
<
|
53 |
-
<li>
|
54 |
-
<li>
|
55 |
-
<li>
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
<
|
61 |
-
<li>
|
62 |
-
<li>
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
<
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
*
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
*
|
152 |
-
|
153 |
-
= 2.9.
|
154 |
-
*
|
155 |
-
|
156 |
-
= 2.9.
|
157 |
-
*
|
158 |
-
|
159 |
-
= 2.9.
|
160 |
-
*
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
*
|
171 |
-
|
172 |
-
= 2.9.
|
173 |
-
*
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
*
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
*
|
184 |
-
|
185 |
-
|
186 |
-
= 2.9.
|
187 |
-
*
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
*
|
193 |
-
|
194 |
-
= 2.
|
195 |
-
*
|
196 |
-
*
|
197 |
-
*
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
*
|
202 |
-
* fix
|
203 |
-
|
204 |
-
= 2.
|
205 |
-
*
|
206 |
-
*
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
*
|
212 |
-
|
213 |
-
= 2.
|
214 |
-
*
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
*
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
*
|
224 |
-
* fix
|
225 |
-
|
226 |
-
= 2.
|
227 |
-
*
|
228 |
-
*
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
*
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
*
|
246 |
-
* fix
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
*
|
255 |
-
|
256 |
-
|
257 |
-
*
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
*
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
* Fix
|
271 |
-
|
272 |
-
= 2.6.
|
273 |
-
* Fix
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
*
|
279 |
-
*
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
* Fix
|
289 |
-
|
290 |
-
= 2.
|
291 |
-
* Fix
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
* Fix
|
296 |
-
*
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
*
|
319 |
-
|
320 |
-
= 2.
|
321 |
-
*
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
* Fix
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
*
|
335 |
-
|
336 |
-
= 2.4.
|
337 |
-
* Fix some
|
338 |
-
|
339 |
-
= 2.4.
|
340 |
-
*
|
341 |
-
|
342 |
-
= 2.4.
|
343 |
-
*
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
* Fix
|
350 |
-
|
351 |
-
= 2.4.
|
352 |
-
*
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
*
|
369 |
-
|
370 |
-
= 2.
|
371 |
-
*
|
372 |
-
|
373 |
-
= 2.
|
374 |
-
*
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
*
|
383 |
-
|
384 |
-
= 2.3.
|
385 |
-
*
|
386 |
-
*
|
387 |
-
|
388 |
-
= 2.3.
|
389 |
-
*
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
*
|
394 |
-
|
395 |
-
|
396 |
-
* Update the
|
397 |
-
|
398 |
-
= 2.3.
|
399 |
-
* Update
|
400 |
-
|
401 |
-
= 2.3.
|
402 |
-
*
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
*
|
416 |
-
|
417 |
-
|
418 |
-
* Update the
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
= 2.
|
428 |
-
*
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
*
|
435 |
-
|
436 |
-
= 2.
|
437 |
-
*
|
438 |
-
|
439 |
-
= 2.
|
440 |
-
*
|
441 |
-
*
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
*
|
452 |
-
|
453 |
-
|
454 |
-
* Update the default form UI
|
455 |
-
* Update french translation
|
456 |
-
* Add functionality to remove "white space" when input api info for login.
|
457 |
-
|
458 |
-
= 2.0.4 =
|
459 |
-
* Add security functionality
|
460 |
-
|
461 |
-
= 2.0.3 =
|
462 |
-
* Fix the encode error of French language
|
463 |
-
* Add the translation of some text
|
464 |
-
* Fix the Button size at French
|
465 |
-
|
466 |
-
= 2.0.2 =
|
467 |
-
* Fix the error of account detail
|
468 |
-
|
469 |
-
= 2.0.1 =
|
470 |
-
* Fix compatible error
|
471 |
-
|
472 |
-
= 2.0 =
|
473 |
-
* update sendinblue api
|
474 |
-
* Add functionality (List,Contact,Stat,Form Management)
|
475 |
-
* Update UI user-friendly
|
1 |
+
=== Sendinblue Subscribe Form And WP SMTP ===
|
2 |
+
Contributors: neeraj_slit
|
3 |
+
Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
|
4 |
+
Requires at least: 4.4
|
5 |
+
Tested up to: 5.2.2
|
6 |
+
Stable tag: trunk
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Easily send emails from your WordPress blog using your preferred SMTP server
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
<a href="https://www.sendinblue.com/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=addons_page" target="_blank">Sendinblue</a>’s official plugin for WordPress is a powerful all-in-one email marketing plugin. At a glance:
|
15 |
+
<ul>
|
16 |
+
<li><b>Subscription forms</b> - Create custom subscription forms and easily integrate them into your posts, pages or sidebars</li>
|
17 |
+
<li><b>Contact lists</b> - Manage your contact lists and take advantage of advanced segmentation to improve your campaign performance</li>
|
18 |
+
<li><b>Marketing campaigns</b> - Easily create and send beautiful newsletters using our mobile-friendly, drag and drop builder to create custom emails or select from our template library</li>
|
19 |
+
<li><b>Transactional emails</b> - The wp_mail() function automatically uses Sendinblue’s SMTP for enhanced deliverability and tracking</li>
|
20 |
+
<li><b>Statistics</b> - Real-time report dashboard gives you advanced insights into deliverability and performance: opens, clicks, bounce reports, etc.</li>
|
21 |
+
<li><b>Marketing automation</b> - Enable Automation on WordPress to auto-install the script on your website and the identify tag on the Sendinblue forms and Wordpress Login </li>
|
22 |
+
</ul>
|
23 |
+
|
24 |
+
= Subscription Forms =
|
25 |
+
<ul>
|
26 |
+
<li>Form designer with WYSIWYG and direct HTML / CSS editing (if desired)</li>
|
27 |
+
<li>Integration as widget or shortcode [sibwp_form]</li>
|
28 |
+
<li>Send a confirmation email - you choose the template and the sender</li>
|
29 |
+
<li>Use a double opt-in confirmation - you choose the template and the sender</li>
|
30 |
+
<li>URL redirection</li>
|
31 |
+
<li>Confirmation / error message customization</li>
|
32 |
+
</ul>
|
33 |
+
|
34 |
+
= Contact Lists =
|
35 |
+
<ul>
|
36 |
+
<li>Folder and lists management</li>
|
37 |
+
<li>CSV and TXT file import</li>
|
38 |
+
<li>Unlimited custom fields</li>
|
39 |
+
<li>Advanced segmentation. Example: Search for contacts who are less than 45 years who clicked links in my last 3 campaigns.</li>
|
40 |
+
</ul>
|
41 |
+
|
42 |
+
= Marketing Campaigns =
|
43 |
+
<ul>
|
44 |
+
<li>Responsive, drag and drop email design tools</li>
|
45 |
+
<li>Library of mobile-friendly, creative email design templates</li>
|
46 |
+
<li>Subject and content personalization. Example: Hello {NAME},</li>
|
47 |
+
<li>Inbox and design rendering tests for multiple devices and email clients</li>
|
48 |
+
<li>Schedule campaigns in advance</li>
|
49 |
+
</ul>
|
50 |
+
|
51 |
+
= Transactional Emails & Statistics =
|
52 |
+
<ul>
|
53 |
+
<li>Automatic replacement of default SMTP when you use wp_mail function</li>
|
54 |
+
<li>Create transactional email templates that are easy to reuse via the API</li>
|
55 |
+
<li>Real-time and exhaustive statistics: delivered, opened, clicked, etc.</li>
|
56 |
+
</ul>
|
57 |
+
|
58 |
+
= Marketing Automation =
|
59 |
+
<ul>
|
60 |
+
<li>Auto-installation of the automation script on your website</li>
|
61 |
+
<li>Auto-deployment of the identify tag for Sendinblue’s forms and Wordpress plugin</li>
|
62 |
+
<li>Access to the Sendinblue online dashboard for workflow creation and management</li>
|
63 |
+
</ul>
|
64 |
+
|
65 |
+
= Plugin Support =
|
66 |
+
To get support, please send an email to <a href="mailto:contact@sendinblue.com">contact@sendinblue.com</a>, we will be happy to help you!
|
67 |
+
|
68 |
+
The plugin is available in English and French.
|
69 |
+
|
70 |
+
== Installation ==
|
71 |
+
|
72 |
+
1. In your WordPress admin panel, go to Plugins > New Plugin, search for "Sendinblue for WP" and click "Install now". Alternatively, download the plugin and upload the contents of mailin.zip to your plugins directory, which may be /wp-content/plugins/.
|
73 |
+
2. Activate the Sendinblue plugin through the 'Plugins' menu in WordPress.
|
74 |
+
3. The "Sendinblue" tab must appear in your WordPress side navigation panel, then set your <a href="https://my.sendinblue.com/advanced/apikey/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=addons_page" target="_blank">Sendinblue API key</a> in the plugin homepage.
|
75 |
+
|
76 |
+
To get a Sendinblue API key, you have to <a href="https://app.sendinblue.com/account/register/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=addons_page" target="_blank">create an account</a>. It's free and takes less than 2 minutes!
|
77 |
+
|
78 |
+
== Screenshots ==
|
79 |
+
1. First, your are invited to create an account on Sendinblue then enter your API keys
|
80 |
+
2. The Homepage gives you an overall view over your campaigns and allows you to activate Sendinblue SMTP for all transactional emails and Marketing Automation to better target your customers
|
81 |
+
3. The Forms page gives you access to your forms list
|
82 |
+
4. When you click on a specific form, you can configure your sign up process and customize it
|
83 |
+
5. The Lists page allows you to see, edit or filter, your lists and your contacts
|
84 |
+
6. The Campaigns page summarizes your most recent campaign performance and allows you to create a new campaign using our responsive and user-friendly email designer
|
85 |
+
7. The Statistics page gives you a global view over your performance: delivered, opened, clicked, etc.
|
86 |
+
8. From the Widget page, you are able to add the Sendinblue widget in one or more sidebars. For each form, you can choose the fields displayed and the list where contacts are saved.
|
87 |
+
9. The Workflows page (Marketing Automation activated) allows you to create new workflows in Sendinblue or access your logs or existing workflows
|
88 |
+
|
89 |
+
== Frequently Asked Questions ==
|
90 |
+
|
91 |
+
= What is Sendinblue? =
|
92 |
+
Sendinblue is a powerful all-in-one marketing platform. Over 15,000 companies around the world trust Sendinblue to deliver their emails and SMS messages. Combining many powerful features, competitive pricing and excellent deliverability thanks to our proprietary cloud-based infrastructure, Sendinblue is available and supported in 6 languages: English, French, Spanish, German, Italian, and Portuguese.
|
93 |
+
|
94 |
+
= Why use Sendinblue as an SMTP relay for my website? =
|
95 |
+
By using Sendinblue’s SMTP, you will avoid the risk of having your legitimate emails ending up in the spam folder and you will have statistics on emails sent: deliverability, opens, clicks, etc. Sendinblue’s proprietary infrastructure optimizes your deliverability, enabling you to focus on your content.
|
96 |
+
|
97 |
+
= Why do I need a Sendinblue account? =
|
98 |
+
The Sendinblue for WordPress plugin uses Sendinblue’s API to synchronize contacts, send emails and get statistics. Creating an account on Sendinblue is free and takes less than 2 minutes. Once logged into your account, you can get the API key.
|
99 |
+
|
100 |
+
= Do I have to pay to use the plugin and send emails? =
|
101 |
+
No, the plugin is totally free and Sendinblue offers a free plan with 9,000 emails per month. If you need to send more than 9,000 emails / month, we invite you to see our pricing. For example, the Micro plan is $7.37 / month and allows you to send up to 40,000 emails per month. All Sendinblue plans are without any commitment.
|
102 |
+
|
103 |
+
= How do I get my get synchronize my lists? =
|
104 |
+
You have nothing to do - synchronization is automatic! It doesn't matter whether your lists were uploaded on your WordPress interface or on your Sendinblue account: they will always remain up-to-date on both sides.
|
105 |
+
|
106 |
+
= How can I get support? =
|
107 |
+
If you need some assistance, you can post an issue in the Support tab, or send us an email at contact@sendinblue.com.
|
108 |
+
|
109 |
+
= How do I create a signup form? =
|
110 |
+
In order to create a signup form, you need to:
|
111 |
+
1. Go to Wp admin > Sendinblue > Settings in order to define your form’s fields and settings
|
112 |
+
2. Integrate the form in a sidebar using a widget from WP panel > Appearance > Widgets. The Sendinblue widget form should appear in your widgets list, you just to have to drag and drop the widget into the sidebar of your choice.
|
113 |
+
|
114 |
+
== Changelog ==
|
115 |
+
= 3.0.0 =
|
116 |
+
* migrate to API v3
|
117 |
+
* remove iframe depended views
|
118 |
+
|
119 |
+
= 2.9.18 =
|
120 |
+
* Bug and Security fix
|
121 |
+
|
122 |
+
= 2.9.17 =
|
123 |
+
* Plugin page css conflict design issue fixed
|
124 |
+
* Multiple V2 Google recaptcha for same page issue fixed
|
125 |
+
* updated regex for test email
|
126 |
+
|
127 |
+
= 2.9.16 =
|
128 |
+
* Fixed date invalid format issue of form
|
129 |
+
* fixed terms and condition not working with invisible captcha bug
|
130 |
+
|
131 |
+
= 2.9.15 =
|
132 |
+
* Sib_security token issue has been fixed
|
133 |
+
|
134 |
+
= 2.9.14 =
|
135 |
+
* Form submission -1 issue and mailin class conflict issue has been fixed
|
136 |
+
|
137 |
+
= 2.9.13 =
|
138 |
+
* Added feature that allows to map WP boolean attributes to Sendinblue contacts
|
139 |
+
|
140 |
+
= 2.9.12 =
|
141 |
+
* Updated company description
|
142 |
+
|
143 |
+
= 2.9.11 =
|
144 |
+
* Add Validation on required fields when invisible captcha is enabled on Forms
|
145 |
+
* New Sender not Updated issue fixed
|
146 |
+
|
147 |
+
= 2.9.10 =
|
148 |
+
* new branding changes
|
149 |
+
|
150 |
+
= 2.9.9 =
|
151 |
+
* campaign and list page url issue fixed
|
152 |
+
|
153 |
+
= 2.9.8 =
|
154 |
+
* notation and variable issue fixed
|
155 |
+
|
156 |
+
= 2.9.7 =
|
157 |
+
* redirection issue fixed
|
158 |
+
|
159 |
+
= 2.9.6 =
|
160 |
+
* Fr translations fixes
|
161 |
+
* Small improvements related to Query Monitor, Form Redirection etc.
|
162 |
+
|
163 |
+
|
164 |
+
= 2.9.5 =
|
165 |
+
* Fix fr translation issue.
|
166 |
+
|
167 |
+
= 2.9.4 =
|
168 |
+
* Fix the doubleoptin issue for NTL
|
169 |
+
* update Sendinblue registration link
|
170 |
+
* Update translation
|
171 |
+
|
172 |
+
= 2.9.3 =
|
173 |
+
* Fix the issue that request ajax call on every page
|
174 |
+
* Fix sms field issue
|
175 |
+
* add required field alert message
|
176 |
+
|
177 |
+
= 2.9.2 =
|
178 |
+
* Add compliance note block to forms
|
179 |
+
* Add multi list subscription option
|
180 |
+
* fix Sendinblue account info display issue.
|
181 |
+
|
182 |
+
= 2.9.1 =
|
183 |
+
* fix "reply-to" email address issue
|
184 |
+
* fix the issue that doesn't sync "user role" attribute
|
185 |
+
|
186 |
+
= 2.9.0 =
|
187 |
+
* add country code prefix to sms field.
|
188 |
+
* send final confirmation email in Double Opt_in form
|
189 |
+
* change email validation rule
|
190 |
+
|
191 |
+
= 2.8.3 =
|
192 |
+
* fix compatible issue with old forms
|
193 |
+
|
194 |
+
= 2.8.2 =
|
195 |
+
* fix missing alt text for loading gif image
|
196 |
+
* update user attributes when user already exists in contact list
|
197 |
+
* Allow to use google recaptcha v2 and invisible recaptcha
|
198 |
+
* Change MA automation script
|
199 |
+
|
200 |
+
= 2.8.1 =
|
201 |
+
* fix double opt_in issue
|
202 |
+
* fix language support notice issue
|
203 |
+
|
204 |
+
= 2.8.0 =
|
205 |
+
* add compatibility with wpml plugin
|
206 |
+
* add invisible google captcha feature
|
207 |
+
* fix several security issues
|
208 |
+
* fix date format issue
|
209 |
+
|
210 |
+
= 2.7.3 =
|
211 |
+
* add independence between Sendinblue plugins
|
212 |
+
|
213 |
+
= 2.7.2 =
|
214 |
+
* add some note on plugin forms page
|
215 |
+
* fix responsive issue on plugin home page
|
216 |
+
* change the tutorial link
|
217 |
+
|
218 |
+
= 2.7.1 =
|
219 |
+
* fix version upgrade issue
|
220 |
+
|
221 |
+
= 2.7.0 =
|
222 |
+
* Integrate a term acceptance checkbox
|
223 |
+
* Change redirection for campaigns on plugin home page
|
224 |
+
* fix re-subscription issue for unsubscribed users
|
225 |
+
|
226 |
+
= 2.6.13 =
|
227 |
+
* Fix sendinblue dev url to prod url in list page
|
228 |
+
* Change google captcha function
|
229 |
+
|
230 |
+
= 2.6.12 =
|
231 |
+
* Sync users for all user roles such as forum role
|
232 |
+
* fix some typo in plugin homepage
|
233 |
+
|
234 |
+
= 2.6.11 =
|
235 |
+
* fix forms disappeared issue in v2.6.10
|
236 |
+
|
237 |
+
= 2.6.10 =
|
238 |
+
* fix google captcha issue in form preview
|
239 |
+
* add prefix to the custom tables
|
240 |
+
|
241 |
+
= 2.6.9 =
|
242 |
+
* fix conflict with other plugin's google Captcha
|
243 |
+
|
244 |
+
= 2.6.8 =
|
245 |
+
* add google Captcha box on the form
|
246 |
+
* fix MA automation issue
|
247 |
+
= 2.6.7 =
|
248 |
+
* Fix some browser compatibility issue for safari
|
249 |
+
|
250 |
+
= 2.6.6 =
|
251 |
+
* Fix browser compatibility issue for safari
|
252 |
+
|
253 |
+
= 2.6.5 =
|
254 |
+
* Add new feature to sync old your users to the desired list
|
255 |
+
* Fix email validation issue
|
256 |
+
* Fix warning issue of active_ma
|
257 |
+
* Use wordpress function for CURL request
|
258 |
+
* Add apply_filter() to the wp_mail() function
|
259 |
+
|
260 |
+
= 2.6.4 =
|
261 |
+
* Fix pre tag issue
|
262 |
+
* Fix unsubscribe link in email template
|
263 |
+
|
264 |
+
= 2.6.3 =
|
265 |
+
* Fix warning issue by WP_Error
|
266 |
+
* Fix p tag issue in javascript
|
267 |
+
|
268 |
+
= 2.6.2 =
|
269 |
+
* Fix set_magic_quotes_runtime() error
|
270 |
+
* Fix subscribe form issue
|
271 |
+
|
272 |
+
= 2.6.1 =
|
273 |
+
* Fix some language issues
|
274 |
+
* Fix attachement in confirmation email
|
275 |
+
* Apply nl2br on text/plain only
|
276 |
+
|
277 |
+
= 2.6.0 =
|
278 |
+
* Integrate Marketing Automation
|
279 |
+
* Update to use multi forms
|
280 |
+
|
281 |
+
= 2.5.5 =
|
282 |
+
* Fix send email issue
|
283 |
+
|
284 |
+
= 2.5.4 =
|
285 |
+
* Fix warning issue by get sender detail
|
286 |
+
|
287 |
+
= 2.5.3 =
|
288 |
+
* Fix some warning issue to send email
|
289 |
+
|
290 |
+
= 2.5.2 =
|
291 |
+
* Fix send email issue on php 7.0
|
292 |
+
|
293 |
+
= 2.5.1 =
|
294 |
+
* Fix sender list issue
|
295 |
+
* Fix attachment issue in transactional email
|
296 |
+
* Update form ajax process
|
297 |
+
|
298 |
+
= 2.5.0 =
|
299 |
+
* Improvement the sender list
|
300 |
+
|
301 |
+
= 2.4.15 =
|
302 |
+
* Fix transactional email issue
|
303 |
+
|
304 |
+
= 2.4.14 =
|
305 |
+
* Fix SMTP issue using wp_mail
|
306 |
+
* Fix some warning issue
|
307 |
+
|
308 |
+
= 2.4.13 =
|
309 |
+
* Fix some warning issue
|
310 |
+
|
311 |
+
= 2.4.12 =
|
312 |
+
* Fix issue for double optin redirection
|
313 |
+
|
314 |
+
= 2.4.11 =
|
315 |
+
* Fix some errors related to SSL certificate
|
316 |
+
|
317 |
+
= 2.4.10 =
|
318 |
+
* Fix page reload problem on submitting form data
|
319 |
+
|
320 |
+
= 2.4.9 =
|
321 |
+
* Improve transaction template with tags
|
322 |
+
* Improve subscriber's ip attribute
|
323 |
+
* Fix some warning issue
|
324 |
+
|
325 |
+
= 2.4.8 =
|
326 |
+
* Update email credits.
|
327 |
+
* Fix language issue in iframe
|
328 |
+
|
329 |
+
= 2.4.7 =
|
330 |
+
* Fix exception functionality of curl.
|
331 |
+
|
332 |
+
= 2.4.6 =
|
333 |
+
* Fix some issue of curl request.
|
334 |
+
* Improve subscriber's attributes for double optin.
|
335 |
+
|
336 |
+
= 2.4.5 =
|
337 |
+
* Fix some warning issue and translation
|
338 |
+
|
339 |
+
= 2.4.4 =
|
340 |
+
* Update sendinblue API library into V2.0
|
341 |
+
|
342 |
+
= 2.4.3 =
|
343 |
+
* Fix some warning issue
|
344 |
+
|
345 |
+
= 2.4.2 =
|
346 |
+
* Fix sender issue
|
347 |
+
|
348 |
+
= 2.4.1 =
|
349 |
+
* Fix ajax warning bug
|
350 |
+
|
351 |
+
= 2.4.0 =
|
352 |
+
* Security update to prevent XSS attack.
|
353 |
+
* Improve transaction template with personalize data.
|
354 |
+
* Improve widget.
|
355 |
+
|
356 |
+
= 2.3.13 =
|
357 |
+
* No changes in "Settings" after update.
|
358 |
+
|
359 |
+
= 2.3.12 =
|
360 |
+
* Improve validation process.
|
361 |
+
|
362 |
+
= 2.3.11 =
|
363 |
+
* Update validation process.
|
364 |
+
* Improve error message.
|
365 |
+
|
366 |
+
= 2.3.10 =
|
367 |
+
* Add the functionality to integrate the category attributes of sendinblue.
|
368 |
+
* Improve loading of setting page.
|
369 |
+
|
370 |
+
= 2.3.9 =
|
371 |
+
* Change iframe url.
|
372 |
+
|
373 |
+
= 2.3.7 =
|
374 |
+
* Update the process for help message.
|
375 |
+
|
376 |
+
= 2.3.6 =
|
377 |
+
* Update the process for blacklisted contact.
|
378 |
+
|
379 |
+
= 2.3.5 =
|
380 |
+
* Improve the function that send template for confirm & double optin.
|
381 |
+
* Update the process for blacklisted contact.
|
382 |
+
* Fix the issue of wrong subject in selected template.
|
383 |
+
|
384 |
+
= 2.3.4 =
|
385 |
+
* Fix the issue that user can't send selected template for confirm & double optin.
|
386 |
+
* Fix the error if user don't have any sender on his setting.
|
387 |
+
|
388 |
+
= 2.3.3 =
|
389 |
+
* Improvement help message.
|
390 |
+
|
391 |
+
= 2.3.2 =
|
392 |
+
* Check with wordpress version 4.1.
|
393 |
+
* Add function to select mail template for double optin.
|
394 |
+
* Improvement help message.
|
395 |
+
* Fix padding issue of subscribe form.
|
396 |
+
* Update the state of smtp activation automatically.
|
397 |
+
|
398 |
+
= 2.3.1 =
|
399 |
+
* Update sender setting.
|
400 |
+
|
401 |
+
= 2.3.0 =
|
402 |
+
* Updated sendinblue api into v2.0.
|
403 |
+
Please use the Access Key of API 2.0 in setting of plugin after update plugin.
|
404 |
+
|
405 |
+
= 2.2.5 =
|
406 |
+
* Add exception functionality.
|
407 |
+
|
408 |
+
= 2.2.4 =
|
409 |
+
* Fix some warning issues.
|
410 |
+
|
411 |
+
= 2.2.3 =
|
412 |
+
* Fix sender's details when send email by using wp_mail().
|
413 |
+
|
414 |
+
= 2.2.2 =
|
415 |
+
* Fixed some issue of curl request.
|
416 |
+
|
417 |
+
= 2.2.1 =
|
418 |
+
* Update the french encoding.
|
419 |
+
* Fixed multi-language issue
|
420 |
+
|
421 |
+
= 2.2.0 =
|
422 |
+
* Update the feautre of smtp activation
|
423 |
+
|
424 |
+
= 2.1.2 =
|
425 |
+
* Update button UI CSS of subscription form
|
426 |
+
|
427 |
+
= 2.1.1 =
|
428 |
+
* Fix login issue
|
429 |
+
* Test on Wordpress 4.0
|
430 |
+
|
431 |
+
= 2.1.0 =
|
432 |
+
* Update the default form UI
|
433 |
+
* Update french translation
|
434 |
+
* Add functionality to remove "white space" when input api info for login.
|
435 |
+
|
436 |
+
= 2.0.4 =
|
437 |
+
* Add security functionality
|
438 |
+
|
439 |
+
= 2.0.3 =
|
440 |
+
* Fix the encode error of French language
|
441 |
+
* Add the translation of some text
|
442 |
+
* Fix the Button size at French
|
443 |
+
|
444 |
+
= 2.0.2 =
|
445 |
+
* Fix the error of account detail
|
446 |
+
|
447 |
+
= 2.0.1 =
|
448 |
+
* Fix compatible error
|
449 |
+
|
450 |
+
= 2.0 =
|
451 |
+
* update sendinblue api
|
452 |
+
* Add functionality (List,Contact,Stat,Form Management)
|
453 |
+
* Update UI user-friendly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sendinblue.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name:
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Easily send emails from your WordPress blog using Sendinblue SMTP and easily add a subscribe form to your site
|
6 |
-
* Version:
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
@@ -28,9 +28,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
28 |
/**
|
29 |
* Application entry point. Contains plugin startup class that loads on <i> sendinblue_init </i> action.
|
30 |
*/
|
31 |
-
if ( ! class_exists( '
|
32 |
require_once( 'inc/mailin.php' );
|
33 |
}
|
|
|
|
|
|
|
34 |
// For marketing automation.
|
35 |
if ( ! class_exists( 'Sendinblue' ) ) {
|
36 |
require_once( 'inc/sendinblue.php' );
|
@@ -43,8 +46,6 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
43 |
|
44 |
require_once( 'page/page-home.php' );
|
45 |
require_once( 'page/page-form.php' );
|
46 |
-
require_once( 'page/page-lists.php' );
|
47 |
-
require_once( 'page/page-campaigns.php' );
|
48 |
require_once( 'page/page-statistics.php' );
|
49 |
require_once( 'page/page-scenarios.php' );
|
50 |
require_once( 'widget/widget_form.php' );
|
@@ -78,10 +79,13 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
78 |
/** Form preview option name */
|
79 |
const PREVIEW_OPTION_NAME = 'sib_preview_form';
|
80 |
|
|
|
|
|
81 |
/** Request url of sendinblue api */
|
82 |
const SENDINBLUE_API_URL = 'https://api.sendinblue.com/v2.0';
|
|
|
83 |
|
84 |
-
|
85 |
* API key
|
86 |
*
|
87 |
* @var $access_key
|
@@ -176,6 +180,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
176 |
// change sib tables name on prior(2.6.9) versions.
|
177 |
SIB_Model_Users::add_prefix();
|
178 |
SIB_Forms::add_prefix();
|
|
|
179 |
|
180 |
if ( self::is_done_validation() === true ) {
|
181 |
add_shortcode( 'sibwp_form', array( &$this, 'sibwp_form_shortcode' ) );
|
@@ -269,21 +274,33 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
269 |
*/
|
270 |
function init() {
|
271 |
// Sign up process.
|
272 |
-
if ( isset( $_POST['sib_form_action'] ) && ( 'subscribe_form_submit' == $_POST['sib_form_action'] ) ) {
|
273 |
$this->signup_process();
|
274 |
}
|
275 |
// Subscribe.
|
276 |
-
if ( isset( $_GET['sib_action'] ) && ( 'subscribe' == $_GET['sib_action'] ) ) {
|
277 |
SIB_API_Manager::subscribe();
|
278 |
exit;
|
279 |
}
|
280 |
// Dismiss language notice.
|
281 |
-
if ( isset( $_GET['dismiss_admin_lang_notice'] ) && '1' == $_GET['dismiss_admin_lang_notice'] ) {
|
282 |
update_option( SIB_Manager::LANGUAGE_OPTION_NAME, true );
|
283 |
wp_safe_redirect( $_SERVER['HTTP_REFERER'] );
|
284 |
exit();
|
285 |
}
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
add_action( 'wp_head', array( &$this, 'install_ma_script' ) );
|
288 |
}
|
289 |
|
@@ -305,8 +322,6 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
305 |
SIB_Manager::LoadTextDomain();
|
306 |
new SIB_Page_Home();
|
307 |
new SIB_Page_Form();
|
308 |
-
new SIB_Page_Lists();
|
309 |
-
new SIB_Page_Campaigns();
|
310 |
new SIB_Page_Statistics();
|
311 |
$home_settings = get_option( SIB_Manager::HOME_OPTION_NAME );
|
312 |
if ( isset( $home_settings['activate_ma'] ) && 'yes' == $home_settings['activate_ma'] ) {
|
@@ -322,7 +337,9 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
322 |
wp_register_script( 'sib-bootstrap-js', self::$plugin_url . '/js/bootstrap/js/bootstrap.min.js', array( 'jquery' ), null );
|
323 |
wp_register_script( 'sib-admin-js', self::$plugin_url . '/js/admin.js', array( 'jquery' ), filemtime( self::$plugin_dir . '/js/admin.js' ) );
|
324 |
wp_register_script( 'sib-chosen-js', self::$plugin_url . '/js/chosen.jquery.min.js', array( 'jquery' ), null );
|
325 |
-
|
|
|
|
|
326 |
|
327 |
/**
|
328 |
* Register stylesheet for admin page
|
@@ -332,6 +349,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
332 |
wp_register_style( 'sib-fontawesome-css', self::$plugin_url . '/css/fontawesome/css/font-awesome.css', array(), null, 'all' );
|
333 |
wp_register_style( 'sib-chosen-css', self::$plugin_url . '/css/chosen.min.css' );
|
334 |
wp_register_style( 'sib-admin-css', self::$plugin_url . '/css/admin.css', array(), filemtime( self::$plugin_dir . '/css/admin.css' ), 'all' );
|
|
|
335 |
}
|
336 |
|
337 |
/**
|
@@ -399,7 +417,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
399 |
// Delete access_token.
|
400 |
$token_settings = array();
|
401 |
update_option( SIB_Manager::ACCESS_TOKEN_OPTION_NAME, $token_settings );
|
402 |
-
|
403 |
// Empty tables.
|
404 |
SIB_Model_Users::removeTable();
|
405 |
SIB_Forms::removeTable();
|
@@ -424,13 +442,15 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
424 |
* Check that have done validation process already.
|
425 |
*/
|
426 |
static function is_done_validation() {
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
}
|
|
|
|
|
434 |
}
|
435 |
|
436 |
/**
|
@@ -529,13 +549,13 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
529 |
src="<?php echo esc_url( includes_url() ); ?>/images/spinner.gif" alt="loader"></div>
|
530 |
<input type="hidden" name="sib_form_action" value="subscribe_form_submit">
|
531 |
<input type="hidden" name="sib_form_id" value="<?php echo esc_attr( $frmID ); ?>">
|
532 |
-
|
533 |
-
|
534 |
<div class="sib_signup_box_inside_<?php echo esc_attr( $frmID ); ?>">
|
535 |
<div style="/*display:none*/" class="sib_msg_disp">
|
536 |
</div>
|
537 |
<?php
|
538 |
-
echo $formData['html'];
|
539 |
?>
|
540 |
</div>
|
541 |
</form>
|
@@ -581,7 +601,6 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
581 |
* Sign up process
|
582 |
*/
|
583 |
function signup_process() {
|
584 |
-
//check_ajax_referer( 'sib_front_ajax_nonce', 'security' );
|
585 |
if ( empty( $_POST['sib_security'] ) ) {
|
586 |
wp_send_json(
|
587 |
array(
|
@@ -612,33 +631,40 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
612 |
'response' => sanitize_text_field( $_POST['g-recaptcha-response'] ),
|
613 |
);
|
614 |
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
}
|
632 |
|
633 |
$listID = $formData['listID'];
|
634 |
if (empty($listID)) {
|
635 |
$listID = array();
|
636 |
}
|
637 |
-
$interestingLists = isset( $_POST['interestingLists']) ? $_POST['interestingLists'] : array();
|
638 |
-
$expectedLists = isset( $_POST['listIDs'] ) ? $_POST['listIDs'] : array();
|
639 |
if ( empty($interestingLists) )
|
640 |
{
|
641 |
-
$unlinkedLists =
|
642 |
}
|
643 |
else{
|
644 |
$unwantedLists = array_diff( $interestingLists, $expectedLists );
|
@@ -646,7 +672,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
646 |
$listID = array_unique(array_merge( $listID, $expectedLists ));
|
647 |
}
|
648 |
|
649 |
-
$email = isset( $_POST['email'] ) ?
|
650 |
if ( ! is_email( $email ) ) {
|
651 |
return;
|
652 |
}
|
@@ -767,7 +793,8 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
767 |
* @return mixed|WP_Error
|
768 |
*/
|
769 |
static function sib_email( $to, $subject, $message, $headers = '', $attachments = array(), $tags = array(), $from_name = '', $from_email = '' ) {
|
770 |
-
|
|
|
771 |
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
|
772 |
|
773 |
if ( ! is_array( $attachments ) ) {
|
@@ -786,13 +813,8 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
786 |
$from_email = apply_filters( 'wp_mail_from', $from_email );
|
787 |
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
|
788 |
|
789 |
-
|
790 |
-
|
791 |
-
$headers = array();
|
792 |
-
$reply = array();
|
793 |
-
$bcc = array();
|
794 |
-
$cc = array();
|
795 |
-
} else {
|
796 |
if ( ! is_array( $headers ) ) {
|
797 |
// Explode the headers out, so this function can take both.
|
798 |
// string headers and an array of headers.
|
@@ -801,9 +823,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
801 |
$tempheaders = $headers;
|
802 |
}
|
803 |
$headers = array();
|
804 |
-
$reply = array();
|
805 |
$bcc = array();
|
806 |
-
$cc = array();
|
807 |
// If it's actually got contents.
|
808 |
if ( ! empty( $tempheaders ) ) {
|
809 |
// Iterate through the raw headers.
|
@@ -852,7 +872,10 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
852 |
$bcc_content = str_replace( '>', '', $bcc_content );
|
853 |
$bcc[ trim( $bcc_content ) ] = '';
|
854 |
} else {
|
855 |
-
|
|
|
|
|
|
|
856 |
}
|
857 |
break;
|
858 |
case 'cc':
|
@@ -860,9 +883,9 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
860 |
{
|
861 |
$cc_content = substr( $content, strpos( $content, '<' ) + 1 );
|
862 |
$cc_content = str_replace( '>', '', $cc_content );
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
}
|
867 |
break;
|
868 |
case 'reply-to':
|
@@ -870,9 +893,13 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
870 |
{
|
871 |
$reply_content = substr( $content, strpos( $content, '<' ) + 1 );
|
872 |
$reply_content = str_replace( '>', '', $reply_content );
|
873 |
-
$reply
|
874 |
} else {
|
875 |
-
$reply
|
|
|
|
|
|
|
|
|
876 |
}
|
877 |
break;
|
878 |
default:
|
@@ -892,10 +919,11 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
892 |
if ( is_array( $email ) ) {
|
893 |
$processed_to[] = $email;
|
894 |
} else {
|
895 |
-
$processed_to[
|
896 |
}
|
897 |
}
|
898 |
-
$to = $processed_to;
|
|
|
899 |
|
900 |
// Attachments.
|
901 |
$attachment_content = array();
|
@@ -906,6 +934,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
906 |
$attachment_content = array_merge( $attachment_content, $content );
|
907 |
}
|
908 |
}
|
|
|
909 |
}
|
910 |
|
911 |
// Common transformations for the HTML part.
|
@@ -924,17 +953,9 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
924 |
}
|
925 |
}
|
926 |
// Sending...
|
927 |
-
$data =
|
928 |
-
|
929 |
-
|
930 |
-
'cc' => $cc,
|
931 |
-
'bcc' => $bcc,
|
932 |
-
'replyto' => $reply,
|
933 |
-
'subject' => $subject,
|
934 |
-
'headers' => $headers,
|
935 |
-
'attachment' => $attachment_content,
|
936 |
-
'html' => $message,
|
937 |
-
);
|
938 |
|
939 |
try {
|
940 |
$sent = SIB_API_Manager::send_email( $data );
|
@@ -1129,7 +1150,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1129 |
|
1130 |
if ( 'sib_page_form' === $page && 'edit' === $action ) {
|
1131 |
?>
|
1132 |
-
<div class="panel panel-default text-left box-border-box small-content">
|
1133 |
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'sib_lang' ); ?></strong></div>
|
1134 |
<div class="panel-body">
|
1135 |
<p>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Sendinblue Subscribe Form And WP SMTP
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Easily send emails from your WordPress blog using Sendinblue SMTP and easily add a subscribe form to your site
|
6 |
+
* Version: 3.0.0
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
28 |
/**
|
29 |
* Application entry point. Contains plugin startup class that loads on <i> sendinblue_init </i> action.
|
30 |
*/
|
31 |
+
if ( ! class_exists( 'Mailin' ) ) {
|
32 |
require_once( 'inc/mailin.php' );
|
33 |
}
|
34 |
+
if ( ! class_exists( 'SendinblueApiClient' ) ) {
|
35 |
+
require_once( 'inc/SendinblueApiClient.php' );
|
36 |
+
}
|
37 |
// For marketing automation.
|
38 |
if ( ! class_exists( 'Sendinblue' ) ) {
|
39 |
require_once( 'inc/sendinblue.php' );
|
46 |
|
47 |
require_once( 'page/page-home.php' );
|
48 |
require_once( 'page/page-form.php' );
|
|
|
|
|
49 |
require_once( 'page/page-statistics.php' );
|
50 |
require_once( 'page/page-scenarios.php' );
|
51 |
require_once( 'widget/widget_form.php' );
|
79 |
/** Form preview option name */
|
80 |
const PREVIEW_OPTION_NAME = 'sib_preview_form';
|
81 |
|
82 |
+
const API_KEY_V3_OPTION_NAME = 'sib_api_key_v3';
|
83 |
+
|
84 |
/** Request url of sendinblue api */
|
85 |
const SENDINBLUE_API_URL = 'https://api.sendinblue.com/v2.0';
|
86 |
+
const RECAPTCHA_API_TEMPLATE = 'https://www.google.com/recaptcha/api/siteverify?%s';
|
87 |
|
88 |
+
/**
|
89 |
* API key
|
90 |
*
|
91 |
* @var $access_key
|
180 |
// change sib tables name on prior(2.6.9) versions.
|
181 |
SIB_Model_Users::add_prefix();
|
182 |
SIB_Forms::add_prefix();
|
183 |
+
SIB_Forms::modify_datatype();
|
184 |
|
185 |
if ( self::is_done_validation() === true ) {
|
186 |
add_shortcode( 'sibwp_form', array( &$this, 'sibwp_form_shortcode' ) );
|
274 |
*/
|
275 |
function init() {
|
276 |
// Sign up process.
|
277 |
+
if ( isset( $_POST['sib_form_action'] ) && ( 'subscribe_form_submit' == sanitize_text_field($_POST['sib_form_action']) ) ) {
|
278 |
$this->signup_process();
|
279 |
}
|
280 |
// Subscribe.
|
281 |
+
if ( isset( $_GET['sib_action'] ) && ( 'subscribe' == sanitize_text_field($_GET['sib_action']) ) ) {
|
282 |
SIB_API_Manager::subscribe();
|
283 |
exit;
|
284 |
}
|
285 |
// Dismiss language notice.
|
286 |
+
if ( isset( $_GET['dismiss_admin_lang_notice'] ) && '1' == sanitize_text_field($_GET['dismiss_admin_lang_notice']) ) {
|
287 |
update_option( SIB_Manager::LANGUAGE_OPTION_NAME, true );
|
288 |
wp_safe_redirect( $_SERVER['HTTP_REFERER'] );
|
289 |
exit();
|
290 |
}
|
291 |
|
292 |
+
$api_key_v3 = get_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
293 |
+
if (empty($api_key_v3)) {
|
294 |
+
$general_settings = get_option( self::MAIN_OPTION_NAME, array() );
|
295 |
+
if (isset($general_settings['access_key'])) {
|
296 |
+
$client = new Mailin(SIB_Manager::SENDINBLUE_API_URL, $general_settings['access_key']);
|
297 |
+
$response = $client->generateApiV3Key();
|
298 |
+
if (!empty($response['data']['value'])) {
|
299 |
+
update_option(SIB_Manager::API_KEY_V3_OPTION_NAME, $response['data']['value']);
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
add_action( 'wp_head', array( &$this, 'install_ma_script' ) );
|
305 |
}
|
306 |
|
322 |
SIB_Manager::LoadTextDomain();
|
323 |
new SIB_Page_Home();
|
324 |
new SIB_Page_Form();
|
|
|
|
|
325 |
new SIB_Page_Statistics();
|
326 |
$home_settings = get_option( SIB_Manager::HOME_OPTION_NAME );
|
327 |
if ( isset( $home_settings['activate_ma'] ) && 'yes' == $home_settings['activate_ma'] ) {
|
337 |
wp_register_script( 'sib-bootstrap-js', self::$plugin_url . '/js/bootstrap/js/bootstrap.min.js', array( 'jquery' ), null );
|
338 |
wp_register_script( 'sib-admin-js', self::$plugin_url . '/js/admin.js', array( 'jquery' ), filemtime( self::$plugin_dir . '/js/admin.js' ) );
|
339 |
wp_register_script( 'sib-chosen-js', self::$plugin_url . '/js/chosen.jquery.min.js', array( 'jquery' ), null );
|
340 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
341 |
+
wp_enqueue_script('jquery-ui-spinner');
|
342 |
+
}
|
343 |
|
344 |
/**
|
345 |
* Register stylesheet for admin page
|
349 |
wp_register_style( 'sib-fontawesome-css', self::$plugin_url . '/css/fontawesome/css/font-awesome.css', array(), null, 'all' );
|
350 |
wp_register_style( 'sib-chosen-css', self::$plugin_url . '/css/chosen.min.css' );
|
351 |
wp_register_style( 'sib-admin-css', self::$plugin_url . '/css/admin.css', array(), filemtime( self::$plugin_dir . '/css/admin.css' ), 'all' );
|
352 |
+
wp_enqueue_style( 'sib-jquery-ui-datepicker', self::$plugin_url . '/css/datepicker.css', false, false, false );
|
353 |
}
|
354 |
|
355 |
/**
|
417 |
// Delete access_token.
|
418 |
$token_settings = array();
|
419 |
update_option( SIB_Manager::ACCESS_TOKEN_OPTION_NAME, $token_settings );
|
420 |
+
delete_option(SIB_Manager::API_KEY_V3_OPTION_NAME);
|
421 |
// Empty tables.
|
422 |
SIB_Model_Users::removeTable();
|
423 |
SIB_Forms::removeTable();
|
442 |
* Check that have done validation process already.
|
443 |
*/
|
444 |
static function is_done_validation() {
|
445 |
+
if (get_option(SIB_Manager::API_KEY_V3_OPTION_NAME)) {
|
446 |
+
$apiClient = new SendinblueApiClient();
|
447 |
+
$apiClient->getAccount();
|
448 |
+
if ( $apiClient->getLastResponseCode() === SendinblueApiClient::RESPONSE_CODE_OK ) {
|
449 |
+
return true;
|
450 |
+
}
|
451 |
}
|
452 |
+
|
453 |
+
return false;
|
454 |
}
|
455 |
|
456 |
/**
|
549 |
src="<?php echo esc_url( includes_url() ); ?>/images/spinner.gif" alt="loader"></div>
|
550 |
<input type="hidden" name="sib_form_action" value="subscribe_form_submit">
|
551 |
<input type="hidden" name="sib_form_id" value="<?php echo esc_attr( $frmID ); ?>">
|
552 |
+
<input type="hidden" name="sib_form_alert_notice" value="<?php echo esc_attr($formData['requiredMsg']); ?>">
|
553 |
+
<input type="hidden" name="sib_security" value="<?php echo esc_attr( wp_create_nonce( 'sib_front_ajax_nonce' ) ); ?>">
|
554 |
<div class="sib_signup_box_inside_<?php echo esc_attr( $frmID ); ?>">
|
555 |
<div style="/*display:none*/" class="sib_msg_disp">
|
556 |
</div>
|
557 |
<?php
|
558 |
+
echo stripcslashes($formData['html']);
|
559 |
?>
|
560 |
</div>
|
561 |
</form>
|
601 |
* Sign up process
|
602 |
*/
|
603 |
function signup_process() {
|
|
|
604 |
if ( empty( $_POST['sib_security'] ) ) {
|
605 |
wp_send_json(
|
606 |
array(
|
631 |
'response' => sanitize_text_field( $_POST['g-recaptcha-response'] ),
|
632 |
);
|
633 |
|
634 |
+
$args = [
|
635 |
+
'method' => 'POST',
|
636 |
+
];
|
637 |
+
|
638 |
+
try {
|
639 |
+
$data = wp_remote_retrieve_body(wp_remote_request(sprintf(self::RECAPTCHA_API_TEMPLATE, http_build_query($data)), $args));
|
640 |
+
$responseData = json_decode($data);
|
641 |
+
if ( ! $responseData->success ) {
|
642 |
+
wp_send_json(
|
643 |
+
array(
|
644 |
+
'status' => 'gcaptchaFail',
|
645 |
+
'msg' => 'Robot verification failed, please try again.',
|
646 |
+
)
|
647 |
+
);
|
648 |
+
}
|
649 |
+
} catch (Exception $exception) {
|
650 |
+
wp_send_json(
|
651 |
+
array(
|
652 |
+
'status' => 'gcaptchaFail',
|
653 |
+
'msg' => $exception->getMessage(),
|
654 |
+
)
|
655 |
+
);
|
656 |
+
}
|
657 |
}
|
658 |
|
659 |
$listID = $formData['listID'];
|
660 |
if (empty($listID)) {
|
661 |
$listID = array();
|
662 |
}
|
663 |
+
$interestingLists = isset( $_POST['interestingLists']) ? sanitize_text_field($_POST['interestingLists']) : array();
|
664 |
+
$expectedLists = isset( $_POST['listIDs'] ) ? sanitize_text_field($_POST['listIDs']) : array();
|
665 |
if ( empty($interestingLists) )
|
666 |
{
|
667 |
+
$unlinkedLists = [];
|
668 |
}
|
669 |
else{
|
670 |
$unwantedLists = array_diff( $interestingLists, $expectedLists );
|
672 |
$listID = array_unique(array_merge( $listID, $expectedLists ));
|
673 |
}
|
674 |
|
675 |
+
$email = isset( $_POST['email'] ) ? sanitize_email( $_POST['email'] ) : '';
|
676 |
if ( ! is_email( $email ) ) {
|
677 |
return;
|
678 |
}
|
793 |
* @return mixed|WP_Error
|
794 |
*/
|
795 |
static function sib_email( $to, $subject, $message, $headers = '', $attachments = array(), $tags = array(), $from_name = '', $from_email = '' ) {
|
796 |
+
$data = [];
|
797 |
+
// Compact the input, apply the filters, and extract them back out.
|
798 |
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
|
799 |
|
800 |
if ( ! is_array( $attachments ) ) {
|
813 |
$from_email = apply_filters( 'wp_mail_from', $from_email );
|
814 |
$from_name = apply_filters( 'wp_mail_from_name', $from_name );
|
815 |
|
816 |
+
if ( !empty( $headers ) ) {
|
817 |
+
$data['headers'] = $headers;
|
|
|
|
|
|
|
|
|
|
|
818 |
if ( ! is_array( $headers ) ) {
|
819 |
// Explode the headers out, so this function can take both.
|
820 |
// string headers and an array of headers.
|
823 |
$tempheaders = $headers;
|
824 |
}
|
825 |
$headers = array();
|
|
|
826 |
$bcc = array();
|
|
|
827 |
// If it's actually got contents.
|
828 |
if ( ! empty( $tempheaders ) ) {
|
829 |
// Iterate through the raw headers.
|
872 |
$bcc_content = str_replace( '>', '', $bcc_content );
|
873 |
$bcc[ trim( $bcc_content ) ] = '';
|
874 |
} else {
|
875 |
+
|
876 |
+
if (!empty(trim( $content ))) {
|
877 |
+
$data['bcc'] = ['email' => trim( $content )];
|
878 |
+
}
|
879 |
}
|
880 |
break;
|
881 |
case 'cc':
|
883 |
{
|
884 |
$cc_content = substr( $content, strpos( $content, '<' ) + 1 );
|
885 |
$cc_content = str_replace( '>', '', $cc_content );
|
886 |
+
if (!empty(trim( $cc_content ))) {
|
887 |
+
$data['cc'] = ['email' => trim( $cc_content )];
|
888 |
+
}
|
889 |
}
|
890 |
break;
|
891 |
case 'reply-to':
|
893 |
{
|
894 |
$reply_content = substr( $content, strpos( $content, '<' ) + 1 );
|
895 |
$reply_content = str_replace( '>', '', $reply_content );
|
896 |
+
$reply = trim( $reply_content );
|
897 |
} else {
|
898 |
+
$reply = trim( $content );
|
899 |
+
}
|
900 |
+
|
901 |
+
if (!empty($reply)) {
|
902 |
+
$data['replyTo'] = ['email' => trim( $reply )];
|
903 |
}
|
904 |
break;
|
905 |
default:
|
919 |
if ( is_array( $email ) ) {
|
920 |
$processed_to[] = $email;
|
921 |
} else {
|
922 |
+
$processed_to[] = ['email' => $email];
|
923 |
}
|
924 |
}
|
925 |
+
$data['to'] = $processed_to;
|
926 |
+
|
927 |
|
928 |
// Attachments.
|
929 |
$attachment_content = array();
|
934 |
$attachment_content = array_merge( $attachment_content, $content );
|
935 |
}
|
936 |
}
|
937 |
+
$data['attachment'] = $attachment_content;
|
938 |
}
|
939 |
|
940 |
// Common transformations for the HTML part.
|
953 |
}
|
954 |
}
|
955 |
// Sending...
|
956 |
+
$data['sender'] = ['email' => $from_email, 'name' => $from_name ];
|
957 |
+
$data['subject'] = $subject;
|
958 |
+
$data['htmlContent'] = $message;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
959 |
|
960 |
try {
|
961 |
$sent = SIB_API_Manager::send_email( $data );
|
1150 |
|
1151 |
if ( 'sib_page_form' === $page && 'edit' === $action ) {
|
1152 |
?>
|
1153 |
+
<div class="panel panel-default text-left box-border-box sib-small-content">
|
1154 |
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'sib_lang' ); ?></strong></div>
|
1155 |
<div class="panel-body">
|
1156 |
<p>
|
widget/index.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
<?php
|
2 |
-
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
-
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
-
header('Pragma: no-cache');
|
7 |
-
header('Location: ../');
|
8 |
-
exit;
|
1 |
+
<?php
|
2 |
+
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
3 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
4 |
+
header('Cache-Control: no-store, no-cache, must-revalidate');
|
5 |
+
header('Cache-Control: post-check=0, pre-check=0', false);
|
6 |
+
header('Pragma: no-cache');
|
7 |
+
header('Location: ../');
|
8 |
+
exit;
|