Code Search for Developers
 
 
  

show_stats.html from AlphaMail at Krugle


Show show_stats.html syntax highlighted

% # vim: set syntax=mason:
<& /mail/header.mhtml, title => "Cache statistics" &>
<pre>
% $m->print(getStats($c));
</pre>
<& /mail/footer.mhtml &>
<%init>
my %allowed = (
   tkay => 1,
   hak => 1,
   consult => 1,
   joelja => 1,
   joe => 1,
   llynch => 1,
   eyildiri => 1,
   miyake => 1
);

my $user = Apache::SiteControl->getCurrentUser($r);
$m->redirect(build_url('/mail/index.html', { message => "Not allowed."})) if !$allowed{$user->getUsername()};

my $prefs = new AlphaMail::Preferences($user->getUsername(), 
                                   $user->getAttribute('imap'), $config);
my $c = new AlphaMail::Middleware($user->getAttribute('imap'),
                                  $user->getUsername(),
                                  $user->getAttribute('password'),
                                  $config);


</%init>
<%once>
use Encode;
use AlphaMail::Preferences;

our $logger = Log::Log4perl->get_logger('alphamail');

sub getStats
{
   my $this = shift;
   my $line = 0;
   my @resp;

   $this->{con}->print("stats\n");
 
   do {
      last if($this->{con}->eof());
      $line = $this->{con}->getline();
      push @resp, $line;
      last if(!defined($line));
   } while($line !~ /^(ok|no)/i);

   return @resp;
}
</%once>




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  addressbook/
    edit.mhtml
    import.mhtml
    import_complete.html
    import_csv.html
    import_csv_save.html
    import_fname.html
    import_imho.html
    import_lname.html
    index.html
    lists.mhtml
    process_edit.html
    process_lists.html
    process_take.html
    take.html
  settings/
    altfolder_update.html
    altprefix_update.html
    edit_folders.html
    folders.mhtml
    general.mhtml
    index.html
    share.mhtml
    sharing_agree.html
    signatures.mhtml
    update_folderlist.html
    update_general.html
    update_signatures.html
  viewers/
    excel.html
    html.html
    targz.html
    text.html
    word.html
    zip.html
  address_mail.html
  addresslist.html
  autohandler
  check_spelling.html
  compose.html
  error.html
  first_login.html
  fix_spelling.html
  folderlist.mhtml
  footer.mhtml
  get_attachment.html
  header.mhtml
  help.html
  index.html
  logout.html
  menu.mhtml
  other_folders.html
  process_compose.html
  process_first_login.html
  process_messages.html
  process_read_message.html
  quota.html
  quota_graph.html
  raw.html
  read.html
  remove_attachment.html
  renew_session.html
  sanitized.html
  share_options.html
  share_upload.html
  show_stats.html
  verify_password.html
  view_attachment.html