Index: trunk/services/admins.php
===================================================================
--- trunk/services/admins.php	(revision 19)
+++ trunk/services/admins.php	(revision 20)
@@ -53,4 +53,7 @@
 $page->setPageNumber(getFormData('page_number'));
 
+// Search limiters retain their values between page requests.
+App::carryQuery('search_query');
+
 
 /******************************************************************************
@@ -60,5 +63,5 @@
 // We may want to use the add/edit interface from another script, so this
 // allows us to remember which page we came from so we can go back there.
-if (getFormData('boomerang', false)) {
+if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
     App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'admins');
 }
@@ -380,5 +383,5 @@
     
     // Create version.
-    $version = new RecordVersion($GLOBALS['auth']);
+    $version = RecordVersion::getInstance($GLOBALS['auth']);
     $version->create('admin_tbl', 'admin_id', $last_insert_id, $frm['username']);
     
@@ -420,5 +423,5 @@
 
         // Create version.
-        $version = new RecordVersion($GLOBALS['auth']);
+        $version = RecordVersion::getInstance($GLOBALS['auth']);
         $version->create('admin_tbl', 'admin_id', $frm['admin_id'], $frm['username']);
     
@@ -450,13 +453,4 @@
             ";
         }
-    }
-
-    if (getFormData('search_query', false)) {
-        // Search query.
-        $where_clause = $search_where_clause;
-    }
-    if (getFormData('filter_admin_user_type', false)) {
-        // Limit by filter.
-        $where_clause .= (empty($where_clause) ? 'WHERE' : 'AND') . " user_type = '" . addslashes(getFormData('filter_admin_user_type')) . "'";
     }
 
Index: trunk/services/lock.php
===================================================================
--- trunk/services/lock.php	(revision 19)
+++ trunk/services/lock.php	(revision 20)
@@ -11,5 +11,5 @@
 App::sslOn();
 
-if (getFormData('boomerang', false)) {
+if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
     // We remember which page we came from so we can go back there.
     $boom_url = strpos(getFormData('boomerang'), '/') !== false ? getFormData('boomerang') : $_SERVER['HTTP_REFERER'];
Index: trunk/services/login.php
===================================================================
--- trunk/services/login.php	(revision 19)
+++ trunk/services/login.php	(revision 20)
@@ -5,5 +5,5 @@
  */
 
-if (getFormData('boomerang', false)) {
+if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
     // We remember which page we came from so we can go back there.
     App::setBoomerangURL($_SERVER['HTTP_REFERER']);
Index: trunk/services/password.php
===================================================================
--- trunk/services/password.php	(revision 19)
+++ trunk/services/password.php	(revision 20)
@@ -1,5 +1,5 @@
 <?php
 /**
- * passwd.php 
+ * password.php 
  * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
  */
@@ -25,7 +25,7 @@
  *****************************************************************************/
 
-if (getFormData('boomerang', false)) {
+if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
     // We remember which page we came from so we can go back there.
-    App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'admin_passwd');
+    App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'admin_password');
 }
 App::sslOn();
@@ -57,5 +57,5 @@
         App::logMsg(sprintf(_("Password change successful for %s"), $auth->getVal('username')), LOG_INFO, __FILE__, __LINE__);
         App::raiseMsg(sprintf(_("Password change successful for %s"), $auth->getVal('username')), MSG_SUCCESS, __FILE__, __LINE__);
-        App::dieBoomerangURL('admin_passwd');
+        App::dieBoomerangURL('admin_password');
     }
     break;
@@ -64,5 +64,5 @@
 // Templates.
 include 'header.ihtml';
-include 'codebase/services/templates/passwd.ihtml';
+include 'codebase/services/templates/password.ihtml';
 include 'footer.ihtml';
 
Index: trunk/services/templates/admin_form.ihtml
===================================================================
--- trunk/services/templates/admin_form.ihtml	(revision 19)
+++ trunk/services/templates/admin_form.ihtml	(revision 20)
@@ -3,7 +3,7 @@
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
 <?php App::printHiddenSession(); ?>
