X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.php;h=4126773669a1df18aad02a1acb3bb2bdc2a4ca66;hb=6c817138130223d73f95f24d06d63239e120d3e2;hp=cdd37727ea6b50512b6c86bf72ce9fed7c54b1cc;hpb=70f1b6b571061f9315cc1004e2fa9c18cf2efe11;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index cdd37727..41267736 100644 --- a/src/search.php +++ b/src/search.php @@ -9,17 +9,46 @@ * $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 "