include "0config.php";?>
$victory = $_GET['victoire'];
if(isset($victory)){
$nbre = intval($_GET['nbre']);
$total = $nbre+1;
$sqlt = "UPDATE photo SET victoire = ".$total." WHERE id =".$victory."";
$reqt = mysql_query($sqlt) or die('Erreur SQL !
'.$sqlt.'
'.mysql_error());
}
$cat = rand(1,11);
switch ($cat){
case 1 : $catt= "Citadine";break;
case 2 : $catt = "Berline-Luxe";break;
case 3 : $catt= "Berline";break;
case 4 : $catt= "Break";break;
case 5 : $catt= "Cabriolet";break;
case 6 : $catt= "Coupe";break;
case 7 : $catt= "SUV";break;
case 8 : $catt= "Crossover";break;
case 9 : $catt= "GT";break;
case 10 : $catt= "Compacte";break;
case 11 : $catt= "GT-Cabriolet";break;
case 12 : $catt= "Sportive";break;
default : $catt= "4x4";break;
}
// Modele 1
$sql = "SELECT marque,modele,categorie2,id,url,victoire FROM photo where categorie2='".$catt."' and categorie = 'serie' order by rand() limit 0,1 ";
$req = mysql_query($sql) or die('Erreur SQL !
'.$sql.'
'.mysql_error());
while($data = mysql_fetch_assoc($req))
{
$marque = $data['marque'];
$modele = $data['modele'];
$categorie = $data['categorie2'];
$id = $data['id'];
$url_clash = $data['url'];
$victoire = $data['victoire'];
if($victoire=="") $victoire=0;
$victoire = intval($victoire);
}
// Modele 2
$sql = "SELECT marque,modele,categorie2,id,url, victoire FROM photo where categorie2='".$catt."' and modele !='".$modele."' order by rand() limit 0,1 ";
$req = mysql_query($sql) or die('Erreur SQL !
'.$sql.'
'.mysql_error());
while($data = mysql_fetch_assoc($req))
{
$marque2 = $data['marque'];
$modele2 = $data['modele'];
$categorie2 = $data['categorie2'];
$id2 = $data['id'];
$url2 = $data['url'];
$victoire2 = $data['victoire'];
if($victoire2=="") $victoire2=0;
$victoire2 = intval($victoire2);
}
?>
include "meta/clash.php"; ?>
include "v-head/css-script.php"; ?>
include "stats.php"; ?>