Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 require_once '../include/constant.php';
00021
00022 include_once ("ac_common.php");
00023 require_once('constant.php');
00024
00025
00026
00027
00028
00029 require_once('class_database.php');
00030
00031
00032 $rep=new Database();
00033
00034 if (defined('MULTI') && MULTI == 0)
00035 $version = $rep->get_value('select val from repo_version');
00036 else
00037 $version = $rep->get_value('select val from version');
00038
00039 if ( isset ($_POST["p_user"] ) )
00040 {
00041 $g_user=sql_string($_POST["p_user"]);
00042 $g_pass=$_POST["p_pass"];
00043 $_SESSION['g_user']=$g_user;
00044 $_SESSION['g_pass']=$g_pass;
00045
00046
00047
00048
00049
00050
00051 if ($version != DBVERSIONREPO)
00052 {
00053 echo alert(_('Version de base de données incorrectes, vous devez mettre à jour'));
00054 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=admin/setup.php\">";
00055 exit();
00056 }
00057 include_once ("class_user.php");
00058 $User=new User($rep);
00059 $User->Check(false,'LOGIN');
00060 if ($g_captcha == true)
00061 {
00062 include("securimage/securimage.php");
00063 $img = new Securimage();
00064 $valid = $img->check($_POST['captcha_code']);
00065 if ( $valid == false )
00066 {
00067 echo alert(_('Code invalide'));
00068 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=index.php\">";
00069 exit();
00070 }
00071 }
00072 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php\">";
00073
00074 }
00075 else
00076 {
00077 $rep=new Database();
00078
00079
00080
00081
00082
00083 if ( $version != DBVERSIONREPO)
00084 {
00085 echo alert(_('Version de base de données incorrectes, vous devez mettre à jour'));
00086 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"1;url=admin/setup.php\">";
00087 exit();
00088
00089 }
00090
00091 include_once ("class_user.php");
00092
00093 $User=new User($rep);
00094 $User->Check();
00095
00096 echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php\">";
00097 }
00098 html_page_stop();
00099 ?>