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'));
43 $parameters = array();
44 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
45 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
47 if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
48 || ($action ==
'updateedit'))
52 dolibarr_set_const($db,
"MAIN_INFO_OPENINGHOURS_WEDNESDAY",
GETPOST(
"wednesday",
'alpha'),
'chaine', 0,
'', $conf->entity);
58 if ($action !=
'updateedit' && !$error)
61 header(
"Location: ".
$_SERVER[
"PHP_SELF"]);
70 $form =
new Form($db);
73 llxHeader(
'', $langs->trans(
"CompanyFoundation"), $help_url);
81 print '<span class="opacitymedium">'.$langs->trans(
"OpeningHoursDesc").
"</span><br>\n";
84 if (empty($action) || $action ==
'edit' || $action ==
'updateedit')
89 print '<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
90 print '<input type="hidden" name="token" value="'.newToken().
'">';
91 print '<input type="hidden" name="action" value="update">';
93 print '<table class="noborder centpercent editmode">';
94 print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans(
"Day").
'</th><th>'.$langs->trans(
"Value").
'</th></tr>'.
"\n";
96 print '<tr class="oddeven"><td>';
97 print $form->textwithpicto($langs->trans(
"Monday"), $langs->trans(
"OpeningHoursFormatDesc"));
99 print '<input name="monday" id="monday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_MONDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_MONDAY :
GETPOST(
"monday",
'alpha')).
'"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'' :
' autofocus="autofocus"').
'></td></tr>'.
"\n";
101 print '<tr class="oddeven"><td>';
102 print $form->textwithpicto($langs->trans(
"Tuesday"), $langs->trans(
"OpeningHoursFormatDesc"));
104 print
'<input name="tuesday" id="tuesday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY :
GETPOST(
"tuesday",
'alpha')).
'"></td></tr>'.
"\n";
106 print
'<tr class="oddeven"><td>';
107 print $form->textwithpicto($langs->trans(
"Wednesday"), $langs->trans(
"OpeningHoursFormatDesc"));
109 print
'<input name="wednesday" id="wednesday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY :
GETPOST(
"wednesday",
'alpha')).
'"></td></tr>'.
"\n";
111 print
'<tr class="oddeven"><td>';
112 print $form->textwithpicto($langs->trans(
"Thursday"), $langs->trans(
"OpeningHoursFormatDesc"));
114 print
'<input name="thursday" id="thursday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY :
GETPOST(
"thursday",
'alpha')).
'"></td></tr>'.
"\n";
116 print
'<tr class="oddeven"><td>';
117 print $form->textwithpicto($langs->trans(
"Friday"), $langs->trans(
"OpeningHoursFormatDesc"));
119 print
'<input name="friday" id="friday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY :
GETPOST(
"friday",
'alpha')).
'"></td></tr>'.
"\n";
121 print
'<tr class="oddeven"><td>';
122 print $form->textwithpicto($langs->trans(
"Saturday"), $langs->trans(
"OpeningHoursFormatDesc"));
124 print
'<input name="saturday" id="saturday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY :
GETPOST(
"saturday",
'alpha')).
'"></td></tr>'.
"\n";
126 print
'<tr class="oddeven"><td>';
127 print $form->textwithpicto($langs->trans(
"Sunday"), $langs->trans(
"OpeningHoursFormatDesc"));
129 print
'<input name="sunday" id="sunday" class="minwidth100" value="'.($conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY ? $conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY :
GETPOST(
"sunday",
'alpha')).
'"></td></tr>'.
"\n";
133 print
'<br><div class="center">';
134 print
'<input type="submit" class="button button-save" name="save" value="'.$langs->trans(
"Save").
'">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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).
company_admin_prepare_head()
Return array head with list of tabs to view object informations.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
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 ...
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.