$r=q("SELECT c.name,c.nurl,q.id,q.network,q.created,q.last from queue as q, contact as c where c.id=q.cid order by q.cid, q.created;");
$t=get_markup_template("admin_queue.tpl");
returnreplace_macros($t,array(
'$title'=>t('Administration'),
'$page'=>t('Inspect Queue'),
'$count'=>sizeof($r),
'id_header'=>t('ID'),
'$to_header'=>t('Recipient Name'),
'$url_header'=>t('Recipient Profile'),
'$network_header'=>t('Network'),
'$created_header'=>t('Created'),
'$last_header'=>t('Last Tried'),
'$info'=>t('This page lists the content of the queue for outgoing postings. These are postings the initial delivery failed for. They will be resend later and eventually deleted if the delivery fails permanently.'),