-<input type="hidden" name="op" value="<?php echo $frm['new_op']; ?>">
-<input type="hidden" name="admin_id" value="<?php echo $frm['admin_id']; ?>">
-<input type="hidden" name="old_username" value="<?php echo $frm['old_username']; ?>">
+<input type="hidden" name="op" value="<?php echo $frm['new_op']; ?>" />
+<input type="hidden" name="admin_id" value="<?php echo $frm['admin_id']; ?>" />
+<input type="hidden" name="old_username" value="<?php echo $frm['old_username']; ?>" />
 
 <table>
@@ -13,37 +13,37 @@
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('username', ' class="error"') ?>><?php echo _("Username"); ?></td>
+        <td class="right"><label for="username"<?php $fv->err('username', ' class="error"') ?>><?php echo _("Username"); ?></label></td>
         <td valign="top">
-            <input type="text" class="forminputtext" size="50" name="username" value="<?php echo oTxt($frm['username']); ?>">
+            <input type="text" class="small" size="50" name="username" value="<?php echo oTxt($frm['username']); ?>" />
         </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('userpass', ' class="error"') ?>><?php echo _("Password"); ?></td>
+        <td class="right"><label for="userpass"<?php $fv->err('userpass', ' class="error"') ?>><?php echo _("Password"); ?></label></td>
         <td valign="top">
-            <input type="password" class="forminputtext" size="50" name="userpass" value="<?php echo oTxt($frm['userpass']); ?>">
+            <input type="password" class="small" size="50" name="userpass" value="<?php echo oTxt($frm['userpass']); ?>" />
         </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('first_name', ' class="error"') ?>><?php echo _("First name"); ?></td>
+        <td class="right"><label for="first_name"<?php $fv->err('first_name', ' class="error"') ?>><?php echo _("First name"); ?></label></td>
         <td valign="top">
-            <input type="text" class="forminputtext" size="50" name="first_name" value="<?php echo oTxt($frm['first_name']); ?>">
+            <input type="text" class="small" size="50" name="first_name" value="<?php echo oTxt($frm['first_name']); ?>" />
         </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('last_name', ' class="error"') ?>><?php echo _("Last name"); ?></td>
+        <td class="right"><label for="last_name"<?php $fv->err('last_name', ' class="error"') ?>><?php echo _("Last name"); ?></label></td>
         <td valign="top">
-            <input type="text" class="forminputtext" size="50" name="last_name" value="<?php echo oTxt($frm['last_name']); ?>">
+            <input type="text" class="small" size="50" name="last_name" value="<?php echo oTxt($frm['last_name']); ?>" />
         </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('email', ' class="error"') ?>><?php echo _("Email"); ?></td>
+        <td class="right"><label for="email"<?php $fv->err('email', ' class="error"') ?>><?php echo _("Email"); ?></label></td>
         <td valign="top">
-            <input type="text" class="forminputtext" size="50" name="email" value="<?php echo oTxt($frm['email']); ?>">
+            <input type="text" class="medium" size="50" name="email" value="<?php echo oTxt($frm['email']); ?>" />
         </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('user_type', ' class="error"') ?>><?php echo _("User type"); ?></td>
+        <td class="right"><label for="user_type"<?php $fv->err('user_type', ' class="error"') ?>><?php echo _("User type"); ?></label></td>
         <td valign="top">
-            <select name="user_type">
+            <select name="user_type" class="small">
             <?php printSetSelectForm('admin_tbl', 'user_type', $frm['user_type'], true); ?>
             </select>
Index: trunk/services/templates/admin_list.ihtml
===================================================================
--- trunk/services/templates/admin_list.ihtml	(revision 19)
+++ trunk/services/templates/admin_list.ihtml	(revision 20)
@@ -2,5 +2,4 @@
 <?php $fv->printErrorMessages(); ?>
 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<?php $carry_queries = array('search_query', 'filter_admin_user_type'); ?>
 <?php App::printHiddenSession(false); ?>
 <div id="commandbox">
@@ -8,10 +7,5 @@
     <br />
     
