Parašė bruzgis· 2007 Gru. 14 16:12:09
#1
Bėda tokia:
if ($birthdate == $today) {
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td><img src='".BASEDIR."images/sugimtadieniu.png'><br><br><center>Pramogauk.net kolektyvas sveikina<br>
<img border='0' alt='".$locale['on106']."' title='".$locale['on106']."' src='".BASEDIR."images/avatars/".$userdata['user_avatar']."'><br>
<b>".$data['user_name']."</b><br>su GIMTADIENIU!!!<br></center></td></tr></table>";
}
Esant zmogaus gimtadieniui nevykdo viso sito kas paryskinta
Pateikiu visa panele:
openside("Kas naujo?" );
echo "<br><img src='".BASEDIR."images/gimtadieniai.png'><br><br>";
$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,5"
);
// 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) {
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td><img src='".BASEDIR."images/sugimtadieniu.png'><br><br><center>Pramogauk.net kolektyvas sveikina<br>
<img border='0' alt='".$locale['on106']."' title='".$locale['on106']."' src='".BASEDIR."images/avatars/".$userdata['user_avatar']."'><br>
<b>".$data['user_name']."</b><br>su GIMTADIENIU!!!<br></center></td></tr></table>";
}
echo "<table width='100%' cellpadding='0' cellspacing='0'><tr><td width='55%'>
<a href='".BASEDIR."profile.php?lookup=$data[user_id]'>";
echo "$data[user_name]</a></td><td >".$birthdate."</td></tr>";
}
}
echo "</table>";
echo "<br><br><img src='".BASEDIR."images/vardadieniai.png'><br><br>";
?><html>
<script type="text/javascript" src="http://day.lt/dienos_vardadieniai"></script>
</html>
<?
closeside();
Dekui tam kas pades :)