email-templates-package.php
13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
62
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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
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
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
<?php
function download_email()
{
$name = $_REQUEST['name'];
$company = $_REQUEST['company'];
$title = $_REQUEST['title'];
$phone = $_REQUEST['phone'];
$designation = $_REQUEST['designation'];
$dir = '/var/www/html/production/fp-canada/current/wp-content/uploads/email_templates/';
$url = '/wp-content/uploads/email_templates/';
ob_start();?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<title></title>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style>
@font-face { font-family: Calibri;
src: url('https://yournumbers.ca/wp-content/themes/understrap-child/Calibri.woff') format('woff'); }
@font-face { font-family: Calibri-bold;
src: url('https://yournumbers.ca/wp-content/themes/understrap-child/Calibri-Bold.woff') format('woff'); }
table, td, div, h1, p {font-family: Calibri;}
strong{font-family: Calibri;}
</style>
</head>
<body style="margin:0;padding:0;max-width: 600px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<tr>
<td align="center" style="padding:0;">
<table role="presentation" style="width:602px;border-collapse:collapse;border-spacing:0;text-align:left;">
<tr style="background-image:url('https://yournumbers.ca/wp-content/uploads/2022/02/Group-1061@2x.png'); height: 400px;background-size: cover;">
<td colspan="4" style="padding:36px 30px 0px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="padding:0 0 36px 0;color:#153643;height: 150px;">
</td>
</tr>
<tr>
<td style="padding: 0 0 0px 0;color:#153643;">
<h1 style="font-size:50px;line-height:55px;color:#012169;margin:0 0 20px 0; font-family: Calibri-bold;">
<br>
HOW MUCH BETTER CAN<br>TOMORROW LOOK?
</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr style="background:#ffffff;">
<td colspan="4" style="padding:36px 30px 42px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td colspan="3" style="padding:0 0 36px 0;color:#153643;">
<p style="margin:0 0 12px 0;font-size:16px;line-height:20px;font-family: Calibri;color:#5B6770;">FP Canada™ survey results show Canadian consumers like you experience 16% less financial stress* when they work with a financial planning professional. It’s a nice number. But what does that look like for you? Maybe you sleep better. Or you and your life partner sing more from the same song sheet and harmony blossoms. Whatever reduced stress looks like for you, it is achievable today. And here’s another number: You’ll also have 17% more financial confidence in the future. That’s you, boldly looking ahead with a big smile.</p>
<p style="margin:0 0 12px 0;font-size:16px;line-height:20px;font-family: Calibri-bold;color:#012169;">The easiest way to realize the stress-busting, confidence-boosting benefits of professional financial planning is to start with one simple number. Talk to me today and see how your future adds up!</p>
</td>
</tr>
<tr>
<td align="left" width="90" style="border-right: #012169 1px solid;padding-top:10px;">
<?php if( $designation == 'CFP') { ?>
<img width="68" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1027@2x.png" class="img-fluid">
<?php }else{ ?>
<img width="68" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1026@2x.png" class="img-fluid">
<?php }?>
</td>
<td colspan="2" align="left" style="padding-left:20px;">
<?php echo $name.'<br>';?>
<?php if($company !="" || $title !=""){
echo $title.' '.$company.'<br>';
} ?>
<?php echo $phone;?>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="padding-bottom:40px">
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="padding-bottom:10px">
<p style="margin:0;font-size:20px;line-height:22px;font-family:Calibri;color:#5B6770;">Want to learn more about how easy it is to get started? Watch this video, pick a number and then let’s chat.</a></p>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="center" colspan="4" style="padding-bottom:10px">
<a href="https://youtu.be/KFcLr1zngS0">
<img width="533" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1060@2x.png"/>
</a>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="color:#5B6770;font: normal normal normal 12px/14px Calibri;padding-bottom:10px">
* Source: 2021 FP Canada Financial Stress Index.<br>
<?php if( $designation != 'CFP') { ?>
QAFP™ is a certification mark of FP Canada. Used under license.
<?php }else{ ?>
CFP®, Certified Financial Planner® and CFP logo are trademarks owned by Financial Planning Standards Board Ltd. (FPSB) and used under license. © 2022 FP Canada™. All rights reserved.
<?php }?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
$body = ob_get_clean();
file_put_contents($dir.'email_1_'.$name.'_'.date("m-d-y-H-i-s").".html", $body );
$file1 = $dir.'email_1_'.$name.'_'.date("m-d-y-H-i-s").".html";
ob_start();?>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<title></title>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style>
@font-face { font-family: Calibri;
src: url('https://yournumbers.ca/wp-content/themes/understrap-child/Calibri.woff') format('woff'); }
@font-face { font-family: Calibri-bold;
src: url('https://yournumbers.ca/wp-content/themes/understrap-child/Calibri-Bold.woff') format('woff'); }
table, td, div, h1, p {font-family: Calibri;}
strong{font-family: Calibri;}
</style>
</head>
<body style="margin:0;padding:0;max-width: 600px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<tr>
<td align="center" style="padding:0;">
<table role="presentation" style="width:602px;border-collapse:collapse;border-spacing:0;text-align:left;">
<tr style="background-image:url('https://yournumbers.ca/wp-content/uploads/2022/02/FP_WYN-Shy-Woman-1_F@2x.png'); height: 400px;background-size: cover;">
<td colspan="4" style="padding:36px 30px 0px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="padding:0 0 36px 0;color:#153643;height: 100px;">
</td>
</tr>
<tr>
<td style="padding: 0 0 70px 0;color:#fff;">
<h1 style="font-size:50px;line-height:55px;color:#fff;margin:0 0 20px 0; font-family: Calibri-bold;">
<br>
DON’T BE SHY.<br>EVERYONE HAS ONE.
</h1>
</td>
</tr>
</table>
</td>
</tr>
<tr style="background:#ffffff;">
<td colspan="4" style="padding:36px 30px 42px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td colspan="3" style="padding:0 0 36px 0;color:#153643;">
<p style="margin:0 0 12px 0;font-size:16px;line-height:20px;font-family: Calibri;color:#5B6770;">You’ve been using simple numbers to map your journey through life forever. From the birthdate your Mom never forgets to the street number on your new home to the mortgage number that you pay monthly. Numbers are simple signposts. So let’s think about your financial well-being in the context of simple numbers. Pick just one. One number that is important to you and we’ll use that as a starting point for a financial plan. We’ll connect your numbers together and we’ll adapt whenever life says you should. It’s an easy way to reduce stress and build financial confidence in your future. And you can start or expand your plan with me today.</p>
<p style="margin:0 0 12px 0;font-size:16px;line-height:20px;font-family: Calibri-bold;color:#012169;">The easiest way to realize the stress-busting, confidence-boosting benefits of professional financial planning is to start with one simple number. Talk to me today and see how your future adds up!</p>
</td>
</tr>
<tr>
<td align="left" width="90" style="border-right: #012169 1px solid;padding-top:10px;">
<?php if( $designation == 'CFP') { ?>
<img width="68" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1027@2x.png" class="img-fluid">
<?php }else{ ?>
<img width="68" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1026@2x.png" class="img-fluid">
<?php }?>
</td>
<td colspan="2" align="left" style="padding-left:20px;">
<?php echo $name.'<br>';?>
<?php if($company !="" || $title !=""){
echo $title.' '.$company.'<br>';
} ?>
<?php echo $phone;?>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="padding-bottom:40px">
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="padding-bottom:10px">
<p style="margin:0;font-size:20px;line-height:22px;font-family:Calibri;color:#5B6770;">Want to learn more about how easy it is to get started? Watch this video, pick a number and then let’s chat.</a></p>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="center" colspan="4" style="padding-bottom:10px">
<a href="https://youtu.be/KFcLr1zngS0">
<img width="533" src="https://yournumbers.ca/wp-content/uploads/2022/02/Group-1060@2x-1.png"/>
</a>
</td>
</tr>
<tr style="background:#ffffff;">
<td align="left" colspan="4" style="color:#5B6770;font: normal normal normal 12px/14px Calibri;padding-bottom:10px">
* Source: 2021 FP Canada Financial Stress Index.<br>
<?php if( $designation != 'CFP') { ?>
QAFP™ is a certification mark of FP Canada. Used under license.
<?php }else{ ?>
CFP®, Certified Financial Planner® and CFP logo are trademarks owned by Financial Planning Standards Board Ltd. (FPSB) and used under license. © 2022 FP Canada™. All rights reserved.
<?php }?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
$body_customer = ob_get_clean();
file_put_contents($dir.'email_2_'.$name.'_'.date("m-d-y-H-i-s").".html", $body_customer );
$file2 = $dir.'email_2_'.$name.'_'.date("m-d-y-H-i-s").".html";
$zip = new ZipArchive;
if ($zip->open($dir.$name.'_'.date("m-d-y-H-i-s").'.zip', ZipArchive::CREATE) === TRUE)
{
// Add file to the zip file
$zip->addFile($file1, 'email_1.html');
$zip->addFile($file2, 'email_2.html');
// All files are added, so close the zip file.
$zip->close();
}
$result['file'] = $url.$name.'_'.date("m-d-y-H-i-s").'.zip';
$result['success'] = true;
unlink($file1);
unlink($file2);
wp_send_json_success($result);
die;
}
add_action("wp_ajax_nopriv_download_email", "download_email");
add_action("wp_ajax_download_email", "download_email");