- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
while($row = mysql_fetch_array($res))
{
$titlelabel = $row['titlelabel'];
if($titlelabel == '')
{
$lol = titles();
$titlelabel = @$lol[$row['title']];
}
if($row['title'] == 79) $titlelabel = "Pont-L'Eveque";
if($num == 1) $text = ' style="color:#ffd700"'; else $text = '';
$query = mysql_query("SELECT color FROM users WHERE login='" . $row['name'] . "'");
$answer = mysql_fetch_row($query);
if($answer[0] != '') $color = ' style="color:#' . $answer[0] . '"';
else $color = '';
$query2 = mysql_query("SELECT avatar FROM users WHERE login='" . $row['name'] . "'");
$answer2 = mysql_fetch_row($query2);
$qname = '"' . $row['name'] . '"';
if($answer2[0] != '') $ava = "<img id='" . $row['name'] . "' src='" . $answer2[0] . "' width='18' height='18' onclick='showbig(" . $qname . ")' onmouseout='showsmall(" . $qname . ")' /> "; else $ava = '';
$currentname = $row['name'];
$query3 = mysql_query("SELECT banend FROM users WHERE login='$currentname'");
$answer3 = mysql_fetch_row($query3);
$currenttime = time();
if($answer3[0] == '' || $answer3[0] < $currenttime) $ban = '';
else if($answer3[0] > $currenttime)
{
$seconds = $answer3[0] - $currenttime;
$hours = ($seconds / 60) / 60;
$hours = (int)$hours + 1;
$ban = " (ban, $hours ч.)";
}
$data = by_login_data($row['name'], 'action');
$data0 = $data[0];
$name = $row['name'];
if($data0 != '') { $exp = explode(';', $data0); $diff = time() - $exp[1]; if($diff <= 3600) { $name_first = $name[0]; $name = '<u>' . $name_first . '</u>' . substr($name, 1); }}
$query4 = mysql_query("SELECT kolbaso4ka FROM users WHERE login='$currentname'");
$answer4 = mysql_fetch_row($query4);
$kolbaso4ka = "";
if($answer4[0] > 0) $kolbaso4ka = " (+" . $answer4[0] . ")";
$query5 = mysql_query("SELECT rank, rank_change FROM tribe WHERE name='$currentname'");
$answer5 = mysql_fetch_row($query5);
$rank_message = "Ранг " . $answer5[0] . ($answer5[1] == "+" ? " ↓" : ($answer5[1] == "-" ? " ↑" : ""));
echo ' <tr' . $text . '>' . $n;
echo ' <td>' . $num . '</td>' . $n;
echo ' <td' . $color .' title="' . $rank_message . '">' . $ava . ' ' . $name . ' ' . $ban . '</td>' . $n;
echo ' <td>' . $row['rounds'] . '</td>' . $n;
echo ' <td>' . $row['cheese'] . '</td>'. $n;
echo ' <td>' . $row['save'] . '</td>'. $n;
echo ' <td>' . $row['hardmode'] . '</td>' . $n;
echo ' <td>' . $row['first'] . '</td>'. $n;
echo ' <td>' . decode($titlelabel) . '</td>'. $n;
echo ' <td>' . $row['coins'] . $kolbaso4ka . '</td>'. $n;
echo ' </tr>'. $n;
$num++;
}
Мой унылый древний говнокод для вывода статистики клана (точней, его часть) кое-какой онлайн-игры.
Постепенно зарос всякой хунтой.
Lure Of Chaos 11.09.2011 11:59 # +3
:D
Uhehesh 11.09.2011 12:11 # 0
Uhehesh 11.09.2011 15:44 # 0
CPPGovno 11.09.2011 16:28 # +4
7ion 11.09.2011 19:03 # +1
inkanus-gray 11.09.2011 19:27 # 0
Lure Of Chaos 12.09.2011 00:40 # 0
bugmenot 12.09.2011 01:20 # 0
Lure Of Chaos 12.09.2011 01:22 # +1
ZX_Spectrum 12.09.2011 02:24 # 0
зы: у меня тоже есть свой юзерскрипт для говнокода, пока работает.
bugmenot 12.09.2011 15:12 # 0
roman-kashitsyn 12.09.2011 15:19 # 0
TheHamstertamer 11.09.2011 19:03 # 0
согласен
nislova 12.09.2011 09:00 # −5
пол-часа переписывать!
Vindicar 12.09.2011 11:44 # +1
Uhehesh 12.09.2011 14:58 # +2
ban end, время конца бана.
Lioncure 12.09.2011 09:36 # −2
Радует почти полное отсутствие табуляции. Кстати, строки 52-56 можно хотя бы теоретически убрать под шаблон? А то почти полная копипаста немного режет глаз.
guest8 09.04.2019 11:29 # −999