Parašė ov1x· 2011 Kov. 12 22:03:27
#1
Kaip dėti scriptus į puslapį? Tarkim:
1.
openside("Top Forumo Nariai");
2.
$sql=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY 'user_posts' DESC LIMIT 0, 8");
3.
echo "<table width='auto' cellspacing='0' cellpadding='0'>";
4.
$i=0;
5.
while ($data=dbarray($sql)) {
6.
echo "<tr>
7.
<td align='left'>
8.
<a href='".BASEDIR."profile.php?lookup=".$data ['user_id']."'>";
9.
if(!empty($data['user_avatar']))
10.
{
11.
$avatar="<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$data['user_name']."' width='50' height='50'>";}
12.
else
13.
{
14.
$avatar="<img src='".IMAGES."noavatar.gif' alt='".$data['user_name']."' width='50' height='50'>";}
15.
echo"$avatar</a></td>
16.
<td align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a><br> - ".$data['user_posts']." Pranesimai</td></tr>";
17.
$i++;
18.
}
19.
echo "</table>";
20.
closeside();