X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=89143a808bad4c006201a5bcca985a8e04e249bd;hb=a11df61b949068712242d77e2c18311c93e63979;hp=a2a011b4b3029ae2852c57dd72aa2693c467cf8a;hpb=a51f9f4b4eed91ac80a85dbca1ce473b6f4b3dde;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index a2a011b4..89143a80 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -1,181 +1,296 @@ - +/** + * 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/html.php'); + +/* lets get the global vars we may need */ +$key = $_COOKIE['key']; +$username = $_SESSION['username']; +$onetimepad = $_SESSION['onetimepad']; +$base_uri = $_SESSION['base_uri']; + +sqextractGlobalVar('show'); +if ( isset($_POST['query']) ) { + $query = $_POST['query']; +} +if ( isset($_POST['listall']) ) { + $listall = $_POST['listall']; +} +if ( isset($_POST['backend'] ) ) { + $backend = $_POST['backend']; +} + +/* 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