[Hastymail-cvs] hastymail/html message.php,1.204,1.205
Brought to you by:
sailfrog,
slushpupie
From: <sai...@us...> - 2003-08-02 21:16:47
|
Update of /cvsroot/hastymail/hastymail/html In directory sc8-pr-cvs1:/tmp/cvs-serv20156/html Modified Files: message.php Log Message: added new message highlighting to the prev and next in search links on the message page. also added some comments to the new function in html_functions.php Index: message.php =================================================================== RCS file: /cvsroot/hastymail/hastymail/html/message.php,v retrieving revision 1.204 retrieving revision 1.205 diff -u -d -r1.204 -r1.205 --- message.php 1 Aug 2003 16:59:05 -0000 1.204 +++ message.php 2 Aug 2003 21:16:44 -0000 1.205 @@ -319,20 +319,41 @@ $current_box_result = array_keys($search_result[$hm_input['mailbox']]); $max = (count($current_box_result) - 1); $search_index_array = array_keys($current_box_result, $hm_input['uid']); - $pos = $search_index_array[0]; + $pos = $search_index_array[0]; + if (!stristr($search_result[$hm_input['mailbox']][$current_box_result[$pos]][5], + 'seen')) { + $_SESSION['search_info'][$hm_input['mailbox']][$current_box_result[$pos]][5] + .= ' seen'; + } echo ' <td align="center" nowrap class="tables3" width="10%">',"\n"; + $font = 'font2'; + $new = 0; if ($pos > 0) { - echo ' <small><a class="font2" href="message.php?id=',$hm_input['id'], + if (!stristr($search_result[$hm_input['mailbox']] + [$current_box_result[($pos - 1)]][5], 'seen')) { + $font = 'font3'; + $new = 1; + } + echo ' <small><a class="',$font,'" href="message.php?id=',$hm_input['id'], '&uid=',$current_box_result[($pos - 1)],'&mailbox=', - $hm_input['mailbox'],'&search=1"><<<</a></small>',"\n"; + $hm_input['mailbox'],'&search=1&new=',$new, + '"><<<</a></small>',"\n"; + $font = 'font2'; + $new = 0; } elseif ($fold_pos > 0) { $new_folder = $folders_index[($fold_pos - 1)]; $new_folder_index = array_keys($search_result[$new_folder]); $new_uid = $new_folder_index[(count($new_folder_index) - 1)]; - echo ' <small><a class="font2" href="message.php?id=',$hm_input['id'], + if (!stristr($search_result[$new_folder][$new_uid][5], 'seen')) { + $font = 'font3'; + $new = 1; + } + echo ' <small><a class="',$font,'" href="message.php?id=',$hm_input['id'], '&uid=',$new_uid,'&mailbox=',$new_folder, - '&search=1"><<<</a></small>',"\n"; + '&search=1&new=',$new,'"><<<</a></small>',"\n"; + $font = 'font2'; + $new = 0; } echo ' <small><a class="font2" href="search.php?mailbox=', urlencode($hm_input['mailbox']),'&uid=',$hm_input['uid'], @@ -340,17 +361,31 @@ Back to Search </a></small>',"\n"; if ($pos < $max) { - echo ' <small><a class="font2" href="message.php?id=',$hm_input['id'], + if (!stristr($search_result[$hm_input['mailbox']] + [$current_box_result[($pos + 1)]][5], 'seen')) { + $font = 'font3'; + $new = 1; + } + echo ' <small><a class="',$font,'" href="message.php?id=',$hm_input['id'], '&uid=',$current_box_result[($pos + 1)],'&mailbox=', - $hm_input['mailbox'],'&search=1">>>></a></small>',"\n"; + $hm_input['mailbox'],'&search=1&new=',$new, + '">>>></a></small>',"\n"; + $font = 'font2'; + $new = 0; } elseif ($fold_pos < $fold_max) { $new_folder = $folders_index[($fold_pos + 1)]; $new_folder_index = array_keys($search_result[$new_folder]); $new_uid = $new_folder_index[0]; - echo ' <small><a class="font2" href="message.php?id=',$hm_input['id'], + if (!stristr($search_result[$new_folder][$new_uid][5], 'seen')) { + $font = 'font3'; + $new = 1; + } + echo ' <small><a class="',$font,'" href="message.php?id=',$hm_input['id'], '&uid=',$new_uid,'&mailbox=',$new_folder, - '&search=1">>>></a></small>',"\n"; + '&search=1&new=',$new,'">>>></a></small>',"\n"; + $font = 'font3'; + $new = 1; } echo ' </td> <td align="center" nowrap class="tables1" width="30%"> |