f71c34a8 by Jeff Balicki

SSS

1 parent 54fe6eef
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
2 2
3 namespace Tz\WordPress\Tools\Notifications\Settings; 3 namespace Tz\WordPress\Tools\Notifications\Settings;
4 4
5 use Tz\Common;
6 use Tz\WordPress\Tools; 5 use Tz\WordPress\Tools;
7 use Tz\WordPress\Tools\Notifications; 6 use Tz\WordPress\Tools\Notifications;
8 7
9 const CAPABILITY = 'manage_notifications'; 8 const CAPABILITY = 'manage_notifications';
10 const MANAGE_SYSTEM_NOTIFICATIONS = 'create_system_notifications'; 9 const MANAGE_SYSTEM_NOTIFICATIONS = 'create_system_notifications';
11 const SETTING_NS = 'canspam_settings'; 10 const SETTING_NS = 'canspam_settings';
12 const ADMIN_PAGE = 'canspam_admin'; 11 const ADMIN_PAGE = 'canspam_admin';
13 12
14 call_user_func( 13 call_user_func(
15 function () { 14 function () {
...@@ -32,14 +31,14 @@ function display_page() ...@@ -32,14 +31,14 @@ function display_page()
32 $id = $entry->ID; 31 $id = $entry->ID;
33 32
34 $details = get_post_meta($id, 'details', true); 33 $details = get_post_meta($id, 'details', true);
35 $email = get_post_meta($id, 'email', true); 34 $email = get_post_meta($id, 'email', true);
36 $system = get_post_meta($id, 'system', true); 35 $system = get_post_meta($id, 'system', true);
37 $push = get_post_meta($id, 'push', true); 36 $push = get_post_meta($id, 'push', true);
38 37
39 $entry->details = $details; 38 $entry->details = $details;
40 $entry->email = $email; 39 $entry->email = $email;
41 $entry->system = $system; 40 $entry->system = $system;
42 $entry->push = $push; 41 $entry->push = $push;
43 42
44 $validation = new Notifications\Validation; 43 $validation = new Notifications\Validation;
45 44
...@@ -68,21 +67,21 @@ function display_page() ...@@ -68,21 +67,21 @@ function display_page()
68 // Clean up data before saving 67 // Clean up data before saving
69 Tools\tzClean($_POST); 68 Tools\tzClean($_POST);
70 69
71 $type = $_POST['type']; 70 $type = $_POST['type'];
72 $title = $_POST['title']; 71 $title = $_POST['title'];
73 $sendto = $_POST['sendto']; 72 $sendto = $_POST['sendto'];
74 $executeDate = ($type == 'scheduled' || $type == 'newsletter') ? $_POST['execute_date'] : '0000-00-00 00:00:00'; 73 $executeDate = ($type == 'scheduled' || $type == 'newsletter') ? $_POST['execute_date'] : '0000-00-00 00:00:00';
75 $trigger = ($type == 'scheduled' || $type == 'newsletter') ? 'scheduled-cron-job' : $_POST['trigger']; 74 $trigger = ($type == 'scheduled' || $type == 'newsletter') ? 'scheduled-cron-job' : $_POST['trigger'];
76 $style = $_POST['email_style']; 75 $style = $_POST['email_style'];
77 $emailData = []; 76 $emailData = [];
78 $systemMessageData = []; 77 $systemMessageData = [];
79 $pushMessageData = []; 78 $pushMessageData = [];
80 79
81 foreach (['en', 'fr'] as $lang) { 80 foreach (['en', 'fr'] as $lang) {
82 // email 81 // email
83 $subject = $_POST[$lang . '_subject']; 82 $subject = $_POST[$lang . '_subject'];
84 $text = $_POST[$lang . '_text']; 83 $text = $_POST[$lang . '_text'];
85 $html = $_POST[$lang . '_html']; 84 $html = $_POST[$lang . '_html'];
86 $attachments = []; 85 $attachments = [];
87 $upload_dir = wp_upload_dir(); 86 $upload_dir = wp_upload_dir();
88 $uploadDir = $upload_dir['basedir'] . '/notifications/'; 87 $uploadDir = $upload_dir['basedir'] . '/notifications/';
...@@ -99,43 +98,42 @@ function display_page() ...@@ -99,43 +98,42 @@ function display_page()
99 98
100 // system 99 // system
101 $systemMessageType = $_POST['system_message_type']; 100 $systemMessageType = $_POST['system_message_type'];
102 $system = $_POST[$lang . '_system']; 101 $system = $_POST[$lang . '_system'];
103
104 $pushMessageTime = $_POST[$lang . '_push_notifications_time'];
105 $title = $_POST[$lang . '_push_notifications_title'];
106 $message = $_POST[$lang . '_push_notifications_message'];
107 $link = $_POST[$lang . '_push_notifications_link'];
108 $status = $_POST[$lang . '_push_notifications_status'];
109 102
103 $pushMessageTime = $_POST[$lang . '_push_notifications_time'];
104 $title = $_POST[$lang . '_push_notifications_title'];
105 $message = $_POST[$lang . '_push_notifications_message'];
106 $link = $_POST[$lang . '_push_notifications_link'];
107 $status = $_POST[$lang . '_push_notifications_status'];
110 108
111 if (count($entry->email[$lang . '_attachments']) > 0) { 109 if (count($entry->email[$lang . '_attachments']) > 0) {
112 $attachments = array_merge($entry->email[$lang . '_attachments'], $attachments); 110 $attachments = array_merge($entry->email[$lang . '_attachments'], $attachments);
113 } 111 }
114 112
115 $emailData = array_merge( 113 $emailData = array_merge(
116 $emailData, 114 $emailData,
117 [ 115 [
118 $lang . '_subject' => $subject, 116 $lang . '_subject' => $subject,
119 $lang . '_text' => $text, 117 $lang . '_text' => $text,
120 $lang . '_html' => $html, 118 $lang . '_html' => $html,
121 $lang . '_attachments' => $attachments 119 $lang . '_attachments' => $attachments,
122 ] 120 ]
123 ); 121 );
124 $systemMessageData = array_merge( 122 $systemMessageData = array_merge(
125 $systemMessageData, 123 $systemMessageData,
126 [ 124 [
127 'system_message_type' => $systemMessageType, 125 'system_message_type' => $systemMessageType,
128 $lang . '_message' => $system 126 $lang . '_message' => $system,
129 ] 127 ]
130 ); 128 );
131 $pushMessageData = array_merge( 129 $pushMessageData = array_merge(
132 $pushMessageData, 130 $pushMessageData,
133 [ 131 [
134 'push_message_time' => $pushMessageTime, 132 'push_message_time' => $pushMessageTime,
135 $lang . '_title' => $title, 133 $lang . '_title' => $title,
136 $lang . '_message' => $message, 134 $lang . '_message' => $message,
137 $lang . '_link' => $link, 135 $lang . '_link' => $link,
138 $lang . '_status' => $status 136 $lang . '_status' => $status,
139 ] 137 ]
140 ); 138 );
141 } 139 }
...@@ -144,12 +142,11 @@ function display_page() ...@@ -144,12 +142,11 @@ function display_page()
144 $id, 142 $id,
145 'details', 143 'details',
146 [ 144 [
147 'type' => $type, 145 'type' => $type,
148 'sendto' => $sendto, 146 'sendto' => $sendto,
149 'status' => $entry->details['status'], 147 'status' => $entry->details['status'],
150 'trigger' => $trigger, 148 'trigger' => $trigger,
151 'execute_date' => $executeDate 149 'execute_date' => $executeDate,
152
153 150
154 ] 151 ]
155 ); 152 );
...@@ -164,27 +161,27 @@ function display_page() ...@@ -164,27 +161,27 @@ function display_page()
164 update_post_meta($id, 'style', $style); 161 update_post_meta($id, 'style', $style);
165 update_post_meta($id, 'push', $pushMessageData); 162 update_post_meta($id, 'push', $pushMessageData);
166 163
167 $update = []; 164 $update = [];
168 $update['ID'] = $id; 165 $update['ID'] = $id;
169 $update['post_title'] = $title; 166 $update['post_title'] = $title;
170 wp_update_post($update); 167 wp_update_post($update);
171 168
172 $id = $entry->ID; 169 $id = $entry->ID;
173 170
174 $details = get_post_meta($id, 'details', true); 171 $details = get_post_meta($id, 'details', true);
175 $email = get_post_meta($id, 'email', true); 172 $email = get_post_meta($id, 'email', true);
176 $system = get_post_meta($id, 'system', true); 173 $system = get_post_meta($id, 'system', true);
177 $push = get_post_meta($id, 'push', true); 174 $push = get_post_meta($id, 'push', true);
178 175
179 $entry->details = $details; 176 $entry->details = $details;
180 $entry->email = $email; 177 $entry->email = $email;
181 $entry->system = $system; 178 $entry->system = $system;
182 $entry->push = $push; 179 $entry->push = $push;
183 180
184 $flash = '<strong>Notification Saved Successfully!</strong><br /><a href=""/wp-admin/admin.php?page=notifications">Click here</a> to view all notifications.</a>'; 181 $flash = '<strong>Notification Saved Successfully!</strong><br /><a href=""/wp-admin/admin.php?page=notifications">Click here</a> to view all notifications.</a>';
185 require_once(__DIR__ . '/views/form.php'); 182 require_once __DIR__ . '/views/form.php';
186 } else { 183 } else {
187 require_once(__DIR__ . '/views/form.php'); 184 require_once __DIR__ . '/views/form.php';
188 } 185 }
189 } else { 186 } else {
190 if (isset($_GET['action']) && $_GET['action'] == 'delete') { 187 if (isset($_GET['action']) && $_GET['action'] == 'delete') {
...@@ -192,7 +189,7 @@ function display_page() ...@@ -192,7 +189,7 @@ function display_page()
192 } elseif (isset($_GET['action']) && $_GET['action'] == 'archive') { 189 } elseif (isset($_GET['action']) && $_GET['action'] == 'archive') {
193 $id = $_GET['page_id']; 190 $id = $_GET['page_id'];
194 191
195 $postdata = get_post_meta($id, 'details', true); 192 $postdata = get_post_meta($id, 'details', true);
196 $postdata['status'] = "archived"; 193 $postdata['status'] = "archived";
197 194
198 update_post_meta($id, 'details', $postdata); 195 update_post_meta($id, 'details', $postdata);
...@@ -200,18 +197,18 @@ function display_page() ...@@ -200,18 +197,18 @@ function display_page()
200 } 197 }
201 198
202 // get all the notifications that status != "archived"; 199 // get all the notifications that status != "archived";
203 $notifications = []; 200 $notifications = [];
204 $notifications['triggered'] = []; 201 $notifications['triggered'] = [];
205 $notifications['scheduled'] = []; 202 $notifications['scheduled'] = [];
206 203
207 $args = [ 204 $args = [
208 'post_type' => 'notifications', 205 'post_type' => 'notifications',
209 'numberposts' => -1, 206 'numberposts' => -1,
210 'orderby' => 'modified', 207 'orderby' => 'modified',
211 'order' => 'desc', 208 'order' => 'desc',
212 'meta_key' => 'send_status', 209 'meta_key' => 'send_status',
213 'meta_compare' => '=', 210 'meta_compare' => '=',
214 'meta_value' => 'pending' 211 'meta_value' => 'pending',
215 ]; 212 ];
216 213
217 $entries = get_posts($args); 214 $entries = get_posts($args);
...@@ -220,18 +217,18 @@ function display_page() ...@@ -220,18 +217,18 @@ function display_page()
220 $id = $entry->ID; 217 $id = $entry->ID;
221 218
222 $details = get_post_meta($id, 'details', true); 219 $details = get_post_meta($id, 'details', true);
223 $email = get_post_meta($id, 'email', true); 220 $email = get_post_meta($id, 'email', true);
224 $system = get_post_meta($id, 'system', true); 221 $system = get_post_meta($id, 'system', true);
225 $push = get_post_meta($id, 'push', true); 222 $push = get_post_meta($id, 'push', true);
226 223
227 $entry->trigger = $details['trigger']; 224 $entry->trigger = $details['trigger'];
228 $entry->status = isset($details['status']) ? $details['status'] : 'active'; 225 $entry->status = isset($details['status']) ? $details['status'] : 'active';
229 $entry->type = $details['type']; 226 $entry->type = $details['type'];
230 $entry->sendto = $details['sendto']; 227 $entry->sendto = $details['sendto'];
231 228
232 $entry->is_email = (($email['en_text'] != '' || $email['en_html'] != '')) || (($email['fr_text'] != '' || $email['fr_html'] != '')) ? true : false; 229 $entry->is_email = (($email['en_text'] != '' || $email['en_html'] != '')) || (($email['fr_text'] != '' || $email['fr_html'] != '')) ? true : false;
233 $entry->is_system = (isset($system['en_message']) && $system['en_message'] != '') || (isset($system['fr_message']) && $system['fr_message'] != '') ? true : false; 230 $entry->is_system = (isset($system['en_message']) && $system['en_message'] != '') || (isset($system['fr_message']) && $system['fr_message'] != '') ? true : false;
234 $entry->push = (isset($push['en_message']) && $push['en_title'] != '') || (isset($push['fr_message']) && $push['en_title'] != '') ? true : false; 231 $entry->push = (isset($push['en_message']) && $push['en_title'] != '') || (isset($push['fr_message']) && $push['en_title'] != '') ? true : false;
235 $entry->execute_date = $details['execute_date']; 232 $entry->execute_date = $details['execute_date'];
236 233
237 if ($entry->status != 'archived') { 234 if ($entry->status != 'archived') {
...@@ -239,7 +236,7 @@ function display_page() ...@@ -239,7 +236,7 @@ function display_page()
239 } 236 }
240 } 237 }
241 238
242 require_once(__DIR__ . '/views/admin.php'); 239 require_once __DIR__ . '/views/admin.php';
243 } 240 }
244 } 241 }
245 242
...@@ -257,8 +254,8 @@ function mysqldatetime_to_timestamp($datetime = '') ...@@ -257,8 +254,8 @@ function mysqldatetime_to_timestamp($datetime = '')
257 } 254 }
258 255
259 // 256 //
260 $date = $datetime; 257 $date = $datetime;
261 $hours = 0; 258 $hours = 0;
262 $minutes = 0; 259 $minutes = 0;
263 $seconds = 0; 260 $seconds = 0;
264 261
...@@ -296,7 +293,7 @@ function fixFilesArray(&$files) ...@@ -296,7 +293,7 @@ function fixFilesArray(&$files)
296 function notification_settings() 293 function notification_settings()
297 { 294 {
298 295
299 require_once(__DIR__ . '/views/settings.php'); 296 require_once __DIR__ . '/views/settings.php';
300 } 297 }
301 298
302 function create_notification() 299 function create_notification()
...@@ -326,7 +323,7 @@ function create_notification() ...@@ -326,7 +323,7 @@ function create_notification()
326 323
327 if ($_POST && ($_POST['en_subject'] == '' && $_POST['fr_subject'] == '' && $_POST['en_system'] == '' && $_POST['fr_system'] == '')) { 324 if ($_POST && ($_POST['en_subject'] == '' && $_POST['fr_subject'] == '' && $_POST['en_system'] == '' && $_POST['fr_system'] == '')) {
328 $form_error = true; 325 $form_error = true;
329 require_once(__DIR__ . '/views/create.php'); 326 require_once __DIR__ . '/views/create.php';
330 } else { 327 } else {
331 if ($validation->run() == true) { 328 if ($validation->run() == true) {
332 329
...@@ -344,28 +341,21 @@ function create_notification() ...@@ -344,28 +341,21 @@ function create_notification()
344 } 341 }
345 342
346 // details 343 // details
347 $type = $_POST['type']; 344 $type = $_POST['type'];
348 $title = $_POST['title']; 345 $title = $_POST['title'];
349 $sendto = $_POST['sendto']; 346 $sendto = $_POST['sendto'];
350 $executeDate = ($type == 'scheduled' || $type == 'newsletter') ? $_POST['execute_date'] : '0000-00-00 00:00:00'; 347 $executeDate = ($type == 'scheduled' || $type == 'newsletter') ? $_POST['execute_date'] : '0000-00-00 00:00:00';
351 $trigger = ($type == 'scheduled' || $type == 'newsletter') ? 'scheduled-cron-job' : $_POST['trigger']; 348 $trigger = ($type == 'scheduled' || $type == 'newsletter') ? 'scheduled-cron-job' : $_POST['trigger'];
352 $style = $_POST['email_style']; 349 $style = $_POST['email_style'];
353 $emailData = []; 350 $emailData = [];
354 $systemMessageData = []; 351 $systemMessageData = [];
355 $pushMessageData = []; 352 $pushMessageData = [];
356 353 $def_trid = "";
357
358
359
360
361
362
363
364 foreach (['en', 'fr'] as $lang) { 354 foreach (['en', 'fr'] as $lang) {
365 // email 355 // email
366 $subject = $_POST[$lang . '_subject']; 356 $subject = $_POST[$lang . '_subject'];
367 $text = $_POST[$lang . '_text']; 357 $text = $_POST[$lang . '_text'];
368 $html = strip_word_html($_POST[$lang . '_html']); 358 $html = strip_word_html($_POST[$lang . '_html']);
369 $attachments = []; 359 $attachments = [];
370 $uploadDir = wp_upload_dir()['basedir'] . '/notifications/'; 360 $uploadDir = wp_upload_dir()['basedir'] . '/notifications/';
371 361
...@@ -382,21 +372,21 @@ function create_notification() ...@@ -382,21 +372,21 @@ function create_notification()
382 if ($style == 'newsletter') { 372 if ($style == 'newsletter') {
383 $newletter_id = -1; 373 $newletter_id = -1;
384 $author_id = 1; 374 $author_id = 1;
385 $slug = strtolower($subject); 375 $slug = strtolower($subject);
386 376
387 if (null == get_page_by_title($subject)) { 377 if (null == get_page_by_title($subject)) {
388 378
389 // Set the page ID so that we know the page was created successfully 379 // Set the page ID so that we know the page was created successfully
390 $post_id = wp_insert_post( 380 $post_id = wp_insert_post(
391 array( 381 array(
392 'comment_status' => 'closed', 382 'comment_status' => 'closed',
393 'ping_status' => 'closed', 383 'ping_status' => 'closed',
394 'post_author' => '1', 384 'post_author' => '1',
395 'post_name' => $slug, 385 'post_name' => $slug,
396 'post_title' => $subject, 386 'post_title' => $subject,
397 'post_status' => 'publish', 387 'post_status' => 'publish',
398 'post_type' => 'newsLetter', 388 'post_type' => 'newsLetter',
399 'post_content' => '<div id="newsletter">' . $html . '</div>', 389 'post_content' => $html,
400 390
401 ) 391 )
402 ); 392 );
...@@ -411,39 +401,47 @@ function create_notification() ...@@ -411,39 +401,47 @@ function create_notification()
411 $original_post_language_info = apply_filters('wpml_element_language_details', null, $get_language_args); 401 $original_post_language_info = apply_filters('wpml_element_language_details', null, $get_language_args);
412 402
413 $set_language_args = array( 403 $set_language_args = array(
414 'element_id' => $post_id, 404 'element_id' => $post_id,
415 'element_type' => $wpml_element_type, 405 'element_type' => $wpml_element_type,
416 'trid' => $original_post_language_info->trid, 406 'trid' => $original_post_language_info->trid,
417 'language_code' => $lang, 407 'language_code' => $lang,
418 'source_language_code' => $original_post_language_info->language_code 408 'source_language_code' => $original_post_language_info->language_code,
419 ); 409 );
420 410
421 do_action('wpml_set_element_language_details', $set_language_args); 411 do_action('wpml_set_element_language_details', $set_language_args);
412
413 }
414
415 if ($post_id && $lang == 'en') {
416 $postIdEn = $post_id;
417 }
418
419 if ($post_id && $lang == 'fr') {
420 $postIdFr = $post_id;
422 } 421 }
423 } else { 422 } else {
424 423
425 $post_id = -2; 424 $post_id = -2;
426 } 425 }
426
427 } 427 }
428 428
429 // system 429 // system
430 $systemMessageType = $_POST['system_message_type']; 430 $systemMessageType = $_POST['system_message_type'];
431 $system = $_POST[$lang . '_system']; 431 $system = $_POST[$lang . '_system'];
432 432
433 $pushMessageTime = $_POST[$lang . '_push_notifications_time']; 433 $pushMessageTime = $_POST[$lang . '_push_notifications_time'];
434 $title = $_POST[$lang . '_push_notifications_title']; 434 $title = $_POST[$lang . '_push_notifications_title'];
435 $message = $_POST[$lang . '_push_notifications_message']; 435 $message = $_POST[$lang . '_push_notifications_message'];
436 $link = $_POST[$lang . '_push_notifications_link']; 436 $link = $_POST[$lang . '_push_notifications_link'];
437 $status = $_POST[$lang . '_push_notifications_status']; 437 $status = $_POST[$lang . '_push_notifications_status'];
438 438
439 439 $emailData = array_merge(
440
441 $emailData = array_merge(
442 $emailData, 440 $emailData,
443 [ 441 [
444 $lang . '_subject' => $subject, 442 $lang . '_subject' => $subject,
445 $lang . '_text' => $text, 443 $lang . '_text' => $text,
446 $lang . '_html' => $html, 444 $lang . '_html' => $html,
447 $lang . '_attachments' => $attachments, 445 $lang . '_attachments' => $attachments,
448 446
449 ] 447 ]
...@@ -452,30 +450,27 @@ function create_notification() ...@@ -452,30 +450,27 @@ function create_notification()
452 $systemMessageData, 450 $systemMessageData,
453 [ 451 [
454 'system_message_type' => $systemMessageType, 452 'system_message_type' => $systemMessageType,
455 $lang . '_message' => $system 453 $lang . '_message' => $system,
456 ] 454 ]
457 ); 455 );
458 $pushMessageData = array_merge( 456 $pushMessageData = array_merge(
459 $pushMessageData, 457 $pushMessageData,
460 [ 458 [
461 'push_message_time' => $pushMessageTime, 459 'push_message_time' => $pushMessageTime,
462 $lang . '_title' => $title, 460 $lang . '_title' => $title,
463 $lang . '_message' => $message, 461 $lang . '_message' => $message,
464 $lang . '_link' => $link, 462 $lang . '_link' => $link,
465 $lang . '_status' => $status 463 $lang . '_status' => $status,
466 ] 464 ]
467 ); 465 );
468 466
469
470 $links[$lang] = get_permalink($post_id); 467 $links[$lang] = get_permalink($post_id);
471 } 468 }
472 469
473
474
475 // make post... 470 // make post...
476 $notification = new PostTemplate(); 471 $notification = new PostTemplate();
477 $notification->post_title = $title; 472 $notification->post_title = $title;
478 $notification->post_content = 'Notification created ' . date( 473 $notification->post_content = 'Notification created ' . date(
479 'Y-m-d H:i:s' 474 'Y-m-d H:i:s'
480 ) . " --- to be sent on $executeDate"; 475 ) . " --- to be sent on $executeDate";
481 $notification->post_date_gmt = date('Y-m-d H:i:s', time()); 476 $notification->post_date_gmt = date('Y-m-d H:i:s', time());
...@@ -484,17 +479,20 @@ function create_notification() ...@@ -484,17 +479,20 @@ function create_notification()
484 479
485 if ($style == 'newsletter') { 480 if ($style == 'newsletter') {
486 update_post_meta($id, 'links', $links); 481 update_post_meta($id, 'links', $links);
482 global $sitepress;
483 $def_trid = $sitepress->get_element_trid($postIdEn, 'post_newsletter');
484 $sitepress->set_element_language_details($postIdFr, 'post_newsletter', $def_trid, 'fr');
487 } 485 }
488 486
489 update_post_meta( 487 update_post_meta(
490 $id, 488 $id,
491 'details', 489 'details',
492 [ 490 [
493 'type' => $type, 491 'type' => $type,
494 'sendto' => $sendto, 492 'sendto' => $sendto,
495 'status' => 'pending', 493 'status' => 'pending',
496 'trigger' => $trigger, 494 'trigger' => $trigger,
497 'execute_date' => $executeDate 495 'execute_date' => $executeDate,
498 496
499 ] 497 ]
500 ); 498 );
...@@ -505,26 +503,22 @@ function create_notification() ...@@ -505,26 +503,22 @@ function create_notification()
505 503
506 update_post_meta($id, 'trigger', $trigger); 504 update_post_meta($id, 'trigger', $trigger);
507 505
508
509 update_post_meta($id, 'email', $emailData); 506 update_post_meta($id, 'email', $emailData);
510 update_post_meta($id, 'style', $style); 507 update_post_meta($id, 'style', $style);
511 update_post_meta($id, 'system', $systemMessageData); 508 update_post_meta($id, 'system', $systemMessageData);
512 update_post_meta($id, 'push', $pushMessageData); 509 update_post_meta($id, 'push', $pushMessageData);
513 510
514 $flash = "<strong>Notification Saved Successfully!</strong><br /><a href='/wp-admin/admin.php?page=notifications'>Click here</a> to view all notifications.</a>"; 511 $flash = "<strong>Notification Saved Successfully!</strong><br /><a href='/wp-admin/admin.php?page=notifications'>Click here</a> to view all notifications.</a>";
515 require_once(__DIR__ . '/views/create.php'); 512 require_once __DIR__ . '/views/create.php';
516 } else { 513 } else {
517 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'create.php'); 514 require_once __DIR__ . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'create.php';
518 } 515 }
519 } 516 }
520 } 517 }
521 518
522
523
524 function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>') 519 function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>')
525 { 520 {
526 521
527
528 mb_regex_encoding('UTF-8'); 522 mb_regex_encoding('UTF-8');
529 //replace MS special characters first 523 //replace MS special characters first
530 $search = array('/&lsquo;/u', '/&rsquo;/u', '/&ldquo;/u', '/&rdquo;/u', '/&mdash;/u'); 524 $search = array('/&lsquo;/u', '/&rsquo;/u', '/&ldquo;/u', '/&rdquo;/u', '/&mdash;/u');
...@@ -542,7 +536,6 @@ function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u> ...@@ -542,7 +536,6 @@ function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u>
542 $text = preg_replace('/\<!--(.)*--\>/isu', '', $text); 536 $text = preg_replace('/\<!--(.)*--\>/isu', '', $text);
543 } 537 }
544 538
545
546 $text = preg_replace('/(?:width\=\"\d*\")\S/mxi', '>', $text); 539 $text = preg_replace('/(?:width\=\"\d*\")\S/mxi', '>', $text);
547 $text = preg_replace('/(?:width\=\"\d*%\")\S/mxi', '>', $text); 540 $text = preg_replace('/(?:width\=\"\d*%\")\S/mxi', '>', $text);
548 return $text; 541 return $text;
......
...@@ -8,6 +8,20 @@ function getInputFormValues($validation, $name) ...@@ -8,6 +8,20 @@ function getInputFormValues($validation, $name)
8 { 8 {
9 return ($validation->set_value($name) != '') ? $validation->set_value($name) : (!empty($_POST[$name])) ? $_POST[$name] : ''; 9 return ($validation->set_value($name) != '') ? $validation->set_value($name) : (!empty($_POST[$name])) ? $_POST[$name] : '';
10 } 10 }
11 $newsletter = get_posts_with_fallback(
12 [
13 'suppress_filters' => false,
14 'post_type' => 'newsletter',
15 'posts_per_page' => 1,
16 'order' => 'DESC',
17
18 ]
19 );
20
21 $newsletterEnId = icl_object_id($newsletter[0]->ID, 'newsletter', false, 'en');
22 $newsletterFrId = icl_object_id($newsletter[0]->ID, 'newsletter', false, 'fr');
23 $newsletterEn = get_post($newsletterEnId);
24 $newsletterFr = get_post($newsletterFrId);
11 25
12 ?> 26 ?>
13 27
...@@ -446,43 +460,9 @@ endforeach; ...@@ -446,43 +460,9 @@ endforeach;
446 jQuery('.scheduled_sendto').show(); 460 jQuery('.scheduled_sendto').show();
447 //$(tinymce.get('en_html').getBody()).html(header+footer); 461 //$(tinymce.get('en_html').getBody()).html(header+footer);
448 //$(tinymce.get('fr_html').getBody()).html(header_fr+footer_fr); 462 //$(tinymce.get('fr_html').getBody()).html(header_fr+footer_fr);
449 jQuery(tinymce.get('en_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image001.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' + 463 jQuery(tinymce.get('en_html').getBody()).html(<?php echo json_encode($newsletterEn->post_content); ?>);
450 '<div class="content-block-header"><h2><span style="font-family: MyanmarMN;"><strong><span style="color: #ffffff;">BREAKING</span> <span style="color: #6ac9c8;">NEWS</span></strong></span></h2>'+ 464
451 '<table> <tbody> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">FIRST-EVER CBV INSTITUTE </span><br /> <span style="font-family: MyanmarMN; color: #6ac9c8;">EXPERT WITNESS SYMPOSIUM</span></h1> <p style="text-align: left;">The CICBV is pleased to present its inaugural <strong>Expert Witness Symposium on Nov 19 20, 2018</strong>.'+ 465 jQuery(tinymce.get('fr_html').getBody()).html(<?php echo json_encode($newsletterFr->post_content); ?>);
452 ' <p>This event will provide CBVs with the unique opportunity to learn from, and with, renowned CBVs, senior legal counsel, and a federal court judge in an interactive and practical format. The Symposium will be of interest to CBVs who are looking to either brush up on, or develop, credible expert witness skills. Participants interested in attending this session should have some litigation support experience.</p> <p style="text-align: left;">Attendees may choose the live in-person <strong><a href="https://cicbv.ca/events/expert-witness-symposium-in-person-2-day-live-event/">2-day session</a></strong> or the <strong>'+
453 '<a href="https://cicbv.ca/events/livestreaming-day-1-expert-witness-symposium/">live streaming of day 1</a></strong>. Space is very limited don t miss this fantastic opportunity to learn from the best!</p> </td> </tr> </tbody> </table> <p><img class="aligncenter wp-image-129339 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/07/Summer-Social-Draft-2-1.jpg" alt="" width="1200" height="627" /></p> </div> <table> <tbody> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">CBV INSTITUTE <span style="color: #6ac9c8;">EVENTS</span></span></h1> '+
454 ' <table> <tbody> <tr> <td> <p><span style="color: #221d58;">09/19/18</span></p> </td> <td> <p><span style="color: #221d58;">When is the right time to sell: How do we give the Business Owner comfort on their cash flow in the post transaction period?</span></p> </td> <td> <p><span style="color: #221d58;">WORKSHOP</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/when-is-the-right-time-to-sell-how-do-we-give-the-business-owner-comfort-on-their-cash-flow-in-the-post-transaction-period/">More information/Registration</a></span></p> '+
455 ' </td> </tr> <tr> <td> <p><span style="color: #221d58;">09/20/18</span></p> </td> <td> <p><span style="color: #221d58;">Texas Scramble Golf Tournament</span></p> </td> <td> <p><span style="color: #221d58;">WORKSHOP</span></p> </td> <td> <p><span style="color: #221d58;">CALGARY</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/calgary-workshop-texas-scramble-golf-tournament-5/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">09/28/18</span></p> <p> </p> </td> <td> <p><span style="color: #221d58;">The Art & Science of Forecasting</span></p>'+
456 ' </td> <td> <p><span style="color: #221d58;">WEBINAR/</span></p> <p><span style="color: #221d58;">LUNCHEON</span></p> </td> <td> <p><span style="color: #221d58;">TORONTO</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cfainstitute.force.com/s/lt-event?site=a0Wj0000005liezEAA&id=a1Of1000002mbpBEAQ">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">10/03/18</span></p> </td> <td> <p><span style="color: #221d58;">Key Elements of US Tax Reform for Canadians</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> '+
457 ' <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/key-elements-of-us-tax-reform-for-canadians/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">10/17/18</span></p> </td> <td> <p><span style="color: #221d58;">Cannabis in Canada</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">11/19/18</span></p> </td> <td>'+
458 ' <p><span style="color: #221d58;">Expert Witness Symposium (Live streaming Day 1 only)</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/livestreaming-day-1-expert-witness-symposium/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">11/19/18</span></p> </td> <td> <p><span style="color: #221d58;">Expert Witness Symposium </span><br /> <span style="color: #221d58;">(In-person 2 day live event)</span></p> </td> <td> <p><span style="color: #221d58;">SYMPOSIUM</span></p> </td> <td> '+
459 ' <p><span style="color: #221d58;">TORONTO</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> <tr class="trlast-child"> <td> <p><span style="color: #221d58;">01/16/19</span></p> </td> <td> <p><span style="color: #221d58;">Strategies to address the estate and tax implications of trapped money in a holding company</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> </tbody> '+
460 ' </table> </td> </tr> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">POD<span style="color: #6ac9c8;">CASTS</span></span></h1> <table> <tbody> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Recordings</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day M&A Update</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td>'+
461 ' <p><span style="color: #221d58;">2017 Atlantic PD Day Bankers Perspective on Current Capital </span><br /> <span style="color: #221d58;">Structure Trends</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Cross Examination Preparation by Expert Witnesses</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Family Law Panel Discussion</span></p> </td> '+
462 '<td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr class="trlast-child"> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Topical Issues in Business Loss Quantification</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">EXTERNAL <span style="color: #6ac9c8;">EVENTS</span></span></h1> <p style="text-align: left;"><span style="color: #221d58;">ASA 2018 ABV Conference '+
463 '<strong>Huge discount for CICBV Members and Students</strong></span><br /> <span style="color: #221d58;">Save <sup>$</sup>1,100 For only <strong><sup>$</sup>200 CICBV</strong> Members and students can attend the ASA 2018 Advanced Business Valuation Conference in Anaheim <strong>California October 7 10, 2018</strong>.</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Enhance Your Professional Knowledge</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Learn from the Very Best in the BV Profession</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Build Your Business Network and Make New Contacts</span></p> <p style="text-align: left;"><span style="color: #221d58;">CBV INSTITUTE EVENTS</span></p> <p style="text-align: left;"><span style="color: #221d58;">'+
464 '<strong>1. </strong>Meet and Learn from the World s Most Renowned Thought Leaders </span><br /> <span style="color: #221d58;">in Business Valuation.</span></p> <p style="text-align: left;"><span style="color: #221d58;"><strong>2. </strong>Network with 600+ Appraisal Professionals from 6 Disciplines.</span></p> <p style="text-align: left;"><span style="color: #221d58;"><strong>3. </strong>Pre-Conference BV Courses are Available for an Additional Registration Fee.</span></p> <p> </p> <p><span style="color: #221d58;"><strong> </strong></span></p> <div class="call-to-action"> <h2><span style="color: #ffffff;"><strong>For more information/registration </strong><span style="color: #6ac9c8;"><strong><a style="color: #6ac9c8;" href="https://cicbv.ca/wp-content/uploads/2018/08/ASA-BV-Conference-2018.pdf">click here</a></strong></span></span></h2> </div>'+
465 ' <p><span style="color: #221d58;"><strong><u> </u></strong></span></p> </td> </tr> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">EMPLOYMENT <span style="color: #6ac9c8;">OPPORTUNITIES</span></span></h1> <table> <tbody> <tr> <td> <p>08/02/18</p> </td> <td> <p>MDD Forensic Accountants</p> </td> <td> <p>LONDON</p> </td> <td class="tdlast-child"> <p>Senior Manager</p> </td> </tr> <tr> <td> <p>07/26/18</p> </td> <td> <p>Ontario Teachers Pension Plan</p> </td> <td> <p>TORONTO</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/senior-financial-analyst-valuations/">Senior Financial Analyst, Valuations</a></p> </td> </tr> <tr class="trlast-child"> <td> <p>06/13/16</p> </td> <td> <p>Raymond Chabot Grant Thornton</p> </td> <td> '+
466 ' <p>SHERBROOKE</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/conseiller-en-evaluation-dentreprise-2/">Conseiller en valuation d entreprises</a></p> </td> </tr> </tbody> </table> <p><img class="alignnone wp-image-129621 " src="https://cbvinstitute.com/wp-content/uploads/2019/07/LI-In-Bug-150x150.png" alt="" width="50" height="50" /></p> </td> </tr> </tbody> </table> </div>');
467
468 jQuery(tinymce.get('fr_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image002.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' +
469 '<div class="content-block-header"><h2><span style="font-family: MyanmarMN;"><strong><span style="color: #ffffff;">DERNIÈRES</span> <span style="color: #6ac9c8;">NOUVELLES</span></strong></span></h2>'+
470 '<table> <tbody> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">FIRST-EVER CBV INSTITUTE </span><br /> <span style="font-family: MyanmarMN; color: #6ac9c8;">EXPERT WITNESS SYMPOSIUM</span></h1> <p style="text-align: left;">The CICBV is pleased to present its inaugural <strong>Expert Witness Symposium on Nov 19 20, 2018</strong>.'+
471 '<p>This event will provide CBVs with the unique opportunity to learn from, and with, renowned CBVs, senior legal counsel, and a federal court judge in an interactive and practical format. The Symposium will be of interest to CBVs who are looking to either brush up on, or develop, credible expert witness skills. Participants interested in attending this session should have some litigation support experience.</p> <p style="text-align: left;">Attendees may choose the live in-person <strong><a href="https://cicbv.ca/events/expert-witness-symposium-in-person-2-day-live-event/">2-day session</a></strong> or the <strong>'+
472 '<a href="https://cicbv.ca/events/livestreaming-day-1-expert-witness-symposium/">live streaming of day 1</a></strong>. Space is very limited don t miss this fantastic opportunity to learn from the best!</p> </td> </tr> </tbody> </table> <p><img class="aligncenter wp-image-129339 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/07/Summer-Social-Draft-2-1.jpg" alt="" width="1200" height="627" /></p> </div> <table> <tbody> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">CBV INSTITUTE <span style="color: #6ac9c8;">EVENTS</span></span></h1> '+
473 ' <table> <tbody> <tr> <td> <p><span style="color: #221d58;">09/19/18</span></p> </td> <td> <p><span style="color: #221d58;">When is the right time to sell: How do we give the Business Owner comfort on their cash flow in the post transaction period?</span></p> </td> <td> <p><span style="color: #221d58;">WORKSHOP</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/when-is-the-right-time-to-sell-how-do-we-give-the-business-owner-comfort-on-their-cash-flow-in-the-post-transaction-period/">More information/Registration</a></span></p> '+
474 ' </td> </tr> <tr> <td> <p><span style="color: #221d58;">09/20/18</span></p> </td> <td> <p><span style="color: #221d58;">Texas Scramble Golf Tournament</span></p> </td> <td> <p><span style="color: #221d58;">WORKSHOP</span></p> </td> <td> <p><span style="color: #221d58;">CALGARY</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/calgary-workshop-texas-scramble-golf-tournament-5/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">09/28/18</span></p> <p> </p> </td> <td> <p><span style="color: #221d58;">The Art & Science of Forecasting</span></p>'+
475 ' </td> <td> <p><span style="color: #221d58;">WEBINAR/</span></p> <p><span style="color: #221d58;">LUNCHEON</span></p> </td> <td> <p><span style="color: #221d58;">TORONTO</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cfainstitute.force.com/s/lt-event?site=a0Wj0000005liezEAA&id=a1Of1000002mbpBEAQ">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">10/03/18</span></p> </td> <td> <p><span style="color: #221d58;">Key Elements of US Tax Reform for Canadians</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> '+
476 ' <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/key-elements-of-us-tax-reform-for-canadians/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">10/17/18</span></p> </td> <td> <p><span style="color: #221d58;">Cannabis in Canada</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">11/19/18</span></p> </td> <td>'+
477 ' <p><span style="color: #221d58;">Expert Witness Symposium (Live streaming Day 1 only)</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/livestreaming-day-1-expert-witness-symposium/">More information/Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">11/19/18</span></p> </td> <td> <p><span style="color: #221d58;">Expert Witness Symposium </span><br /> <span style="color: #221d58;">(In-person 2 day live event)</span></p> </td> <td> <p><span style="color: #221d58;">SYMPOSIUM</span></p> </td> <td> '+
478 ' <p><span style="color: #221d58;">TORONTO</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> <tr class="trlast-child"> <td> <p><span style="color: #221d58;">01/16/19</span></p> </td> <td> <p><span style="color: #221d58;">Strategies to address the estate and tax implications of trapped money in a holding company</span></p> </td> <td> <p><span style="color: #221d58;">WEBINAR</span></p> </td> <td> <p> </p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/cannabis-in-canada/">More information/Registration</a></span></p> </td> </tr> </tbody> '+
479 ' </table> </td> </tr> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">POD<span style="color: #6ac9c8;">CASTS</span></span></h1> <table> <tbody> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Recordings</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day M&A Update</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td>'+
480 ' <p><span style="color: #221d58;">2017 Atlantic PD Day Bankers Perspective on Current Capital </span><br /> <span style="color: #221d58;">Structure Trends</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Cross Examination Preparation by Expert Witnesses</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Family Law Panel Discussion</span></p> </td> '+
481 '<td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> <tr class="trlast-child"> <td> <p><span style="color: #221d58;">2017 Atlantic PD Day Topical Issues in Business Loss Quantification</span></p> </td> <td class="tdlast-child"> <p><span style="color: #221d58;"><a style="color: #221d58;" href="https://cicbv.ca/events/2017-atlantic-pd-day-recordings/">More information/ Registration</a></span></p> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="color: #221d58; font-family: MyanmarMN;">EXTERNAL <span style="color: #6ac9c8;">EVENTS</span></span></h1> <p style="text-align: left;"><span style="color: #221d58;">ASA 2018 ABV Conference '+
482 '<strong>Huge discount for CICBV Members and Students</strong></span><br /> <span style="color: #221d58;">Save <sup>$</sup>1,100 For only <strong><sup>$</sup>200 CICBV</strong> Members and students can attend the ASA 2018 Advanced Business Valuation Conference in Anaheim <strong>California October 7 10, 2018</strong>.</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Enhance Your Professional Knowledge</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Learn from the Very Best in the BV Profession</span></p> <p style="text-align: left;"><span style="color: #221d58;"> Build Your Business Network and Make New Contacts</span></p> <p style="text-align: left;"><span style="color: #221d58;">CBV INSTITUTE EVENTS</span></p> <p style="text-align: left;"><span style="color: #221d58;">'+
483 '<strong>1. </strong>Meet and Learn from the World s Most Renowned Thought Leaders </span><br /> <span style="color: #221d58;">in Business Valuation.</span></p> <p style="text-align: left;"><span style="color: #221d58;"><strong>2. </strong>Network with 600+ Appraisal Professionals from 6 Disciplines.</span></p> <p style="text-align: left;"><span style="color: #221d58;"><strong>3. </strong>Pre-Conference BV Courses are Available for an Additional Registration Fee.</span></p> <p> </p> <p><span style="color: #221d58;"><strong> </strong></span></p> <div class="call-to-action"> <h2><span style="color: #ffffff;"><strong>For more information/registration </strong><span style="color: #6ac9c8;"><strong><a style="color: #6ac9c8;" href="https://cicbv.ca/wp-content/uploads/2018/08/ASA-BV-Conference-2018.pdf">click here</a></strong></span></span></h2> </div>'+
484 ' <p><span style="color: #221d58;"><strong><u> </u></strong></span></p> </td> </tr> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">EMPLOYMENT <span style="color: #6ac9c8;">OPPORTUNITIES</span></span></h1> <table> <tbody> <tr> <td> <p>08/02/18</p> </td> <td> <p>MDD Forensic Accountants</p> </td> <td> <p>LONDON</p> </td> <td class="tdlast-child"> <p>Senior Manager</p> </td> </tr> <tr> <td> <p>07/26/18</p> </td> <td> <p>Ontario Teachers Pension Plan</p> </td> <td> <p>TORONTO</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/senior-financial-analyst-valuations/">Senior Financial Analyst, Valuations</a></p> </td> </tr> <tr class="trlast-child"> <td> <p>06/13/16</p> </td> <td> <p>Raymond Chabot Grant Thornton</p> </td> <td> '+
485 ' <p>SHERBROOKE</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/conseiller-en-evaluation-dentreprise-2/">Conseiller en valuation d entreprises</a></p> </td> </tr> </tbody> </table> <p><img class="alignnone wp-image-129621 " src="https://cbvinstitute.com/wp-content/uploads/2019/07/LI-In-Bug-150x150.png" alt="" width="50" height="50" /></p> </td> </tr> </tbody> </table> </div>');
486 466
487 jQuery('#execute_date').datetimepicker({ 467 jQuery('#execute_date').datetimepicker({
488 format: 'Y-m-d, H:i', 468 format: 'Y-m-d, H:i',
......