New: La foncton export contact vCard est mis via un lien sur onglet Import-Export afin de prparer ajout d'autres exports ou outils de syncro.
This commit is contained in:
parent
80d71771c8
commit
a6284c2f35
108
htdocs/contact/exportimport.php
Normal file
108
htdocs/contact/exportimport.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/contact/exportimport.php
|
||||
\ingroup societe
|
||||
\brief Onglet exports-imports d'un contact
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require("../contact.class.php");
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
|
||||
$h=0;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/fiche.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("General");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("PersonalInformations");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/exportimport.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("ExportImport");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$h++;
|
||||
|
||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Contact").": ".$contact->firstname.' '.$contact->name);
|
||||
|
||||
|
||||
/*
|
||||
* Fiche en mode visu
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
if ($contact->socid > 0)
|
||||
{
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("ExportCardToFormat").': ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"].'">';
|
||||
print img_file($langs->trans("VCard")).' ';
|
||||
print $langs->trans("VCard");
|
||||
print '</a>';
|
||||
|
||||
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
@ -186,8 +186,8 @@ if ($_GET["id"] > 0)
|
||||
$head[$h][1] = $langs->trans("PersonalInformations");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/exportimport.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("ExportImport");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$_GET["id"];
|
||||
@ -236,44 +236,44 @@ if ($_GET["action"] == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
else {
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="5">';
|
||||
print $form->select_societes('','socid');
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||
print $form->select_societes('','socid','');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $form->select_civilite($obj->civilite);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input name="name" type="text" size="20" maxlength="80"></td>';
|
||||
print '<td>'.$langs->trans("Firstname").'</td><td><input name="firstname" type="text" size="15" maxlength="80"></td>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%"><input name="name" type="text" size="20" maxlength="80" value="'.$contact->nom.'"></td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%"><input name="firstname" type="text" size="15" maxlength="80" value="'.$contact->prenom.'"></td></tr>';
|
||||
|
||||
print '<td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.$contact->phone_pro.'"></td></tr>';
|
||||
|
||||
print '<tr><td>Poste/Fonction</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.$contact->poste.'"></td>';
|
||||
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="address" type="text" size="50" maxlength="80"></td>';
|
||||
|
||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80" value="'.$contact->cp.'"> ';
|
||||
|
||||
print '<input name="ville" type="text" size="20" value="'.$contact->ville.'" maxlength="80"></td>';
|
||||
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" type="text" size="18" maxlength="80"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td colspan="5"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||
print '<tr><td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.$contact->phone_pro.'"></td>';
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
|
||||
print '<tr><td>Jabberid</td><td colspan="5"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Fax").'</td><td><input name="fax" type="text" size="18" maxlength="80"></td>';
|
||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="5"><textarea name="note" cols="60" rows="3"></textarea></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Email").'</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="5">';
|
||||
print '<tr><td>Jabberid</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3"><textarea name="note" cols="60" rows="3"></textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
||||
print $form->selectyesno("facturation",$contact->facturation);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td align="center" colspan="6"><input type="submit" value="'.$langs->trans("Add").'"></td></tr>';
|
||||
print '<tr><td align="center" colspan="4"><input type="submit" value="'.$langs->trans("Add").'"></td></tr>';
|
||||
print "</table><br>";
|
||||
|
||||
print "</form>";
|
||||
@ -298,46 +298,45 @@ elseif ($_GET["action"] == 'edit')
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="5">'.$objsoc->nom_url.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $form->select_civilite($contact->civilite_id);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td><input name="name" type="text" size="20" maxlength="80" value="'.$contact->name.'"></td>';
|
||||
print '<td>'.$langs->trans("Firstname").'</td><td><input name="firstname" type="text" size="15" maxlength="80" value="'.$contact->firstname.'"></td>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%"><input name="name" type="text" size="20" maxlength="80" value="'.$contact->name.'"></td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%"><input name="firstname" type="text" size="15" maxlength="80" value="'.$contact->firstname.'"></td></tr>';
|
||||
|
||||
print '<td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.$contact->phone_pro.'"></td></tr>';
|
||||
|
||||
print '<tr><td>Poste/Fonction</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.$contact->poste.'"></td>';
|
||||
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
print '<tr><td>Poste/Fonction</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.$contact->poste.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="address" type="text" size="50" maxlength="80" value="'.$contact->address.'"></td>';
|
||||
|
||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3"><input name="cp" type="text" size="6" maxlength="80" value="'.$contact->cp.'"> ';
|
||||
|
||||
print '<input name="ville" type="text" size="20" value="'.$contact->ville.'" maxlength="80"></td>';
|
||||
|
||||
print '<tr><td>Tel Pro</td><td><input name="phone_pro" type="text" size="18" maxlength="80" value="'.$contact->phone_pro.'"></td>';
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
|
||||
print '<tr><td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td><input name="fax" type="text" size="18" maxlength="80" value="'.$contact->fax.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="5"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||
|
||||
print '<tr><td>Jabberid</td><td colspan="5"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="3"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="5">';
|
||||
print '<tr><td>Jabberid</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.$contact->jabberid.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">';
|
||||
print '<textarea name="note" cols="60" rows="3">';
|
||||
print $contact->note;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
||||
print $form->selectyesno("facturation",$contact->facturation);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td colspan="6" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print '<tr><td colspan="4" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print "</table><br>";
|
||||
|
||||
print "</form>";
|
||||
@ -356,34 +355,32 @@ else
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="5">'.$objsoc->nom_url.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
//TODO Aller chercher le libellé de la civilite a partir de l'id $contact->civilite_id
|
||||
//print '<tr><td valign="top">Titre : '.$contact->civilite."<br>";
|
||||
print $contact->civilite_id;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td>'.$contact->name.'</td>';
|
||||
print '<td>'.$langs->trans("Firstname").'</td><td>'.$contact->firstname.'</td>';
|
||||
|
||||
print '<td width="15%">Tel Pro</td><td width="15%">'.$contact->phone_pro.'</td></tr>';
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||
|
||||
print '<tr><td>Poste/Fonction</td><td colspan="3">'.$contact->poste.'</td>';
|
||||
|
||||
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3">'.$contact->address.'</td>';
|
||||
|
||||
print '<td>Portable</td><td>'.$contact->phone_mobile.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3">'.$contact->address.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$contact->cp.' ';
|
||||
print $contact->ville.'</td>';
|
||||
print $contact->ville.'</td></tr>';
|
||||
|
||||
print '<tr><td>Tel Pro</td><td>'.$contact->phone_pro.'</td>';
|
||||
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>';
|
||||
|
||||
print '<td>Portable</td><td>'.$contact->phone_mobile.'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$contact->fax.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="3">';
|
||||
if ($contact->email && ! ValidEmail($contact->email))
|
||||
{
|
||||
print '<div class="error">'.$langs->trans("ErrorBadEMail",$contact->email)."</div>";
|
||||
@ -394,13 +391,13 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>Jabberid</td><td colspan="5">'.$contact->jabberid.'</td></tr>';
|
||||
print '<tr><td>Jabberid</td><td colspan="3">'.$contact->jabberid.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">';
|
||||
print nl2br($contact->note);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="5">';
|
||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
||||
print $langs->trans($yesno[$contact->facturation]);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -49,8 +49,8 @@ $head[$h][0] = DOL_URL_ROOT.'/contact/perso.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("PersonalInformations");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/exportimport.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("ExportImport");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$_GET["id"];
|
||||
|
||||
@ -56,6 +56,7 @@ if ($_POST["action"] == 'update')
|
||||
$result = $contact->update_perso($_POST["contactid"], $user);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
@ -63,6 +64,8 @@ if ($_POST["action"] == 'update')
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"], $user);
|
||||
|
||||
@ -78,8 +81,8 @@ $head[$h][1] = $langs->trans("PersonalInformations");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/vcard.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("VCard");
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/exportimport.php?id='.$_GET["id"];
|
||||
$head[$h][1] = $langs->trans("ExportImport");
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$_GET["id"];
|
||||
@ -106,10 +109,16 @@ if ($_GET["action"] == 'edit')
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2">'.$objsoc->nom_url.'</td>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("Name").'</td><td colspan="2">'.$contact->name.' '.$contact->firstname .'</td>';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->nom.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->prenom.'</td>';
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td>';
|
||||
$html=new Form($db);
|
||||
@ -121,7 +130,7 @@ if ($_GET["action"] == 'edit')
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$langs->trans("Alert").': ';
|
||||
print '<td colspan="2">'.$langs->trans("Alert").': ';
|
||||
if ($contact->birthday_alert)
|
||||
{
|
||||
print '<input type="checkbox" name="birthday_alert" checked></td>';
|
||||
@ -132,8 +141,8 @@ if ($_GET["action"] == 'edit')
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print "</table><br>";
|
||||
print '<tr><td colspan="4" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
||||
print "</table>";
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
@ -149,13 +158,18 @@ else
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($contact->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td>'.$objsoc->nom_url.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("Name").'</td><td>'.$contact->name.' '.$contact->firstname .'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||
print $contact->civilite_id;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||
|
||||
if ($contact->birthday && $contact->birthday > 0) {
|
||||
print '<tr><td>'.$langs->trans("Birthdate").'</td><td>'.dolibarr_print_date($contact->birthday);
|
||||
print '<tr><td>'.$langs->trans("Birthdate").'</td><td colspan="3">'.dolibarr_print_date($contact->birthday);
|
||||
|
||||
if ($contact->birthday_alert)
|
||||
print ' (alerte anniversaire active)</td>';
|
||||
@ -163,7 +177,7 @@ else
|
||||
print ' (alerte anniversaire inactive)</td>';
|
||||
}
|
||||
else {
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td>'.$langs->trans("Unknown")."</td>";
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td colspan="3">'.$langs->trans("Unknown")."</td>";
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
@ -171,15 +185,17 @@ else
|
||||
|
||||
print "</div>";
|
||||
|
||||
|
||||
// Barre d'actions
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
print '<a class="tabAction" href="perso.php?id='.$_GET["id"].'&action=edit">'.$langs->trans('Edit').'</a>';
|
||||
print '<a class="butAction" href="perso.php?id='.$_GET["id"].'&action=edit">'.$langs->trans('Edit').'</a>';
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
/**
|
||||
\file htdocs/contact/vcard.php
|
||||
\ingroup societe
|
||||
\brief Onglet vcard d'un contact
|
||||
@ -32,38 +32,43 @@ require("./pre.inc.php");
|
||||
require("../contact.class.php");
|
||||
require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php");
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_GET["id"]);
|
||||
|
||||
|
||||
// On crée car la VCard
|
||||
|
||||
$v = new vCard();
|
||||
|
||||
$v->setName($contact->name, $contact->firstname, "", "");
|
||||
|
||||
$v->setPhoneNumber($contact->phone_perso, "PREF;HOME;VOICE");
|
||||
|
||||
if ($contact->birthday)
|
||||
$v->setBirthday($contact->birthday);
|
||||
if ($contact->birthday) $v->setBirthday($contact->birthday);
|
||||
|
||||
// TODO finir le support des adresses dans les contacts
|
||||
|
||||
$v->setAddress("", "", $contact->address, $contact->ville, "", $contact->cp, $contact->pays);
|
||||
|
||||
$v->setEmail($contact->email);
|
||||
|
||||
//$v->setNote("You can take some notes here.\r\nMultiple lines are supported via \\r\\n.");
|
||||
//$v->setURL("http://www.thomas-mustermann.de", "WORK");
|
||||
|
||||
$output = $v->getVCard();
|
||||
$filename = $v->getFileName();
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
// Renvoi VCard au navigateur
|
||||
|
||||
$output = $v->getVCard();
|
||||
|
||||
$filename = sanitize_string(ereg_replace('^%20','',$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;
|
||||
print $output;
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -94,4 +94,6 @@ NbOfAttachedFiles=Number of attached files
|
||||
AttachANewFile=Attach a new file
|
||||
FileWasRemoved=Files was removed
|
||||
NoRIB=No RIB defined
|
||||
NoParentCompany=None
|
||||
NoParentCompany=None
|
||||
ExportImport=Import-Export
|
||||
ExportCardToFormat=Export card to format
|
||||
@ -94,4 +94,6 @@ NbOfAttachedFiles=Nombre de fichiers joints
|
||||
AttachANewFile=Joindre un nouveau fichier
|
||||
FileWasRemoved=Le fichier a été supprimé
|
||||
NoRIB=Aucun RIB défini
|
||||
NoParentCompany=Aucune
|
||||
NoParentCompany=Aucune
|
||||
ExportImport=Import-Export
|
||||
ExportCardToFormat=Exporter fiche au format
|
||||
Loading…
Reference in New Issue
Block a user