-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemails.php
More file actions
54 lines (45 loc) · 1.89 KB
/
emails.php
File metadata and controls
54 lines (45 loc) · 1.89 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
<?php
@include_once 'commons.php';
$nc = new NewsletterControls();
$emails = $wpdb->get_results("select * from " . $wpdb->prefix . "newsletter_emails where type='email' order by id desc");
if ($nc->is_action('send')) {
$newsletter->hook_newsletter();
}
?>
<div class="wrap">
<h2>Newsletters</h2>
<?php include dirname(__FILE__) . '/header.php'; ?>
<form method="post" action="admin.php?page=newsletter/emails.php">
<?php $nc->init(); ?>
<p><a href="admin.php?page=newsletter/emails-edit.php&id=0" class="button">Crear nueva newsletter</a></p>
<p>
El sistema activará el siguiente envío en: <?php echo wp_next_scheduled('newsletter')-time(); ?> segundos
<!--<?php $nc->button('send', 'Enviar ahora'); ?> <br />Pulsar en "enviar ahora" pone en cola el envío en servidor AHORA y no cuando especifica el contador.--><br /> El envío puede no ser inmediato. <br />
Un envío no comenzará hasta que el anterior haya terminado. Puedes revisar la cantidad de correos que se envían por hora en la <strong>Configuración General</strong>.
</p>
<table class="widefat">
<thead>
<tr>
<th>ID</th>
<th>Título</th>
<th>Fecha</th>
<th>Estado</th>
<th> </th>
</tr>
</thead>
<tbody>
<?php foreach ($emails as &$email) { ?>
<tr>
<td><?php echo $email->id; ?></td>
<td><a href="admin.php?page=newsletter/emails-edit.php&id=<?php echo $email->id; ?>"><?php echo htmlspecialchars($email->subject); ?></a></td>
<td><?php echo $email->date; ?></td>
<td>
<?php echo $email->status; ?>
(<?php echo $email->sent; ?>/<?php echo $email->total; ?>)
</td>
</tr>
<?php } ?>
</tbody>
</table>
</form>
</div>