This should now work at least for sql contacts

This commit is contained in:
Miles Lott 2001-04-08 07:25:31 +00:00
parent cf77700087
commit 91c2b49c5d

View File

@ -38,26 +38,28 @@
$phpgw->common->show_date(time(),"m"), $phpgw->common->show_date(time(),"m"),
$phpgw->common->show_date(time(),"d"), $phpgw->common->show_date(time(),"d"),
$phpgw->common->show_date(time(),"Y")),"n/d" ); $phpgw->common->show_date(time(),"Y")),"n/d" );
//echo $today."\n";
$bdays = $c->read(0,15,'',$today,'access=public,tid=n','','',$phpgw_info["user"]["account_id"]); $bdays = $c->read(0,15,$qfields,$today,'tid=n','','',$phpgw_info["user"]["account_id"]);
for($i=0;$i<count($bdays);$i++) while(list($key,$val) = @each($bdays))
{ {
echo "<tr><td>" . lang("Today is x's birthday!", $bdays[$i]["n_given"] . " " $tmp = $val["n_given"] . " " . $val["n_family"];
. $bdays[$i]["n_family"]) . "</td></tr>\n"; echo "<tr><td>" . lang("Today is x's birthday!", $tmp) . "</td></tr>\n";
} }
$tomorrow = $phpgw->common->show_date(mktime(0,0,0, $tomorrow = $phpgw->common->show_date(mktime(0,0,0,
$phpgw->common->show_date(time(),"m"), $phpgw->common->show_date(time(),"m"),
$phpgw->common->show_date(time(),"d")+1, $phpgw->common->show_date(time(),"d")+1,
$phpgw->common->show_date(time(),"Y")),"n/d" ); $phpgw->common->show_date(time(),"Y")),"n/d" );
//echo $tomorrow."\n";
$bdays = $c->read(0,15,'',$tomorrow,'access=public,tid=n','','',$phpgw_info["user"]["account_id"]); $bdays = $c->read(0,15,$qfields,$tomorrow,'tid=n','','',$phpgw_info["user"]["account_id"]);
for($i=0;$i<count($bdays);$i++) while(list($key,$val) = @each($bdays))
{ {
echo "<tr><td>" . lang("Tomorrow is x's birthday.", $bdays[$i]["n_given"] . " " $tmp = $val["n_given"] . " " . $val["n_family"];
. $bdays[$i]["n_family"]) . "</td></tr>\n"; echo "<tr><td>" . lang("Tomorrow is x's birthday.", $tmp) . "</td></tr>\n";
} }
echo "\n<!-- Birthday info -->\n"; echo "\n<!-- Birthday info -->\n";
} }