-    <input type="text" class="forminputtext" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: Admin id, Username, Userpass, First name, Last name, Email, User type, Login abuse exempt, Blocked, Blocked reason, Abuse warning level, Seconds online, Last login datetime, Last access datetime, Last login ip, Added by user id, Modified by user id, Added datetime, Modified datetime.")); ?>" />
-<!-- 
-    <select name="filter_<##>">
-        <?php // printSelectForm('<##>_tbl', "CONCAT(<##>_id, '&mdash;', city, '&mdash;', title)", '<##>_id', getFormData('filter_<##>'), array('Any <##>'), 'ORDER BY <##> ASC'); ?>
-    </select>
- -->
+    <input type="text" class="small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: Admin id, Username, Userpass, First name, Last name, Email, User type, Login abuse exempt, Blocked, Blocked reason, Abuse warning level, Seconds online, Last login datetime, Last access datetime, Last login ip, Added by user id, Modified by user id, Added datetime, Modified datetime.")); ?>" />
     <input type="submit" name="list" value="<?php echo _("Search"); ?>" />
 </div>
Index: trunk/services/templates/lock.ihtml
===================================================================
--- trunk/services/templates/lock.ihtml	(revision 19)
+++ trunk/services/templates/lock.ihtml	(revision 20)
@@ -18,7 +18,7 @@
     <?php if ($lock->getSecondsElapsed() > $lock->timeout) { ?>
     <p><?php printf(_("You can force unlock the record if you believe the editing session has expired. You might want to confirm with before doing this."), $lock->getEditor()) ?></p>
-    <input type="submit" class="formsubmitbutton" name="unlock" value="<?php echo _("Unlock"); ?>">
+    <input type="submit" class="formsubmitbutton" name="unlock" value="<?php echo _("Unlock"); ?>" />
     <?php } ?>
 
-    <input type="submit" class="formsubmitbutton" name="cancel" value="<?php echo _("Cancel"); ?>">
+    <input type="submit" class="formsubmitbutton" name="cancel" value="<?php echo _("Cancel"); ?>" />
 </form>
Index: trunk/services/templates/log_list.ihtml
===================================================================
--- trunk/services/templates/log_list.ihtml	(revision 19)
+++ trunk/services/templates/log_list.ihtml	(revision 20)
@@ -30,5 +30,5 @@
     </table>
 <?php } ?>
-    <input type="text" class="forminputtext" size="20" name="search_query" value="<?php echo oTxt(getFormData('search_query')); ?>" title="<?php echo _("All lines in currently viewed log file are searched."); ?>" />
+    <input type="text" class="small" size="20" name="search_query" value="<?php echo oTxt(getFormData('search_query')); ?>" title="<?php echo _("All lines in currently viewed log file are searched."); ?>" />
     <input type="checkbox" name="search_grep"<?php frmChecked(getFormData('search_grep')) ?> /><span class="commandtext"><?php echo _("Use Grep"); ?></span>
     <input type="submit" name="list" value="<?php echo _("Search"); ?>" class="formsubmitbutton" />
Index: trunk/services/templates/login_form.ihtml
===================================================================
--- trunk/services/templates/login_form.ihtml	(revision 19)
+++ trunk/services/templates/login_form.ihtml	(revision 20)
@@ -1,16 +1,20 @@
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
 <?php App::printHiddenSession() ?>
-<table border="0" cellspacing="0" cellpadding="4">
+<table>
     <tr>
-        <td class="formlabel" align="right" valign="top"><?php echo _("Username"); ?></td>
-        <td valign="top"><input type="text" class="forminputtext" size="25" name="username" value="<?php echo oTxt($frm['username']); ?>"></td>
+        <td class="right"><label for="username"><?php echo _("Username"); ?></label></td>
+        <td valign="top">
+            <input type="text" class="medium" size="20" name="username" value="<?php echo oTxt($frm['username']); ?>" />
+        </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top"><?php echo _("Password"); ?></td>
-        <td valign="top"><input type="password" class="forminputtext" size="25" name="password" value="<?php echo oTxt($frm['password']); ?>"></td>
+        <td class="right"><label for="password"><?php echo _("Password"); ?></label></td>
+        <td valign="top">
+            <input type="password" class="medium" size="20" name="password" value="<?php echo oTxt($frm['password']); ?>" />
+        </td>
     </tr>
     <tr>
-        <td class="formlabel" align="right" valign="top">&nbsp;</td>
-        <td valign="top"><br /><input type="submit" class="formsubmitbutton" value="<?php echo _("Login"); ?>"></td>
+        <td>&nbsp;</td>
+        <td valign="top"><input type="submit" value="<?php echo _("Login"); ?>" /></td>
     </tr>
 </table>
