25require
'../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
29$action =
GETPOST(
'action',
'aZ09');
30$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'adminaccoutant';
33$langs->loadLangs(array(
'admin',
'companies',
'other'));
47$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
52if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
53|| ($action ==
'updateedit')) {
56 dolibarr_set_const($db,
"MAIN_INFO_OPENINGHOURS_WEDNESDAY",
GETPOST(
"wednesday",
'alpha'),
'chaine', 0,
'', $conf->entity);
62 if ($action !=
'updateedit' && !$error) {
64 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
76llxHeader(
'', $langs->trans(
"CompanyFoundation"), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-openinghours');
78print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
84print
'<span class="opacitymedium">'.$langs->trans(
"OpeningHoursDesc").
"</span><br>\n";
87if (empty($action) || $action ==
'edit' || $action ==
'updateedit') {
91 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
92 print
'<input type="hidden" name="token" value="'.newToken().
'">';
93 print
'<input type="hidden" name="action" value="update">';
95 print
'<table class="noborder centpercent editmode">';
96 print
'<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans(
"Day").
'</th><th>'.$langs->trans(
"Value").
'</th></tr>'.
"\n";
98 print
'<tr class="oddeven"><td>';
99 print $form->textwithpicto($langs->trans(
"Monday"), $langs->trans(
"OpeningHoursFormatDesc"));
101 print
'<input name="monday" id="monday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_MONDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_MONDAY :
GETPOST(
"monday",
'alpha')).
'"'.(!
getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_MONDAY') ?
' autofocus="autofocus"' :
'').
'></td></tr>'.
"\n";
103 print
'<tr class="oddeven"><td>';
104 print $form->textwithpicto($langs->trans(
"Tuesday"), $langs->trans(
"OpeningHoursFormatDesc"));
106 print
'<input name="tuesday" id="tuesday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_TUESDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_TUESDAY :
GETPOST(
"tuesday",
'alpha')).
'"></td></tr>'.
"\n";
108 print
'<tr class="oddeven"><td>';
109 print $form->textwithpicto($langs->trans(
"Wednesday"), $langs->trans(
"OpeningHoursFormatDesc"));
111 print
'<input name="wednesday" id="wednesday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_WEDNESDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_WEDNESDAY :
GETPOST(
"wednesday",
'alpha')).
'"></td></tr>'.
"\n";
113 print
'<tr class="oddeven"><td>';
114 print $form->textwithpicto($langs->trans(
"Thursday"), $langs->trans(
"OpeningHoursFormatDesc"));
116 print
'<input name="thursday" id="thursday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_THURSDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_THURSDAY :
GETPOST(
"thursday",
'alpha')).
'"></td></tr>'.
"\n";
118 print
'<tr class="oddeven"><td>';
119 print $form->textwithpicto($langs->trans(
"Friday"), $langs->trans(
"OpeningHoursFormatDesc"));
121 print
'<input name="friday" id="friday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_FRIDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_FRIDAY :
GETPOST(
"friday",
'alpha')).
'"></td></tr>'.
"\n";
123 print
'<tr class="oddeven"><td>';
124 print $form->textwithpicto($langs->trans(
"Saturday"), $langs->trans(
"OpeningHoursFormatDesc"));
126 print
'<input name="saturday" id="saturday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_SATURDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_SATURDAY :
GETPOST(
"saturday",
'alpha')).
'"></td></tr>'.
"\n";
128 print
'<tr class="oddeven"><td>';
129 print $form->textwithpicto($langs->trans(
"Sunday"), $langs->trans(
"OpeningHoursFormatDesc"));
131 print
'<input name="sunday" id="sunday" class="minwidth100" value="'.(getDolGlobalString(
'MAIN_INFO_OPENINGHOURS_SUNDAY') ? $conf->global->MAIN_INFO_OPENINGHOURS_SUNDAY :
GETPOST(
"sunday",
'alpha')).
'"></td></tr>'.
"\n";
135 print $form->buttonsSaveCancel(
"Save",
'');
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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 information.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.