Update card.php
This commit is contained in:
parent
31fcfc5aa5
commit
3c2f30a824
@ -33,13 +33,17 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("intracommreport"));
|
$langs->loadLangs(array("intracommreport"));
|
||||||
|
|
||||||
|
// Get Parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action');
|
||||||
$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB or DES
|
$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB or DES
|
||||||
@ -48,6 +52,7 @@ $month = GETPOSTINT('month');
|
|||||||
$label = (string) GETPOST('label', 'alphanohtml');
|
$label = (string) GETPOST('label', 'alphanohtml');
|
||||||
$type_declaration = (string) GETPOST('type_declaration', 'alphanohtml');
|
$type_declaration = (string) GETPOST('type_declaration', 'alphanohtml');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$declaration = array(
|
$declaration = array(
|
||||||
"deb" => $langs->trans("DEB"),
|
"deb" => $langs->trans("DEB"),
|
||||||
"des" => $langs->trans("DES"),
|
"des" => $langs->trans("DES"),
|
||||||
@ -56,6 +61,8 @@ $typeOfDeclaration = array(
|
|||||||
"introduction" => $langs->trans("Introduction"),
|
"introduction" => $langs->trans("Introduction"),
|
||||||
"expedition" => $langs->trans("Expedition"),
|
"expedition" => $langs->trans("Expedition"),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Initialize technical objects
|
||||||
$object = new IntracommReport($db);
|
$object = new IntracommReport($db);
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@ -68,6 +75,7 @@ $hookmanager->initHooks(array('intracommcard', 'globalcard'));
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissiontoread = $user->rights->intracommreport->read;
|
$permissiontoread = $user->rights->intracommreport->read;
|
||||||
$permissiontoadd = $user->rights->intracommreport->write;
|
$permissiontoadd = $user->rights->intracommreport->write;
|
||||||
$permissiontodelete = $user->rights->intracommreport->delete;
|
$permissiontodelete = $user->rights->intracommreport->delete;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user