Parašė SeRino· 2011 Bir. 20 15:06:40
#1
Sveiki, noriu paklausti. Turiu tokią panelę ir man reikia padaryti, kadjos turinys lygiuotusi centre
panelės kodas:
openside("pavadinimas");
$siandien = date('Y-m-d', time());
$laimeta = mysql_fetch_array(mysql_query("SELECT laimetojas, laimeta FROM laimetojai2 WHERE data='$siandien' ORDER BY laimeta DESC"));
if ($laimeta[0]){
echo"
<center><a href='".BASEDIR."komanda.php?te_id=$laimeta[0]'><img src='http://nba23.vhost.lt/stats/images/teams_mid/$laimeta[0].png' border='0'></a><br>
<br>";
$tm_info = mysql_query("SELECT * FROM ".DB_PREFIX."teams WHERE te_id='$laimeta[0]'");
while ($q = mysql_fetch_array($tm_info))
{
$te_name = $q['te_name'];
$te_city = $q['te_city'];
$te_id = $q['te_id'];
$te_abbrev = $q['te_abbrev'];
$te_overall = $q['te_overall'];
}
echo "<a href='".BASEDIR."komanda.php?te_id=$te_id'><span style='color:white'>$te_city $te_name</span></a>
<br>
Laimėjo varžybų: <b>$laimeta[1]</b>.<br/>
";
$savget = mysql_query("SELECT * FROM savininkai WHERE komandos_id='".$te_id."'");
$users_name_array = mysql_fetch_array($savget);
$user_name_tm = trim($users_name_array['nick']);
$sav = mysql_query("SELECT * FROM ".DB_PREFIX."users WHERE user_name='$user_name_tm'");
while ($u = mysql_fetch_array($sav))
{
$user_id = $u['user_id'];
$user_aim = $u['user_aim'];
}
$tm_info2 = mysql_query("SELECT * FROM laimetojai WHERE data='$siandien' and laimetojas='$laimeta[0]'");
echo "<table border='0'>
<tr>
</tr>";
$n = 0;
while ($r = mysql_fetch_array($tm_info2))
{
$n++;
$zaidimas = $r['ga_date'];
$bendras = mysql_fetch_array(mysql_query("SELECT ga_home_id, ga_away_id, ga_home_score, ga_away_score, ga_id FROM ".DB_PREFIX."games WHERE ga_date='$zaidimas' ORDER BY ga_date DESC LIMIT 6"));
$home = $bendras[0];
$away = $bendras[1];
$home_pts = $bendras[2];
$away_pts = $bendras[3];
$idasss = $bendras[4];
echo "<tr>
<td><span style='color:white'><center><b>$n</b>.</center></span></td>
<td><center><b><a href='".BASEDIR."komanda.php?te_id=$home'><img src='http://nba23.vhost.lt/stats/tm_numbers/$home.gif' border='0'></a></b></center></td>
<td><center><b><a href='".BASEDIR."rezultatas.php?ga_id=$idasss'><span style='color:white'>$home_pts - $away_pts</span></b></a></center></td>
<td><center><a href='".BASEDIR."komanda.php?te_id=$away'><img src='http://nba23.vhost.lt/stats/tm_numbers/$away.gif' border='0'></a></center></td>
</tr>";
}
echo "</table>";
echo "<br>Savininkas: <a href='".BASEDIR."profile.php?lookup=$user_id'><span style='color:white'>$user_name_tm</span></a> (<a href='skype:$user_aim?chat' class='$user_aim' title='$user_aim'><span style='color:white'>$user_aim</span></a>)
";
}else{
echo "<center><b>.</b></center>";
}
closeside();
Man reikia ne vieną padaryti, kad ji lygiuotusi centre, tai gal pvz parašykite kaip reikia, kad panelė visa lygiuotusi centre.