dolibarr/htdocs/contact/info.php

84 lines
2.0 KiB
PHP
Raw Normal View History

<?php
2006-03-14 23:23:12 +01:00
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2008-02-25 21:13:28 +01:00
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
2004-01-31 12:35:05 +01:00
*
* 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.
*/
2004-10-23 02:46:54 +02:00
2004-12-25 19:37:40 +01:00
/**
2004-11-11 22:19:50 +01:00
\file htdocs/contact/info.php
2004-10-23 02:46:54 +02:00
\ingroup societe
2004-11-11 22:19:50 +01:00
\brief Onglet info d'un contact
2008-02-25 21:13:28 +01:00
\version $Id$
2004-10-23 02:46:54 +02:00
*/
2004-01-31 12:35:05 +01:00
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/contact.lib.php");
2004-10-23 02:46:54 +02:00
2004-11-11 22:19:50 +01:00
$langs->load("companies");
2004-10-23 02:46:54 +02:00
2008-02-25 17:30:43 +01:00
// Security check
2006-03-11 17:04:19 +01:00
$contactid = isset($_GET["id"])?$_GET["id"]:'';
2008-02-25 21:03:21 +01:00
if ($user->societe_id) $socid=$user->societe_id;
2008-02-25 21:13:28 +01:00
$result = restrictedArea($user, 'contact',$contactid,'socpeople');
2006-03-11 17:04:19 +01:00
2006-03-14 23:23:12 +01:00
/*
2008-02-25 17:30:43 +01:00
* View
*/
2006-03-14 23:23:12 +01:00
2004-01-31 12:35:05 +01:00
llxHeader();
$contact = new Contact($db);
$contact->fetch($_GET["id"], $user);
/*
* Affichage onglets
*/
$head = contact_prepare_head($contact);
2007-11-05 19:35:45 +01:00
dolibarr_fiche_head($head, 'info', $langs->trans("Contact"));
2004-01-31 12:35:05 +01:00
/*
* Visualisation de la fiche
*
*/
print '<table width="100%"><tr><td>';
2004-01-31 12:35:05 +01:00
$contact->info($_GET["id"]);
print '</td></tr></table>';
2004-01-31 12:35:05 +01:00
if ($contact->socid > 0)
{
$societe = new Societe($db);
$societe->fetch($contact->socid);
2004-01-31 12:35:05 +01:00
print $langs->trans("Company").' : '.$societe->getNomUrl(0).'<br>';
2004-01-31 12:35:05 +01:00
}
2004-01-31 18:32:25 +01:00
dolibarr_print_object_info($contact);
2004-01-31 12:35:05 +01:00
print "</div>";
2004-01-31 12:35:05 +01:00
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>