userid!=1)) { include("$include_path/external_admin_auth.inc.php"); } else { // on checke si l'utilisateur existe et si le mot de passe est OK $query = "SELECT count(1) FROM users WHERE username='$user' AND pwd=password('$password') "; $result = pmb_mysql_query($query, $dbh); $valid_user = pmb_mysql_result($result, 0, 0); } } } else $valid_user=2; if(!$valid_user) { header("Location: index.php?login_error=1"); } else { if ($valid_user==1) startSession('PhpMyBibli', $user, $database); } if(SESSlang) { $lang=SESSlang; $helpdir = $lang; } // localisation (fichier XML) $messages = new XMLlist("$include_path/messages/$lang.xml", 0); $messages->analyser(); $msg = $messages->table; require("$include_path/templates/common.tpl.php"); header ("Content-Type: text/html; charset=$charset"); $sphinx_message = check_sphinx_service(); if (!empty($sphinx_message)) { print ""; } //--------------------------LLIUREX 15/07/2019------------- require_once("$include_path/templates/main.tpl.php"); print $std_header; print ""; print $menu_bar; print $extra; print $main_layout; $bdd_info=Array($pmb_bdd_version,$pmb_version_database_as_it_should_be,$pmb_subversion_database_as_it_shouldbe,$pmb_bdd_subversion); $required_indexation=indexation_required($msg,$bdd_info); if($use_shortcuts) { include("$include_path/shortcuts/circ.sht"); } if ((!$param_licence)||($pmb_bdd_version!=$pmb_version_database_as_it_should_be)||($pmb_subversion_database_as_it_shouldbe!=$pmb_bdd_subversion)) { //--LLIUREX 15/07/2019---- /* require_once("$include_path/templates/main.tpl.php"); print $std_header; print ""; print $menu_bar; print $extra; if($use_shortcuts) { include("$include_path/shortcuts/circ.sht"); } print $main_layout; */ if ($pmb_bdd_version!=$pmb_version_database_as_it_should_be) { $required_indexation=0; //if ($pmb_bdd_version!=$pmb_version_database_as_it_should_be) { echo "

".$msg["pmb_v_db_pas_a_jour"]."

"; echo "

".$msg[1803]."".$pmb_bdd_version."

"; echo "

".$msg['pmb_v_db_as_it_should_be']."".$pmb_version_database_as_it_should_be."

"; echo "".$msg["pmb_v_db_mettre_a_jour"].""; echo ""; } elseif ($pmb_subversion_database_as_it_shouldbe!=$pmb_bdd_subversion) { echo "

Minor changes in database in progress...

"; include("./admin/misc/addon.inc.php"); echo "

Changes applied in database.

"; $required_indexation=-1; } //On est probablement sur une première connexion à PMB //$pmb_indexation_must_be_initialized += 0; if ($required_indexation) { sleep(20); print ""; /* echo "

Indexation in progress...

"; flush(); ob_flush(); include("./admin/misc/setup_initialization.inc.php"); echo "

Indexation applied in database.

"; */ //---------------------FIN LLIUREX 15/07/2019----------------- } if (!$param_licence) { include("$base_path/resume_licence.inc.php"); print $PMB_texte_licence ; } print $main_layout_end; print $footer; pmb_mysql_close($dbh); exit ; } if ($ret_url) { if(strpos($ret_url, 'ajax.php') !== false) { print ""; exit; } //AR - on évite un redirection vers une url absolue... if((strpos($ret_url, 'http://') === false) && (strpos($ret_url, 'https://') === false)) { print ""; exit ; } } //chargement de la première page require_once($include_path."/misc.inc.php"); if ($required_indexation) { print ""; }else{ go_first_tab(); } pmb_mysql_close($dbh);