Go to the documentation of this file.
28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/expedition.lib.php';
33 $langs->loadLangs(array(
'admin',
'sendings',
'deliveries'));
39 $action =
GETPOST(
'action',
'aZ09');
47 if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) {
49 dolibarr_set_const($db,
"MAIN_SUBMODULE_EXPEDITION",
"1",
'chaine', 0,
'', $conf->entity);
67 if ($action ==
'activate_delivery') {
68 dolibarr_set_const($db,
"MAIN_SUBMODULE_EXPEDITION",
"1",
'chaine', 0,
'', $conf->entity);
69 dolibarr_set_const($db,
"MAIN_SUBMODULE_DELIVERY",
"1",
'chaine', 0,
'', $conf->entity);
70 header(
"Location: confexped.php");
72 } elseif ($action ==
'disable_delivery') {
74 header(
"Location: confexped.php");
83 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/expedition/";
86 llxHeader(
"", $langs->trans(
"SendingsSetup"));
88 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
89 print
load_fiche_titre($langs->trans(
"SendingsSetup"), $linkback,
'title_setup');
97 print
'<table class="noborder centpercent">';
98 print
'<tr class="liste_titre">';
99 print
'<td>'.$langs->trans(
"Feature").
'</td>';
100 print
'<td width="20"> </td>';
101 print
'<td class="center">'.$langs->trans(
"Status").
'</td>';
106 print
'<td>'.$langs->trans(
"SendingsAbility").
'</td>';
109 print
'<td class="center">';
110 print
'<span class="opacitymedium">'.img_picto($langs->trans(
"Required"),
'switch_on').
'</span>';
125 print $langs->trans(
"DeliveriesOrderAbility");
126 print
'<br>'.info_admin($langs->trans(
"NoNeedForDeliveryReceipts"), 0, 1);
130 print
'<td class="center">';
132 if (empty($conf->global->MAIN_SUBMODULE_DELIVERY)) {
133 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=activate_delivery&token='.
newToken().
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
135 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=disable_delivery&token='.
newToken().
'">'.
img_picto($langs->trans(
"Enabled"),
'switch_on').
'</a>';
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
expedition_admin_prepare_head()
Return array head with list of tabs to view object informations.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.