Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: budysystem

Parašė Enzo· 2007 Gru. 11 18:12:54
#14

Va:

@openside('Gimtadieniai');
$result=dbquery(
"SELECT user_id, user_name, DATE_FORMAT(user_birthdate, '%d') AS birth_day, EXTRACT(MONTH FROM user_birthdate) AS birth_month ".
"FROM ".$db_prefix."users ".
"WHERE EXTRACT(MONTH FROM user_birthdate)>EXTRACT(MONTH FROM NOW()) OR ".
"(EXTRACT(MONTH FROM user_birthdate)=EXTRACT(MONTH FROM NOW()) AND EXTRACT(DAY FROM user_birthdate)>=EXTRACT(DAY FROM NOW())) ".
"ORDER BY birth_month , birth_day LIMIT 0,7"
);

// Calculate Today's Date
$today = strftime("%b %d");

echo "<table width='100%' cellpadding='0' cellspacing='0'>";
if (dbrows($result) != 0) {
$months = explode("|", $locale['shortmonths']);
while ($data = dbarray($result)) {
$birthdate = $months[$data['birth_month']]." ".$data['birth_day'];
// If It's a Birthday, bold it
if ($birthdate == $today) {
$birthdate = "<span style='font-weight:bold'>Šiandien! - </span><i><a href='messages.php?msg_send=".$data['user_id']."'><font color=brown><b>sveikinti?</b></color></a></i></span>";
}
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td>
<a href='".BASEDIR."profile.php?lookup=$data[user_id]'
onmouseover=\"gpe('text: <b>".$data['user_name']."</b><hr>".$locale['XXX_004'].": ".$data['user_location']."<br><br> ".$data['user_msn'].";')\">";

echo "$data[user_name]</a></td><td class='small2' align='right'>".$birthdate."</td></tr>";
}
}
echo "</table>";
closeside();



Redagavo Enzo· 2007 Gru. 11 18:12:04