24if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
34if (isset(
$_REQUEST[
'gDossier']) &&
$http->request(
"gDossier",
"number",0) != 0 )
38 $cn =Dossier::connect();
41 $local_pref=
$g_user->get_preference();
55 $style->selected =$_SESSION[SESSION_KEY.
'g_theme'];
62 echo HtmlInput::title_box(
_(
'Préférence'),
'preference_div');
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'");
110 $period =
new Periode(
$cn, $l_user_per);
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();
197 <?=
_(
'Utilisation id TVA ou code')?>
201 $selVATCode=
new ISelect(
'selVATCode');
202 $selVATCode->value=array(
203 [
'label'=>
'numérique',
'value'=>0],
204 [
'label'=>
'Code',
'value'=>1]
206 $selVATCode->selected=
$g_user->get_vat_code_preference();
207 echo $selVATCode->input();
214 <legend><?=
_(
"Format Export CSV")?></legend>
217 if ( $_SESSION[SESSION_KEY.
'csv_fieldsep']==1 && $_SESSION[SESSION_KEY.
'csv_decimal']==1)
219 echo_warning(
_(
"N'utilisez pas le même séparateur pour les champs et les décimales"));
226 <?=
_(
"Séparateur de champs")?>
230 $csv_fieldsep=
new ISelect(
'csv_fieldsep');
231 $csv_fieldsep->value=[
232 [
"label"=>
_(
"Point-virgule"),
"value"=>0],
233 [
"label"=>
_(
"virgule"),
"value"=>1]
235 $csv_fieldsep->selected=$_SESSION[SESSION_KEY.
'csv_fieldsep'];
236 echo $csv_fieldsep->input();
242 <?=
_(
"Séparateur Décimale")?>
246 $csv_decimal=
new ISelect(
'csv_decimal');
247 $csv_decimal->value=[
248 [
"label"=>
_(
"point"),
"value"=>0],
249 [
"label"=>
_(
"virgule"),
"value"=>1]
251 $csv_decimal->selected=$_SESSION[SESSION_KEY.
'csv_decimal'];
252 echo $csv_decimal->input();
262 $csv_encoding=
new ISelect(
'csv_encoding');
263 $csv_encoding->value=[
264 [
"label"=>
_(
"utf8"),
"value"=>
'utf8'],
265 [
"label"=>
_(
"latin1"),
"value"=>
'latin1']
267 $csv_encoding->selected=$_SESSION[SESSION_KEY.
'csv_encoding'];
268 echo $csv_encoding->input();
277 echo
'<fieldset style="margin: 1%">';
278 echo
'<legend>' .
_(
'Langue') .
'</legend>';
279 echo
_(
'Selectionnez votre langue');
280 $aLang = array(array(
_(
'Français'),
'fr_FR.utf8'),
281 array(
_(
'Anglais'),
'en_US.utf8'),
282 array(
_(
'Néerlandais'),
'nl_NL.utf8'),
284 echo
'<select name="lang" id="l">';
285 for (
$i = 0;
$i < count($aLang);
$i++)
288 if ($aLang[
$i][1] == $_SESSION[SESSION_KEY.
'g_lang'])
290 printf(
'<option value="%s" %s>%s</option>', $aLang[
$i][1],
$sel, $aLang[
$i][0]);
296 echo Dossier::hidden();
298 echo
'<p style="text-align:center">';
299 echo HtmlInput::button_close(
'preference_div');
300 echo HtmlInput::submit(
"set_preference",
_(
"Valider"));
315 $lang=
$http->post(
"lang",
"string",
"fr_FR.utf8");
316 $p_size=
$http->post(
"p_size",
"number",50);
317 $pass_1=
$http->post(
"pass_1",
"string",
"");
318 $pass_2=
$http->post(
"pass_2",
"string",
"");
319 $p_email=
$http->post(
"p_email",
"string",
"");
320 $csv_fieldsep=
$http->post(
"csv_fieldsep",
"number");
321 $csv_decimal=
$http->post(
"csv_decimal",
"number");
322 $csv_encoding=
$http->post(
"csv_encoding");
323 $firstday=
$http->post(
"selFirstDay",
"number");
324 $vatCode=
$http->post(
"selVATCode",
"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 $period=
$http->post(
"period",
"number");
358 $g_user->save_global_preference(
'LANG', $lang);
359 $g_user->save_global_preference(
'PAGESIZE', $p_size);
360 $g_user->save_global_preference(
'csv_fieldsep', $csv_fieldsep);
361 $g_user->save_global_preference(
'csv_decimal', $csv_decimal);
362 $g_user->save_global_preference(
'csv_encoding', $csv_encoding);
363 $g_user->save_global_preference(
'first_week_day', $firstday);
364 $g_user->save_global_preference(
'vat_code', $vatCode);
368 $_SESSION[SESSION_KEY.
'g_pagesize']=$p_size;
369 $_SESSION[SESSION_KEY.
'g_lang']=$lang;
370 $_SESSION[SESSION_KEY.
'csv_fieldsep']=$csv_fieldsep;
371 $_SESSION[SESSION_KEY.
'csv_decimal']=$csv_decimal;
372 $_SESSION[SESSION_KEY.
'csv_encoding']=$csv_encoding;
375 $style=
$repo->get_value(
"select the_filestyle from theme
379 $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
global $g_user
if no group available , then stop
catch(Exception $e) $exercice
if(isset($_REQUEST['gDossier']) && $http->request("gDossier","number", 0) !=0) $repo
_("actif, passif,charge,...")
contains the class for connecting to Noalyss
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.
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.