I'm trying to get something to work in PayPal Donations 2.0.2, Paypal Donations For vBulletin 3.5.
I've been looking at the php codes from the alldonators.php and created a new php file which I am showing through an iframe.

I want to show all donators from the current month and not as it is doing now, from all months. I'm redoing the php file to get the data from the paypalipn table, because that one inserts a date of transaction which I can use.
What I need is a way to compair the current month with the month that is stored in the payment_date table. The type of the table is varchar instead of datetime and looks like this: 12:00:00 November 25 2006 PST. I managed to bring this date back to the three letters of the month, but I can't figure out how to only show those results that match the current month. Any help is greatly appreciated.
This is the php code that I created now. (There's probably a lot left from the alldonators.php code that isn't needed, but it currently gets half the job done).
PHP Code:
<?
/*======================================================================*\
|| #################################################################### ||
|| # Paypal Donations for vBulletin 3.5 - Version 2.00 # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2005 The Noble Pagan, Inc. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------------------------------------------------------- # ||
|| # This Addon Contributed by DSBoyce8624 # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| # ---------------------------------------------------------------- # ||
|| #################################################################### ||
\*======================================================================*/
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
$month = date("M");
echo "<link href=\"donors.css\" rel=\"stylesheet\" type=\"text/css\">";
echo "<center><table>";
echo "<tr><td colspan=2 align=center><a href=\"forums/alldonors.php\" target=\"_top\">Our Donators</a></td></tr>";
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
// ###### Show All Donors ######
$query = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."donation_paypalipn WHERE userid != '0' AND valid != '0' ORDER BY mc_gross DESC");
$num = $vbulletin->db->num_rows($query);
$pic='';
$i = 1;
$p = 1;
while ($row = $vbulletin->db->fetch_array($query)){
$avatar_row = $vbulletin->db->query_first("SELECT user.showdonor, user.username, user.avatarid, user.avatarrevision, avatar.avatarpath, NOT ISNULL(customavatar.filedata) AS hascustomavatar, customavatar.dateline AS avatardateline
FROM ".TABLE_PREFIX."user AS user
LEFT JOIN ".TABLE_PREFIX."avatar AS avatar ON(avatar.avatarid = user.avatarid)
LEFT JOIN ".TABLE_PREFIX."customavatar AS customavatar ON(customavatar.userid = user.userid)
WHERE user.userid = '".$row['userid']."'");
if ($avatar_row['avatarid']){
$avatarurl = $avatar_row['avatarpath'];
} else {
if ($avatar_row['hascustomavatar']){
if ($vbulletin->options['usefileavatar']){
$avatarurl = $vbulletin->options['avatarurl']."/avatar".$row['userid']."_".$avatar_row['avatarrevision'].".gif";
} else {
$avatarurl = "image.php?".$session['sessionurl']."u=".$row['userid']."&dateline=".$avatar_row['avatardateline'];
}
} else {
$avatarurl = '';
}
}
$userid = $row['userid'];
$avatar = '<img src="'.$avatarurl.'" border="0">';
$username = stripslashes($avatar_row['username']);
$show_as_donor = $avatar_row['showdonor'];
$total = number_format($row['mc_gross'], 2, '.', ',');
$currency = $row['mc_currency'];
$date = date("M", strtotime($row['payment_date']));
echo "<tr><td><font size=\"1\">$username</font></td><td><font size=\"1\">$total $currency $month $date</font></td></tr>";
}
{
echo "</table></center>";
}
/*======================================================================*\
|| #################################################################### ||
|| # alldonors -- Fileversion 2.00 # ||
|| # Date Version Finalized -- 03 July 2005 # ||
|| #################################################################### ||
\*======================================================================*/
?>
This is what it outputs now: