forked from science-ation/science-ation
Update fundraising dashboard and colourchange overdue thankyous
This commit is contained in:
parent
f4829bfd9e
commit
ebf6c0e79b
@ -122,13 +122,15 @@ $q=mysql_query("SELECT * FROM fundraising_goals WHERE fiscalyear='{$config['FISC
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
<h3><?=i18n("To Do List")?></h3>
|
<h3><?=i18n("To Do List")?></h3>
|
||||||
<h4>Thank You's</h4>
|
<h4><?=i18n("Thank You's")?></h4>
|
||||||
<?
|
<?
|
||||||
$q=mysql_query("SELECT value, thanked, status, users_uid, sponsors_id, datereceived
|
$q=mysql_query("SELECT value, thanked, status, users_uid, sponsors_id, datereceived,
|
||||||
|
DATE_ADD(datereceived, INTERVAL 1 MONTH) < NOW() AS onemonth,
|
||||||
|
DATE_ADD(datereceived, INTERVAL 2 MONTH) < NOW() AS twomonth
|
||||||
FROM fundraising_donations
|
FROM fundraising_donations
|
||||||
WHERE thanked='no' AND status='received'
|
WHERE thanked='no' AND status='received'
|
||||||
AND fiscalyear='{$config['FISCALYEAR']}
|
AND fiscalyear='{$config['FISCALYEAR']}'
|
||||||
ORDER BY datereceived'
|
ORDER BY datereceived
|
||||||
");
|
");
|
||||||
//AND (users.year IS NULL OR users.year='{$config['FISCALYEAR']}')
|
//AND (users.year IS NULL OR users.year='{$config['FISCALYEAR']}')
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
@ -141,15 +143,20 @@ if(mysql_num_rows($q)) {
|
|||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
while($r=mysql_fetch_object($q)) {
|
while($r=mysql_fetch_object($q)) {
|
||||||
|
/*
|
||||||
if($r->users_uid) {
|
if($r->users_uid) {
|
||||||
$dq=mysql_query("SELECT CONCAT(firstname,' ',lastname) AS name FROM users WHERE uid='$r->users_uid' ORDER BY fairyear DESC LIMIT 1");
|
$dq=mysql_query("SELECT CONCAT(firstname,' ',lastname) AS name FROM users WHERE uid='$r->users_uid' ORDER BY fairyear DESC LIMIT 1");
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ($r->sponsors_id) {
|
else if ($r->sponsors_id) {
|
||||||
|
*/
|
||||||
$dq=mysql_query("SELECT organization AS name FROM sponsors WHERE id='$r->sponsors_id'");
|
$dq=mysql_query("SELECT organization AS name FROM sponsors WHERE id='$r->sponsors_id'");
|
||||||
}
|
// }
|
||||||
$dr=mysql_fetch_object($dq);
|
$dr=mysql_fetch_object($dq);
|
||||||
echo "<tr>";
|
if($r->twomonth) $s="style=\"background-color: ".colour_to_percent(0).";\"";
|
||||||
|
else if($r->onemonth) $s="style=\"background-color: ".colour_to_percent(50).";\"";
|
||||||
|
else $s="";
|
||||||
|
|
||||||
|
echo "<tr $s>";
|
||||||
echo " <td>$dr->name</td>";
|
echo " <td>$dr->name</td>";
|
||||||
echo " <td>".format_date($r->datereceived)."</td>";
|
echo " <td>".format_date($r->datereceived)."</td>";
|
||||||
echo " <td style=\"text-align: right;\">".format_money($r->value)."</td>";
|
echo " <td style=\"text-align: right;\">".format_money($r->value)."</td>";
|
||||||
@ -165,7 +172,7 @@ if(mysql_num_rows($q)) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<h4>Appeal Follow-Ups</h4>
|
<h4><?=i18n("Appeal Follow-Ups")?></h4>
|
||||||
<?
|
<?
|
||||||
$q=mysql_query("SELECT * FROM fundraising_campaigns WHERE followupdate>=NOW() ORDER BY followupdate LIMIT 5");
|
$q=mysql_query("SELECT * FROM fundraising_campaigns WHERE followupdate>=NOW() ORDER BY followupdate LIMIT 5");
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user