HIT 30


Un seul vote par jour.

"; } else { $newvote=$nbvote+1; $sql = "INSERT INTO votes (id, ip, idmusic, date) VALUES ('','$ip','$idmusic','$quand')"; $insert = mysql_query ($sql); $query = "UPDATE hit30 SET nbvote='$newvote' WHERE id='$idmusic' "; $result = mysql_query($query); echo"Votre vote a bien été enregistré.

"; } } if($action=="contre") { $search_vote = mysql_query("SELECT * FROM votes WHERE ip = '$ip' AND date = '$quand' "); $nb_vote = mysql_num_rows($search_vote); if($nb_vote =="1") { echo"Un seul vote par jour.

"; } else { $result_sql = mysql_query("SELECT * FROM hit30 WHERE id='$idmusic' "); $nbvote = mysql_result($result_sql,0,"nbvote"); if($nbvote =="0") { $sql = "INSERT INTO votes (id, ip, idmusic, date) VALUES ('','$ip','$idmusic','$quand')"; $insert = mysql_query ($sql); echo"Votre vote a bien été enregistré.

"; } else { $newvote=$nbvote-1; $sql = "INSERT INTO votes (id, ip, idmusic, date) VALUES ('','$ip','$idmusic','$quand')"; $insert = mysql_query ($sql); $query = "UPDATE hit30 SET nbvote='$newvote' WHERE id='$idmusic' "; $result = mysql_query($query); echo"Votre vote a bien été enregistré.

"; } } } $hit1=mysql_query("select * from hit30 WHERE place='1' "); $i=1; while($row=mysql_fetch_array($hit1)) { $res1=$row[place1]-$row[place]; if($res1 =="0") { $res=""; } if($res1 > 0) { $res="+$res1"; } if($res1 < 0) { $res="$res1"; } ?>
  -  pour contre

"; } if($res1 > 0) { $res="+$res1"; } if($res1 < 0) { $res="$res1"; } ?>
  -  pour contre

"; } if($res1 > 0) { $res="+$res1"; } if($res1 < 0) { $res="$res1"; } ?>
  -  pour contre



"; } if($res1 > 0) { $res="+$res1"; } if($res1 < 0) { $res="$res1"; } ?>
  -