// Send to the original recipient(s) or to an alternate address if (isset($_GET['alt_recpt_yn']) && $_GET['alt_recpt_yn'] == "y") { $to = sanitizeInput($_GET['alt_recpt']); $to = htmlentities($to); } else { $to = $quarantined[0]['to']; } $status[] = quarantine_release($quarantined, $_GET['release'], $to, RPC_ONLY); } // sa-learn if (isset($_GET['learn'])) { $status[] = quarantine_learn($quarantined, $_GET['learn'], $_GET['learn_type'], RPC_ONLY); } // Delete if (isset($_GET['delete'])) { $status[] = quarantine_delete($quarantined, $_GET['delete'], RPC_ONLY); } echo '<table border="0" cellpadding="1" cellspacing="1" width="100%" class="maildetail">' . "\n"; echo ' <tr>' . "\n"; echo ' <th colspan="2">' . __('quarcmdres04') . '</th>' . "\n"; echo ' </tr>' . "\n"; if (!empty($status)) { echo ' <tr>' . "\n"; echo ' <td class="heading" width="150" align="right" valign="top">' . __('resultmsg04') . ':</td>' . "\n"; echo ' <td class="detail">' . "\n"; foreach ($status as $key => $val) { echo " {$val}<br>\n"; } echo " </td>\n"; echo " </tr>\n"; }
function rpc_quarantine_delete($msg) { $items = php_xmlrpc_decode(array_shift($msg->params)); $item = php_xmlrpc_decode(array_shift($msg->params)); $return = quarantine_delete($items, $item); return new xmlrpcresp(new xmlrpcval($return, 'string')); }
</td> </tr> </table> <?php simple_html_end(); } else { simple_html_start(); for ($i = 0; $i < count($list); $i++) { $status[] = quarantine_delete($list, array($i)); } $status = join('<br/>', $status); simple_html_result($status); simple_html_end(); } } else { // Delete for ($i = 0; $i < count($list); $i++) { $status[] = quarantine_delete($list, array($i)); } } break; case 'learn': break; default: die("Unknown action: " . sanitizeInput($_GET['action'])); } dbclose(); ?> </body> </html>