290 |
elseif ($_GET["action"] == 'edit') |
elseif ($_GET["action"] == 'edit') |
291 |
{ |
{ |
292 |
/* |
/* |
293 |
* Fiche en mode edition |
* Fiche en mode edition |
294 |
* |
* |
295 |
*/ |
*/ |
296 |
|
|
297 |
print '<form method="post" action="fiche.php?id='.$_GET["id"].'">'; |
print '<form method="post" action="fiche.php?id='.$_GET["id"].'">'; |
298 |
print '<input type="hidden" name="id" value="'.$_GET["id"].'">'; |
print '<input type="hidden" name="id" value="'.$_GET["id"].'">'; |
352 |
print $form->selectyesno("facturation",$contact->facturation); |
print $form->selectyesno("facturation",$contact->facturation); |
353 |
print '</td></tr>'; |
print '</td></tr>'; |
354 |
|
|
355 |
|
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">'; |
356 |
|
if ($contact->user_id) print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$contact->user_id.'">'.$contact->user_login.'</a>'; |
357 |
|
else print $langs->trans("NoDolibarrAccess"); |
358 |
|
print '</td></tr>'; |
359 |
|
|
360 |
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>'; |
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>'; |
361 |
print "</table><br>"; |
print '</table>'; |
362 |
|
|
363 |
print "</form>"; |
print "</form>"; |
364 |
} |
} |
365 |
else |
else |
366 |
{ |
{ |
367 |
/* |
/* |
368 |
* Visualisation de la fiche |
* Fiche en mode visualisation |
369 |
* |
* |
370 |
*/ |
*/ |
371 |
|
|
375 |
{ |
{ |
376 |
$objsoc = new Societe($db); |
$objsoc = new Societe($db); |
377 |
$objsoc->fetch($contact->socid); |
$objsoc->fetch($contact->socid); |
378 |
|
|
379 |
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>'; |
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>'; |
380 |
} |
} |
381 |
else |
else |
404 |
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">'; |
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">'; |
405 |
print $contact->pays; |
print $contact->pays; |
406 |
print '</td></tr>'; |
print '</td></tr>'; |
407 |
|
|
408 |
print '<tr><td>Tel Pro</td><td>'.$contact->phone_pro.'</td>'; |
print '<tr><td>Tel Pro</td><td>'.$contact->phone_pro.'</td>'; |
409 |
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>'; |
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>'; |
410 |
|
|
432 |
print yn($contact->facturation); |
print yn($contact->facturation); |
433 |
print '</td></tr>'; |
print '</td></tr>'; |
434 |
|
|
435 |
|
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">'; |
436 |
|
if ($contact->user_id) print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$contact->user_id.'">'.$contact->user_login.'</a>'; |
437 |
|
else print $langs->trans("NoDolibarrAccess"); |
438 |
|
print '</td></tr>'; |
439 |
|
|
440 |
print "</table>"; |
print "</table>"; |
441 |
|
|
442 |
print "</div>"; |
print "</div>"; |