| @@ -1,5 +1,9 @@ | ||
| 1 | -<form id="acym_form" action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" method="post" name="acyForm" data-abide novalidate> | |
| 1 | +<?php | |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. | |
| 3 | +defined('ABSPATH') || die('Restricted Access'); | |
| 4 | +?> | |
| 5 | +<form id="acym_form" action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" method="post" name="acyForm" data-abide novalidate> | |
| 2 | 6 | <?php |
| 3 | 7 | $isEmpty = empty($data['allElements']) && empty($data['search']) && empty($data['tag']) && empty($data['status']); |
| 4 | 8 | if (!$isEmpty) { |
| 5 | 9 | $data['toolbar']->displayToolbar($data); |
| @@ -7,36 +11,36 @@ | ||
| 7 | 11 | ?> |
| 8 | 12 | <div id="acym__queue" class="acym__content"> |
| 9 | 13 | <?php |
| 10 | 14 | $workflow = $data['workflowHelper']; |
| 11 | - echo $workflow->displayTabs($this->steps, 'scheduled'); | |
| 15 | + $workflow->displayTabs($this->steps, 'scheduled'); | |
| 12 | 16 | ?> |
| 13 | 17 | |
| 14 | 18 | <?php if ($isEmpty) { ?> |
| 15 | 19 | <div class="grid-x text-center"> |
| 16 | - <h1 class="acym__listing__empty__title cell"><?php echo acym_translation('ACYM_YOU_DONT_HAVE_ANY_CAMPAIGN_IN_QUEUE'); ?></h1> | |
| 17 | - <h1 class="acym__listing__empty__subtitle cell"><?php echo acym_translation('ACYM_SEND_ONE_AND_SEE_HOW_AMAZING_QUEUE_IS'); ?></h1> | |
| 20 | + <h1 class="acym__listing__empty__title cell"><?php echo esc_html(acym_translation('ACYM_YOU_DONT_HAVE_ANY_CAMPAIGN_IN_QUEUE')); ?></h1> | |
| 21 | + <h1 class="acym__listing__empty__subtitle cell"><?php echo esc_html(acym_translation('ACYM_SEND_ONE_AND_SEE_HOW_AMAZING_QUEUE_IS')); ?></h1> | |
| 18 | 22 | </div> |
| 19 | 23 | <?php } else { ?> |
| 20 | 24 | <?php if (empty($data['allElements'])) { ?> |
| 21 | - <h1 class="cell acym__listing__empty__search__title text-center"><?php echo acym_translation('ACYM_NO_RESULTS_FOUND'); ?></h1> | |
| 25 | + <h1 class="cell acym__listing__empty__search__title text-center"><?php echo esc_html(acym_translation('ACYM_NO_RESULTS_FOUND')); ?></h1> | |
| 22 | 26 | <?php } else { ?> |
| 23 | 27 | <div class="grid-x acym__listing acym__listing__view__squeue"> |
| 24 | 28 | <div class="cell grid-x acym__listing__header hide-for-small-only"> |
| 25 | 29 | <div class="acym__listing__header__title cell medium-auto"> |
| 26 | - <?php echo acym_translation('ACYM_MAILS'); ?> | |
| 30 | + <?php echo esc_html(acym_translation('ACYM_MAILS')); ?> | |
| 27 | 31 | </div> |
| 28 | 32 | <div class="acym__listing__header__title cell large-3 hide-for-medium-only text-center"> |
| 29 | - <?php echo acym_translation('ACYM_RECIPIENTS'); ?> | |
| 33 | + <?php echo esc_html(acym_translation('ACYM_RECIPIENTS')); ?> | |
| 30 | 34 | </div> |
| 31 | 35 | <div class="acym__listing__header__title cell medium-4 text-center"> |
| 32 | - <?php echo acym_translation('ACYM_SENDING_DATE'); ?> | |
| 36 | + <?php echo esc_html(acym_translation('ACYM_SENDING_DATE')); ?> | |
| 33 | 37 | </div> |
| 34 | 38 | <div class="cell medium-2"></div> |
| 35 | 39 | </div> |
| 36 | 40 | <?php foreach ($data['allElements'] as $row) { |
| 37 | 41 | ?> |
| 38 | - <div data-acy-elementid="<?php echo acym_escape($row->id); ?>" class="cell grid-x acym__listing__row"> | |
| 42 | + <div data-acy-elementid="<?php echo esc_attr($row->id); ?>" class="cell grid-x acym__listing__row"> | |
| 39 | 43 | <div class="cell medium-auto acym_vcenter"> |
| 40 | 44 | <div class="acym__listing__title"> |
| 41 | 45 | <?php |
| 42 | 46 | $afterName = $row->language; |
| @@ -46,10 +50,10 @@ | ||
| 46 | 50 | $afterName = $data['languages'][$row->language]->name; |
| 47 | 51 | } |
| 48 | 52 | $afterName = empty($afterName) ? '' : ' - '.$afterName |
| 49 | 53 | ?> |
| 50 | - <h6 class="acym__listing__title__primary acym_text_ellipsis"><?php echo acym_escape($row->name.$afterName); ?></h6> | |
| 51 | - <span class="acym__listing__title__secondary acym_text_ellipsis"><?php echo acym_escape($row->subject); ?></span> | |
| 54 | + <h6 class="acym__listing__title__primary acym_text_ellipsis"><?php echo esc_html($row->name.$afterName); ?></h6> | |
| 55 | + <span class="acym__listing__title__secondary acym_text_ellipsis"><?php echo esc_html($row->subject); ?></span> | |
| 52 | 56 | </div> |
| 53 | 57 | </div> |
| 54 | 58 | <div class="cell large-3 hide-for-medium-only hide-for-small-only text-center"> |
| 55 | 59 | <div class="queue_lists"> |
| @@ -57,9 +61,9 @@ | ||
| 57 | 61 | $i = 0; |
| 58 | 62 | $class = 'acym_subscription acymicon-circle'; |
| 59 | 63 | foreach ($row->lists as $oneList) { |
| 60 | 64 | if ($i === 6) { |
| 61 | - echo acym_tooltip( | |
| 65 | + acym_tooltip( | |
| 62 | 66 | [ |
| 63 | 67 | 'hoveredText' => '<i data-campaign="'.$row->id.'" class="acym_subscription acymicon-add"></i>', |
| 64 | 68 | 'textShownInTooltip' => acym_translation('ACYM_SHOW_ALL_LISTS'), |
| 65 | 69 | ] |
| @@ -65,11 +69,11 @@ | ||
| 65 | 69 | ] |
| 66 | 70 | ); |
| 67 | 71 | $class .= ' is-hidden'; |
| 68 | 72 | } |
| 69 | - echo acym_tooltip( | |
| 73 | + acym_tooltip( | |
| 70 | 74 | [ |
| 71 | - 'hoveredText' => '<i class="'.$class.'" style="color:'.$oneList->color.'"></i>', | |
| 75 | + 'hoveredText' => '<i class="'.esc_attr($class).'" style="color:'.esc_attr($oneList->color ?? '#0079d3').'"></i>', | |
| 72 | 76 | 'textShownInTooltip' => $oneList->name, |
| 73 | 77 | ] |
| 74 | 78 | ); |
| 75 | 79 | $i++; |
| @@ -77,15 +81,16 @@ | ||
| 77 | 81 | ?> |
| 78 | 82 | </div> |
| 79 | 83 | </div> |
| 80 | 84 | <div class="cell medium-4 small-9"> |
| 81 | - <?php echo acym_date($row->sending_date, acym_getDateTimeFormat()); ?> | |
| 85 | + <?php echo esc_html(acym_date($row->sending_date, acym_getDateTimeFormat())); ?> | |
| 82 | 86 | </div> |
| 83 | 87 | <div class="cell medium-2 small-3"> |
| 84 | 88 | <div class="acym_vcenter"> |
| 85 | 89 | <?php |
| 90 | + // Now display the action buttons | |
| 86 | 91 | echo '<div class="acym_action_buttons">'; |
| 87 | - echo acym_tooltip( | |
| 92 | + acym_tooltip( | |
| 88 | 93 | [ |
| 89 | 94 | 'hoveredText' => '<i class="acymicon-times-circle acym__queue__cancel__button" mailid="'.$row->id.'"></i>', |
| 90 | 95 | 'textShownInTooltip' => acym_translation('ACYM_CANCEL_SCHEDULING'), |
| 91 | 96 | ] |
| @@ -96,9 +101,9 @@ | ||
| 96 | 101 | </div> |
| 97 | 102 | </div> |
| 98 | 103 | <?php } ?> |
| 99 | 104 | </div> |
| 100 | - <?php echo $data['pagination']->display('squeue'); ?> | |
| 105 | + <?php $data['pagination']->display('squeue'); ?> | |
| 101 | 106 | <?php } ?> |
| 102 | 107 | <?php } ?> |
| 103 | 108 | <?php acym_formOptions(true, 'scheduled'); ?> |
| 104 | 109 | <input type="hidden" name="acym__queue__cancel__mail_id"> |