X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=8c5532240f0300f19c5720d5d0dd4a2ad4bf21ab;hb=ccbe63bad9cfea0850e299e6be71eba5d76170d6;hp=8d77d2b1e994cc444f241a143e04b472eb3ff43f;hpb=dcbe1eccb02754d102d78dd79d3c80d207846a62;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index 8d77d2b1..8c553224 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 */ +$key = $_COOKIE['key']; +$username = $_SESSION['username']; +$onetimepad = $_SESSION['onetimepad']; +$delimiter = $_SESSION['delimiter']; + +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 "