|
|
|
|||||||
| Mody gotowe - niesprawdzone Mody gotowe, ale niesprawdzone. |
![]() |
|
|
|
Narzędzia wątku | Wygląd |
|
|
#1 |
|
Administrator
![]() Grupa: Administrator
Dołączył: Jan 2006
Posty: 3,294
Piwa Postawione: 0
Piwa Otrzymane: 256
Punkty Reputacji: 4
Siła Reputacji: 6
|
Dane usera w index.php
[center:6ba37aa157]Dane usera w index.php [/center:6ba37aa157]
Mod pokazujący dane usera w index.php po najechaniu myszką na nick. Screen bittorrent.php w <head> dodaj: Kod:
<script type="text/javascript" src="overlib.js"></script> Kod:
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> w zapytaniu: Kod:
$res = mysql_query("SELECT id, username, class, warned...
Kod:
, avatar, added, uploaded, downloaded, title, seedbonus, gender Kod:
if ($activeusers) $activeusers .= ",\n";
switch ($arr["class"])
{
case UC_SYSOP:
$arr["username"] = "<font color=#0033cc>" . $arr["username"] . "</font>";
case UC_ADMINISTRATOR:
$arr["username"] = "<font color=#33ccff>" . $arr["username"] . "</font>";
case UC_MODERATOR:
$arr["username"] = "<font color=#66ccff>" . $arr["username"] . "</font>";
case UC_UPLOADER:
$arr["username"] = "<font color=#ffff00>" . $arr["username"] . "</font>";
case UC_VIP:
$arr["username"] = "<font color=#ff00cc>" . $arr["username"] . "</font>";
case UC_POWER_USER:
$arr["username"] = "<font color=#00ff00>" . $arr["username"] . "</font>";
case UC_USER:
$arr["username"] = "<font color=#330000>" . $arr["username"] . "</font>";
case UC_LEECHER:
$arr["username"] = "<font color=#ff0000>" . $arr["username"] . "</font>";
break;
Kod:
//// check active torrents ///////////////////////
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . htmlspecialchars($arr["id"]) . " AND seeder='yes'") or print(mysql_error());
$row = mysql_fetch_row($res2);
$activeseed = "$row[0]";
$res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . htmlspecialchars($arr["id"]) . " AND seeder='no'") or print(mysql_error());
$row = mysql_fetch_row($res2);
$activeleech = "$row[0]";
//// end
if ($arr[added] == "0000-00-00 00:00:00")
$joindate = 'N/A';
else
$joindate = "Zarejestrowany: " . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["added"])) . "";
if ($arr["downloaded"] > 0)
{
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
}
else
if ($arr["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";
$uploaded = mksize($arr["uploaded"]);
$downloaded = mksize($arr["downloaded"]);
$username = $arr["username"];
$bonus = "$arr[seedbonus]";
$gender = "$arr[gender]";
if ($gender == 'Male')
$gender = 'Mezczyzna';
else if ($gender == 'Female')
$gender = 'Kobieta';
else
$gender = '---';
if ($arr["avatar"])
$avatarover = $arr["avatar"];
elseif (!$arr["avatar"])
$avatarover = "/pic/default_avatar.gif";
///check connectable////
$res3 = mysql_query("SELECT connectable FROM peers WHERE userid=" . htmlspecialchars($arr["id"]) . " LIMIT 1") or print(mysql_error());
if($row = mysql_fetch_row($res3)){
$connect = $row[0];
if($connect == "yes"){
$connectable = "<font color=green>Tak</font>";
}else{
$connectable = "<font color=red>Nie</a></font>";
}
}else{
$connectable ="<font color=blue><a>---</a></font>";
}
////end
if ($activeusers) $activeusers .= ",\n";
switch ($arr["class"])
{
case UC_SYSOP:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_ADMINISTRATOR:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_MODERATOR:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_UPLOADER:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_VIP:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_POWER_USER:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
case UC_USER:
$arr["username"] = "<a href=userdetails.php?id=" . $arr["id"] . " onmouseover=\"return overlib('<img align=left src=$avatarover height=90 width=60><div align=top><font color=#990033>$arr[title]</font>
$joindate
<font color=green>UP: $uploaded</font>
<font color=darkred>DL: $downloaded</font>
Bonus: <font color=green>$bonus</font>
Plec: <font color=blue>$gender</font>
Dostepny: $connectable</div>', CAPTION, '<font color=#990033>$username</font>
<font color=black>Ratio: $ratio</font> <font color=black> <img src=pic/arrowup.png> <font color=green>$activeseed</font> <img src=pic/arrowdown.png> <font color=darkred>$activeleech</font>');\" onmouseout=\"return nd();\"><font color=#990033>" . htmlspecialchars($arr["username"]) . "</font></a>";
break;
Kod:
<font color=#990033>$username</font> Kod:
<font color=#990033>" . htmlspecialchars($arr["username"]) . "</font> P.S. w załączniku obrazki wrzucamy do folderu pic, i plik overlib.js do głównego katalogu |
|
|
|
|
|
#2 |
|
Zablokowany
![]() Grupa: Banned Users
Dołączył: May 2008
Posty: 10
Piwa Postawione: 0
Piwa Otrzymane: 0
Punkty Reputacji: 0
Siła Reputacji: 0
|
Wywala mi taki błąd
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' avatar, added, uploaded, downloaded, title, enabled, anonymous, donated, hidena' at line 1 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/movietor/public_html/index.php on line 127 |
|
|
|
|
|
#3 |
|
Xtreme User
![]() |
Zdaje mi sie że powinno być zapytanie do tego moda.Ale wątpie bo to wkoncu tylko okienko :-).
Mogłes dodać ze to jest dla tych którzy nadal zostawili tableke aktywni użytkownicy :-P.A ten bład to jest bład w tym co zrobiłeś. Czyli jak tam pisze: index.php w zapytaniu: To po warned dodaj , avatar, added, uploaded, downloaded, title, seedbonus, gender i tam dalej zostaw.Żeby to nie wyglądało w taki sposób $res = mysql_query("SELECT id, username, class, warned, avatar, added, uploaded, downloaded, title, seedbonus, gender.
__________________
![]() |
|
|
|
![]() |
| Narzędzia wątku | |
| Wygląd | |
|
|
Podobne wątki
|
||||
| Wątek | Autor wątku | Forum | Odpowiedzi | Ostatni Post |
| Przewijane ostrzeżenie na index.php | HERKULES | Mody 100% działające | 0 | 14-02-07 18:42 |
| Ocena profilu/usera | HERKULES | Mody 100% działające | 0 | 14-02-07 00:49 |
| Udowodnij a będzie ci dane :P | kamilg13 | Zaproszenia Torrent | 14 | 19-05-06 12:15 |
| Nowy na TM? | Potrzebna Pomoc? |