]> git.datanom.net - qtadmin.git/blobdiff - index.php
Add change row per page
[qtadmin.git] / index.php
index 4d24a35eed0d9f41b483b1fe66731c9b488b4901..8c19452578a526ff34323f2ba5641035b5f4672e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,10 +1,10 @@
 <?php
-/* vim: set ts=4 tw=0 sw=4 noet: */
+/* vim: set ts=4 tw=4 sw=4 noet: */
     require_once 'config.php';
     require_once $CFG->root . 'lib/db_factory.php';
     require_once $CFG->root . 'lib/utils.inc.php';
 
-    $util = Utils::getInstance();
+    $util = new Utils;
     unset($_SESSION['mailInfo']);
 
     if ($util->isLoggedIn()) {
         echo $util->getHeader();
         echo $util->getHeading();
 
-        echo "<span class=\"user\">{$util->getUser()}
-            <a title=\"Logout\" href=\"auth.php?op=logout\">Logout</a></span>";
+        echo "<form onsubmit=\"javascript: updateRowsPerPage();\"><input type=\"text\"
+              value=\"$rowsPerPage\" id=\"rows\" size=\"2\"/><input type=\"submit\"
+              value=\"Change\"/></form><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();
@@ -34,8 +36,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 "<th><input name=\"multiselect\" type=\"checkbox\" ";
+        echo "onchange=\"javascript: updateAction(this)\" /></th>";
         echo "</tr>";
 
         $mailInfo = array();
@@ -60,7 +62,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><td>$checkbox</td></tr>";
+                "<td>$subject</td><td class=\"nav-action\">$action</td><td class=\"nav-action\">$checkbox</td></tr>";
             $i++;
         }
         $_SESSION['mailInfo'] = $mailInfo;
 
         if ($pageNum > 1) {
             $page  = $pageNum - 1;
-            $prev = "[<a title=\"Prev Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
-                class='whitefooter'>[<img class=\"nav-img\" src=\"pics/go-previous.png\" alt=\"Previous\" /></a>]";
-            $first = "[<a title=\"First Page\" href=\"$self?page=1&rowsperpage=$rowsPerPage\"
-                class='whitefooter'><img class=\"nav-img\" src=\"pics/go-first.png\" alt=\"First\" /></a>]";
+            $prev = " <a title=\"Prev Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
+                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\"
+                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
             $first = '&nbsp;'; // nor the first page link
 
         if ($pageNum < $maxPage) {
             $page = $pageNum + 1;
-            $next = "[<a title=\"Next Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
-                class='whitefooter'>[<img class=\"nav-img\" src=\"pics/go-next.png\" alt=\"Next\" /></a>]";
-            $last = "[<a title=\"Last Page\" href=\"$self?page=$maxPage&rowsperpage=$rowsPerPage\"
-                class='whitefooter'><img class=\"nav-img\" src=\"pics/go-last.png\" alt=\"Last\" /></a>]";
+            $next = " <a title=\"Next Page\" href=\"$self?page=$page&rowsperpage=$rowsPerPage\"
+                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\"
+                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
             $last = '&nbsp;'; // nor the last page link
This page took 0.071616 seconds and 5 git commands to generate.