]> git.datanom.net - qtadmin.git/blobdiff - index.php
add multicheck
[qtadmin.git] / index.php
index 68526246ecccf1e7ba3ac56c035934504e45d890..6e1db887d6256d2a42035a7135aeefd542e7f2ce 100644 (file)
--- a/index.php
+++ b/index.php
@@ -34,6 +34,8 @@
         echo "<table><tr>";
         echo "<table><tr><th>Received</th><th>Cause</th>";
         echo "<th>Sender</th><th>Recipient</th><th>Subject</th><th>Action</th>";
+        echo "<th><input name=\"multiselect\" type=\"checkbox\"
+              onchange=\"javascript: updateAction(this)\" /></th>";
         echo "</tr>";
 
         $mailInfo = array();
@@ -46,6 +48,7 @@
             $id = $row->mail_id;
             $mailInfo[$id] = serialize($row);
             $url = urlencode($id);
+            $checkbox = "<input name=\"action\" type=\"checkbox\" value=\"$url\" />";
             $recipient = "<a title=\"Show Report\" href=\"mail_report.php?id=$url\">{$row->recipient}</a>";
             $action = "<a title=\"Release Mail\" href=\"quarantine.php?id=$url&op=release\">";
             $action .= "<img class=\"nav-img\" src=\"pics/release.png\" alt=\"Release\" /></a>";
@@ -57,7 +60,7 @@
             $subject = $row->subject;
             echo "<td>$received</td><td class=\"nav-action\">".
                 "$quaratinefor</td><td>$sender</td><td>$recipient</td>".
-                "<td>$subject</td><td class=\"nav-action\">$action</td></tr>";
+                "<td>$subject</td><td class=\"nav-action\">$action</td><td>$checkbox</td></tr>";
             $i++;
         }
         $_SESSION['mailInfo'] = $mailInfo;
         $_SESSION['marked'] = serialize($marked);
         echo '<input class="mail-purge" type="button" value="Purge Mails ('.
               count($marked).')" onclick="javascript: location.href=\'quarantine.php?op=purge\'"/>';
+        echo '<input class="mail-purge" type="button" value="Release checked"
+              onclick="javascript: checkAction(\'release\');"/>';
+        echo '<input class="mail-purge" type="button" value="Delete checked"
+              onclick="javascript: checkAction(\'delete\');"/>';
         echo "<p class=\"page-nav\">$first$prev Showing page $pageNum of
               $maxPage pages $next$last</p>";
 
This page took 0.461647 seconds and 5 git commands to generate.