Exemplo n.º 1
0
function rpc_quarantine_release($msg)
{
    $items = php_xmlrpc_decode(array_shift($msg->params));
    $item = php_xmlrpc_decode(array_shift($msg->params));
    $to = php_xmlrpc_decode(array_shift($msg->params));
    $return = quarantine_release($items, $item, $to);
    return new xmlrpcresp(new xmlrpcval($return, 'string'));
}
Exemplo n.º 2
0
                break;
            default:
                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
Exemplo n.º 3
0
 echo "<br>\n";
 if (isset($_GET['submit']) && $_GET['submit'] == __('submit04')) {
     debug("submit branch taken");
     // Reset error status
     $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";
Exemplo n.º 4
0
    die("Error: No action");
}
$list = quarantine_list_items(sanitizeInput($_GET['id']));
if (count($list) == 0) {
    die("Error: Message not found in quarantine");
}
switch ($_GET['action']) {
    case 'release':
        $result = '';
        if (count($list) == 1) {
            $to = $list[0]['to'];
            $result = quarantine_release($list, array(0), $to);
        } else {
            for ($i = 0; $i < count($list); $i++) {
                if (preg_match('/message\\/rfc822/', $list[$i]['type'])) {
                    $result = quarantine_release($list, array($i), $list[$i]['to']);
                }
            }
        }
        if (isset($_GET['html'])) {
            // Display success
            simple_html_start();
            simple_html_result($result);
            simple_html_end();
        }
        break;
    case 'delete':
        $status = array();
        if (isset($_GET['html'])) {
            if (!isset($_GET['confirm'])) {
                // Dislay an 'Are you sure' dialog