]> git.datanom.net - qtadmin.git/blobdiff - index.php
Add change row per page
[qtadmin.git] / index.php
index 2714d9a913d54864e6006e9086135238e93f66cd..00e9a8bd6b09a4d7d03134a074da7c7b469e9458 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 id=\"rowsForm\" \">
+              Rows per page <input type=\"text\" value=\"$rowsPerPage\" id=\"rows\"
+              size=\"2\"/><input type=\"button\" onclick=\"javascript: updateRowsPerPage()\" 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();
This page took 0.03183 seconds and 5 git commands to generate.