X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=dcd7b285339112c51cf2edacb0508c2f66189415;hb=a11df61b949068712242d77e2c18311c93e63979;hp=400ba81f9e6ead45a8efdb228203657c8c24f1db;hpb=59a623e69455d6dfd6715883ab2995fb977d14b1;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index 400ba81f..dcd7b285 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 "