1. PHP / Говнокод #7834

    +153

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 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] == "+" ? " &darr;" : ($answer5[1] == "-" ? " &uarr;" : ""));
    
    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++;
    }

    Мой унылый древний говнокод для вывода статистики клана (точней, его часть) кое-какой онлайн-игры.
    Постепенно зарос всякой хунтой.

    Запостил: Uhehesh, 11 Сентября 2011

    Комментарии (18) RSS

    Добавить комментарий