-echo html_tag( 'table',
- html_tag( 'tr', "\n" .
- html_tag( 'td', '<b>' . _("Search") . '</b>', 'center', $color[0] )
- ) ,
- '', '', 'width="100%"') . "\n";
-
-/* update the recent and saved searches from the pref files */
-$attributes = get_recent($username, $data_dir);
-$saved_attributes = get_saved($username, $data_dir);
-$saved_count = count($saved_attributes['saved_what']);
-$count_all = 0;
-
-/* Saved Search Table */
-if ($saved_count > 0) {
- echo "<br>\n"
- . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' )
- . html_tag( 'tr',
- html_tag( 'td', '<b>Saved Searches</b>', 'center' )
- )
- . html_tag( 'tr' )
- . html_tag( 'td' )
- . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="2" cellspacing="2" border="0"' );
- for ($i=0; $i < $saved_count; ++$i) {
- if ($i % 2) {
- echo html_tag( 'tr', '', '', $color[0] );
- } else {
- echo html_tag( 'tr', '', '', $color[4] );
- }
- echo html_tag( 'td', $saved_attributes['saved_folder'][$i], 'left', '', 'width="35%"' )
- . html_tag( 'td', $saved_attributes['saved_what'][$i], 'left' )
- . html_tag( 'td', $saved_attributes['saved_where'][$i], 'center' )
- . html_tag( 'td', '', 'right' )
- . '<a href=search.php'
- . '?mailbox=' . htmlentities($saved_attributes['saved_folder'][$i])
- . '&what=' . htmlentities($saved_attributes['saved_what'][$i])
- . '&where=' . htmlentities($saved_attributes['saved_where'][$i])
- . '>' . _("edit") . '</a>'
- . ' | '
- . '<a href=search.php'
- . '?mailbox=' . urlencode($saved_attributes['saved_folder'][$i])
- . '&what=' . urlencode($saved_attributes['saved_what'][$i])
- . '&where=' . urlencode($saved_attributes['saved_where'][$i])
- . '&submit=Search_no_update'
- . '>' . _("search") . '</a>'
- . ' | '
- . "<a href=search.php?count=$i&submit=delete>"
- . _("delete")
- . '</a>'
- . '</td></tr>';
- }
- echo "</table></td></tr></table>\n";
-}
-
-if ($recent_count > 0) {
- echo "<br>\n"
- . html_tag( 'table', '', 'center', $color[9], 'width="95%" cellpadding="1" cellspacing="1" border="0"' )
- . html_tag( 'tr',
- html_tag( 'td', '<b>' . _("Recent Searches") . '</b>', 'center' )
- )
- . html_tag( 'tr' )
- . html_tag( 'td' )
- . html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="0" cellspacing="0" border="0"' );
- for ($i=1; $i <= $recent_count; ++$i) {
- if (isset($attributes['search_folder'][$i])) {
- if ($attributes['search_folder'][$i] == "") {
- $attributes['search_folder'][$i] = "INBOX";
- }
- }
- if ($i % 2) {
- echo html_tag( 'tr', '', '', $color[0] );
- } else {
- echo html_tag( 'tr', '', '', $color[0] );
- }
- if (isset($attributes['search_what'][$i]) &&
- !empty($attributes['search_what'][$i])) {
- echo html_tag( 'td', $attributes['search_folder'][$i], 'left', '', 'width="35%"' )
- . html_tag( 'td', $attributes['search_what'][$i], 'left' )
- . html_tag( 'td', $attributes['search_where'][$i], 'center' )
- . html_tag( 'td', '', 'right' )
- . "<a href=search.php?count=$i&submit=save>"
- . _("save")
- . '</a>'
- . ' | '
- . '<a href=search.php'
- . '?mailbox=' . urlencode($attributes['search_folder'][$i])
- . '&what=' . urlencode($attributes['search_what'][$i])
- . '&where=' . urlencode($attributes['search_where'][$i])
- . '&submit=Search_no_update'
- . '>' . _("search") . '</a>'
- . ' | '
- . "<a href=search.php?count=$i&submit=forget>"
- . _("forget")
- . '</a>'
- . '</td></tr>';
- }
- }
- echo '</table></td></tr></table><br>';