forked from Wavyzz/dolibarr
@@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Gilles Poirier <glgpoirier@gmail.com>
|
||||
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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 3 of the License, or
|
||||
@@ -22,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/resource/contact.php
|
||||
* \ingroup resource
|
||||
* \brief Onglet de gestion des contacts des resources
|
||||
* \brief Contacts management tab for resources
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@@ -32,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('resource', 'sendings', 'companies'));
|
||||
$langs->loadLangs(array('companies', 'resource', 'sendings'));
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
@@ -41,7 +44,7 @@ $action = GETPOST('action', 'aZ09');
|
||||
$object = new DolResource($db);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
|
||||
|
||||
// Security check
|
||||
if ($user->socid) {
|
||||
@@ -55,10 +58,12 @@ if (!$user->rights->resource->read) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Add a new contact
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Add a new contact
|
||||
if ($action == 'addcontact' && $user->rights->resource->write) {
|
||||
if ($result > 0 && $id > 0) {
|
||||
$contactid = (GETPOST('userid', 'int') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
@@ -106,7 +111,7 @@ $userstatic = new User($db);
|
||||
|
||||
llxHeader('', $langs->trans("Resource"));
|
||||
|
||||
// Mode vue et edition
|
||||
// View and edit mode
|
||||
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$soc = new Societe($db);
|
||||
|
||||
Reference in New Issue
Block a user