X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=89823839297db7c2308988e93116fed0089c153d;hb=ce20ea9260adccbf62ca895c7e372947c3007f21;hp=4a4d0884298a33aea42f5f386938c9f1970a4e8c;hpb=bebf762c1d4483d66a5dcc990c0bc72a9dd3cc96;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index 4a4d0884..89823839 100644 --- a/src/search.php +++ b/src/search.php @@ -3,22 +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/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 "