X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fvcard.php;h=ecbaefd1c7ad392dec3debacc9bde6d74f510255;hb=89ac34a4a6247d9cc428a37368502d323775a0a5;hp=ee109a6ce9471ecb09b47f83f9063bad1fff0f07;hpb=f38b7cf06c3343a7fead417d90bd67d291f5dc29;p=squirrelmail.git diff --git a/src/vcard.php b/src/vcard.php index ee109a6c..ecbaefd1 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -3,15 +3,19 @@ /** * vcard.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * This file shows an attched vcard * - * $Id$ + * @version $Id$ + * @package squirrelmail */ -/* Path for SquirrelMail required files. */ +/** + * Path for SquirrelMail required files. + * @ignore + */ Define('SM_PATH','../'); /* SquirrelMail required files. */ @@ -44,8 +48,8 @@ echo '
' . _("Viewing a Business Card") . " - "; $msg_url = 'read_body.php?mailbox='.urlencode($mailbox). - '&startMessage='.$startMessage. - '&passed_id='.$passed_id; + '&startMessage='.urlencode($startMessage). + '&passed_id='.urlencode($passed_id); $msg_url = set_url_var($msg_url, 'ent_id', 0); @@ -88,9 +92,9 @@ if ($vcard_nice['version'] == '2.1') { $vcard_nice['email;internet'] = $vcard_nice['email;pref;internet']; } } else { - echo '
\n"; + echo '\n"; } foreach ($vcard_nice as $k => $v) { @@ -115,10 +119,11 @@ $ShowValues = array( echo '' . '' . '
vCard Version ' . $vcard_nice['version'] . - ' is not supported. Some information might not be converted ' . - "correctly.
' . + sprintf(_("vCard Version %s is not supported. Some information might not be converted correctly."),$vcard_nice['version']) . + "

' . '' . "\n"; -if (isset($vcard_safe['email;internet'])) { $vcard_safe['email;internet'] = '' . $vcard_safe['email;internet'] . - ''; +if (isset($vcard_safe['email;internet'])) { + $vcard_safe['email;internet'] = makeComposeLink('src/compose.php?send_to='.urlencode($vcard_safe['email;internet']), + $vcard_safe['email;internet']); } + if (isset($vcard_safe['url'])) { $vcard_safe['url'] = '' . $vcard_safe['url'] . ''; @@ -142,74 +147,60 @@ echo '
' . _("Add to Addressbook") . '
' . - '
' . + addForm('../src/addressbook.php', 'POST', 'f_add') . '' . '' . - '' . - '' . + '' . + +echo addSelect('addaddr[label]', $opts, '', TRUE); +echo '' . '' . '
Nickname:
Note Field Contains:' . - ''. + addInput('addaddr[nickname]', $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'], '20'). + '
Note Field Contains:' ; +$opts = array(); if (isset($vcard_nice['url'])) { - echo '\n"; + $opts[$vcard_nice['url']] = _("Web Page"); } if (isset($vcard_nice['adr'])) { - echo '\n"; + $opts[$vcard_nice['adr']] = _("Address"); } if (isset($vcard_nice['title'])) { - echo '\n"; + $opts[$vcard_nice['title']] = _("Title"); } if (isset($vcard_nice['org'])) { - echo '\n"; + $opts[$vcard_nice['org']] = _("Organization / Department"); } if (isset($vcard_nice['title'])) { - echo '\n"; + $opts[$vcard_nice['title'].'; '.$vcard_nice['org']] = _("Title & Org. / Dept."); } if (isset($vcard_nice['tel;work'])) { - echo '\n"; + $opts[$vcard_nice['tel;work']] = _("Work Phone"); } if (isset($vcard_nice['tel;home'])) { - echo '\n"; + $opts[$vcard_nice['tel;home']] = _("Home Phone"); } if (isset($vcard_nice['tel;cell'])) { - echo '\n"; + $opts[$vcard_nice['tel;cell']] = _("Cellular Phone"); } if (isset($vcard_nice['tel;fax'])) { - echo '\n"; + $opts[$vcard_nice['tel;fax']] = _("Fax"); } if (isset($vcard_nice['note'])) { - echo '\n"; + $opts[$vcard_nice['note']] = _("Note"); } -echo '' . - '
' . - '' . - '' . - '' . - '' . + addHidden('addaddr[email]', $vcard_nice['email;internet']). + addHidden('addaddr[firstname]', $vcard_safe['firstname']). + addHidden('addaddr[lastname]', $vcard_safe['lastname']). + addSubmit(_("Add to Address Book"), 'addaddr[SUBMIT]'). '
' . - '
' . + '' . '
' . '' . _("Download this as a file") . '' . '
' .