X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fsearch.php;h=79da86acd8aa95417a0f5303185b7f571041dd99;hp=a82dc7473643a2efa248bd2e9f1e2c3bdc25b4d1;hb=91dc6e4e1605dc5aee40e3cae9f11d79f785b834;hpb=a1401db6e316f0087f7f32bf5bf56db4c1a98cfc diff --git a/src/search.php b/src/search.php index a82dc747..79da86ac 100644 --- a/src/search.php +++ b/src/search.php @@ -1,86 +1,118 @@ ', + $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"); + 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"); + include('../functions/page_header.php'); if (!isset($imap_php)) - include("../functions/imap.php"); - if (!isset($imap_search_php)) - include("../functions/imap_search.php"); + include('../functions/imap.php'); + if (!isset($imap_search_php)) + include('../functions/imap_search.php'); if (!isset($array_php)) - include("../functions/array.php"); + include('../functions/array.php'); - include("../src/load_prefs.php"); + 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); ?>