24 if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
34 if (isset(
$_REQUEST[
'gDossier']) &&
$http->request(
"gDossier",
"number",0) != 0 )
41 $local_pref=
$g_user->get_preference();
55 $style->selected =$_SESSION[SESSION_KEY.
'g_theme'];
60 if (
$action ==
'display_form' )
63 echo
'<DIV class="content">';
64 echo
'<p class="notice">';
65 echo _(
"Après validation, recharger pour appliquer les changements");
71 <div
class=
"content" >
73 <FORM METHOD=
"POST" onsubmit=
"updatePreference();return false;" id=
"preference_frm">
74 <fieldset
style=
"margin: 1%"><legend><?php echo _(
'Options Générales')?></legend>
78 <?php echo _(
'Email')?>
81 <input
type=
"text" name=
"p_email" value=
"<?php echo $g_user->email?>" class=
"input_text">
87 <
td><input
type=
"password" value=
"" class=
"input_text" name=
"pass_1" nohistory>
88 <input
type=
"password" value=
"" class=
"input_text" name=
"pass_2" nohistory>
94 <?php echo _(
'Thème');?>
97 <?php echo
$style->input();?>
104 $l_user_per =
$g_user->get_periode();
105 if ($l_user_per ==
"")
106 $l_user_per =
$cn->get_value(
"select min(p_id) from parm_periode where p_closed='f'");
111 $period->p_id = $l_user_per;
112 $period->jrn_def_id = 0;
113 $selected_exercice=$period->get_exercice();
114 $js=sprintf(
'onchange="updatePeriodePreference(%d);"',
Dossier::id());
117 if ($period->is_closed($l_user_per) == 1)
119 $msg = _(
'Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable');
120 $msg =
'<h2 class="notice">' .
$msg .
'</h2>';
123 $iperiod =
new IPeriod(
"period");
124 $iperiod->id=
"setting_period";
127 $iperiod->filter_year =
true;
128 $iperiod->exercice=$selected_exercice;
129 $iperiod->value = $l_user_per;
130 $iperiod->type =
ALL;
131 $l_form_per = $iperiod->input();
138 <?=
$exercice->select(
"exercice_setting",$selected_exercice,
$js)->input();?>
143 <?=_(
"Premier jour semaine")?>
148 [
"label"=>_(
"Lundi"),
"value"=>1],
149 [
"label"=>_(
"Mardi"),
"value"=>2],
150 [
"label"=>_(
"Mercredi"),
"value"=>3],
151 [
"label"=>_(
"Jeudi"),
"value"=>4],
152 [
"label"=>_(
"Vendredi"),
"value"=>5],
153 [
"label"=>_(
"Samedi"),
"value"=>6],
154 [
"label"=>_(
"Dimanche"),
"value"=>0],
156 $selFirstDay=
new ISelect(
"selFirstDay");
157 $selFirstDay->value=$aFirstDay;
158 $selFirstDay->selected=
$g_user->get_first_week_day();
159 echo $selFirstDay->input();
166 <
td><?php echo _(
'Période');?></
td>
168 <?php printf(
' %s ', $l_form_per);?>
172 <
td><?php echo _(
'Taille des pages');?></
td>
174 <SELECT NAME=
"p_size">
175 <option
value=
"15">15
176 <option
value=
"25">25
177 <option
value=
"50">50
178 <option
value=
"100">100
179 <option
value=
"150">150
180 <option
value=
"200">200
181 <option
value=
"-1"><?php echo _(
'Illimité');?>
183 $label = ($_SESSION[SESSION_KEY.
'g_pagesize'] == -1) ? _(
'Illimité') : $_SESSION[SESSION_KEY.
'g_pagesize'];
184 echo
'<option value="' . $_SESSION[SESSION_KEY.
'g_pagesize'] .
'" selected>' .
$label;
196 <legend><?=_(
"Format Export CSV")?></legend>
199 if ( $_SESSION[SESSION_KEY.
'csv_fieldsep']==1 && $_SESSION[SESSION_KEY.
'csv_decimal']==1)
201 echo_warning(_(
"N'utilisez pas le même séparateur pour les champs et les décimales"));
208 <?=_(
"Séparateur de champs")?>
212 $csv_fieldsep=
new ISelect(
'csv_fieldsep');
213 $csv_fieldsep->value=[
214 [
"label"=>_(
"Point-virgule"),
"value"=>0],
215 [
"label"=>_(
"virgule"),
"value"=>1]
217 $csv_fieldsep->selected=$_SESSION[SESSION_KEY.
'csv_fieldsep'];
218 echo $csv_fieldsep->input();
224 <?=_(
"Séparateur Décimale")?>
228 $csv_decimal=
new ISelect(
'csv_decimal');
229 $csv_decimal->value=[
230 [
"label"=>_(
"point"),
"value"=>0],
231 [
"label"=>_(
"virgule"),
"value"=>1]
233 $csv_decimal->selected=$_SESSION[SESSION_KEY.
'csv_decimal'];
234 echo $csv_decimal->input();
244 $csv_encoding=
new ISelect(
'csv_encoding');
245 $csv_encoding->value=[
246 [
"label"=>_(
"utf8"),
"value"=>
'utf8'],
247 [
"label"=>_(
"latin1"),
"value"=>
'latin1']
249 $csv_encoding->selected=$_SESSION[SESSION_KEY.
'csv_encoding'];
250 echo $csv_encoding->input();
261 echo
'<fieldset style="margin: 1%">';
262 echo
'<legend>' . _(
'Options pour la page d\'accueil') .
'</legend>';
263 echo _(
'Mini-Rapport : ');
266 $aRapport[] = array(
"value" => 0,
"label" => _(
'Aucun mini rapport'));
268 $wRapport->name =
"minirap";
269 $wRapport->selected =
$g_user->get_mini_report();
270 $wRapport->value = $aRapport;
271 echo $wRapport->input();
272 echo
'<span class="notice">' . _(
'Le mini rapport est un rapport qui s\'affiche sur votre page d\'accueil') .
'</span>';
276 echo
'<fieldset style="margin: 1%">';
277 echo
'<legend>' . _(
'Langue') .
'</legend>';
278 echo _(
'Selectionnez votre langue');
279 $aLang = array(array(_(
'Français'),
'fr_FR.utf8'),
280 array(_(
'Anglais'),
'en_US.utf8'),
281 array(_(
'Néerlandais'),
'nl_NL.utf8'),
283 echo
'<select name="lang" id="l">';
284 for (
$i = 0;
$i < count($aLang);
$i++)
287 if ($aLang[
$i][1] == $_SESSION[SESSION_KEY.
'g_lang'])
289 printf(
'<option value="%s" %s>%s</option>', $aLang[
$i][1],
$sel, $aLang[
$i][0]);
297 echo
'<p style="text-align:center">';
314 $lang=
$http->post(
"lang",
"string",
"fr_FR.utf8");
315 $p_size=
$http->post(
"p_size",
"number",50);
316 $pass_1=
$http->post(
"pass_1",
"string",
"");
317 $pass_2=
$http->post(
"pass_2",
"string",
"");
318 $p_email=
$http->post(
"p_email",
"string",
"");
319 $csv_fieldsep=
$http->post(
"csv_fieldsep",
"number");
320 $csv_decimal=
$http->post(
"csv_decimal",
"number");
321 $csv_encoding=
$http->post(
"csv_encoding");
322 $firstday=
$http->post(
"selFirstDay",
"number");
324 if (strlen(trim($pass_1)) != 0 && strlen(trim($pass_2)) != 0)
326 $g_user->save_password($pass_1,$pass_2);
331 $minirap=
$http->post(
"minirap",
"number",
"0");
332 $period=
$http->post(
"period",
"number");
334 $g_user->set_mini_report($minirap);
337 $g_user->save_global_preference(
'LANG', $lang);
338 $g_user->save_global_preference(
'PAGESIZE', $p_size);
339 $g_user->save_global_preference(
'csv_fieldsep', $csv_fieldsep);
340 $g_user->save_global_preference(
'csv_decimal', $csv_decimal);
341 $g_user->save_global_preference(
'csv_encoding', $csv_encoding);
342 $g_user->save_global_preference(
'first_week_day', $firstday);
346 $_SESSION[SESSION_KEY.
'g_pagesize']=$p_size;
347 $_SESSION[SESSION_KEY.
'g_lang']=$lang;
350 $style=
$repo->get_value(
"select the_filestyle from theme
354 $style =
"style-classic7.css";