Index: trunk/services/templates/passwd.ihtml
===================================================================
--- trunk/services/templates/passwd.ihtml	(revision 19)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<?php $fv->printErrorMessages(); ?>
-
-<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
-<?php App::printHiddenSession() ?>
-<input type="hidden" name="op" value="update_password">
-<table border="0" cellspacing="0" cellpadding="4">
-    <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('oldpassword', ' class="error"') ?>><?php echo _("Old password"); ?></td>
-        <td valign="top"><input type="password" class="forminputtext" size="25" name="oldpassword" /></td>
-    </tr>
-    <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('newpassword', ' class="error"') ?>><?php echo _("New password"); ?></td>
-        <td valign="top"><input type="password" class="forminputtext" size="25" name="newpassword" /></td>
-    </tr>
-    <tr>
-        <td class="formlabel" align="right" valign="top"<?php $fv->err('newpassword2', ' class="error"') ?>><?php echo _("New password again"); ?></td>
-        <td valign="top"><input type="password" class="forminputtext" size="25" name="newpassword2" /></td>
-    </tr>
-    <tr>
-        <td class="formlabel" align="right" valign="top">&nbsp;</td>
-        <td valign="top"><br /><input type="submit" class="formsubmitbutton" value="<?php echo _("Change password"); ?>" /></td>
-    </tr>
-</table>
-</form>
Index: trunk/services/templates/password.ihtml
===================================================================
--- trunk/services/templates/password.ihtml	(revision 20)
+++ trunk/services/templates/password.ihtml	(revision 20)
@@ -0,0 +1,30 @@
+<?php $fv->printErrorMessages(); ?>
+
+<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
+<?php App::printHiddenSession() ?>
+<input type="hidden" name="op" value="update_password" />
+<table>
+    <tr>
+        <td class="right"><label for="oldpassword"<?php $fv->err('oldpassword', ' class="error"') ?>><?php echo _("Old password"); ?></label></td>
+        <td valign="top">
+            <input type="text" class="medium" size="50" name="oldpassword" />
+        </td>
+    </tr>
+    <tr>
+        <td class="right"><label for="newpassword"<?php $fv->err('newpassword', ' class="error"') ?>><?php echo _("New password"); ?></label></td>
+        <td valign="top">
+            <input type="password" class="medium" size="50" name="newpassword" />
+        </td>
+    </tr>
+    <tr>
+        <td class="right"><label for="newpassword2"<?php $fv->err('newpassword2', ' class="error"') ?>><?php echo _("New password again"); ?></label></td>
+        <td valign="top">
+            <input type="password" class="medium" size="50" name="newpassword2" />
+        </td>
+    </tr>
+    <tr>
+        <td>&nbsp;</td>
+        <td valign="top"><input type="submit" value="<?php echo _("Change password"); ?>" /></td>
+    </tr>
+</table>
+</form>
Index: trunk/services/templates/versions_list.ihtml
===================================================================
--- trunk/services/templates/versions_list.ihtml	(revision 19)
+++ trunk/services/templates/versions_list.ihtml	(revision 20)
@@ -1,5 +1,5 @@
 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
 <?php App::printHiddenSession() ?>
-<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>">
+<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>" />
 <table class="list" border="0" cellspacing="0" cellpadding="4">
 <tr>
@@ -31,4 +31,4 @@
 </table>
 <div class="help"><?php printf(_("When there are more than %s versions, those over %s days old are deleted."), $version->record_version_min_qty, $version->record_version_min_days); ?></div>
-<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>">
+<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>" />
 </form>
Index: trunk/services/versions.php
===================================================================
--- trunk/services/versions.php	(revision 19)
+++ trunk/services/versions.php	(revision 20)
@@ -17,8 +17,11 @@
  *****************************************************************************/
 
-$version = new RecordVersion($GLOBALS['auth']);
+$version = RecordVersion::getInstance($GLOBALS['auth']);
 
-// These values must be kept across requests.
-$carry_queries = array('record_table', 'record_key', 'record_val', 'version_title');
+// Query arguments to retain their values between page requests.
+App::carryQuery('record_table');
+App::carryQuery('record_key');
+App::carryQuery('record_val');
+App::carryQuery('version_title');
 
 // Titles and navigation header.
@@ -41,5 +44,5 @@
 }
 
-if (getFormData('boomerang', false)) {
+if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
     // We remember which page we came from so we can go back there.
     App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'versions');
