Parent Directory | Revision Log
Now server generates popup test, give Tony Chang proper credits (but, since this extension has new uuid, I listed him as contributor)
1 | #!/usr/bin/suidperl -wT |
2 | |
3 | # if you are running under suexec Apache you might want to change |
4 | # interpreter to just /usr/bin/perl ! |
5 | |
6 | use strict; |
7 | use Email::Folder; |
8 | |
9 | sub count($) { |
10 | my $folder = shift; |
11 | |
12 | my $dir="/home/dpavlin/Mail/$folder/new"; |
13 | return 0 if (! -d $dir); |
14 | |
15 | opendir(DIR, $dir); |
16 | my @msgs = grep { -f "$dir/$_" } readdir(DIR); |
17 | closedir(DIR); |
18 | |
19 | return scalar @msgs; |
20 | } |
21 | |
22 | my ($inbox,$private) = (count('INBOX'), count('dpavlin')); |
23 | |
24 | my $status = "time: ".scalar localtime; |
25 | my $popup = qq{dpavlin/inbox: $private/$inbox}; |
26 | |
27 | print qq{Content-type: text/xml |
28 | |
29 | <meta> |
30 | <user name="dpavlin"> |
31 | <emailRedCount>$private</emailRedCount> |
32 | <emailCount>$inbox</emailCount> |
33 | <status>$status</status> |
34 | <popup>$popup</popup> |
35 | </user> |
36 | </meta> |
37 | }; |
38 |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |