26require
'../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
30$action =
GETPOST(
'action',
'aZ09');
31$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'adminaccoutant';
42$langs->loadLangs(array(
'admin',
'companies',
'other'));
56$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
61if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
62|| ($action ==
'updateedit')) {
71 if ($action !=
'updateedit' && !$error) {
73 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
85llxHeader(
'', $langs->trans(
"CompanyFoundation"), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-openinghours');
87print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
93print
'<span class="opacitymedium">'.$langs->trans(
"OpeningHoursDesc").
"</span><br>\n";
96if (empty($action) || $action ==
'edit' || $action ==
'updateedit') {
100 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index">';
101 print
'<input type="hidden" name="token" value="'.newToken().
'">';
102 print
'<input type="hidden" name="action" value="update">';
104 print
'<table class="noborder centpercent editmode">';
105 print
'<tr class="liste_titre"><th class="titlefieldcreate wordbreak">'.$langs->trans(
"Day").
'</th><th>'.$langs->trans(
"Value").
'</th></tr>'.
"\n";
107 print
'<tr class="oddeven"><td>';
108 print $form->textwithpicto($langs->trans(
"Monday"), $langs->trans(
"OpeningHoursFormatDesc"));
110 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";
112 print
'<tr class="oddeven"><td>';
113 print $form->textwithpicto($langs->trans(
"Tuesday"), $langs->trans(
"OpeningHoursFormatDesc"));
115 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";
117 print
'<tr class="oddeven"><td>';
118 print $form->textwithpicto($langs->trans(
"Wednesday"), $langs->trans(
"OpeningHoursFormatDesc"));
120 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";
122 print
'<tr class="oddeven"><td>';
123 print $form->textwithpicto($langs->trans(
"Thursday"), $langs->trans(
"OpeningHoursFormatDesc"));
125 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";
127 print
'<tr class="oddeven"><td>';
128 print $form->textwithpicto($langs->trans(
"Friday"), $langs->trans(
"OpeningHoursFormatDesc"));
130 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";
132 print
'<tr class="oddeven"><td>';
133 print $form->textwithpicto($langs->trans(
"Saturday"), $langs->trans(
"OpeningHoursFormatDesc"));
135 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";
137 print
'<tr class="oddeven"><td>';
138 print $form->textwithpicto($langs->trans(
"Sunday"), $langs->trans(
"OpeningHoursFormatDesc"));
140 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";
144 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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.