Top Голосующих в L2top
Есть у кого-то скрипт для L2top , записывающий n человек , которые больше всего раз голосовали?Очень нужно.
Если вы не поняли про что я, то вот пример того , что должен выводить скрипт:
Статистика голосовавших;
1)Lexa - 11 голосов
2)Roma - 9 голосов
3) CaIIIa - 8 голосов
4) IIet9 - 7 голосов
5) Nick - 4 голоса.
Вот типа такого.
Спасибо тем , кто выложит:)
— ы
да скриптик дейстивтельно интересный
есть у грозы но он жмот и вообще редиско)
если у каво есть выложите пожалуйста спасибку тыкну
— Perpetuum Mobile
Кто ответит тому мы все дадим Спасибки! ![]()
// Dj StaL' - Кто будет продолжать флудить, тот отправится в бан на 10 суток. Обещаю!
— Оо
Желательно что бы отображалось по 10 ников голосовавших.
У кого есть скрипт , мне в пм , договоримся.
— ы
mgelon: а под какой веб надо?
Хотя бы намек, а там переделаем)
На Форуме я тоже Radar!
Я везде Radar!
<style type="text/css">
<!--
.style3 {font-size: 12px}
body,td,th {
color: #0066FF;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #0066FF;
text-decoration: none;
}
a:visited {
color: #0066FF;
text-decoration: none;
}
body {
background-color: #000000;
}
.style4 {font-size: 14px}
-->
</style>
<table width="100%" border="0">
<tr>
<th align="center" valign="middle" bgcolor="#4A567C" scope="col"><div align="left"><img src="l2j-logo.jpg" width="290" height="64">
<?php include ("mysql_online.php"); ?>
</div></th>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td width="17%" align="left" valign="top"><?php include ("menu.php"); ?>
<td width="65%" valign="top">
<table width="100%" height="100%" border="0">
<tr>
<td height="20"><?php
$L2JBS_config["mysql_host"]=";
$L2JBS_config["mysql_port"]=3306;
$L2JBS_config["mysql_db"]="l2jdb";
$L2JBS_config["mysql_login"]="root";
$L2JBS_config["mysql_password"]="";
$L2JBS_config["telnet_enable"]=true;
$L2JBS_config["telnet_host"]="";
$L2JBS_config["telnet_port"]=12345;
$L2JBS_config["telnet_password"]="";
$L2JBS_config["language"]="ru";
$L2JBS_config["javascript_sort_method"]="bubble";
$L2JBS_config["allowban_access_level"]=200;
$L2JBS_config["javalogfile"]="F:\Documents and Settings\Administrator\Desktop\Сервер Ла2\C4\gameserverx10\log\java0.log.0";
print "<title>".$L2JBS_lang['online_title']."</title>\n";
$link = mysql_connect($L2JBS_config['mysql_host'].":".$L2JBS_config['mysql_port'], $L2JBS_config['mysql_login'], $L2JBS_config['mysql_password']);
if (!$link)
die("не коннектит сцуко");
@mysql_select_db($L2JBS_config['mysql_db'])
or die ("Couldn't open '".$L2JBS_config['mysql_db']."': ".mysql_error());
switch ($L2JBS_config["language"])
{
case "ru": include("lang_ru.php"); break;
default: include("lang_en.php");
}
switch ($L2JBS_config["javascript_sort_method"])
{
case "quick": print "<script type=\"text/javascript\" src=\"sort_quick.js\"></script>\n"; break;
default: print "<script type=\"text/javascript\" src=\"sort_bubble.js\"></script>\n";
}
print "<title>".$L2JBS_lang['online_title']."</title>\n";
print "<title>".$L2JBS_lang["clantop_title"]."</title>\n";
?>
</head>
<body onload="document.getElementById('TblBdy').lastColumn=2">
<?php
$result = mysql_query("SELECT l2top.*,nick,cavg FROM l2top INNER JOIN characters ON l2top.nick=characters.char_name LEFT JOIN (SELECT id, SUM(level) AS csum, count(level) AS ccount, AVG(level) AS cavg FROM characters WHERE clanid GROUP BY clanid) DESC, csum DESC", $link)
or die ("Error: ".mysql_error());
print '<table>
<caption>'.$L2JBS_lang["clantop_title"].'</caption>
<thead>
<tr style="vertical-align: bottom;">
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 0, false);">'.$L2JBS_lang["clantop_clanname"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 1, false);">'.$L2JBS_lang["clantop_clanleader"].'</a></th>
<th class="sortedColumn"><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 2, true);">'.$L2JBS_lang["clantop_clanlevel"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 3, false);">'.$L2JBS_lang["clantop_castle"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 4, true);">'.$L2JBS_lang["clantop_sumlevels"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 5, true);">'.$L2JBS_lang["clantop_nummembers"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 6, true);">'.$L2JBS_lang["clantop_avglevel"].'</a></th>
</tr>
</thead>
<tfoot>
<tr><td colspan="7" style="text-align: right;">'.$L2JBS_lang["clantop_total"].': '.mysql_num_rows($result).'</td></tr>
</tfoot>
<tbody id="TblBdy">
';
$i=1;
while ($row=mysql_fetch_array($result))
{
switch ($row["hasCastle"])
{
case 1: $row["hasCastle"]=$L2JBS_lang["clantop_gludiocastle"]; break;
case 2: $row["hasCastle"]=$L2JBS_lang["clantop_dioncastle"]; break;
case 3: $row["hasCastle"]=$L2JBS_lang["clantop_girancastle"]; break;
case 4: $row["hasCastle"]=$L2JBS_lang["clantop_orencastle"]; break;
case 5: $row["hasCastle"]=$L2JBS_lang["clantop_adencastle"]; break;
case 6: $row["hasCastle"]=$L2JBS_lang["clantop_innadrilcastle"]; break;
default: $row["hasCastle"]=$L2JBS_lang["clantop_nocastle"];
}
print "<tr". (($i++ % 2) ? "" : " class=\"alternateRow\"") ."><td><a href=\"clanview10.php?clan_name=". $row["clan_name"]."\">". htmlspecialchars($row["clan_name"]). "</a></td><td>". $row["char_name"]. "</td><td class=\"numeric sortedColumn\">".$row["clan_level"]. "</td><td>".$row["hasCastle"]. "</td><td class=\"numeric\">".$row["csum"]. "</td><td class=\"numeric\">".$row["ccount"]. "</td><td class=\"numeric\">".$row["cavg"]. "</td></tr>\n";
}
print "</tbody>\n</table>\n";
mysql_close($link);
?>
</body></td>
</tr>
</table></td>
<td width="18%" align="left" valign="top"><?php include ("status.php"); ?>
вот что то сделал потестете только под себя настройте чтобы показывал персов
mgelon: <style type="text/css">
<!--
.style3 {font-size: 12px}
body,td,th {
color: #0066FF;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #0066FF;
text-decoration: none;
}
a:visited {
color: #0066FF;
text-decoration: none;
}
body {
background-color: #000000;
}
.style4 {font-size: 14px}
-->
</style>
<table width="100%" border="0">
<tr>
<th align="center" valign="middle" bgcolor="#4A567C" scope="col"><div align="left"><img src="l2j-logo.jpg" width="290" height="64">
<?php include ("mysql_online.php"); ?>
</div></th>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td width="17%" align="left" valign="top"><?php include ("menu.php"); ?>
<td width="65%" valign="top">
<table width="100%" height="100%" border="0">
<tr>
<td height="20"><?php
$L2JBS_config["mysql_host"]=";
$L2JBS_config["mysql_port"]=3306;
$L2JBS_config["mysql_db"]="l2jdb";
$L2JBS_config["mysql_login"]="root";
$L2JBS_config["mysql_password"]="";
$L2JBS_config["telnet_enable"]=true;
$L2JBS_config["telnet_host"]="";
$L2JBS_config["telnet_port"]=12345;
$L2JBS_config["telnet_password"]="";
$L2JBS_config["language"]="ru";
$L2JBS_config["javascript_sort_method"]="bubble";
$L2JBS_config["allowban_access_level"]=200;
$L2JBS_config["javalogfile"]="F:\Documents and Settings\Administrator\Desktop\Сервер Ла2\C4\gameserverx10\log\java0.log.0";
print "<title>".$L2JBS_lang['online_title']."</title>\n";
$link = mysql_connect($L2JBS_config['mysql_host'].":".$L2JBS_config['mysql_port'], $L2JBS_config['mysql_login'], $L2JBS_config['mysql_password']);
if (!$link)
die("не коннектит сцуко");
@mysql_select_db($L2JBS_config['mysql_db'])
or die ("Couldn't open '".$L2JBS_config['mysql_db']."': ".mysql_error());
switch ($L2JBS_config["language"])
{
case "ru": include("lang_ru.php"); break;
default: include("lang_en.php");
}
switch ($L2JBS_config["javascript_sort_method"])
{
case "quick": print "<script type=\"text/javascript\" src=\"sort_quick.js\"></script>\n"; break;
default: print "<script type=\"text/javascript\" src=\"sort_bubble.js\"></script>\n";
}
print "<title>".$L2JBS_lang['online_title']."</title>\n";
print "<title>".$L2JBS_lang["clantop_title"]."</title>\n";
?>
</head>
<body onload="document.getElementById('TblBdy').lastColumn=2">
<?php
$result = mysql_query("SELECT l2top.*,nick,cavg FROM l2top INNER JOIN characters ON l2top.nick=characters.char_name LEFT JOIN (SELECT id, SUM(level) AS csum, count(level) AS ccount, AVG(level) AS cavg FROM characters WHERE clanid GROUP BY clanid) DESC, csum DESC", $link)
or die ("Error: ".mysql_error());
print '<table>
<caption>'.$L2JBS_lang["clantop_title"].'</caption>
<thead>
<tr style="vertical-align: bottom;">
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 0, false);">'.$L2JBS_lang["clantop_clanname"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 1, false);">'.$L2JBS_lang["clantop_clanleader"].'</a></th>
<th class="sortedColumn"><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 2, true);">'.$L2JBS_lang["clantop_clanlevel"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 3, false);">'.$L2JBS_lang["clantop_castle"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 4, true);">'.$L2JBS_lang["clantop_sumlevels"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 5, true);">'.$L2JBS_lang["clantop_nummembers"].'</a></th>
<th><a href="" onclick="this.blur(); return sortTable(\'TblBdy\', 6, true);">'.$L2JBS_lang["clantop_avglevel"].'</a></th>
</tr>
</thead>
<tfoot>
<tr><td colspan="7" style="text-align: right;">'.$L2JBS_lang["clantop_total"].': '.mysql_num_rows($result).'</td></tr>
</tfoot>
<tbody id="TblBdy">
';
$i=1;
while ($row=mysql_fetch_array($result))
{
switch ($row["hasCastle"])
{
case 1: $row["hasCastle"]=$L2JBS_lang["clantop_gludiocastle"]; break;
case 2: $row["hasCastle"]=$L2JBS_lang["clantop_dioncastle"]; break;
case 3: $row["hasCastle"]=$L2JBS_lang["clantop_girancastle"]; break;
case 4: $row["hasCastle"]=$L2JBS_lang["clantop_orencastle"]; break;
case 5: $row["hasCastle"]=$L2JBS_lang["clantop_adencastle"]; break;
case 6: $row["hasCastle"]=$L2JBS_lang["clantop_innadrilcastle"]; break;
default: $row["hasCastle"]=$L2JBS_lang["clantop_nocastle"];
}
print "<tr". (($i++ % 2) ? "" : " class=\"alternateRow\"") ."><td><a href=\"clanview10.php?clan_name=". $row["clan_name"]."\">". htmlspecialchars($row["clan_name"]). "</a></td><td>". $row["char_name"]. "</td><td class=\"numeric sortedColumn\">".$row["clan_level"]. "</td><td>".$row["hasCastle"]. "</td><td class=\"numeric\">".$row["csum"]. "</td><td class=\"numeric\">".$row["ccount"]. "</td><td class=\"numeric\">".$row["cavg"]. "</td></tr>\n";
}
print "</tbody>\n</table>\n";
mysql_close($link);
?>
</body></td>
</tr>
</table></td>
<td width="18%" align="left" valign="top"><?php include ("status.php"); ?>
вот что то сделал потестете только под себя настройте чтобы показывал персов
Это юмор?
— ы



![-=[BloodKill]=-](/uploads/fotos/av-39301.jpg)

