Index: WAeUP_SRP/base/Upload.py
===================================================================
--- WAeUP_SRP/base/Upload.py	(revision 3324)
+++ WAeUP_SRP/base/Upload.py	(revision 3325)
@@ -56,4 +56,9 @@
     NO_KEY = NO_KEY
     IGNORE = IGNORE
+    def getImporter(self):
+        importer_name = ''.join([part.capitalize() for part in self.getContent().import_layout.split('_')])
+        importer = eval("%sImport" % importer_name)(self)
+        return importer
+    
     security.declareProtected(View,"Title") ###(
     def Title(self):
@@ -67,6 +72,5 @@
         doc = self.getContent()
         csv_path = os.path.join(storage_path,doc.filename)
-        importer_name = ''.join([part.capitalize() for part in self.getContent().import_layout.split('_')])
-        importer = eval("%sImport" % importer_name)(self)
+        importer = self.getImporter()
         msg = ''
         invalid_keys = []
@@ -99,6 +103,5 @@
     def getKeys(self):
         """return the valid keys for headline"""
-        importer_name = ''.join([part.capitalize() for part in self.getContent().import_layout.split('_')])
-        importer = eval("%sImport" % importer_name)(self)
+        importer = self.getImporter()
         keys = importer.schema.keys()
         keys.sort()
@@ -113,9 +116,40 @@
     ###)
 
+    security.declareProtected(ModifyPortalContent,"getPending") ###(
+    def getPending(self):
+        """return pending-data"""
+        importer = self.getImporter()
+        data = open(importer.pending_path).read()
+        return importer.pending_fn,data
+
+    security.declareProtected(ModifyPortalContent,"getPending") ###(
+    def getErrors(self):
+        """return import_errors"""
+        import tempfile
+        importer = self.getImporter()
+        lines = []
+        filename = self.getContent().filename
+        data = open(importer.pending_path)
+        reader = csv.reader(data)
+        headline = reader.next()
+        reader = csv.DictReader(data,headline)
+        # imported_from_pos = headline.index('imported_from')
+        # imported_line_nr_pos = headline.index('imported_line_nr')
+        out_file = tempfile.TemporaryFile()
+        writer = csv.DictWriter(out_file,
+                                importer.info.keys(),
+                                extrasaction='ignore')
+        lines += dict([(k,k) for k in importer.info.keys()]),
+        #import pdb;pdb.set_trace()
+        for item in reader:
+            if item["imported_from"] == filename:
+                lines += item,
+        writer.writerows(lines)
+        out_file.seek(0)
+        return out_file.read()
+
     security.declareProtected(ModifyPortalContent,"editHeadline") ###(
     def editHeadline(self,key_pairs):
         """edit headline"""
-        importer_name = ''.join([part.capitalize() for part in self.getContent().import_layout.split('_')])
-        importer = eval("%sImport" % importer_name)(self)
         csv_path = os.path.join(storage_path,self.filename)
         reader = csv.reader(open(csv_path,"rb"))
Index: WAeUP_SRP/base/WAeUPImport.py
===================================================================
--- WAeUP_SRP/base/WAeUPImport.py	(revision 3324)
+++ WAeUP_SRP/base/WAeUPImport.py	(revision 3325)
@@ -103,5 +103,6 @@
             info = {}
             info['imported_from'] = ''
-            info['imported_by'] =  self.imported_by
+            info['import_line_nr'] = 0
+            info['imported_by'] = self.imported_by
             info['import_date'] = self.import_date.strftime("%d/%m/%y %H:%M:%S")
             info['error'] = ''
@@ -128,6 +129,9 @@
         if os.path.exists(self.pending_path):
             datafile = open(self.pending_path,"r")
-            pending_csv_reader = csv.DictReader(datafile,self.csv_keys,)
-            pending_csv_reader.next() # skip headline
+            reader = csv.reader(datafile)
+            old_headline = reader.next()
+            #datafile.seek(0)
+            pending_csv_reader = csv.DictReader(datafile,old_headline,)
+            #pending_csv_reader.next() # skip headline
             for item in pending_csv_reader:
                 digest = makeDigest(item,self.data_keys)
@@ -169,10 +173,10 @@
         while True:
             if len(values) != len(import_keys):
-                msg += "+ %d fields in headline but %d values +" % (len(import_keys),len(values))
+                msg += "%d fields in headline but %d values" % (len(import_keys),len(values))
                 break
             for k in import_keys:
                 if k in singels:
                     keys += (k,'%s' % k,values[i],'(duplicate)'),
-                    msg += ("+ duplicate %s +" % k)
+                    msg += ("duplicate %s," % k)
                     keys[singels.index(k)] = (k,'%s' % k,values[singels.index(k)],'(duplicate)')
                 elif k in invalid_keys and not k.startswith(IGNORE):
@@ -186,5 +190,4 @@
     ###)
 ###)
-
 
 class ApplicationImport(WAeUPImport):###(
Index: WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- WAeUP_SRP/base/WAeUPTool.py	(revision 3324)
+++ WAeUP_SRP/base/WAeUPTool.py	(revision 3325)
@@ -936,5 +936,5 @@
         da['jamb_sex'] = sex
         da['jamb_age'] = brain.jamb_age
-        da['app_reg_pin'] = brain.pin
+        #da['app_ac_pin'] = brain.pin
         da['jamb_lga'] = brain.jamb_lga
         da['jamb_state'] = brain.jamb_state
@@ -1412,5 +1412,4 @@
         #current = importer.current
         import_date = importer.import_date
-        imported_by = importer.imported_by
         #
         # not_imported
@@ -1565,4 +1564,5 @@
             data_string = ", ".join("%s: %s" % (k,v) for k,v in mapping.items())
             info['error'] = error
+            info['import_line_nr'] = count + 1
             mapping.update(info)
             log_list = []
@@ -1639,5 +1639,5 @@
                 #mapping['import_date'] = DateTime.DateTime()
                 mapping['import_date'] = import_date
-                mapping['imported_by'] = imported_by
+                mapping['imported_by'] = member
                 mapping['import_message'] = msg
                 upload_doc.edit(mapping = mapping)
Index: WAeUP_SRP/base/skins/waeup_upload/download_errors.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/download_errors.py	(revision 3325)
+++ WAeUP_SRP/base/skins/waeup_upload/download_errors.py	(revision 3325)
@@ -0,0 +1,32 @@
+## Script (Python) "download_errors"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+export xxx.errors
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+set_trace()
+data = context.getContent()['getErrors']()
+filename = context.getId().replace('.csv','_errors.csv')
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename=%s' % filename)
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+#setheader('Pragma', 'no-cache') # HTTP/1.0
+return data
Index: WAeUP_SRP/base/skins/waeup_upload/download_pending.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/download_pending.py	(revision 3325)
+++ WAeUP_SRP/base/skins/waeup_upload/download_pending.py	(revision 3325)
@@ -0,0 +1,27 @@
+## Script (Python) "download_pending"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+export xxx.pending
+"""
+request = context.REQUEST
+setheader = request.RESPONSE.setHeader
+
+name,data = context.getContent()['getPending']()
+
+#setheader('Content-type', 'text/x-cvs')
+#setheader('Content-type','application/vnd.ms-excel')
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="%s.csv"' % name)
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+#setheader('Pragma', 'no-cache') # HTTP/1.0
+return data
Index: WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt	(revision 3324)
+++ WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt	(revision 3325)
@@ -180,4 +180,5 @@
           <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
             <tr>
+              <th>Download</th>
               <th>File in Archive</th>
               <th>Data Layout</th>
@@ -190,5 +191,6 @@
             <tr tal:repeat="row info/imported"
                 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
-              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
+              <td> <a href="view" tal:attributes="href string:${row/url}/download_pending">pending</a> <br />
+                              <a href="view" tal:attributes="href string:${row/url}/download_errors">errors</a>  </td>
               <td tal:content="string:${row/id}.done" ></td>
               <td tal:content="row/import_layout"></td>
Index: WAeUP_SRP/base/skins/waeup_upload/uploads_index.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/uploads_index.py	(revision 3324)
+++ WAeUP_SRP/base/skins/waeup_upload/uploads_index.py	(revision 3325)
@@ -87,8 +87,9 @@
         row['msg'] = import_message
         if getattr(doc,'import_date',''):
-            row['import_date'] = doc.import_date.strftime("%d/%m/%y %H:%M:%S")
+            row['import_date'] = doc.import_date
         else:
             row['import_date'] = ''
         add_to = imported
+        
     else:
         row['msg'],row['fields'] = doc['checkKeys']()
