heavy lifting for delivery reports
This commit is contained in:
32
mod/dreport.php
Normal file
32
mod/dreport.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
function dreport_content(&$a) {
|
||||
|
||||
if(! local_channel()) {
|
||||
notice( t('Permission denied') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$channel = $a->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;
|
||||
}
|
||||
|
||||
return print_r($r,true);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user