$header = 'urlID failed. Make sure you copy and paste the link properly. <u>Do not try to tamper with urls.</u>' . $h2; } else { if ($e != make_hash($un . $h)) { $header = 'Earn Hash check FAILED.' . $h2; } else { if ($db->Query("SELECT url FROM earnedurls WHERE url='{$un}' LIMIT 1")) { $header = 'This Credit URL has already been Earned.' . $h2; } else { if (!$db->Query("SELECT status, username, weekadcount, weekadmissed, lastearned, turingkeycount FROM users WHERE affid='{$affid}' LIMIT 1")) { $header = 'user affid not found.' . $h2; } else { list($status, $username, $weekadcount, $weekadmissed, $lastearned, $turingkeycount) = $db->FetchRow(); $rand_num = rand(0, 9); $rand_nums = array(1, 2, 3, 4, 5, 6, 7); // TURING TEST if ($turingkeycount and !turing_key_valid(500) or !turing_key_valid(500) and !in_array($rand_num, $rand_nums, 0) and !$s or $s and !turing_key_valid(500)) { list($v, $keyfilename) = turing_key_create(); $header = ' <form action="http://freeadplanet.com/earnX.php" method="post"> <b>Enter Turing Key: </b><img src="http://freeadplanet.com/keys/' . $keyfilename . '" border="0" /> <input type="text" name="tkey" size="4" /> <input id="submit" type="submit" value="Get Your Credits" /> <input type="hidden" name="v" value="' . $v . '" /> <input type="hidden" name="u" value="' . $u . '" /> <input type="hidden" name="h" value="' . $h . '" /> <input type="hidden" name="e" value="' . $e . '" /> <input type="hidden" name="b" value="' . $b . '" /> <input type="hidden" name="a" value="0" /> <input type="hidden" name="s" value="1" /> </form> ';
if ($type == 0 and $mailcount > 5) { $header = 'You must click/earn other types of ADs (from Members Area) for every 5 Email ADs you view. (Excluding Solo Ads).'; } } if ($e != make_hash($un . $h)) { $header = 'Earn Hash check FAILED.' . $h2; } else { if ($db->Query("SELECT url FROM earnedurls WHERE url='{$un}' LIMIT 1")) { $header = 'This Credit URL has already been Earned.' . $h2; } else { if ($header) { $header = $header; } else { // 5% chance of turing test $rand_hit = in_array(rand(0, 19), array(0), 0); $key_valid = turing_key_valid(180); // TURING TEST if (!$key_valid and ($key_count or $s or $rand_hit and !$s)) { list($v, $keyfilename) = turing_key_create(); $header = ' <form action="http://freeadplanet.com/earn.php" method="post"> <b>Enter Turing Key: </b><img src="http://freeadplanet.com/keys/' . $keyfilename . '" border="0" /> <input type="text" name="tkey" size="4" /> <input id="submit" type="submit" value="Get Your Credits" /> <input type="hidden" name="v" value="' . $v . '" /> <input type="hidden" name="u" value="' . $u . '" /> <input type="hidden" name="h" value="' . $h . '" /> <input type="hidden" name="e" value="' . $e . '" /> <input type="hidden" name="b" value="' . $b . '" /> <input type="hidden" name="a" value="0" /> <input type="hidden" name="s" value="1" />