X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsearch.php;h=7eb98a183faa78e51be51356758c4bff51f4fb4d;hb=16a973d70a51ec3e3a171b87fcf0fc2fd5de5351;hp=a82dc7473643a2efa248bd2e9f1e2c3bdc25b4d1;hpb=a1401db6e316f0087f7f32bf5bf56db4c1a98cfc;p=squirrelmail.git diff --git a/src/search.php b/src/search.php index a82dc747..7eb98a18 100644 --- a/src/search.php +++ b/src/search.php @@ -1,24 +1,37 @@ ', + $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)) include("../functions/imap.php"); - if (!isset($imap_search_php)) + if (!isset($imap_search_php)) include("../functions/imap_search.php"); if (!isset($array_php)) include("../functions/array.php"); @@ -26,61 +39,80 @@ include("../src/load_prefs.php"); displayPageHeader($color, $mailbox); - $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); -if (empty($mailbox) || empty($what) || empty($where)) { + do_hook("search_before_form"); + echo "
\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo "
"._("Search")."
\n"; + echo "
"; -echo "
- -
-
"._("Search")."
-

"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; + echo " "; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; - echo " \n"; + echo " \n"; + echo " \n"; - echo " "; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; + echo " "; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo " \n"; - echo "
\n"; - echo " \n"; - echo ""; -} else { - -sqimap_mailbox_select($imapConnection, $mailbox); - sqimap_search($imapConnection, $where, $what, $mailbox, $color); - -} -sqimap_logout ($imapConnection); + } + echo "
"; + echo "
\n"; + if (!isset($what)) + $what = ""; + $what_disp = ereg_replace(",", " ", $what); + $what_disp = str_replace("\\\\", "\\", $what_disp); + $what_disp = str_replace("\\\"", "\"", $what_disp); + $what_disp = str_replace("\"", """, $what_disp); + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo ""; + echo "
"; + do_hook("search_after_form"); + if (isset($where) && $where && isset($what) && $what) { + sqimap_mailbox_select($imapConnection, $mailbox); + sqimap_search($imapConnection, $where, $what, $mailbox, $color); + } + do_hook("search_bottom"); + sqimap_logout ($imapConnection); ?>