]> git.datanom.net - qtadmin.git/blobdiff - index.php
prepare for wblistadm server
[qtadmin.git] / index.php
index f0a89360d901a59cfaef029a74bf9ece3ed8abf2..ec831b0039b877358c447874659c3cfe85c57e33 100644 (file)
--- a/index.php
+++ b/index.php
         echo $util->getHeader();
         echo $util->getHeading();
 
         echo $util->getHeader();
         echo $util->getHeading();
 
-        echo "<span class=\"user\">{$util->getUser()}
-            <a title=\"Logout\" href=\"auth.php?op=logout\">Logout</a></span>";
+        echo "Rows per page <input type=\"text\" value=\"$rowsPerPage\" id=\"rows\"
+              size=\"2\"/><input type=\"button\" onclick=\"javascript: updateRowsPerPage()\"
+              value=\"Change\"/><span class=\"user\">{$util->getUser()}
+              <a title=\"Logout\" href=\"auth.php?op=logout\">Logout</a></span>";
         $which = ($util->isAdmin() == true) ? 'all' : $util->getUser();
         $rows = $DB->getQMails($offset, $rowsPerPage, $which);
         $numrows = $DB->numRows();
         echo "<span class=\"total-rows\">$numrows quarantined mail(s)</span>";
         echo "<table><tr>";
         $which = ($util->isAdmin() == true) ? 'all' : $util->getUser();
         $rows = $DB->getQMails($offset, $rowsPerPage, $which);
         $numrows = $DB->numRows();
         echo "<span class=\"total-rows\">$numrows quarantined mail(s)</span>";
         echo "<table><tr>";
-        echo "<table><tr><th>Received</th><th>Cause</th>";
+        echo "<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\" ";
         echo "onchange=\"javascript: updateAction(this)\" /></th>";
         echo "<th>Sender</th><th>Recipient</th><th>Subject</th><th>Action</th>";
         echo "<th><input name=\"multiselect\" type=\"checkbox\" ";
         echo "onchange=\"javascript: updateAction(this)\" /></th>";
             $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>";
             $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 = "<a title=\"Release Mail\" href=\"quarantine.php?id=$url&amp;op=release\">";
             $action .= "<img class=\"nav-img\" src=\"pics/release.png\" alt=\"Release\" /></a>";
             $action .= "<img class=\"nav-img\" src=\"pics/release.png\" alt=\"Release\" /></a>";
-            $action .= "&nbsp;<a title=\"Delete Mail\" href=\"quarantine.php?id=$url&op=delete\">";
+            $action .= "&nbsp;<a title=\"Delete Mail\" href=\"quarantine.php?id=$url&amp;op=delete\">";
             $action .= "<img class=\"nav-img\" src=\"pics/delete.png\" alt=\"Delete\" /></a>";
             $action .= "<img class=\"nav-img\" src=\"pics/delete.png\" alt=\"Delete\" /></a>";
+            $action .= "&nbsp;<a title=\"Block Sender\" href=\"quarantine.php?id=$url&amp;op=block\">";
+            $action .= "<img class=\"nav-img\" src=\"pics/spam.png\" alt=\"Block Sender\" /></a>";
             $sender = $row->sender;
             $received = strftime("%c", $row->time_iso);
             $quaratinefor = $util->convertContent($row->quaratinefor);
             $sender = $row->sender;
             $received = strftime("%c", $row->time_iso);
             $quaratinefor = $util->convertContent($row->quaratinefor);
@@ -71,9 +75,9 @@
 
         if ($pageNum > 1) {
             $page  = $pageNum - 1;
 
         if ($pageNum > 1) {
             $page  = $pageNum - 1;
-            $prev = " <a title=\"Prev Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
+            $prev = " <a title=\"Prev Page\" href=\"$self?page=$page&amp;rowsperpage=$rowsPerPage\"
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-previous-symbolic.svg\" alt=\"Previous\" /></a> ";
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-previous-symbolic.svg\" alt=\"Previous\" /></a> ";
-            $first = " <a title=\"First Page\" href=\"$self?page=1&rowsperpage=$rowsPerPage\"
+            $first = " <a title=\"First Page\" href=\"$self?page=1&amp;rowsperpage=$rowsPerPage\"
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-first-symbolic.svg\" alt=\"First\" /></a> ";
         } else {
             $prev  = '&nbsp;'; // we're on page one, don't print previous link
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-first-symbolic.svg\" alt=\"First\" /></a> ";
         } else {
             $prev  = '&nbsp;'; // we're on page one, don't print previous link
@@ -82,9 +86,9 @@
 
         if ($pageNum < $maxPage) {
             $page = $pageNum + 1;
 
         if ($pageNum < $maxPage) {
             $page = $pageNum + 1;
-            $next = " <a title=\"Next Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
+            $next = " <a title=\"Next Page\" href=\"$self?page=$page&amp;rowsperpage=$rowsPerPage\"
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-next-symbolic.svg\" alt=\"Next\" /></a> ";
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-next-symbolic.svg\" alt=\"Next\" /></a> ";
-            $last = " <a title=\"Last Page\" href=\"$self?page=$maxPage&rowsperpage=$rowsPerPage\"
+            $last = " <a title=\"Last Page\" href=\"$self?page=$maxPage&amp;rowsperpage=$rowsPerPage\"
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-last-symbolic.svg\" alt=\"Last\" /></a> ";
         } else {
             $next = '&nbsp;'; // we're on the last page, don't print next link
                 class='whitefooter'><img class=\"nav-img\" src=\"pics/go-last-symbolic.svg\" alt=\"Last\" /></a> ";
         } else {
             $next = '&nbsp;'; // we're on the last page, don't print next link
               onclick="javascript: checkAction(\'release\');"/>';
         echo '<input class="mail-purge" type="button" value="Delete checked"
               onclick="javascript: checkAction(\'delete\');"/>';
               onclick="javascript: checkAction(\'release\');"/>';
         echo '<input class="mail-purge" type="button" value="Delete checked"
               onclick="javascript: checkAction(\'delete\');"/>';
+        echo '<input class="mail-purge" type="button" value="Block checked"
+              onclick="javascript: checkAction(\'block\');"/>';
         echo "<p class=\"page-nav\">$first$prev Showing page $pageNum of
               $maxPage pages $next$last</p>";
 
         echo "<p class=\"page-nav\">$first$prev Showing page $pageNum of
               $maxPage pages $next$last</p>";
 
This page took 0.050147 seconds and 5 git commands to generate.