} else { $ip = $_SERVER['REMOTE_ADDR']; //$ip = rand(0, 1000000); if ($_SERVER['HTTP_REFERER'] == "http://ynotradio.net/addtop11vote.php" || check_ip($ip) == "true") { $count = count($top11picks); for ($i = 0; $i < $count; $i++) { add_top11_plus1($top11picks[$i]); } $firstname = mysql_real_escape_string($_POST['firstname']); $lastname = mysql_real_escape_string($_POST['lastname']); $email = mysql_real_escape_string($_POST['email']); $phone = mysql_real_escape_string($_POST['phone']); $write_in_value = mysql_real_escape_string($_POST['write_in_value']); $contest = $_POST['contest']; $newsletter = $_POST['newsletter']; if ($write_in_value) { write_in($write_in_value); } if ($contest == "yes" && ($email || $phone)) { add_contestant($firstname, $lastname, $email, $phone, $contest, $newsletter); echo "<div class=\"center success\">We have received your entry and song selections, thanks!</div>"; } else { echo "<div class=\"center success\">We have received your song entries, thanks!</div>"; } if ($contest == "no" && $newsletter == 'yes' && ($email || $phone)) { add_contestant($firstname, $lastname, $email, $phone, $contest, $newsletter); } } else { echo "<div class=\"center error\">Our records show that you have already voted this week.\n<br>\nIf you feel this is a mistake, please contact <a href=\"mailto:josh@ynotradio.net?Subject=Top11%20Voting%20Error\">Josh T. Landow.</a></div>"; } }
if ($_SERVER['HTTP_REFERER'] == "http://ynotradio.net/addtop11vote.php" || $_SERVER['HTTP_REFERER'] == "http://www.ynotradio.net/addtop11vote.php" || checkip($ip) == "true") { $count = count($top11picks); for ($i = 0; $i < $count; $i++) { addtop11plus1($top11picks[$i]); } if (!get_magic_quotes_gpc()) { $firstname = addslashes($_POST['firstname']); $lastname = addslashes($_POST['lastname']); $email = addslashes($_POST['email']); $phone = addslashes($_POST['phone']); $write_in = addslashes($_POST['write_in']); } $contest = $_POST['contest']; $newsletter = $_POST['newsletter']; if ($write_in) { write_in($write_in); } if ($contest == "yes" && ($email || $phone)) { addcontestant($firstname, $lastname, $email, $phone, $contest, $newsletter); echo "<center><h3>We have received your entry and song selections, thanks!</h3></center>"; } else { echo "<center><h2>We have received your song entries, thanks!</h2></center>"; } if ($contest == "no" && $newsletter == 'yes' && ($email || $phone)) { addcontestant($firstname, $lastname, $email, $phone, $contest, $newsletter); } } else { echo "<center><h3>Our records show that you have already voted this week.</h3>"; echo "If you feel this is a mistake, please contact <a href=\"mailto:josh@ynotradio.net?Subject=Top11%20Voting%20Error\">Josh T. Landow.</a></center>"; } }