25require_once
'../include/constant.php';
27require_once NOALYSS_INCLUDE.
'/class/database.class.php';
28require_once NOALYSS_INCLUDE.
'/class/dossier.class.php';
29require_once NOALYSS_INCLUDE.
'/lib/user_common.php';
30require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
31require_once NOALYSS_INCLUDE.
'/lib/function_javascript.php';
32require_once NOALYSS_INCLUDE.
'/constant.security.php';
33require_once NOALYSS_INCLUDE.
'/lib/html_input.class.php';
34require_once NOALYSS_INCLUDE.
'/lib/http_input.class.php';
35require_once NOALYSS_INCLUDE.
'/lib/icon_action.class.php';
38mb_internal_encoding(
"UTF-8");
45if ( ! isset ($_SESSION[SESSION_KEY.
'g_user']))
47 echo
"<h2>"._(
'Vous êtes déconnecté').
"</h2>";
48 $backurl=$_SERVER[
'REQUEST_URI'];
49 $url=
"index.php?".http_build_query(array(
'reconnect'=>1,
'backurl'=>urlencode($backurl)));
64if ( !
$cn->exist_table(
'version')) {
65 echo
'<h2 class="notice">'._(
'Désolé').
'</h2>';
66 echo _(
'Ce dossier est vide');
68 echo
'<a class="button" href="do.php">'._(
"Retour à l'accueil").
'</a>';
75if (
$g_user->get_access_mode()==
'MOBILE') { require NOALYSS_HOME.
"/mobile.php";
return;}
80if ( DEBUGNOALYSS > 1 ) {
95if (strpos(
$browser,
'MSIE 6') !=
false ||
102 <div
style=
'border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
103 <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>
104 <div
style=
'width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
105 <div
style=
'width: 75px; float: left;'><img src=
'http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt=
'Warning!'/></div>
106 <div
style=
'width: 275px; float: left; font-family: Arial, sans-serif;'>
107 <div
style=
'font-size: 14px; font-weight: bold; margin-top: 12px;'>Vous utilisez un navigateur dépassé depuis près de 8 ans!</div>
108 <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>
110 <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>
111 <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>
112 <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>
119if (
$cn->exist_table(
'version') ==
false)
121 echo
'<h2 class="error" style="font-size:12px">' . _(
"Base de donnée invalide") .
'</h2>';
122 $base = dirname($_SERVER[
'REQUEST_URI']);
128 $a = _(
"cliquez ici pour mettre à jour ");
129 $base =NOALYSS_URL.
"/admin-noalyss.php?action=upgrade&sb=application";
131 echo
'<h2 class="error" style="font-size:12px">' .
132 _(
"Attention: la version de base de donnée est supérieure à la version du programme, vous devriez mettre à jour") ,
133 '<a class="text-warning line" hreF="' .
$base .
'">' .
$a .
'</a></h2>',
138 echo
'<h2 class="error" style="font-size:12px">' . _(
"Votre base de données n'est pas à jour") .
' ';
139 $a = _(
"cliquez ici pour appliquer le patch");
140 $base =NOALYSS_URL.
'/admin-noalyss.php?action=upgrade&sb=database';
141 echo
'<a class="text-warning line" href="' .
$base .
'">' .
$a .
'</a></h2>';
152 $periode =
$cn->get_value(
'select p_id from parm_periode order by p_start asc limit 1');
164window.onload=
function ()
181 $file_loginput=fopen($_ENV[
'TMP'].
'/scenario-'.$_SERVER[
'REQUEST_TIME'].
'.php',
'a+');
182 $tmp_ac=explode(
'/',trim(strtoupper(
$_REQUEST[
'ac'])));
183 $last=count($tmp_ac);
185 fwrite ($file_loginput,
"<?php \n");
186 fwrite ($file_loginput,
'//@description:'.$tmp_ac[
$last].
"\n");
187 fwrite($file_loginput,
'$_GET='.var_export(
$_GET,
true));
188 fwrite($file_loginput,
";\n");
189 fwrite($file_loginput,
'$_POST='.var_export(
$_POST,
true));
190 fwrite($file_loginput,
";\n");
191 fwrite($file_loginput,
'$_POST[\'gDossier\']=$gDossierLogInput;');
192 fwrite($file_loginput,
"\n");
193 fwrite($file_loginput,
'$_GET[\'gDossier\']=$gDossierLogInput;');
194 fwrite($file_loginput,
"\n");
195 fwrite($file_loginput,
' $_REQUEST=array_merge($_GET,$_POST);');
196 fwrite($file_loginput,
"\n");
197 fclose($file_loginput);
201 $ac_post = trim(strtoupper(
$http->post(
"ac",
"string",
"")));
202 $ac_get = trim(strtoupper(
$http->get(
"ac",
"string",
"")));
204 $AC=($ac_post ==
"")?$ac_get:$ac_post;
208 $amenu_id=
$cn->get_array(
'select
209 pm_id_v3,pm_id_v2,pm_id_v1
210 from v_menu_profile where code= upper($1) and p_id=$2',
214 if (count($amenu_id) == 0 ) {
219 $direct_ac=
$cn->get_array(
"select me_file,me_parameter,me_javascript from profile_menu
220 join menu_ref using (me_code)
226 if (!empty($direct_ac)) {
227 $aAccess=
$cn->get_array(
"select code, me_code from v_menu_description where me_code=$1 and p_id=$2",
231 if (empty($aAccess)) {
232 throw new Exception(_(
'Erreur menu'),10);
236 $amenu_id=
$cn->get_array(
'select
237 pm_id_v3,pm_id_v2,pm_id_v1
239 where code= upper($1) and p_id=$2',
243 if ( count($amenu_id)> 1) {
252 put_global(array(array(
"key"=>
"ac",
"value"=>$AC)));
253 $module_id=
$cn->get_value(
'select distinct
254 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
258 and upper(code)=upper($2)',
272 }
catch (Exception
$e) {
273 if (
$e->getCode() == 10 ) {
274 alert(_(
'Accès menu impossible'));
275 echo
'<a class="button" href="do.php?'.Dossier::get().
'">';
295 throw new Exception (_(
'Aucun profil utilisateur'));
298 case when pm_id_v3 = 0 then
299 (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end)
301 from v_menu_profile where code= upper($1) and p_id=$2',
310 catch (Exception $exc)
312 echo $exc->getMessage();
complete_default_menu($pa_menu)
Check if there is a default menu for this user and add it.
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.
alert($p_msg, $buffer=false)
alert in javascript
if(! empty( $error)) for($i=0;$i< count($error);$i++)( $last !=$error[$i]) $last
static id()
return the 'gDossier' value after a check
static set_firstDate($firstDate)
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...)
For the periode tables parm_periode and jrn_periode.
if(strpos( $browser, 'MSIE 6') !=false||strpos( $browser, 'MSIE 5') !=false) if($cn->exist_table('version')==false) if(DBVERSION< dossier::get_version( $cn)) if(DBVERSION > dossier::get_version($cn)) $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
if(! isset( $_REQUEST[ 'gDossier'])) if(! isset($_SESSION[SESSION_KEY. 'g_user'])) $cn
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($p_string, $p_time=0)