| Server IP : 89.108.64.180 / Your IP : 216.73.217.92 Web Server : Apache/2.4.41 (Ubuntu) System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-root ( 1010) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/hotelzm.com/wp-content/plugins/newsletter/emails/ |
Upload File : |
<?php
/* @var $this NewsletterEmails */
defined('ABSPATH') || exit;
require_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
require_once NEWSLETTER_INCLUDES_DIR . '/paginator.php';
$controls = new NewsletterControls();
if ($controls->is_action('copy')) {
$original = Newsletter::instance()->get_email($_POST['btn']);
$email = array();
$email['subject'] = $original->subject;
$email['message'] = $original->message;
$email['message_text'] = $original->message_text;
$email['send_on'] = time();
$email['type'] = 'message';
$email['editor'] = $original->editor;
$email['track'] = $original->track;
$email['options'] = $original->options;
$this->save_email($email);
$controls->messages .= __('Message duplicated.', 'newsletter');
}
if ($controls->is_action('delete')) {
$this->delete_email($_POST['btn']);
$controls->add_message_deleted();
}
if ($controls->is_action('delete_selected')) {
$r = Newsletter::instance()->delete_email($_POST['ids']);
$controls->messages .= $r . ' message(s) deleted';
}
$pagination_controller = new TNP_Pagination_Controller(NEWSLETTER_EMAILS_TABLE, 'id', ['type' => 'message']);
$emails = $pagination_controller->get_items();
?>
<div class="wrap tnp-emails tnp-emails-index" id="tnp-wrap">
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
<div id="tnp-heading">
<h2><?php _e('Newsletters', 'newsletter') ?></h2>
</div>
<div id="tnp-body">
<form method="post" action="">
<?php $controls->init(); ?>
<a href="<?php echo $this->get_admin_page_url('composer'); ?>" class="button-primary"><?php _e('New newsletter', 'newsletter') ?></a>
<?php $controls->button_confirm('delete_selected', __('Delete selected newsletters', 'newsletter')); ?>
<?php $pagination_controller->display_paginator(); ?>
<table class="widefat tnp-newsletters-list" style="width: 100%">
<thead>
<tr>
<th><input type="checkbox" onchange="jQuery('input.tnp-selector').prop('checked', this.checked)"></th>
<th>Id</th>
<th><?php _e('Subject', 'newsletter') ?></th>
<th><?php _e('Status', 'newsletter') ?></th>
<th><?php _e('Progress', 'newsletter') ?> (*)</th>
<th><?php _e('Date', 'newsletter') ?></th>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach ($emails as $email) { ?>
<tr>
<td><input type="checkbox" class="tnp-selector" name="ids[]" value="<?php echo $email->id; ?>"/></td>
<td><?php echo $email->id; ?></td>
<td><?php
if ($email->subject)
echo htmlspecialchars($email->subject);
else
echo "Newsletter #" . $email->id;
?>
</td>
<td>
<?php $this->show_email_status_label($email) ?>
</td>
<td>
<?php $this->show_email_progress_bar($email, array('numbers' => true)) ?>
</td>
<td><?php if ($email->status == 'sent' || $email->status == 'sending') echo $this->format_date($email->send_on); ?></td>
<td>
<?php echo $this->get_edit_button($email) ?>
</td>
<td style="white-space: nowrap">
<?php $controls->button_icon_statistics(NewsletterStatistics::instance()->get_statistics_url($email->id)) ?>
<?php $controls->button_icon_view(home_url('/') . '?na=view&id=' . $email->id) ?>
</td>
<td style="white-space: nowrap">
<?php $controls->button_icon_copy($email->id); ?>
<?php $controls->button_icon_delete($email->id); ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<p>
(*) <?php _e('Expected total at the end of the delivery may differ due to subscriptions/unsubscriptions occurred meanwhile.', 'newsletter') ?>
</p>
</form>
</div>
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
</div>