5 * Template to display a vCard
7 * The following variables are available in this template:
8 * $view_message_link - URL to go back to the message
9 * $download_link - URL to download the vCard
10 * $nickname - Default nickname for the address book add form
11 * $firstname - First name for the address book add from
12 * $last name - Last name for the add form
13 * $email - Email for the add form
14 * $info - array of Additional info for the add form. May be
15 * empty if no additional info is provided by the
16 * card. Index of each element is the value for the
17 * option, value of each element is the name.
18 * $vcard - array containing vCard data, scrubbed and i-18-n'ed.
19 * Index of each element is the field name, value of
20 * each element is the field value.
22 * @copyright 1999-2012 The SquirrelMail Project Team
23 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
25 * @package squirrelmail
26 * @subpackage templates
29 /** add required includes **/
31 /** extract template variables **/
34 /** Begin template **/
37 <table cellspacing="0" class="table1">
40 <?php echo _("Viewing a Business Card") ; ?> - <a href="<?php echo $view_message_link; ?>"><?php echo _("View message"); ?></a>
45 <table cellspacing="0">
47 foreach ($vcard as $field=>$value) {
50 <td class="fieldName">
51 <?php echo $field; ?>:
53 <td class="fieldValue">
65 <a href="<?php echo $download_link; ?>"><?php echo _("Download this as a file"); ?></a>
69 <form action="../src/addressbook.php" method="post" name="f_add">
70 <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token(); ?>" />
71 <input type="hidden" name="addaddr[firstname]" value="<?php echo $firstname; ?>" />
72 <input type="hidden" name="addaddr[lastname]" value="<?php echo $lastname; ?>" />
73 <table cellspacing="0" class="table1">
76 <?php echo _("Add to address book"); ?>
81 <table cellspacing="0">
83 <td class="fieldName">
84 <?php echo _("Nickname"); ?>
86 <td class="fieldValue">
87 <input type="text" name="addaddr[nickname]" value="<?php echo $nickname; ?>" size="20" />
91 <td class="fieldName">
92 <?php echo _("Email"); ?>
94 <td class="fieldValue">
95 <input type="text" name="addaddr[email]" value="<?php echo $email; ?>" size="20" />
99 <td class="fieldName">
100 <?php echo _("Additional Info"); ?>
102 <td class="fieldValue">
104 if (count($info) == 0) {
106 <input type="text" name="addaddr[label]" value="" size="20" />
110 <select name="addaddr[label]">
112 foreach ($info as $value=>$field) {
114 <option value="<?php echo $value; ?>"><?php echo $field; ?></option>
129 <input type="submit" value="<?php echo _("Add to address book"); ?>" name="addaddr[SUBMIT]" id="addaddr_SUBMIT_" />