1 <& /elements/header-popup.html &>
3 <TR><TD>From:</TD><TD><% $cust_msg->env_from %></TD></TR>
4 <TR><TD>To:</TD><TD><% $env_to %></TD></TR>
6 <TR><TD><% $label{$cust_msg->status} %></TD><TD><% $date %></TD></TR>
8 % if ( $cust_msg->error ) {
9 <TR><TD>Error:</TD><TD><% encode_entities($cust_msg->error) %></TD></TR>
13 <SCRIPT type="text/javascript">
14 function toggle_display(obj) {
15 document.getElementById('content-header').style.display =
16 (obj.value == 'header' ? 'block' : 'none');
17 document.getElementById('content-body').style.display =
18 (obj.value == 'body' ? 'block' : 'none');
21 <INPUT type="radio" name="what_to_show" onchange="toggle_display(this)" value="header" checked> Header
22 <INPUT type="radio" name="what_to_show" onchange="toggle_display(this)" value="body"> Body
25 <TR><TD colspan=2 style="text-align:center">
26 <TEXTAREA id="content-header" style="font-family:monospace"
27 readonly=1 cols=80 rows=20>
28 <% encode_entities($cust_msg->header) %>
30 <TEXTAREA id="content-body" style="font-family:monospace;display:none"
31 readonly=1 cols=80 rows=20>
32 <% encode_entities($cust_msg->body) %>
37 <& /elements/footer.html &>
40 my $curuser = $FS::CurrentUser::CurrentUser;
41 die "access denied" if !$curuser->access_right('View customers of all agents');
43 my ($custmsgnum) = $cgi->keywords;
44 $custmsgnum =~ /^(\d+)$/ or die "illegal custmsgnum";
45 my $cust_msg = qsearchs('cust_msg', { 'custmsgnum' => $custmsgnum });
47 $date = time2str('%Y-%m-%d %T', $cust_msg->_date) if ( $cust_msg->_date );
48 my $env_to = join('</TD></TR><TR><TD></TD><TD>', split(',', $cust_msg->env_to));
52 'failed' => 'Attempted: ',
53 'prepared' => 'Not sent',