Advertisement
sneyzi

Untitled

Jun 4th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. $check = mysqli_query($link, "SELECT * FROM `UVotes` WHERE `username`='".$player."' AND `monitoring`='hotmc'");
  2.  
  3. $milliseconds = time() * 1000 + 86400 * 1000;
  4. $player = strtolower($_POST['nick']);
  5.  
  6. if(mysqli_num_rows($check) > 0) {
  7.  
  8.  
  9. mysqli_query($link,"UPDATE `UVotes` SET `time`='".$milliseconds."', `count`=`count` + 1, `status`=0 WHERE
  10. `username`='".$player."' AND `monitoring`='hotmc'");
  11.  
  12. } else {
  13.  
  14. mysqli_query($link, "INSERT INTO `UVotes` SET `username` = '".$player."', `monitoring`='hotmc', `time`='".$milliseconds."', `count`='1', `status`=0");
  15.  
  16. }
  17.  
  18. $check = mysqli_query($link, "SELECT * FROM `UVotesCommon` WHERE `username`='".$player."'");
  19.  
  20. if(mysqli_num_rows($check) > 0) {
  21.  
  22. mysqli_query($link,"UPDATE `UVotesCommon` SET `votes`=`votes` + 1 WHERE
  23. `username`='".$player."'");
  24.  
  25.  
  26. } else {
  27.  
  28. mysqli_query($link, "INSERT INTO `UVotesCommon` SET `username` = '".$player."', `votes`='1'");
  29.  
  30. }
  31. exit('ok');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement