Code Search for Developers
 
 
  

index.html from AlphaMail at Krugle


Show index.html syntax highlighted

% # vim:set syntax=mason:
<%args>
$mx => ''
</%args>
<%once>
use AlphaMail::HTMLHelper qw(hyperlink);
use AlphaMail;
</%once>
<%init>
# my $r = Apache->request;
my $logger = Log::Log4perl->get_logger('login');
my $uri;
my $reason = undef;
my $args;
my $motd = $config->get('motd', '');

if(!$mx) {
   $mx = $config->get('default_domain', 'uoregon.edu');
}

if($r->prev) {
   $uri = $r->prev->uri;
   $reason = $r->prev->subprocess_env("AuthCookieReason");
   $args = $r->prev->args;
}

if ($args) {
    $uri .= "?$args";
    $logger->debug("Previous URI with params: $uri");
}

my $imaps = $config->getIMAPServers;
my $base = $config->get('base_uri');

$logger->debug("Reason was set to $reason") if($reason);
$logger->debug("Previous URI: $uri");
</%init>
<html>
   <head>
      <title><% $config->get('organization_name') %> Alpha Mail</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta http-equiv="pragma" content="no-cache">
      <link href="<% $base %>/static/default.css" rel="stylesheet" type="text/css" title="Default Stylesheet">
      <script type="text/javascript">
         <!--
         function getById(name)
         {
            var ele = 0;
            eval("ele = document.getElementById(name);");
            if(!ele)
               eval("ele = document.all[" + name + "];");

            return ele;
         }
         function check_form()
         {
            var login_field = getById("login");
            var password_field = getById("password");

            if(login_field && login_field.value == "") return false;
            if(password_field && password_field.value == "") return false;

            return true;
         }
         // -->
      </script>
   </head>
   <body class="login_screen" onLoad="document.forms[0].credential_0.focus();">
      <form name="login_form" method="post" action="<% $base %>/LOGIN"
            onsubmit="return check_form()">
         <input type="hidden" name="destination" 
                value="<% $base %>/mail/index.html">
         <table>
            <tr>
               <td> </td>
               <td>
                  <h1 class="login_title"><% $config->get('organization_name') %> Web Email</h1>
               </td>
            </tr>
            <tr>
               <td class="label">
                  Login:
               </td>
               <td>
                  <input type="text" id="login" name="credential_0" size="10" maxlength="10">
% my @servers = sort keys %$imaps;
% if(scalar(@servers) == 1) {
		  <input type="hidden" name="credential_2" value="<% $servers[0] |h %>">
% } else {
                  @<select name="credential_2">
%    for my $k (sort keys %$imaps) {
                     <option <% $mx eq $k ? "selected":"" %>><% $k |h %></option>
%    }
                  </select>
% }
               </td>
            </tr>
            <tr>
               <td class="label">
                  Password:
               </td>
               <td>
% if($config->get('nologin', 0)) {
<p><% $config->get('nologin_message', 'Maintenance in progress') |h %></p>
% } else {
                  <input type="password" id="password" name="credential_1" size="10">
% }
% if($reason =~ m/^bad_credential/i) {
                  <span class="error">Unable to log in.</span>
% } elsif($reason =~ m/^bad_cook/i) {
                  <span class="error">Cookie error. If this persists, please clear your browser cookies.</span>
% } 
               </td>
            </tr>
            <tr>
               <td class="label">
                  Interface:
               </td>
               <td>
                  <select name="credential_3">
                     <option value="std">Standard</option>
                     <option value="pda">Small Screen Mode</option>
                  </select>
               </td>
            </tr>
            <tr>
               <td>
               </td>
               <td>
                  <input type="submit" name="login" value="Login">
               </td>
            </tr>
               </td>
            </tr>
         </table>
% if($motd) {
         <div class="motd">
            <% $motd |h %>
         </div>
% }
         <input type="hidden" name="credential_4" value="0">
         <input type="hidden" name="credential_5" value="0">
         <input type="hidden" name="credential_6" value="0">
         <script language="JavaScript">
            <!--
            // Detect javascript support
            document.login_form.credential_4.value = 1;
            document.login_form.credential_5.value = navigator.userAgent;
            document.login_form.credential_6.value = navigator.appVersion;
            // -->
         </script>
      </form>
% if($config->get('support_phone', 0)) {
   <div class="login_help">
      <p>Live help is available from 9am to 5pm Monday through Friday by calling <% $config->get('support_phone', '') |h %>
      or by mailing <% $config->get('support_email', '<unknown>') |h %>
   </div>
% }
   <div class="smallprint">
      Running 
      <a target="_blank"
         href="http://www.uoregon.edu/~tkay/alphamail.html">
         AlphaMail Version <% $AlphaMail::VERSION %>
      </a>
   </div>
   </body>
</html>




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

  images/
  mail/
    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
    admin/
      autohandler
      index.html
      show_stats.mhtml
      test.mhtml
    docs/
      faq/
        colors.gif
        dates1.gif
        drafts.gif
        filter.gif
        general.html
        index.html
        notrash1.gif
        notrash2.gif
        notrash3.gif
        other.html
        sort.gif
        timeout.gif
      new_features.html
    settings/
      add_filter.html
      altfolder_update.html
      altprefix_update.html
      edit_folders.html
      export.mhtml
      export_mail.html
      filters.mhtml
      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
    feedback.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
    process_search.html
    quota.html
    quota_graph.html
    raw.html
    read.html
    remove_attachment.html
    renew_session.html
    resume_compose.html
    sanitized.html
    share_options.html
    share_upload.html
    verify_password.html
    view_attachment.html
  static/
    rte/
    amail_icon.jpg
    amail_large.jpg
    default.css
    paperclip.png
    wick.css
    wick.js
    wz_tooltip.js
  download.html
  error.html
  filevault.html
  index.html