$vCard->setLastName($names[$anz - 1]);
    }
    if (!empty($row->location)) {
        $vCard->setHomeCity($row->location);
        $vCard->setPostalCity($row->location);
    }
    if (!empty($row->hp)) {
        $vCard->setURLWork($row->hp);
    }
    if (!empty($row->birthday) && $row->birthday != '0000-00-00') {
        $bday = str_replace('-', '', $row->birthday);
        $vCard->setBirthday($bday, 1);
    }
    $filename = $row->id . '.vcf';
    ($code = $plugins->load('profile_vcard_prepared')) ? eval($code) : null;
    $text = $vCard->getCardOutput();
    viscacha_header("Content-Type: text/x-vcard");
    viscacha_header("Content-Disposition: attachment; filename=\"{$filename}\"");
    viscacha_header('Content-Length: ' . strlen($text));
    echo $text;
    $slog->updatelogged();
    $db->close();
    exit;
} elseif (($_GET['action'] == 'mail' || $_GET['action'] == 'sendmail') && $is_member) {
    $result = $db->query('SELECT id, name, opt_hidemail, mail FROM ' . $db->pre . 'user WHERE id = ' . $_GET['id'], __LINE__, __FILE__);
    $row = $gpc->prepare($db->fetch_object($result));
    $breadcrumb->Add($lang->phrase('profile_mail_2'));
    if ($my->vlogin && $row->opt_hidemail != 1) {
        if ($_GET['action'] == 'sendmail') {
            $error = array();
            if (flood_protect() == FALSE) {