Parašė Qrmiz· 2007 Lie. 19 14:07:27
#10
Sukurkite naują panelę ir įdėkite šį kodą:
echo "<table width='100%' valign='top'>
<tr>
<td width='33%'>";
openside("Artimiausi 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,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) {
$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>
<img src='http://www.3deearts.com/demo/images/icons/icon_cake.gif'> <a href='".BASEDIR."profile.php?lookup=$data[user_id]'
onmouseover=\"gpe('text: <b>".$data['user_name']."</b>".$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();
echo "</td>
<td width='33%'>";
openside("Šios dienos info:");
?><html>
<center>
<script type="text/javascript" src="http://day.lt/dienos_info?format=[metai] [menuo_txt_klm_vdid] [diena_nr2] [savaites_txt] [n][metu_diena] 'oji metų diena[n]DIENOS ŠVENTĆ‹: [n][svente][n]HOROSKOPAS: [n][horoskopas][n]"></script></center></html>
<?
closeside();
echo "</td>
<td width='33%'>";
openside("Vardadieniai:");
?><html>
<script type="text/javascript" src="http://day.lt/dienos_vardadieniai"></script><br><br><br><br><br>
</html>
<?
closeside();
echo "</tr>
</table>";
(Šiek tiek pakoregavau tas 3 paneles). Tik kažkodėl neišėjo sulygiuot visų, kad būtų viename aukštyje