|
$date=date('m-d');
/*
$res=sqlexec("select name from auth_users where
DAYOFMONTH(birthday) = DAYOFMONTH(now()) and
MONTH(birthday) = MONTH(now())
");
*/
$res=sqlexec("select distinct name from auth_users where
DAYOFMONTH(birthday) = ".(int)date('d')." and
MONTH(birthday) = ".(int)date('m'));
//$res=sqlexec("select name from auth_users where birthday like '____-$date'");
if (sqlgetnumrows($res)) {
echo ' Happy Birthday to: '; }
while($row=sqlgetrow($res)) {
if (empty($row['name'])) { continue; }
?>
echo $row['name']; ?>
}
Last Seven Days:
$yr=date('Y'); $mn=date('m'); $dy=date('d');
for($i=0; $i<=6; $i++) {
$time=mktime(0,0,0,$mn,$dy-$i,$yr);
$date=substr(date('D',$time),0,2);
echo '';
echo ''.$date.'';
echo '
 | ';
}
?>
|
 |
|
 |