get_channel(); $mid = ((argc() > 1) ? argv(1) : ''); if(! $mid) { notice( t('Invalid message') . EOL); return; } $r = q("select * from dreport where dreport_xchan = '%s' and dreport_mid = '%s'", dbesc($channel['channel_hash']), dbesc($mid) ); if(! $r) { notice( t('no results') . EOL); return; } $o .= '

' . sprintf( t('Delivery report for %1$s'),substr($mid,0,32)) . '...' . '

'; $o .= ''; foreach($r as $rr) { $name = escape_tags(substr($rr['dreport_recip'],strpos($rr['dreport_recip'],' '))); $o .= ''; } $o .= '
' . $name . '' . $rr['dreport_result'] . '' . $rr['dreport_time'] . '
'; return $o; }