X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=4fca3ea9c9db800895d03dd96d5dad7896eb6404;hb=c3ccfa1912b4ca47279d259bb587ceb293ce5d83;hp=1c29fe064158efa19bb1960c49c0314f377c9b88;hpb=d7f8e6e69e33b218bf6d7775a53c811d839bce61;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index 1c29fe06..4fca3ea9 100644 --- a/src/search.php +++ b/src/search.php @@ -3,23 +3,52 @@ /** * search.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * $Id$ */ -require_once('../src/validate.php'); -require_once('../functions/imap.php'); -require_once('../functions/imap_search.php'); -require_once('../functions/imap_utf7_decode_local.php'); -require_once('../functions/array.php'); -require_once('../functions/strings.php'); +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/imap_search.php'); +require_once(SM_PATH . 'functions/imap_mailbox.php'); +require_once(SM_PATH . 'functions/strings.php'); global $allow_thread_sort; -/* here are some functions, could go in imap_search.php +/* get globals we may need */ + +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); +sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); + +if (isset($_GET['mailbox'])) { + $mailbox = strip_tags($_GET['mailbox']); +} +if (isset($_GET['submit'])) { + $submit = strip_tags($_GET['submit']); +} +if (isset($_GET['what'])) { + $what = $_GET['what']; +} +if (isset($_GET['where'])) { + $where = strip_tags($_GET['where']); +} +if (isset($_GET['checkall'])) { + $checkall = strip_tags($_GET['checkall']); +} +if (isset($_GET['count'])) { + $count = strip_tags($_GET['count']); +} +/* end of get globals */ +/* here are some functions, could go in imap_search.php this was here, pretty handy */ function s_opt( $val, $sel, $tit ) { echo "