/[webmail]/cgi-bin/inbox.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /cgi-bin/inbox.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dpavlin, Wed Apr 19 09:06:17 2000 UTC revision 1.4 by dpavlin, Wed Apr 19 10:57:07 2000 UTC
# Line 89  $pop = new Mail::POP3Client($loginname, Line 89  $pop = new Mail::POP3Client($loginname,
89  #How many messages are there in the inbox provided by the $pop object?  #How many messages are there in the inbox provided by the $pop object?
90  $MessageCount = $pop->Count;  $MessageCount = $pop->Count;
91    
92    #gather additional size info
93    @MessageSize = $pop->ListArray;
94    
95  print "<table><tr><td>";  print "<table><tr><td>";
96  #if $pop->count is -1, then the POP connection failed.  #if $pop->count is -1, then the POP connection failed.
# Line 104  elsif ($MessageCount == 0) { Line 106  elsif ($MessageCount == 0) {
106  #if $pop->count is >0, then that is the number of messages in the  #if $pop->count is >0, then that is the number of messages in the
107  #POP account inbox.  #POP account inbox.
108  else {  print "<img src=$MAIL_IMG valign=middle>&nbsp;&nbsp;";  else {  print "<img src=$MAIL_IMG valign=middle>&nbsp;&nbsp;";
109          print "<b>$MessageCount $messagesininbox.</b>\n";          print "<b>$MessageCount $messagesininbox (",$pop->Size," $bytestotaltext).</b>\n";
110                  }                  }
111    
112  #print "</td><td width=300 align=center>\n";  #print "</td><td width=300 align=center>\n";
# Line 138  print "</td></tr></table><br>\n"; Line 140  print "</td></tr></table><br>\n";
140                                    
141          if ($MessageCount > 0) {          if ($MessageCount > 0) {
142                  print "<table border=0 cellpadding=2 cellspacing=0 width=90% align=center>";                  print "<table border=0 cellpadding=2 cellspacing=0 width=90% align=center>";
143                  print "<tr bgcolor=darkblue><td><b><font color=white>$fromtext</b></td><td><b><font color=white>$subjecttext</b></td><td><b><font color=white>$datetext</b></td><td>&nbsp;</td>";                  print "<tr bgcolor=darkblue><td><b><font color=white>$fromtext</b></td><td><b><font color=white>$subjecttext</b></td><td><b><font color=white>$datetext</b></td><td colspan=2><font color=white><b>$sizetext&nbsp;</b></td>";
144          &ParseHeaders();                  &ParseHeaders();
145                  print "</table>";                  print "</table>";
146                  }                  }
147                    
# Line 255  for ($i=$lastMsg; $i >= 1 && $i> $lastMs Line 257  for ($i=$lastMsg; $i >= 1 && $i> $lastMs
257          }          }
258          $date=~ s/.*\,(.*)\+.*/$1/;          $date=~ s/.*\,(.*)\+.*/$1/;
259          $date="<small>$date</small>";          $date="<small>$date</small>";
260          print "<td><a href='.' OnClick='document.lire$i.submit();return false;'>$from&nbsp;</a></td><td><b>$sub&nbsp;</b></td><td>$date&nbsp;</td>";  
261            $size=$MessageSize[$i];
262            $size="<small>".int(($size+512)/1024)."k</small>";
263    
264            print "<td><a href='.' OnClick='document.lire$i.submit();return false;'>$from&nbsp;</a></td><td><b>$sub&nbsp;</b></td><td>$date&nbsp;</td><td align=right>$size</td>";
265    
266          #for each message header, also provide a FORM button to          #for each message header, also provide a FORM button to
267          #delete using inbox.pl As above, pass in the needed vars          #delete using inbox.pl As above, pass in the needed vars

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26