echo $vnconv->VnConv($headings);
         echo $crlf;
         $ab->get_companies($_POST['addressbook_id']);
         while ($ab->next_record()) {
             $record = array($ab->f("name"), $ab->f("country"), $ab->f("state"), $ab->f("city"), $ab->f("zip"), $ab->f("address"), $ab->f("email"), $ab->f("phone"), $ab->f("fax"), $ab->f("homepage"), $ab->f("bank_no"), $ab->f('vat_no'));
             $record = $quote . implode($quote . $seperator . $quote, $record) . $quote;
             echo $vnconv->VnConv($record);
             echo $crlf;
         }
     }
     exit;
 } else {
     $addressbook = $ab->get_addressbook($addressbook_id);
     require $GO_CONFIG->class_path . "/phpvnconv/phpvnconv.class.inc";
     $vnconv = new phpVnconv();
     $vnconv->set_to("ascii");
     $browser = detect_browser();
     header("Content-type: text/x-csv");
     header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
     if ($browser['name'] == 'MSIE') {
         header("Content-Disposition: inline; filename=\"" . $vnconv->vnconv($addressbook['name']) . "-" . $_POST['export_type'] . ".csv\"");
         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
         header('Pragma: public');
     } else {
         header('Pragma: no-cache');
         header("Content-Disposition: attachment; filename=\"" . $vnconv->vnconv($addressbook['name']) . ".csv\"");
     }
     $vnconv->set_to($_POST['encoding'] == "none" || $_POST['encoding'] == "utf16" ? '' : $_POST['encoding']);
     $utf16 = $_POST['encoding'] == 'utf16';
     $quote = smartstrip($_POST['quote']);
     $crlf = smartstrip($_POST['crlf']);
echo $_SERVER['PHP_SELF'];
?>
">
<input type="hidden" name="task" value="import" />
<input type="hidden" name="return_to" value="<?php 
echo $return_to;
?>
" />

<?php 
$tabtable = new tabtable('export_tab', $contacts_import, '460', '400', '120', '', true);
$tabtable->print_head();
echo '<table border="0" cellpadding="5"><tr><td>';
require_once $GO_CONFIG->class_path . "/phpvnconv/phpvnconv.class.inc";
$vnconv = new phpVnconv();
$vnconv->set_to('utf8');
$vnconv->set_from($_POST['encoding'] == "none" ? '' : $_POST['encoding']);
if ($task == 'import') {
    $contact_groups[''] = 0;
    $group_mode = isset($_POST['group_mode']) ? $_POST['group_mode'] : 'group_name';
    $group_id = isset($_POST['group_id']) ? $_POST['group_id'] : 'group_id';
    if ($group_mode == 'file') {
        $ab->get_groups($_POST['addressbook_id']);
        while ($ab->next_record()) {
            $contact_groups[$ab->f('name')] = $ab->f('id');
        }
    }
    switch ($_POST['file_type']) {
        case 'vcf':
            require_once $GO_MODULES->path . "classes/vcard.class.inc";
            $vcard = new vcard();