$tit\n"; } /* ------------------------ main ------------------------ */ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); if( $mailbox == 'None' ) { $mailbox = $boxes[0]['unformatted']; } displayPageHeader($color, $mailbox); if( !isset( $search_memory ) ) { $search_memory = 0; } do_hook('search_before_form'); echo "
\n". " \n". " \n". '
\n". "
"._("Search")."
\n". "
'; if( $search_memory > 0 ) { if( isset( $pos) ) { setpref( $data_dir, $username, 'search_pos', $pos ); } else { $pos = getPref($data_dir, $username, 'search_pos', 0 ); } } for ( $form = 0; $form <= $search_memory; $form++ ) { $frm = "$form"; $what = "what$frm"; $where = "where$frm"; if( $search_memory > 0 ) { if ( $$what == '' ) { $$what = getPref($data_dir, $username, "search_what$frm", '' ); $$where = getPref($data_dir, $username, "search_where$frm", '' ); } else { setpref( $data_dir, $username, "search_what$frm", $$what ); setpref( $data_dir, $username, "search_where$frm", $$where ); } } echo " \n"; if( !($form == 0 && $search_memory > 0) ) { if( $form == $pos ) { $act = $color[5]; } else { $act = $color[4]; } echo "\n". "". " \n". ' \n". " '. "\n". " \n". " \n". ''; } echo "
'. " \n"; if (!isset($$what)) { $$what = ''; } $what_disp = str_replace(',', ' ', $$what); $what_disp = str_replace('\\\\', '\\', $what_disp); $what_disp = str_replace('\\"', '"', $what_disp); $what_disp = str_replace('"', '"', $what_disp); echo " \n". '\n". "\n" . " \n". " \n". "
\n"; } echo "
"; do_hook("search_after_form"); if( !isset( $pos ) ) { $pos = $frm; } $what = "what$pos"; $where = "where$pos"; if (isset($$where) && $$where && isset($$what) && $$what) { sqimap_mailbox_select($imapConnection, $mailbox); sqimap_search($imapConnection, $$where, $$what, $mailbox, $color, $pos); } do_hook("search_bottom"); sqimap_logout ($imapConnection); echo ''; ?>