$error = 0; $status = array(); // Release if (isset($_GET['release'])) { // 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";
function rpc_quarantine_learn($msg) { $items = php_xmlrpc_decode(array_shift($msg->params)); $item = php_xmlrpc_decode(array_shift($msg->params)); $type = php_xmlrpc_decode(array_shift($msg->params)); $return = quarantine_learn($items, $item, $type); return new xmlrpcresp(new xmlrpcval($return, 'string')); }
continue; } $items = quarantine_list_items($id, RPC_ONLY); // Commenting out the below line since it shouldn't make a table for every message // echo "<TABLE WIDTH=\"100%\">\n"; if (count($items) > 0) { $num = 0; $itemnum = array($num); echo '<tr><td><a href="detail.php?id=' . $id . '">' . $id . '</a></td><td>' . $type . '</td><td>'; if ($type == 'release') { if ($quarantined = quarantine_list_items($id, RPC_ONLY)) { $to = $quarantined[0]['to']; } echo quarantine_release($quarantined, $itemnum, $to, RPC_ONLY); } else { echo quarantine_learn($items, $itemnum, $type, RPC_ONLY); } echo '</td></tr>' . "\n"; } } } else { echo '<tr><td colspan="3">Message not found in quarantine</td></tr>' . "\n"; } echo '</table>' . "\n"; echo ' </td>' . "\n"; echo ' </tr>' . "\n"; echo ' </table>' . "\n"; echo '<p><a href="javascript:history.back(1)">Back</a>' . "\n"; //Add footer html_end(); //Close database connection