1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| <script type="text/javascript">
var t = <?php echo AD_TIMER ?>;
var decr = 1;
var handle = null;
var e = null;
function startTimer() {
if(!e)
e = document.getElementById("time");
e.innerHTML = t;
handle = setInterval(function() {
if(t == 0) {
clearInterval(handle);
var a = Math.ceil(Math.random() * 10);
var b = Math.ceil(Math.random() * 10);
var c = a + b;
function DrawBotBoot()
{
document.write("What is "+ a + " + " + b +"? ");
document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
document.write("<input id='Button1' type='button' value='Check' onclick='alert(ValidBotBoot());'/>");
}
function ValidBotBoot(){
var d = document.getElementById('BotBootInput').value;
if (d == c) {
alert("Your Account Has Been Credited!")
window.location = "visit.php?ad=<?php echo $ad_id; ?>&code=<?php echo $mycode;?>&url=<?php echo $ad_row['url']; ?>";
window.opener.location.reload();
}
else{
alert("Your Account Has NOT Been Credited!")
}
}
DrawBotBoot()
}
else {
t -= decr;
e.innerHTML = t;
}
}, decr * 1000);
}
window.onload = startTimer;
</script> |
Partager