X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Faddrbook_search.php;h=4e914beef1ef4f28c5297d4665e19f6148e3510e;hp=a2a011b4b3029ae2852c57dd72aa2693c467cf8a;hb=cb104e1dc329188c066b6d6b843fdbd22f9e16de;hpb=a51f9f4b4eed91ac80a85dbca1ce473b6f4b3dde diff --git a/src/addrbook_search.php b/src/addrbook_search.php index a2a011b4..4e914bee 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,181 +1,291 @@ - +/** + * addrbook_search.php + * + * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * 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! + * + * $Id$ + */ + +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +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'); + +/* lets get the global vars we may need */ +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION); +sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION); + +sqgetGlobalVar('show' , $show); +sqgetGlobalVar('query', $query, SQ_POST); +sqgetGlobalVar('listall', $listall, SQ_POST); +sqgetGlobalVar('backend', $backend, SQ_POST); + +/* Function to include JavaScript code */ +function insert_javascript() { + ?> + "; - } else { - echo "
\n"; - } - - // Just make a blank page and exit - if(($show == "blank") || (empty($query) && empty($show))) { - printf("
%s