analyser();
$msg = $messages->table;
// temporaire :
$inst_language = "";
$current_module = "";
require_once("$include_path/templates/common.tpl.php");
require_once("$include_path/templates/index.tpl.php");
if (!$dbh) {
header ("Content-Type: text/html; charset=".$charset);
print $index_header;
print $extra_version;
print "
$__erreur_cnx_base__
" ;
print $msg["cnx_base_err1"]." ./tables/install.php ?
.".$msg["cnx_base_err2"];
print $index_footer;
exit ;
}
// affichage du form de login
if (!isset($demo) || $demo=="") $demo = 0;
header ("Content-Type: text/html; charset=$charset");
if (!isset($login_error) || !$login_error) {
//Est-on déjà authentifié ?
if (checkUser('PhpMyBibli')) {
header("Location: ./main.php");
exit();
}
}
print $index_layout;
if ($demo) {
if (!isset($login_error) || !$login_error) {
$login_form_demo = str_replace("!!erreur!!", " ", $login_form_demo);
print $login_form_demo;
} else {
$login_form_demo = str_replace("!!erreur!!", $login_form_error, $login_form_demo);
print $login_form_demo;
}
} else {
if (!isset($login_error) || !$login_error) {
$login_form = str_replace("!!erreur!!", " ", $login_form);
} else {
$login_form = str_replace("!!erreur!!", $login_form_error, $login_form);
}
if (isset($login_message) && $login_message) {
$login_form = str_replace("!!login_message!!", $login_message, $login_form);
} else {
$login_form = str_replace("!!login_message!!", "", $login_form);
}
print $login_form;
}
print form_focus('login', 'user');
print $index_footer;