Adding Basque translators' info.
[squirrelmail.git] / src / addrbook_search.php
index b1bc299e16534a3efc54d4149f59bd36f0fdaafd..2fbd9346b660fe680d9f2be3ce42da421ec5335b 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * addrbook_search.php
  *
- * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Copyright (c) 1999-2004 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Handle addressbook searching in the popup window.
  *       addrbook_search_html.html -- If you change one,
  *       change the other one too!
  *
- * $Id$ 
+ * @version $Id$ 
  * @package squirrelmail
  */
 
 /**
  * Path for SquirrelMail required files.
+ * @ignore
  */
 define('SM_PATH','../');
 
@@ -26,6 +27,7 @@ require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'functions/global.php');
 require_once(SM_PATH . 'functions/html.php');
+require_once(SM_PATH . 'functions/forms.php');
 
 /** lets get the global vars we may need */
 sqgetGlobalVar('key',       $key,           SQ_COOKIE);
@@ -189,7 +191,7 @@ if ($show == 'form' && !isset($listall)) {
 /* Empty search */
 if (empty($query) && empty($show) && empty($listall)) {
     echo html_tag( 'p', '<br>' .
-                      _("No persons matching your search was found"),
+                      _("No persons matching your search were found"),
             'center' ) .
           "\n</BODY></HTML>\n",
     exit;
@@ -206,20 +208,20 @@ if ($show == 'form' && empty($listall)) {
          html_tag( 'tr' ) .
          html_tag( 'td', '  <strong>' . _("Search for") . "</strong>\n", 'left', '', 'nowrap valign="middle" width="10%"' ) .
          html_tag( 'td', '', 'left', '', '' ) .
-                 '<INPUT TYPE=text NAME=query VALUE="' . htmlspecialchars($query) .
-                 "\" SIZE=28>\n";
+            addInput('query', $query, 28);
 
     /* List all backends to allow the user to choose where to search */
     if ($abook->numbackends > 1) {
-        echo '<STRONG>' . _("in") . '</STRONG>&nbsp;<SELECT NAME=backend>'."\n".
-             '<OPTION VALUE=-1 SELECTED>' . _("All address books") . "\n";
+        echo '<STRONG>' . _("in") . '</STRONG>&nbsp;'."\n".
+       $selopts['-1'] = _("All address books");
+       
         $ret = $abook->get_backend_list();
         while (list($undef,$v) = each($ret)) {
-            echo '<OPTION VALUE=' . $v->bnum . '>' . $v->sname . "\n";
+            $selopts[$v->bnum] = $v->sname;
         }
-        echo "</SELECT>\n";
+       echo addSelect('backend', $selopts, '-1', TRUE);
     } else {
-        echo '<INPUT TYPE=hidden NAME=backend VALUE=-1>' . "\n";
+        echo addHidden('backend', '-1');
     }
         
     echo '</td></tr>' .
@@ -285,7 +287,7 @@ if ($show == 'form' && empty($listall)) {
         
             if (sizeof($res) == 0) {
                 echo html_tag( 'p', '<br><b>' .
-                                 _("No persons matching your search was found") . "</b>\n" ,
+                                 _("No persons matching your search were found") . "</b>\n" ,
                        'center' ) .
                 "\n</BODY></HTML>\n";
                 exit;