commit
cf4bd243a3
@ -31,6 +31,7 @@
|
|||||||
* \brief Page of contacts of thirdparties
|
* \brief Page of contacts of thirdparties
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
@ -46,7 +47,9 @@ if (!empty($conf->adherent->enabled)) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
$langs->loadLangs(array("companies", "commercial", "bills", "banks", "users"));
|
||||||
|
|
||||||
if (!empty($conf->categorie->enabled)) {
|
if (!empty($conf->categorie->enabled)) {
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
}
|
}
|
||||||
@ -59,18 +62,23 @@ if (!empty($conf->notification->enabled)) {
|
|||||||
|
|
||||||
$mesg = ''; $error = 0; $errors = array();
|
$mesg = ''; $error = 0; $errors = array();
|
||||||
|
|
||||||
|
|
||||||
|
// Get parameters
|
||||||
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
$action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||||
|
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($socid) && $action == 'view') {
|
if (empty($socid) && $action == 'view') {
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize objects
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user