Code Search for Developers
 
 
  

import_complete.html from AlphaMail at Krugle


Show import_complete.html syntax highlighted

% # vim:set syntax=mason:
<%args>
$data => ''
$fn => 0
$ln => 0
$em => 0
$al => 0
</%args>
<& /mail/header.mhtml, title => 'Choose email address' &>
% if($js) {
<script type="text/javascript" language="JavaScript">
   <!--
      function check_all()
      {
         document.csvimport.line.checked=1;
         for(var i=0; i<document.csvimport.line.length; i++)
            document.csvimport.line[i].checked=1;
      }
      function uncheck_all()
      {
         document.csvimport.line.checked=0;
         for(var i=0; i<document.csvimport.line.length; i++)
            document.csvimport.line[i].checked=0;
      }
      function invert_checks()
      {
         document.csvimport.line.checked=!document.csvimport.line.checked;
         for(var i=0; i<document.csvimport.line.length; i++)
            document.csvimport.line[i].checked=!document.csvimport.line[i].checked;
      }
   // -->
</script>
% }
<P>Uncheck any address you don't want to import and click Save.</P>
<form name="csvimport" method="post" action="<% $base %>/mail/addressbook/import_csv_save.html">
<div class="control">
   <input type="submit" name="save" value="Save">
   <input type="submit" name="cancel" value="Cancel">
</div>
% if($js) {
      <div class="quickcheck">
         Select: 
         <a class="control" onClick="check_all();" href="#">All</a>,
         <a class="control" onClick="uncheck_all();" href="#">None</a>, 
         <a class="control" onClick="invert_checks();" href="#">Invert</a>
      </div>
% }
<table class="import_verify">
<%perl>
my ($entry, $address, $fname, $lname, @ao);
open DATA, "<$data";
my @lines = <DATA>;
close DATA;
my $line = 0;
for my $n (@lines) {
   $logger->debug("Line $n");
   $_ = $n;
   my @fields = split /,/;
   $fname = $fields[$fn];
   $lname = $fields[$ln];
   $entry = new Email::Address("$fname $lname", $fields[$em]);
   if(!$entry) {
</%perl>
   <tr>
      <td colspan="3">
         Skipped entry for: (<% "$fname $lname" |h %>)
      </td>
   </tr>
<%perl>
      next;
   }
   $address = $entry->format;
</%perl>
   <tr>
      <th>
         <input type="checkbox" name="line" value="<% $line %>" checked>
      </th>
      <th>
         <input type="text" name="entry" size="50" value="<% $address |h %>">
      </th>
   </tr>
<%perl>
   $line++;
}
</%perl>
</table>
% if($js) {
      <div class="quickcheck">
         Select: 
         <a class="control" onClick="check_all();" href="#">All</a>,
         <a class="control" onClick="uncheck_all();" href="#">None</a>, 
         <a class="control" onClick="invert_checks();" href="#">Invert</a>
      </div>
% }
<div class="control">
   <input type="submit" name="save" value="Save">
   <input type="submit" name="cancel" value="Cancel">
</div>
</form>
<& /mail/footer.mhtml &>
<%init>
my $user = Apache2::SiteControl->getCurrentUser($r);
my $js = defined($user->getAttribute('credential_4')) ? $user->getAttribute('credential_4'):0;
</%init>
<%once>
our $logger = Log::Log4perl->get_logger('alphamail');
our $base = $config->get('base_uri');
</%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

  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