Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $vp = $_POST['vp'];
- if(isset($_POST['votetest'])) {
- $vote_last_time = "SELECT vote_time FROM vote_cooldown WHERE account = '" . $_SESSION['username'] . "'";
- if($vote_last_time >= time() - 60 * 60 * 12) {
- $new_time = "UPDATE `vote_cooldown` SET vote_time=now() WHERE account = '" . $_SESSION['username'] . "'";
- $addvp = "UPDATE auth.account SET vp = vp+$vp WHERE account = '" . $_SESSION['username'] . "'";
- } else {
- echo "You can't vote now";
- }
- }else{
- echo "Button have not been clicked";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement