- //prepare templates
- tpl_std();
- tpl_orgs();
- tpl_markers();
- $smarty->assign('error',$error);
- $smarty->assign('list',$list);
- //display templates
- $smarty->display('header.tpl');
- $smarty->display('import.tpl');
- $smarty->display('footer.tpl');
-
-
-function zaurus_entry($cnct){
- $entry['name'] = $cnct['LastName'];
- $entry['givenname'] = trim($cnct['FirstName'].' '.$cnct['MiddleName']);
- $entry['title'] = $cnct['JobTitle'];
- $entry['organization'] = $cnct['Company'];
- $entry['office'] = $cnct['Office'];
- $entry['note'] = $cnct['Notes'];
- $entry['mail'] = split(' ',$cnct['Emails']);
- $entry['street'] = $cnct['BusinessStreet'];
- $entry['location'] = $cnct['BusinessCity'];
- $entry['zip'] = $cnct['BusinessZip'];
- $entry['homestreet'] = $cnct['HomeStreet']."\n". //str
- $cnct['HomeZip']." ". //plz
- $cnct['HomeCity']; //ort
- $entry['homephone'] = $cnct['HomePhone'];
- $entry['phone'] = $cnct['BusinessPhone'];
- $entry['fax'] = empty($cnct['BusinessFax']) ? $cnct['HomeFax'] : $cnct['BusinessFax'];
- $entry['mobile'] = empty($cnct['HomeMobile']) ? $cnct['BusinessMobile'] : $cnct['HomeMobile'];
- $entry['fax'] = empty($cnct['BusinessFax']) ? $cnct['HomeFax'] : $cnct['BusinessFax'];
+//prepare templates for all found entries
+$list = '';
+if(count($vcards)){
+ foreach ($vcards as $vcard){
+ $entry = vcard_entry($vcard);
+ $smarty->clear_all_assign();
+ tpl_std();
+ $smarty->assign('entry',$entry);
+ $list .= $smarty->fetch('import_entry.tpl');
+ }
+}