24if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
34if (isset(
$_REQUEST[
'gDossier']) &&
$http->request(
"gDossier",
"number",0) != 0 )
41 $local_pref=
$g_user->get_preference();
55 $style->selected =$_SESSION[SESSION_KEY.
'g_theme'];
63 echo
'<DIV class="content">';
64 echo
'<p class="notice">';
65 echo _(
"Après validation, recharger pour appliquer les changements");
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">
88 <input
type=
"password" value=
"" class=
"input_text" name=
"pass_2" nohistory>
95 <?php echo _(
'Thème');?>
98 <?php echo
$style->input();?>
105 $l_user_per =
$g_user->get_periode();
106 if ($l_user_per ==
"")
107 $l_user_per =
$cn->get_value(
"select min(p_id) from parm_periode where p_closed='f'");
112 $period->p_id = $l_user_per;
113 $period->jrn_def_id = 0;
114 $selected_exercice=$period->get_exercice();
115 $js=sprintf(
'onchange="updatePeriodePreference(%d);"',
Dossier::id());
118 if ($period->is_closed($l_user_per) == 1)
120 $msg = _(
'Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable');
121 $msg =
'<h2 class="notice">' .
$msg .
'</h2>';
124 $iperiod =
new IPeriod(
"period");
125 $iperiod->id=
"setting_period";
128 $iperiod->filter_year =
true;
129 $iperiod->exercice=$selected_exercice;
130 $iperiod->value = $l_user_per;
131 $iperiod->type =
ALL;
132 $l_form_per = $iperiod->input();
139 <?=
$exercice->select(
"exercice_setting",$selected_exercice,
$js)->input();?>
145 <
td><?php echo _(
'Période');?></
td>
147 <?php printf(
' %s ', $l_form_per);?>
151 <
td><?php echo _(
'Taille des pages');?></
td>
153 <SELECT NAME=
"p_size">
154 <option
value=
"15">15
155 <option
value=
"25">25
156 <option
value=
"50">50
157 <option
value=
"100">100
158 <option
value=
"150">150
159 <option
value=
"200">200
160 <option
value=
"-1"><?php echo _(
'Illimité');?>
162 $label = ($_SESSION[SESSION_KEY.
'g_pagesize'] == -1) ? _(
'Illimité') : $_SESSION[SESSION_KEY.
'g_pagesize'];
163 echo
'<option value="' . $_SESSION[SESSION_KEY.
'g_pagesize'] .
'" selected>' .
$label;
174 <?=_(
"Premier jour semaine")?>
179 [
"label"=>_(
"Lundi"),
"value"=>1],
180 [
"label"=>_(
"Mardi"),
"value"=>2],
181 [
"label"=>_(
"Mercredi"),
"value"=>3],
182 [
"label"=>_(
"Jeudi"),
"value"=>4],
183 [
"label"=>_(
"Vendredi"),
"value"=>5],
184 [
"label"=>_(
"Samedi"),
"value"=>6],
185 [
"label"=>_(
"Dimanche"),
"value"=>0],
187 $selFirstDay=
new ISelect(
"selFirstDay");
188 $selFirstDay->value=$aFirstDay;
189 $selFirstDay->selected=
$g_user->get_first_week_day();
190 echo $selFirstDay->input();
198 <legend><?=_(
"Format Export CSV")?></legend>
201 if ( $_SESSION[SESSION_KEY.
'csv_fieldsep']==1 && $_SESSION[SESSION_KEY.
'csv_decimal']==1)
203 echo_warning(_(
"N'utilisez pas le même séparateur pour les champs et les décimales"));
210 <?=_(
"Séparateur de champs")?>
214 $csv_fieldsep=
new ISelect(
'csv_fieldsep');
215 $csv_fieldsep->value=[
216 [
"label"=>_(
"Point-virgule"),
"value"=>0],
217 [
"label"=>_(
"virgule"),
"value"=>1]
219 $csv_fieldsep->selected=$_SESSION[SESSION_KEY.
'csv_fieldsep'];
220 echo $csv_fieldsep->input();
226 <?=_(
"Séparateur Décimale")?>
230 $csv_decimal=
new ISelect(
'csv_decimal');
231 $csv_decimal->value=[
232 [
"label"=>_(
"point"),
"value"=>0],
233 [
"label"=>_(
"virgule"),
"value"=>1]
235 $csv_decimal->selected=$_SESSION[SESSION_KEY.
'csv_decimal'];
236 echo $csv_decimal->input();
246 $csv_encoding=
new ISelect(
'csv_encoding');
247 $csv_encoding->value=[
248 [
"label"=>_(
"utf8"),
"value"=>
'utf8'],
249 [
"label"=>_(
"latin1"),
"value"=>
'latin1']
251 $csv_encoding->selected=$_SESSION[SESSION_KEY.
'csv_encoding'];
252 echo $csv_encoding->input();
263 echo
'<fieldset style="margin: 1%">';
264 echo
'<legend>' . _(
'Options pour la page d\'accueil') .
'</legend>';
265 echo _(
'Mini-Rapport : ');
268 $aRapport[] = array(
"value" => 0,
"label" => _(
'Aucun mini rapport'));
270 $wRapport->name =
"minirap";
271 $wRapport->selected =
$g_user->get_mini_report();
272 $wRapport->value = $aRapport;
273 echo $wRapport->input();
274 echo
'<span class="notice">' . _(
'Le mini rapport est un rapport qui s\'affiche sur votre page d\'accueil') .
'</span>';
278 echo
'<fieldset style="margin: 1%">';
279 echo
'<legend>' . _(
'Langue') .
'</legend>';
280 echo _(
'Selectionnez votre langue');
281 $aLang = array(array(_(
'Français'),
'fr_FR.utf8'),
282 array(_(
'Anglais'),
'en_US.utf8'),
283 array(_(
'Néerlandais'),
'nl_NL.utf8'),
285 echo
'<select name="lang" id="l">';
286 for (
$i = 0;
$i < count($aLang);
$i++)
289 if ($aLang[
$i][1] == $_SESSION[SESSION_KEY.
'g_lang'])
291 printf(
'<option value="%s" %s>%s</option>', $aLang[
$i][1],
$sel, $aLang[
$i][0]);
299 echo
'<p style="text-align:center">';
316 $lang=
$http->post(
"lang",
"string",
"fr_FR.utf8");
317 $p_size=
$http->post(
"p_size",
"number",50);
318 $pass_1=
$http->post(
"pass_1",
"string",
"");
319 $pass_2=
$http->post(
"pass_2",
"string",
"");
320 $p_email=
$http->post(
"p_email",
"string",
"");
321 $csv_fieldsep=
$http->post(
"csv_fieldsep",
"number");
322 $csv_decimal=
$http->post(
"csv_decimal",
"number");
323 $csv_encoding=
$http->post(
"csv_encoding");
324 $firstday=
$http->post(
"selFirstDay",
"number");
331 $g_user->password_to_session() ;
339 if (
$_POST[
'pass_1'] !== $pass_2) {
340 $msg = _(
"Mot de passe ne correspondent pas");
344 if ( count($a_pass_error[
'msg']) != 0 ) {
345 foreach($a_pass_error[
'msg'] as $pass_error) {
346 $msg.=$pass_error.
"<br/>";
354 $minirap=
$http->post(
"minirap",
"number",
"0");
355 $period=
$http->post(
"period",
"number");
357 $g_user->set_mini_report($minirap);
360 $g_user->save_global_preference(
'LANG', $lang);
361 $g_user->save_global_preference(
'PAGESIZE', $p_size);
362 $g_user->save_global_preference(
'csv_fieldsep', $csv_fieldsep);
363 $g_user->save_global_preference(
'csv_decimal', $csv_decimal);
364 $g_user->save_global_preference(
'csv_encoding', $csv_encoding);
365 $g_user->save_global_preference(
'first_week_day', $firstday);
369 $_SESSION[SESSION_KEY.
'g_pagesize']=$p_size;
370 $_SESSION[SESSION_KEY.
'g_lang']=$lang;
371 $_SESSION[SESSION_KEY.
'csv_fieldsep']=$csv_fieldsep;
372 $_SESSION[SESSION_KEY.
'csv_decimal']=$csv_decimal;
373 $_SESSION[SESSION_KEY.
'csv_encoding']=$csv_encoding;
376 $style=
$repo->get_value(
"select the_filestyle from theme
380 $style =
"style-classic7.css";
span($p_string, $p_extra='')
noalyss_strlentrim($p_string)
echo_warning($p_string)
warns
check_password_strength($password)
returns an double array with the error found and code , if the count is 0 then the password is very s...
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
catch(Exception $e) $exercice
if(isset($_REQUEST['gDossier']) && $http->request("gDossier","number", 0) !=0) $repo
Class rapport Create, view, modify and parse report.
contains the class for connecting to Noalyss
static id()
return the 'gDossier' value after a check
static hidden()
return a string to set gDossier into a FORM
about the accountancy period (usually 1 year starting in January until december) = exercice
Generate the form for the periode Data Members.
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
Data & function about connected users.
For the periode tables parm_periode and jrn_periode.
if(! $cn->exist_table( 'version')) if($g_user->get_access_mode()=='MOBILE') $style_user
if access_mode is MOBILE than force it to mobile.php
json_response($p_answer)
Send header and json object.