";
$dummy.="";
$dummy.="";
$dummy.="";
$dummy.="";
$dummy.="
Patientez...
";
$dummy.="
".$msg[alter_etape].$etape." / ".$nb_etapes."
";
$dummy.="";
$dummy.="";
return $dummy;
}
function form_relance ($maj_suivante="lancement") {
global $msg;
global $current_module;
$dummy="";
//$dummy.="";
return $dummy;
}
function traite_rqt($requete="", $message="") {
global $dbh;
$retour="";
$res = mysql_query($requete, $dbh) ;
$erreur_no = mysql_errno();
if (!$erreur_no) {
$retour = "Successful";
} else {
switch ($erreur_no) {
case "1060":
$retour = "Field already exists, no problem.";
break;
case "1061":
$retour = "Key already exists, no problem.";
break;
case "1091":
$retour = "Object already deleted, no problem.";
break;
default:
$retour = "Error may be fatal : ".mysql_error()."";
break;
}
}
return "".$message." | ".$retour." |
";
}
settype ($action,"string");
/* vérification de l'existence de la table paramètres */
$query = "select count(1) from parametres ";
$req = mysql_query($query, $dbh);
if (!$req) { /* la table parametres n'existe pas... */
$rqt = "CREATE TABLE if not exists parametres (
id_param INT( 6 ) UNSIGNED NOT NULL AUTO_INCREMENT,
type_param VARCHAR( 20 ) ,
sstype_param VARCHAR( 20 ) ,
valeur_param VARCHAR( 255 ) ,
PRIMARY KEY ( id_param ) ,
INDEX ( type_param , sstype_param )
) " ;
$res = mysql_query($rqt, $dbh) ;
}
$query = "select valeur_param from parametres where type_param='pmb' and sstype_param='bdd_version' ";
$req = mysql_query($query, $dbh);
if (mysql_num_rows($req) == 0) { /* la version de la base n'existe pas... */
$rqt = "INSERT INTO parametres (id_param, type_param, sstype_param, valeur_param) VALUES (0, 'pmb', 'bdd_version', 'v1.0')" ;
$res = mysql_query($rqt, $dbh) ;
$query = "select valeur_param from parametres where type_param='pmb' and sstype_param='bdd_version' ";
$req = mysql_query($query, $dbh);
}
$data = mysql_fetch_array($req) ;
$version_pmb_bdd = $data['valeur_param'];
echo "";
echo "
".$msg[1803]."".$version_pmb_bdd."
";
echo "".$msg[pmb_v_db_as_it_should_be]."".$pmb_version_database_as_it_should_be."
";
if ($action=="lancement" || !$action ) $deb_version_pmb_bdd = substr($version_pmb_bdd,0,2) ;
else $deb_version_pmb_bdd = substr($action,0,2) ;
switch ($deb_version_pmb_bdd) {
case "v1":
include ("./alter_v1.inc.php") ;
break ;
case "v2":
include ("./alter_v2.inc.php") ;
break ;
case "v3":
include ("./alter_v3.inc.php") ;
break ;
case "v4" :
include ("./alter_v4.inc.php") ;
break ;
case "v5" :
include ("./alter_v5.inc.php") ;
// ------- LLIUREX 11/02/2013
case "vL" :
include ("./alter_vLlxNemo.inc.php") ;
break ;
// ------- LLIUREX
}
echo "";
print "