2005-11-11 17:37:53 +01:00
|
|
|
<?php
|
2012-03-28 19:39:56 +02:00
|
|
|
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
2012-12-30 15:11:07 +01:00
|
|
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
2012-03-28 19:39:56 +02:00
|
|
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
2005-11-11 17:37:53 +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
|
2013-01-16 15:36:08 +01:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2005-11-11 17:37:53 +01:00
|
|
|
* (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
|
2011-08-01 01:19:04 +02:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-11-11 17:37:53 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
2010-03-01 09:28:29 +01:00
|
|
|
* \file htdocs/societe/info.php
|
|
|
|
|
* \ingroup societe
|
|
|
|
|
* \brief Page des informations d'une societe
|
|
|
|
|
*/
|
2005-11-11 17:37:53 +01:00
|
|
|
|
2012-08-22 23:24:21 +02:00
|
|
|
require '../main.inc.php';
|
2012-08-22 23:11:24 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
2005-11-11 17:37:53 +01:00
|
|
|
|
|
|
|
|
$langs->load("companies");
|
2005-12-02 14:20:06 +01:00
|
|
|
$langs->load("other");
|
2012-09-15 10:01:35 +02:00
|
|
|
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
2005-11-11 17:37:53 +01:00
|
|
|
|
2008-02-25 17:30:43 +01:00
|
|
|
// Security check
|
2012-03-28 19:39:56 +02:00
|
|
|
$socid = GETPOST('socid','int');
|
2008-02-25 21:03:21 +01:00
|
|
|
if ($user->societe_id) $socid=$user->societe_id;
|
2012-03-28 19:39:56 +02:00
|
|
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
2006-03-10 18:32:47 +01:00
|
|
|
|
2013-01-13 19:33:54 +01:00
|
|
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
|
|
$hookmanager->initHooks(array('infothirdparty'));
|
2013-01-12 14:34:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-11-11 17:37:53 +01:00
|
|
|
/*
|
2013-01-13 19:33:54 +01:00
|
|
|
* Actions
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
$parameters=array('id'=>$socid);
|
|
|
|
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
|
|
|
|
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
|
|
|
|
|
2013-01-12 14:34:16 +01:00
|
|
|
|
2005-11-11 17:37:53 +01:00
|
|
|
|
|
|
|
|
/*
|
2013-01-12 14:34:16 +01:00
|
|
|
* View
|
|
|
|
|
*/
|
2008-02-24 15:41:07 +01:00
|
|
|
|
2013-01-12 14:34:16 +01:00
|
|
|
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
|
|
|
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
2005-11-11 17:37:53 +01:00
|
|
|
|
|
|
|
|
$soc = new Societe($db);
|
2006-03-10 19:08:37 +01:00
|
|
|
$soc->fetch($socid);
|
|
|
|
|
$soc->info($socid);
|
2005-11-11 17:37:53 +01:00
|
|
|
|
2006-04-09 00:47:51 +02:00
|
|
|
/*
|
|
|
|
|
* Affichage onglets
|
|
|
|
|
*/
|
|
|
|
|
$head = societe_prepare_head($soc);
|
2005-11-11 17:37:53 +01:00
|
|
|
|
2009-08-05 19:19:55 +02:00
|
|
|
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"),0,'company');
|
2005-11-11 17:37:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print '<table width="100%"><tr><td>';
|
2009-01-07 11:57:36 +01:00
|
|
|
dol_print_object_info($soc);
|
2005-11-11 17:37:53 +01:00
|
|
|
print '</td></tr></table>';
|
|
|
|
|
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
|
|
|
|
|
2011-08-27 16:24:16 +02:00
|
|
|
llxFooter();
|
2012-01-18 00:16:02 +01:00
|
|
|
|
|
|
|
|
$db->close();
|
2005-11-11 17:37:53 +01:00
|
|
|
?>
|