Je développe un serveur SA:MP et sur mon site j'ai un bouton '' Voter '' pour voter pour notre serveur sur le root top !
Quand je clique dessus, aucun problème (image) https://www.noelshack.com/2018-29-5-153 ... obleme.png
Mais une fois que je clique sur le bouton entouré en rouge avec le fond jaune, cela me met sa.. (image) https://www.noelshack.com/2018-29-5-153 ... bleme2.png
Je met les 10 lignes de header.php et de vote.php en dessous !
Si quelqu'un aurais une solution à mon problème je suis preneur !
header :
<div id="menu_header">
<div class="logo"> </div>
<div class="menu">
<ul>
<li><a href="index.php">Accueil</a></li>
<li><a href="http://localhost/forum" target="_blank">Forum</a></li>
<?php
if(isConnected())
{
echo'<li><a href="index.php?p=vote">Voter</a></li>
<li><a href="index.php?p=shop">Boutique</a></li>';
if(isAdmin())
{echo '<li><a href="index.php?p=admin">Admin</a></li>';}
}
else
{echo'<li><a href="http://www.root-top.com/topsite/gta/details.php?ID=5572">Voter</a></li>';}
echo '<li><a href="samp://'.$samp['ip'].':'.$samp['port'].'">Serveur</a></li>
<li><a href="ts3server://'.$ts3['ip'].':'.$ts3['port'].'">TeamSpeak</a></li>';
?>
</ul>
</div> vote:
<?php
if(isConnected())
{
$req = mysqli_query($bdd,'SELECT * FROM lvrp_users WHERE id = '.$_SESSION['id'].'');
$dStats = mysqli_fetch_array($req);
$succes=0;
$error=0;
$_SESSION['Refresh']=0;
if(!isset($_SESSION['timeVote']))
{$_SESSION['timeVote']=0;}
if(isset($_POST['voter']))
{
$date = time();
$ecartminute = ($date - $dStats['HasVoted1'])/60;
if ($ecartminute > 120)
{
$tokens = $dStats['Tokens'] +1;
$vote = $dStats['Votes'] +1 ;
mysqli_query($bdd,'UPDATE lvrp_users SET Tokens ='.$tokens.', HasVoted1 = '.$date.', Votes = '.$vote.' WHERE id = '.$_SESSION['id'].' ');
echo"
<script type='text/javascript'>
window.location.replace('http://www.root-top.com/topsite/gta/details.php?ID=5572');
</script>";
$_SESSION['timeVote']=0;
}
else
{
$_SESSION['timeVote'] = round(120 - $ecartminute, 0);
$_SESSION['Refresh']=1;
header ('Location: index.php?p=vote');
}
}
?>