Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][HTML]Tabelka cheaters.php na przemian kolory (jasny, ciemny)
Razor88
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 2.05.2013

Ostrzeżenie: (0%)
-----


Witam. Jak w temacie. Chciałbym zrobić tak by kolumny poziome były na przemian kolorami, ciemniejszy druga kolumna jaśniejsza, trzecia kolumna znowu ciemniejsza itd . Dodatkowo by pionowa kolumna prędkości była na jeszcze inny kolor. Ktoś pomoże ? W linku wstawiłem plik. Pozdrawiam.
plik
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Razor88
post
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 2.05.2013

Ostrzeżenie: (0%)
-----


Dziekuję za pomoc ale nadal nie potrafię tego zrobić. Tabelka z przykładu trochę się różni od mojej w pliku. To ona:
Kod
print("<table width=100%>");

print("<table border=1 width=100% cellspacing=0 cellpadding=2>");
print("<tr align=center><td class=colhead>#</td>
<td class=colhead>Użytkownik</td>
<td class=colhead>Zarejestrowany</td>
<td class=colhead>Torrent</td>
<td class=colhead>Klient</td>
<td class=colhead>Prędko¶ć</td>
<td class=colhead>Wysłał</td>
<td class=colhead>Czas</td>
<td class=colhead>Leechów</td>
<td class=colhead>IP</td>
<td class=colhead>R</td></tr>\n");

$res = mysql_query("SELECT * FROM cheaters ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res))
{
$rrr = mysql_query("SELECT id, username, class, downloaded, uploaded FROM users WHERE id = $arr[userid]");
$aaa = mysql_fetch_assoc($rrr);

$rrr2 = mysql_query("SELECT name, leechers FROM torrents WHERE id = $arr[torrentid]");
$aaa2 = mysql_fetch_assoc($rrr2);

if($aaa["downloaded"] > 0)
{
$ratio = number_format($aaa["uploaded"] / $aaa["downloaded"], 3);
}
else
{
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

$uppd = mksize($arr["upthis"]);


print("<tr><td align=center width=10>$arr[id]</td>");
print("<td align=left><b><a href=userdetails.php?id=$aaa[id]>$aaa[username]</a></b></td>");
print("<td align=center>$arr[added]</td>");
print("<td align=center><u><a href=details.php?id=$arr[torrentid]>$arr[torrentid]</a></u></td>");
print("<td align=center>$arr[client]</td>");
print("<td align=center>$arr[rate]/s</td>");
print("<td align=center>$uppd</td>");
print("<td align=center>$arr[timediff] sec</td>");
print("<td align=center>$aaa2[leechers]</td>");
print("<td align=center>$arr[userip]</td>");
print("<td class=\"tableb\" valign=\"top\" width=10><input type=\"checkbox\" name=\"remove[]\" value=\"" . $arr["id"] . "\"/></td>");
}
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 08:02