Gestion du CP et de la ville
This commit is contained in:
parent
4906fa01e8
commit
41b87ad357
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
*
|
*
|
||||||
@ -35,7 +35,6 @@ require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php");
|
|||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
$error = array();
|
$error = array();
|
||||||
|
|
||||||
|
|
||||||
@ -54,11 +53,13 @@ if ($_GET["action"] == 'create_user' && $user->admin)
|
|||||||
|
|
||||||
if ($_POST["action"] == 'add')
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
if (! $_POST["name"] && ! $_POST["firstname"]) {
|
if (! $_POST["name"] && ! $_POST["firstname"])
|
||||||
|
{
|
||||||
array_push($error,'Le champ nom ou prénom est obligatoire.');
|
array_push($error,'Le champ nom ou prénom est obligatoire.');
|
||||||
$_GET["action"]="create";
|
$_GET["action"]="create";
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
|
|
||||||
$contact->socid = $_POST["socid"];
|
$contact->socid = $_POST["socid"];
|
||||||
@ -246,7 +247,9 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
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"> <input name="cp" type="text" size="20" maxlength="80"></td>';
|
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 '<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>'.$langs->trans("Email").'</td><td colspan="5"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||||
@ -299,7 +302,10 @@ elseif ($_GET["action"] == 'edit')
|
|||||||
|
|
||||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
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"> <input name="cp" type="text" size="20" maxlength="80"></td>';
|
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" value="'.$contact->fax.'"></td></tr>';
|
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>'.$langs->trans("EMail").'</td><td colspan="5"><input name="email" type="text" size="50" maxlength="80" value="'.$contact->email.'"></td></tr>';
|
||||||
@ -340,14 +346,16 @@ else
|
|||||||
|
|
||||||
print '<tr><td valign="top">';
|
print '<tr><td valign="top">';
|
||||||
|
|
||||||
if ($contact->name || $contact->firstname) {
|
if ($contact->name || $contact->firstname)
|
||||||
|
{
|
||||||
print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."<br>";
|
print $langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($contact->poste)
|
if ($contact->poste)
|
||||||
print 'Poste : '.$contact->poste ."<br>";
|
print 'Poste : '.$contact->poste ."<br>";
|
||||||
|
|
||||||
if ($contact->email) {
|
if ($contact->email)
|
||||||
|
{
|
||||||
print $langs->trans("EMail").' : '.$contact->email ."<br>";
|
print $langs->trans("EMail").' : '.$contact->email ."<br>";
|
||||||
|
|
||||||
if (!ValidEmail($contact->email))
|
if (!ValidEmail($contact->email))
|
||||||
@ -369,6 +377,12 @@ else
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($contact->address || $contact->ville)
|
||||||
|
{
|
||||||
|
print 'Adresse : '.$contact->address ."<br>";
|
||||||
|
print 'Adresse : '.$contact->cp . " ".$contact->ville ."<br>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($contact->jabberid)
|
if ($contact->jabberid)
|
||||||
print 'Jabber : '.$contact->jabberid ."<br>";
|
print 'Jabber : '.$contact->jabberid ."<br>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user