<?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); $ls = new WebblerListing(s('Campaigns')); if (Sql_Table_Exists($GLOBALS['tables']['usermessage'])) { $msgs = Sql_Query(sprintf('select messageid,entered,viewed,(viewed = 0 or viewed is null) as notviewed, abs(unix_timestamp(entered) - unix_timestamp(viewed)) as responsetime from %s where userid = %d and status = "sent" order by entered desc', $GLOBALS['tables']['usermessage'], $user['id'])); $num = Sql_Affected_Rows(); } else { $num = 0; } printf('%d '.s('messages sent to this user').'<br/>', $num); if ($num) { $resptime = 0; $totalresp = 0; $ls->setElementHeading(s('Campaign Id')); while ($msg = Sql_Fetch_Array($msgs)) { $ls->addElement($msg['messageid'], PageURL2('message', s('view'), 'id='.$msg['messageid'])); if (defined('CLICKTRACK') && CLICKTRACK) { $clicksreq = Sql_Fetch_Row_Query(sprintf('select sum(clicked) as numclicks from %s where userid = %s and messageid = %s', $GLOBALS['tables']['linktrack_uml_click'], $user['id'], $msg['messageid'])); $clicks = sprintf('%d', $clicksreq[0]); if ($clicks) { $ls->addColumn($msg['messageid'], s('clicks'), PageLink2('userclicks&userid='.$user['id'].'&msgid='.$msg['messageid'], $clicks)); } else { $ls->addColumn($msg['messageid'], s('clicks'), 0); } } $ls->addColumn($msg['messageid'], s('sent'), formatDateTime($msg['entered'], 1)); if (!$msg['notviewed']) { $ls->addColumn($msg['messageid'], s('viewed'), formatDateTime($msg['viewed'], 1)); $ls->addColumn($msg['messageid'], s('Response time'), secs2time($msg['responsetime'])); $resptime += $msg['responsetime']; $totalresp += 1; } if (!empty($bounces[$msg['messageid']])) { $ls->addColumn($msg['messageid'], s('bounce'), $bounces[$msg['messageid']]); } } if ($totalresp) { $avgresp = sprintf('%d', ($resptime / $totalresp)); $ls->addElement('<strong>'.s('Average response time: ').'</strong>'.secs2time($avgresp)); } } echo $ls->display();
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
.htaccess | File | 31 B | 0644 |
|
addemail.php | File | 874 B | 0644 |
|
addlist.php | File | 69 B | 0644 |
|
bounce.php | File | 166 B | 0644 |
|
bounces.php | File | 1.35 KB | 0644 |
|
campaigns.php | File | 2.57 KB | 0644 |
|
checkurl.php | File | 838 B | 0644 |
|
configure.php | File | 2.37 KB | 0644 |
|
domainbounces.php | File | 1.66 KB | 0644 |
|
domainstats.php | File | 7.2 KB | 0644 |
|
export.php | File | 6.92 KB | 0644 |
|
generatetext.php | File | 1.01 KB | 0644 |
|
generatetextpreview.php | File | 1.42 KB | 0644 |
|
getservertime.php | File | 127 B | 0644 |
|
hidenote.php | File | 245 B | 0644 |
|
import.php | File | 182 B | 0644 |
|
import1.php | File | 9.21 KB | 0644 |
|
import2.php | File | 23.54 KB | 0644 |
|
importsimple.php | File | 182 B | 0644 |
|
initlanguage.php | File | 243 B | 0644 |
|
keepalive.php | File | 180 B | 0644 |
|
listbounces.php | File | 2.4 KB | 0644 |
|
markread.php | File | 341 B | 0644 |
|
mclicks.php | File | 4.81 KB | 0644 |
|
mergeduplicatelists.php | File | 1.41 KB | 0644 |
|
msgbounces.php | File | 2.35 KB | 0644 |
|
msgsent.php | File | 881 B | 0644 |
|
msgstatus.php | File | 5.35 KB | 0644 |
|
mviews.php | File | 4.97 KB | 0644 |
|
plugins.php | File | 943 B | 0644 |
|
processqueue.php | File | 53.08 KB | 0644 |
|
reconcileusers.php | File | 471 B | 0644 |
|
removeemptylists.php | File | 379 B | 0644 |
|
searchemail.php | File | 825 B | 0644 |
|
shownotes.php | File | 74 B | 0644 |
|
statsoverview.php | File | 5.83 KB | 0644 |
|
storemessage.php | File | 2.05 KB | 0644 |
|
subscription.php | File | 3.91 KB | 0644 |
|
test.php | File | 13 B | 0644 |
|
updatetranslation.php | File | 824 B | 0644 |
|
upgrade.php | File | 183 B | 0644 |
|
user.php | File | 710 B | 0644 |
|
viewtemplate.php | File | 1.09 KB | 0644 |
|