Parašė marqs· 2009 Spa. 27 20:10:38
#1
Tai va, bandžiau darytis aktyviausių tm ir naujausių rezultatų panelę, bet kažkaip man išėjo negražiai, gal galėtumėt padėti?
Štai kaip atrodo negražiai, noriu, kad būtų graži panel ir visi table stovėtų savo vietose.
Prašau padėkit, jeigu galit, štai kodas:
echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("Aktyviausios komandos");
echo "<b>Namuose:</b><br><br>";
$x = "fusion_rezu_system";
$q = "
select ho_team, count(ho_team) kiek
from {$x }
group by ho_team order by kiek DESC
limit 5";
$i = 0;
$a = mysql_query($q) or die(mysql_error());
while($db = mysql_fetch_array($a)) {
$i++;
$viso = $db[kiekis] + $db[kiek];
$ho_te_gavimas = mysql_query("SELECT * from teams WHERE name='{$db['ho_team']}'");
while ($q = mysql_fetch_array($ho_te_gavimas))
{
$rezu_te_id_ho = $q['id'];
}
echo "{$i}. <a href='http://trn.lt/infusions/stats/komandos.php?id=$rezu_te_id_ho'><img src='http://trn.lt/infusions/stats/teams_small/{$db['ho_team']}.png' border='0'></a> - {$viso} varžybų<br />";
}
echo "<br><br>";
echo "<b>Svečiuose:</b><br><br>";
$x = "fusion_rezu_system";
$q = "
select aw_team, count(aw_team) kiek
from {$x }
group by aw_team order by kiek DESC
limit 5";
$i = 0;
$a = mysql_query($q) or die(mysql_error());
while($db = mysql_fetch_array($a)) {
$i++;
$viso = $db[kiekis] + $db[kiek];
$aw_te_gavimas = mysql_query("SELECT * from teams WHERE name='{$db['aw_team']}'");
while ($q = mysql_fetch_array($aw_te_gavimas))
{
$rezu_te_id_aw = $q['id'];
}
echo "{$i}. <a href='http://trn.lt/infusions/stats/komandos.php?id=$rezu_te_id_aw'><img src='http://trn.lt/infusions/stats/teams_small/{$db['aw_team']}.png' border='0'></a> - {$viso} varžybų<br />";
}
closeside();
echo "</td>
<td width='33%'>";
openside("Naujausi rezultatai");
$rezultatai = mysql_query("SELECT * FROM fusion_rezu_system ORDER BY time DESC LIMIT 6");
echo "<table border='0' width='100%'>";
while ($q = mysql_fetch_array($rezultatai))
{
$ho_team = $q['ho_team'];
$aw_team = $q['aw_team'];
$ho_score = $q['ho_score'];
$aw_score = $q['aw_score'];
$ho_te_gavimas = mysql_query("SELECT * from teams WHERE name='$ho_team'");
while ($q = mysql_fetch_array($ho_te_gavimas))
{
$rezu_te_id_ho = $q['id'];
}
$aw_te_gavimas = mysql_query("SELECT * from teams WHERE name='$aw_team'");
while ($q = mysql_fetch_array($aw_te_gavimas))
{
$rezu_te_id_aw = $q['id'];
}
echo "
<tr><td><center><a href='http://trn.lt/infusions/stats/komandos.php?id=$rezu_te_id_ho'><img src='http://trn.lt/infusions/stats/teams_small/$ho_team.png' border='0'></a></center></td><td><b><center>$ho_score</center></b></td><td><center><b>:</b></center></td><td><b><center>$aw_score</center></b></td><td><center><a href='http://trn.lt/infusions/stats/komandos.php?id=$rezu_te_id_aw'><img src='http://trn.lt/infusions/stats/teams_small/$aw_team.png' border='0'></a></center></td></tr>
";
}
echo "</table>";
closeside();
echo "</tr>
</table>";