-
-
Notifications
You must be signed in to change notification settings - Fork 287
Expand file tree
/
Copy pathbounces.php
More file actions
55 lines (48 loc) · 1.43 KB
/
Copy pathbounces.php
File metadata and controls
55 lines (48 loc) · 1.43 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
<?php
require_once dirname(__FILE__).'/../accesscheck.php';
if (!defined('PHPLISTINIT')) {
exit;
}
if (!$_GET['id']) {
Fatal_Error(s('no such User'));
return;
} else {
$id = sprintf('%d', $_GET['id']);
}
$status = "";
$result = Sql_query("SELECT * FROM {$GLOBALS['tables']['user']} where id = $id");
if (!Sql_Affected_Rows()) {
Fatal_Error(s('no such User'));
return;
}
$user = sql_fetch_array($result);
$bouncels = new WebblerListing(s('Bounces'));
$bouncels->setElementHeading('Bounce ID');
$bouncelist = '';
// check for bounces
$req = Sql_Query(sprintf('
select
message_bounce.id
, message_bounce.message
, time
, bounce
from
%s as message_bounce
where
userid = %d', $GLOBALS['tables']['user_message_bounce'], $user['id']));
if (Sql_Affected_Rows()) {
while ($row = Sql_Fetch_Array($req)) {
$messagedata = loadMessageData($row['message']);
$bouncels->addElement($row['bounce'],
PageURL2('bounce', s('view'), 'id=' . $row['bounce']));
if (!empty($messagedata['id'])) {
$bouncels->addColumn($row['bounce'], s('Campaign title'), stripslashes($messagedata['campaigntitle']));
} else {
$bouncels->addColumn($row['bounce'], s('Campaign title'), s('Transactional message'));
}
$bouncels->addColumn($row['bounce'], s('time'), formatDateTime($row['time'], true));
}
echo $bouncels->display();
} else {
echo s("Bounces data not found");
}