Version: , by Iliana (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 07-30-2001
Last Update: Never
Installs: 0
No support by the author.
Hello!
I want to run a contest on my site and winners would be determined by the # of posts they make. I was wondering if anyone has created a hack that could do this by being able to determine the start and end date of contest and then list the post standings by users. Then having a way to turn this option off when you do not have a contest running on the boards.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
<?
require('./global.php');
?>
<html>
<head>
<!-- put any include Styles in here -->
<!-- This is mine: -->
<? include("/home/theparentclub/www/forums/style.html") ?>
<title>The Parent Club Post Contest</title>
</head>
<body>
<?php
$date1 = "UNIX_TIMESTAMP(\"2001-08-01\")";
$date2 = "UNIX_TIMESTAMP(\"2001-08-31\")";
$users = $DB_site->query(
"SELECT post.userid, count(post.userid) as count, user.username from " .
"post, user WHERE post.dateline >= $date1 and post.dateline <= $date2 " .
"and post.userid = user.userid and user.username <> 'admin' group ".
"by post.userid order by count DESC");
$admin = $DB_site->query(
"SELECT post.userid, count(post.userid) as count, user.username from " .
"post, user WHERE post.dateline >= $date1 and post.dateline <= $date2 " .
"and post.userid = user.userid and user.username = 'admin' group ".
"by post.userid order by count DESC");
?>
<!-- Put your header in here -->
<!-- This is mine -->
<? include("/home/theparentclub/www/forums/menu.html") ?>
<p><a href="./"><img border="0" src="images/bbtitle.gif" width="420" height="85"></a></p>
<p align="center"><b><font face="verdana,arial,helvetica" size="2">The TOP THREE USERS who
posts the most on-topic posts from August 1st, 2001 to Aug 31st 2001 will receive the following: TO BE ANNOUNCED. For
residences in the U.S. and Canada.</font></b></p>
<div align="center">
<table border="1" cellpadding="4" cellspacing="4">
<tr>
<td bgcolor="#9900CC"><b><font face="verdana,arial,helvetica" color="#FFFFFF" size="3">User</font></b></td>
<td bgcolor="#9900CC"><b><font face="verdana,arial,helvetica" size="3"><font
color="#FFFFFF">Posts
from July 8th to Aug 8th</font></font></b></td>
</tr>
<tr>
<td>
<FONT face="verdana,arial,helvetica" size="2">
<br>
<?php
while ($user = $DB_site->fetch_array($users))
{
$username = $user["username"];
echo"$username<br>";
}
echo"<br>";
while ($user = $DB_site->fetch_array($admin))
{
$username = $user["username"];
echo"$username<br>";
}
?>
<br>
</font>
</td>
<td align="center">
<FONT face="verdana,arial,helvetica" size="2">
<br>
<?php
$DB_site->data_seek(0,$users);
while ($user = $DB_site->fetch_array($users))
{
$count = $user["count"];
echo"$count<br>";
}
echo"<br>";
$DB_site->data_seek(0,$admin);
while ($user = $DB_site->fetch_array($admin))
{
$count = $user["count"];
echo"$count<br>";
}
?>
<br>
</font>
</td>
</tr>
</table>
</div>
<p> </p>
<!-- Put any Footer info in here -->
<!-- This Is Mine -->
<?php
include ("/home/theparentclub/www/forums/menu.html");
include("/home/theparentclub/www/forums/meter.html");
?>
</body>
</html>