An anonymous, but generous, donor has provided Viperalley with a Valentine One (with optional concealed display) for a
Grand Opening Giveaway. The donor would like to thank everyone for their hard work and participation on the new board.
To be eligible to win, all you have to do is make a single post during the month of February.
Everyone who makes at least one post will automatically be entered.
At the end of the month a SQL will be written to randomly pick a user from those who posted. The query, number of eligible members and the results will be published in the Announcements forum. In the unlikely event the Administrator is chosen, the query will be run again.
The only person ineligible for this prize will be the site Administrator (the person performing the query); all others shall be given an equal chance of winning (
including MOODerators).
Post Whoring will not increase your odds of winning. All you need is a single post to be eligible.
CONTEST CODE
You can see the code running here:
http://www.viperalley.com/contest.php
The following code will be used to pick the winner of next months contest; comments are welcome:
<pre><font class="small">code:</font><hr><?
require ("dbconfig.php");
$query = "SELECT B_PosterId,B_Username FROM w3t_Posts WHERE MONTH(FROM_UNIXTIME(B_Posted))=1";
$sth = $dbh -> do_query($query);
$totalusers = $dbh -> total_rows($sth);
print "<body><font size=\"1\" face=\"MS Sans Serif, Geneva\">";
print "There were " . number_format($totalusers) . " total posts made during January<br>";
$entries=array();
for( $x=0; $x < $totalusers; $x++ ) {
list ($PosterId,$Username) = $dbh -> fetch_array($sth);
// Excluded members are packetjunkie, Administrator and SmokinV10
if ( $PosterId != 2 && $PosterId != 3 && $PosterId != 5) $entries[$PosterId] = $Username;
}
print "The number of members eligable for this drawing is: " . count($entries) . "<br><br>";
print "<font size=\"5\"><b>And the winner is: " . $entries[array_rand( $entries )] . "!</b></font>";
print "</font></body>";
?></pre><hr>