25require_once
'../include/constant.php';
26require_once NOALYSS_INCLUDE.
'/constant.security.php';
27require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
31require_once NOALYSS_INCLUDE.
'/class/database.class.php';
32require_once NOALYSS_INCLUDE.
'/class/dossier.class.php';
33require_once NOALYSS_INCLUDE.
'/lib/user_common.php';
34require_once NOALYSS_INCLUDE.
'/lib/function_javascript.php';
35require_once NOALYSS_INCLUDE.
'/lib/html_input.class.php';
36require_once NOALYSS_INCLUDE.
'/lib/http_input.class.php';
37require_once NOALYSS_INCLUDE.
'/lib/icon_action.class.php';
40mb_internal_encoding(
"UTF-8");
47if ( ! isset ($_SESSION[SESSION_KEY.
'g_user']))
49 echo
"<h2>"._(
'Vous êtes déconnecté').
"</h2>";
50 $backurl=$_SERVER[
'REQUEST_URI'];
51 $url=
"index.php?".http_build_query(array(
'reconnect'=>1,
'backurl'=>urlencode($backurl)));
56$cn = Dossier::connect();
68if ( !
$cn->exist_table(
'version')) {
69 echo
'<h2 class="notice">'._(
'Désolé').
'</h2>';
70 echo
_(
'Ce dossier est vide');
72 echo
'<a class="button" href="do.php">'._(
"Retour à l'accueil").
'</a>';
80if (
$g_user->get_access_mode()==
'MOBILE') { require NOALYSS_HOME.
"/mobile.php";
return;}
89if ( DEBUGNOALYSS > 1 ) {
100if ( !
$g_user->is_double_identified()) {
101 echo
"<h2>"._(
'Vous êtes déconnecté').
"</h2>";
102 $backurl=$_SERVER[
'REQUEST_URI'];
103 $url=
"index.php?".http_build_query(array(
'reconnect'=>1,
'backurl'=>urlencode($backurl)));
107$g_user->check_dossier(Dossier::id());
111if (strpos(
$browser,
'MSIE 6') !=
false ||
112 strpos(
$browser,
'MSIE 5') !=
false)
118 <div
style=
'border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
119 <div
style=
'position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href=
'#' onclick=
'javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style=
'border: none;' alt=
'Close this notice'/></a></div>
120 <div
style=
'width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
121 <div
style=
'width: 75px; float: left;'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt=
'Warning!'/></div>
122 <div
style=
'width: 275px; float: left; font-family: Arial, sans-serif;'>
123 <div
style=
'font-size: 14px; font-weight: bold; margin-top: 12px;'>Vous utilisez un navigateur dépassé depuis près de 8 ans!</div>
124 <div
style=
'font-size: 12px; margin-top: 6px; line-height: 12px;'>Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.</div>
126 <div
style=
'width: 75px; float: left;'><a href=
'http://fr.www.mozilla.com/fr/' target=
'_blank'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style=
'border: none;' alt=
'Get Firefox 3.5'/></a></div>
127 <div
style=
'width: 73px; float: left;'><a href=
'http://www.apple.com/fr/safari/download/' target=
'_blank'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style=
'border: none;' alt=
'Get Safari 4'/></a></div>
128 <div
style=
'float: left;'><a href=
'http://www.google.com/chrome?hl=fr' target=
'_blank'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style=
'border: none;' alt=
'Get Google Chrome'/></a></div>
135if (
$cn->exist_table(
'version') ==
false)
137 echo
'<h2 class="error" style="font-size:12px">' .
_(
"Base de donnée invalide") .
'</h2>';
138 $base = dirname($_SERVER[
'REQUEST_URI']);
144 $a =
_(
"cliquez ici pour mettre à jour ");
145 $base =NOALYSS_URL.
"/admin-noalyss.php?action=upgrade&sb=application";
147 echo
'<h2 class="error" style="font-size:12px">' .
148 _(
"Attention: la version de base de donnée est supérieure à la version du programme, vous devriez mettre à jour") ,
149 '<a class="text-warning line" hreF="' .
$base .
'">' .
$a .
'</a></h2>',
154 echo
'<h2 class="error" style="font-size:12px">' .
_(
"Votre base de données n'est pas à jour") .
' ';
155 $a =
_(
"cliquez ici pour appliquer le patch");
156 $base =NOALYSS_URL.
'/admin-noalyss.php?action=upgrade&sb=database';
157 echo
'<a class="text-warning line" href="' .
$base .
'">' .
$a .
'</a></h2>';
168 $periode =
$cn->get_value(
'select p_id from parm_periode order by p_start asc limit 1');
180window.onload=
function ()
199 $file_loginput=fopen($_ENV[
'TMP'].
'/scenario-'.$_SERVER[
'REQUEST_TIME'].
'.php',
'a+');
200 $tmp_ac=explode(
'/',trim(strtoupper(
$_REQUEST[
'ac'])));
201 $last=count($tmp_ac);
203 fwrite ($file_loginput,
"<?php \n");
204 fwrite ($file_loginput,
'//@description:'.$tmp_ac[
$last].
"\n");
205 fwrite($file_loginput,
'$_GET='.var_export(
$_GET,
true));
206 fwrite($file_loginput,
";\n");
207 fwrite($file_loginput,
'$_POST='.var_export(
$_POST,
true));
208 fwrite($file_loginput,
";\n");
209 fwrite($file_loginput,
'$_POST[\'gDossier\']=$gDossierLogInput;');
210 fwrite($file_loginput,
"\n");
211 fwrite($file_loginput,
'$_GET[\'gDossier\']=$gDossierLogInput;');
212 fwrite($file_loginput,
"\n");
213 fwrite($file_loginput,
' $_REQUEST=array_merge($_GET,$_POST);');
214 fwrite($file_loginput,
"\n");
215 fclose($file_loginput);
219 $ac_post = trim(strtoupper(
$http->post(
"ac",
"string",
"")));
220 $ac_get = trim(strtoupper(
$http->get(
"ac",
"string",
"")));
222 $AC=($ac_post ==
"")?$ac_get:$ac_post;
226 $amenu_id=
$cn->get_array(
'select
227 pm_id_v3,pm_id_v2,pm_id_v1
228 from v_menu_profile where code= upper($1) and p_id=$2',
232 if (count($amenu_id) == 0 ) {
237 $direct_ac=
$cn->get_array(
"select me_file,me_parameter,me_javascript from profile_menu
238 join menu_ref using (me_code)
244 if (!empty($direct_ac)) {
245 $aAccess=
$cn->get_array(
"select code, me_code from v_menu_description where me_code=$1 and p_id=$2",
249 if (empty($aAccess)) {
250 throw new Exception(
_(
'Erreur menu'),10);
254 $amenu_id=
$cn->get_array(
'select
255 pm_id_v3,pm_id_v2,pm_id_v1
257 where code= upper($1) and p_id=$2',
261 if ( count($amenu_id)> 1) {
270 put_global(array(array(
"key"=>
"ac",
"value"=>$AC)));
271 $module_id=
$cn->get_value(
'select distinct
272 case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end
276 and upper(code)=upper($2)',
291 }
catch (Exception
$e) {
292 if (
$e->getCode() == 10 ) {
293 alert(
_(
'Accès menu impossible'));
294 echo
'<a class="button" href="do.php?'.Dossier::get().
'">';
314 throw new Exception (
_(
'Aucun profil utilisateur'));
317 case when pm_id_v3 = 0 then
318 (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end)
320 from v_menu_profile where code= upper($1) and p_id=$2',
329 catch (Exception $exc)
331 echo $exc->getMessage();
complete_default_menu($pa_menu)
Check if there is a default menu for this user and add it.
MaintenanceMode($p_file)
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message ...
put_global($array)
Put in superglobal (get,post,request) the value contained in the parameter field (me_parameter)
html_page_start($p_theme="", $p_script="", $p_script2="")
Default page header for each page.
rebuild_access_code($pan_code)
rebuild the access code
show_module($selected)
Show the modules.
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
show_menu($module)
show the module
alert($p_msg, $buffer=false)
alert in javascript
global $g_user
if no group available , then stop
if(! empty( $error)) for($i=0;$i< count($error);$i++)( $last !=$error[$i]) $last
_("actif, passif,charge,...")
static set_firstDate($firstDate)
static echo_var($n_level, $msg, $print=true)
Display the value of a var if DEBUGNOALYSS is greater than $n_level, the debugging info has a certain...
static display_global()
for development , show GLOBAL and SESSION
static display_request()
for development , show request (POST, GET)
static display_size()
display a bar depending of the size of the screen , it helps for CSS to see the media-size
Class to manage the company parameter (address, name...)
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
if($oPeriode->load()==-1) $module_selected
for($e=0; $e< count($afiche); $e++) exit
load_all_script()
load all the javascript only one time
redirect_header($p_string)
redirect with header,
redirect( $p_string, $p_time=0)
redirect with javascript