Source for file addrbook_search.php
Documentation is available at addrbook_search.php
-  * Handle addressbook searching in the popup window. 
-  * NOTE: A lot of this code is similar to the code in 
-  *       addrbook_search_html.html -- If you change one, 
-  *       change the other one too! 
-  * @copyright 1999-2020 The SquirrelMail Project Team 
-  * @license http://opensource.org/licenses/gpl-license.php GNU Public License 
-  * @version $Id: addrbook_search.php 14845 2020-01-07 08:09:34Z pdontthink $ 
-  * @subpackage addressbook 
- /** This is the addrbook_search page */ 
- define('PAGE_NAME', 'addrbook_search'); 
-  * Include the SquirrelMail initialization file. 
- require ('../include/init.php');
- include_once(SM_PATH - .  'functions/forms.php');
 
- include_once(SM_PATH - .  'functions/addressbook.php');
 
- include_once(SM_PATH - .  'templates/util_addressbook.php');
 
-  * @param array $res Array of search results 
-  * @param bool $includesource [Default=true] 
-     global $oTemplate, $oErrorHandler; 
-     $oTemplate->assign('compose_addr_pop', true); 
-     $oTemplate->assign('include_abook_name', $includesource); 
-     $oTemplate->display('addrbook_search_list.tpl');     
- /* ================= End of functions ================= */ 
- /** lets get the global vars we may need */ 
- /** set correct value of $default_charset */ 
- if (empty($query) - &&  empty($show)- &&  !- isset ($listall)) {
 
-     $oTemplate->display('note.tpl'); 
- /* Initialize addressbook, show init errors only in bottom frame */ 
- $showerr- = ($show- == 'form'- ?  false- :  true);
 
- /* Create search form (top frame) */ 
- if ($show - ==  'form'- &&  !- isset ($listall)) {
 
-     echo  "<form name=\"sform\" target=\"abookres\" action=\"addrbook_search.php\" method=\"post\">\n";
-     $oTemplate->assign('compose_addr_pop', true); 
-     $oTemplate->display('addressbook_search_form.tpl'); 
-      * List addresses (bottom frame) 
-      * If listall is set, list all entries in selected backend. 
-      * If $show is 'blank' (initial call of address book popup) - list 
-     if ($show - ==  'blank'- || isset ($listall)) {
 
-         if($backend - != - 1- ||  $show- ==  'blank') {
 
-                 $backend - =  $abook->localbackend;
 
-             $res - =  $abook->list_addr($backend);
 
-             $res - =  $abook->list_addr();
 
-     } elseif (!empty($query)) { 
-         /* Do the search (listall is not set. query is set.)*/ 
-             $res - =  $abook->s_search($query);
 
-             $res - =  $abook->s_search($query, $backend);
 
-         } elseif (sizeof($res) - ==  0) {
 
-             $oTemplate->assign('note', _("No persons matching your search were found")); 
-             $oTemplate->display('note.tpl'); 
-          * listall is not set, query is not set or empty. 
-          * User hit search button without entering search expression. 
- $oTemplate->display('footer.tpl'); 
 
	
		Documentation generated on Mon, 13 Jan 2020 04:21:58 +0100 by phpDocumentor 1.4.3