X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=7eb98a183faa78e51be51356758c4bff51f4fb4d;hb=16a973d70a51ec3e3a171b87fcf0fc2fd5de5351;hp=de730d096deb3a7f7bbff3d35b934ae8a65da7e3;hpb=06ad27a2ea5e8cef7e172f2d39a5c43b06dd2410;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index de730d09..7eb98a18 100644 --- a/src/search.php +++ b/src/search.php @@ -1,19 +1,32 @@ ', + $color[8], $color[4], $color[7], $color[7], $color[7]); + plain_error_message(_("You need a valid user and password to access this page!") + . "
" + . _("Click here to log back in.") . ".", $color); + echo ""; exit; } - if (!isset($config_php)) - include("../config/config.php"); if (!isset($strings_php)) include("../functions/strings.php"); + if (!isset($i18n_php)) + include("../functions/i18n.php"); + if (!isset($config_php)) + include("../config/config.php"); if (!isset($page_header_php)) include("../functions/page_header.php"); if (!isset($imap_php)) @@ -29,14 +42,14 @@ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); do_hook("search_before_form"); - echo "
- - -
-
"._("Search")."
-
"; + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
"._("Search")."
\n"; + echo "
"; - echo "
\n"; + echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; @@ -44,7 +57,7 @@ $boxes = sqimap_mailbox_list($imapConnection); for ($i = 0; $i < count($boxes); $i++) { - if ($boxes[$i]["flags"][0] != "noselect" && $boxes[$i]["flags"][1] != "noselect" && $boxes[$i]["flags"][2] != "noselect") { + if (!in_array("noselect", $boxes[$i]["flags"])) { $box = $boxes[$i]["unformatted"]; $box2 = replace_spaces($boxes[$i]["formatted"]); if ($mailbox == $box) @@ -56,6 +69,8 @@ echo " "; echo " \n"; + if (!isset($what)) + $what = ""; $what_disp = ereg_replace(",", " ", $what); $what_disp = str_replace("\\\\", "\\", $what_disp); $what_disp = str_replace("\\\"", "\"", $what_disp); @@ -65,22 +80,22 @@ echo " \n"; echo " \n"; @@ -93,7 +108,7 @@ echo ""; echo "
"; do_hook("search_after_form"); - if ($where && $what) { + if (isset($where) && $where && isset($what) && $what) { sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $where, $what, $mailbox, $color); }