Go to the documentation of this file.
24 require
'../main.inc.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
28 $action =
GETPOST(
'action',
'aZ09');
29 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'adminaccoutant';
32 $langs->loadLangs(array(
'admin',
'companies',
'other'));
45 $parameters = array();
46 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
51 if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
52 || ($action ==
'updateedit')) {
55 dolibarr_set_const($db,
"MAIN_INFO_OPENINGHOURS_WEDNESDAY",
GETPOST(
"wednesday",
'alpha'),
'chaine', 0,
'', $conf->entity);
61 if ($action !=
'updateedit' && !$error) {
63 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
77 print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
83 print
'<span class="opacitymedium">'.$langs->trans(
"OpeningHoursDesc").
"</span><br>\n";
86 if (empty($action) || $action ==
'edit' || $action ==
'updateedit') {
90 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
91 print
'<input type="hidden" name="token" value="'.newToken().
'">';
92 print
'<input type="hidden" name="action" value="update">';
94 print
'<table class="noborder centpercent editmode">';
95 print
'<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans(
"Day").
'</th><th>'.$langs->trans(
"Value").
'</th></tr>'.
"\n";
97 print
'<tr class="oddeven"><td>';
98 print
$form->textwithpicto($langs->trans(
"Monday"), $langs->trans(
"OpeningHoursFormatDesc"));
100 print
'<input name="monday" id="monday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_MONDAY :
GETPOST(
"monday",
'alpha')).
'"'.(empty($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY) ?
' autofocus="autofocus"' :
'').
'></td></tr>'.
"\n";
102 print
'<tr class="oddeven"><td>';
103 print
$form->textwithpicto($langs->trans(
"Tuesday"), $langs->trans(
"OpeningHoursFormatDesc"));
105 print
'<input name="tuesday" id="tuesday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY :
GETPOST(
"tuesday",
'alpha')).
'"></td></tr>'.
"\n";
107 print
'<tr class="oddeven"><td>';
108 print
$form->textwithpicto($langs->trans(
"Wednesday"), $langs->trans(
"OpeningHoursFormatDesc"));
110 print
'<input name="wednesday" id="wednesday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY :
GETPOST(
"wednesday",
'alpha')).
'"></td></tr>'.
"\n";
112 print
'<tr class="oddeven"><td>';
113 print
$form->textwithpicto($langs->trans(
"Thursday"), $langs->trans(
"OpeningHoursFormatDesc"));
115 print
'<input name="thursday" id="thursday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY :
GETPOST(
"thursday",
'alpha')).
'"></td></tr>'.
"\n";
117 print
'<tr class="oddeven"><td>';
118 print
$form->textwithpicto($langs->trans(
"Friday"), $langs->trans(
"OpeningHoursFormatDesc"));
120 print
'<input name="friday" id="friday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY :
GETPOST(
"friday",
'alpha')).
'"></td></tr>'.
"\n";
122 print
'<tr class="oddeven"><td>';
123 print
$form->textwithpicto($langs->trans(
"Saturday"), $langs->trans(
"OpeningHoursFormatDesc"));
125 print
'<input name="saturday" id="saturday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY :
GETPOST(
"saturday",
'alpha')).
'"></td></tr>'.
"\n";
127 print
'<tr class="oddeven"><td>';
128 print
$form->textwithpicto($langs->trans(
"Sunday"), $langs->trans(
"OpeningHoursFormatDesc"));
130 print
'<input name="sunday" id="sunday" class="minwidth100" value="'.(!empty($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY) ? $conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY :
GETPOST(
"sunday",
'alpha')).
'"></td></tr>'.
"\n";
134 print
$form->buttonsSaveCancel(
"Save",
'');
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.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
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).
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
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.
company_admin_prepare_head()
Return array head with list of tabs to view object informations.