earloflondon wrote:The Keyboard Oracle wrote:The Keyboard Oracle has decided: joeqj.
between joeqj and me there are 13 contestants in the list webwit posted before. damnit cursed 13
btw congrats "joeqj" dude
damnit
The order actually did not matter, since the script did shuffle the list. For you paranoid folks out there, here is the drawing:
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
echo "Deskthority Filco Majestouch give-away!";
// Gets all unique users from giveaway topic with at least 10 posts, except founders:
$sql = 'SELECT distinct(a.poster_id),b.username,b.user_posts FROM phpbb_posts a left join phpbb_users b on a.poster_id = b.user_id WHERE topic_id=281 and b.user_posts >= 10 and a.poster_id <> 2 and a.poster_id <> 54 and a.poster_id <> 64 and a.poster_id <> 87';
$result = $db->sql_query($sql);
$contestants = array();
while ($row = $db->sql_fetchrow($result)) {
$contestants[] = $row['username'];
}
echo "<br />\n<br />\n" . count($contestants) . " contestants: ";
show_contestants($contestants);
for ($i = 5; $i--; my_shuffle($contestants));
$winner = mt_rand(0, count($contestants) - 1);
echo "<br />\nWinner: " . $contestants[$winner] . "<br />\n<br />\nCongratulations!<br />\n";
function show_contestants(&$contestants)
{
echo implode(', ', $contestants) . "<br />\n";
}
function my_shuffle(&$contestants)
{
shuffle($contestants);
echo "<br />\nShuffling... ";
show_contestants($contestants);
}
?>
Besides what you see, we also took a few other steps to insure the winner was valid.
Congratulations joeqj! and thanks to everyone for participating. The next contest won't be far away.
We will be contacting the winner both by PM and E-Mail to ask for their choice of keyboard and confirm shipping address. If we do not receive a reply within 14 days, we will
run the script again ask for the mighty advice of the great keyboard oracle again.