X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fvcard.php;h=21b5133861802312ba463d9d5d6a5c76b39d9dec;hp=46207d5c5f427014b1efba91f421a5e452be27d6;hb=24d1619523e7005477feb74d9a54da6a0efc58a6;hpb=b3494a627ff4dc90067a0511e42b65858171fa40;ds=sidebyside
diff --git a/src/vcard.php b/src/vcard.php
index 46207d5c..21b51338 100644
--- a/src/vcard.php
+++ b/src/vcard.php
@@ -23,29 +23,22 @@ sqimap_mailbox_select($imapConnection, $mailbox);
displayPageHeader($color, 'None');
-echo '
' .
- html_tag( 'table', '', 'center', '', 'width="100%" border="0" cellspacing="0" cellpadding="2"' ) ."\n" .
- html_tag( 'tr' ) . "\n" .
- html_tag( 'td', '', 'left', $color[0] ) .
+echo '
' . "\n" .
+ '' .
'' .
- _("Viewing a Business Card") . ' - ';
-if (isset($where) && isset($what)) {
- // from a search
- echo '' . _("View message") . '';
-} else {
- echo '' . _("View message") . '';
-}
+ _("Viewing a Business Card") . " - ";
+$msg_url = 'read_body.php?' . $QUERY_STRING;
+$msg_url = set_url_var($msg_url, 'ent_id', 0);
+echo ''. _("View message") . '';
+
echo ' |
';
$message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
-$entity_vcard = getEntity($message,$passed_ent_id);
+$entity_vcard = getEntity($message,$ent_id);
-$vcard = mime_fetch_body ($imapConnection, $passed_id, $passed_ent_id);
+$vcard = mime_fetch_body ($imapConnection, $passed_id, $ent_id);
$vcard = decodeBody($vcard, $entity_vcard->header->encoding);
$vcard = explode ("\n",$vcard);
foreach ($vcard as $l) {
@@ -71,12 +64,9 @@ if ($vcard_nice['version'] == '2.1') {
$vcard_nice["lastname"] = substr($vcard_nice["n"], 0,
strpos($vcard_nice["n"], "\n"));
} else {
- echo html_tag( 'tr',
- html_tag( 'td', 'vCard Version ' . $vcard_nice['version'] .
- ' is not supported. Some information might not be converted ' .
- 'correctly.' ,
- 'center' )
- ) . "\n";
+ echo 'vCard Version ' . $vcard_nice['version'] .
+ ' is not supported. Some information might not be converted ' .
+ "correctly. |
\n";
}
foreach ($vcard_nice as $k => $v) {
@@ -98,53 +88,43 @@ $ShowValues = array(
'tel;fax' => _("Fax"),
'note' => _("Note"));
-echo html_tag( 'tr' ) . html_tag( 'td', '', 'left' ) . '
' .
- html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0"' ) . "\n";
+echo ' ' .
+ '' . "\n";
-if (isset($vcard_safe['email;internet'])) { $vcard_safe['email;internet'] = '' . $vcard_safe['email;internet'] .
- '';
+ '';
}
if (isset($vcard_safe['url'])) {
- $vcard_safe['url'] = '' .
- $vcard_safe['url'] . '';
+ $vcard_safe['url'] = '' .
+ $vcard_safe['url'] . '';
}
foreach ($ShowValues as $k => $v) {
if (isset($vcard_safe[$k]) && $vcard_safe[$k]) {
- echo html_tag( 'tr',
- html_tag( 'td', '' . $v . ':', 'right' ) .
- html_tag( 'td', $vcard_safe[$k], 'left' )
- ) . "\n";
+ echo "$v: | " . $vcard_safe[$k] .
+ " | \n";
}
}
echo ' ' .
' ' .
' |
' .
- html_tag( 'table', '', 'center', '', 'border="0" cellpadding="2" cellspacing="0" width="100%"' ) . "\n";
- html_tag( 'tr',
- html_tag( 'td',
- '' .
- _("Add to Addressbook") . '' ,
- 'left', $color[0] )
- ) .
- html_tag( 'tr' ) .
- html_tag( 'td', '', 'center' ) .
- '' .
+ '' .
+ '' .
+ '' .
+ _("Download this as a file") . '' .
+ ' |
' .
+
+ '' .
'