Пример #1
0
$sql2 = "SELECT * FROM contacts_titlelist WHERE title_id = '{$contact_title}' LIMIT 1";
$result2 = mysql_query($sql2, $conn) or die(mysql_error());
$array2 = mysql_fetch_array($result2);
$title_name = $array2['title_name'];
// WRAP UP OTHER INFORMATION INTO A NOTE
if ($contact_reference != "") {
    $contact_reference = "Notes:\n" . $contact_reference;
}
$contact_reference = $contact_reference . "\nContact Added to Database:\n" . $contact_added;
//  USAGE EXAMPLE
$v = new vCard();
$v->setPhoneNumber($output_telephone, "TEL;PREF;WORK;VOICE");
$v->setPhoneNumber($contact_telephone_home, "TEL;HOME;VOICE");
$v->setPhoneNumber($output_fax, "TEL;WORK;FAX");
$v->setPhoneNumber($contact_mobile, "TEL;CELL;VOICE");
$v->setName($contact_namesecond, $contact_namefirst, "", "");
$v->setTitle($title_name);
$v->setBirthday("");
$v->setCompany($company_name);
$v->setLabel("", "", $contact_address, $contact_city, "", $contact_postcode);
$v->setAddress("", "", $company_address, $company_city, "", $company_postcode);
$v->setEmail($contact_email);
$v->setNote($contact_reference);
$v->setURL($company_web);
$output = $v->getVCard();
$filename = $v->getFileName();
//Header("Content-Disposition: attachment; filename=$filename");
//Header("Content-Length: ".strlen($output));
//Header("Connection: close");
//Header("Content-Type: text/x-vCard; name=$filename");
echo $output;