1. Лучший говнокод

    В номинации:
    За время:
  2. JavaScript / Говнокод #3703

    +172

    1. 1
    e.keyCode == 33 ? "!": e.keyCode == 34 ? "\"": e.keyCode == 35 ? "#": e.keyCode == 36 ? "$": e.keyCode == 37 ? "%": e.keyCode == 38 ? "&": e.keyCode == 39 ? "'": e.keyCode == 40 ? "(": e.keyCode == 41 ? ")": e.keyCode == 42 ? "*": e.keyCode == 43 ? "+": e.keyCode == 44 ? ",": e.keyCode == 45 ? "-": e.keyCode == 46 ? ".": e.keyCode == 47 ? "/": e.keyCode == 48 ? "0": e.keyCode == 49 ? "1": e.keyCode == 50 ? "2": e.keyCode == 51 ? "3": e.keyCode == 52 ? "4": e.keyCode == 53 ? "5": e.keyCode == 54 ? "6": e.keyCode == 55 ? "7": e.keyCode == 56 ? "8": e.keyCode == 57 ? "9": e.keyCode == 58 ? ":": e.keyCode == 59 ? ";": e.keyCode == 60 ? "<": e.keyCode == 61 ? "=": e.keyCode == 62 ? ">": e.keyCode == 63 ? "?": e.keyCode == 64 ? "@": e.keyCode == 65 ? "A": e.keyCode == 66 ? "B": e.keyCode == 67 ? "C": e.keyCode == 68 ? "D": e.keyCode == 69 ? "E": e.keyCode == 70 ? "F": e.keyCode == 71 ? "G": e.keyCode == 72 ? "H": e.keyCode == 73 ? "I": e.keyCode == 74 ? "J": e.keyCode == 75 ? "K": e.keyCode == 76 ? "L": e.keyCode == 77 ? "M": e.keyCode == 78 ? "N": e.keyCode == 79 ? "O": e.keyCode == 80 ? "P": e.keyCode == 81 ? "Q": e.keyCode == 82 ? "R": e.keyCode == 83 ? "S": e.keyCode == 84 ? "T": e.keyCode == 85 ? "U": e.keyCode == 86 ? "V": e.keyCode == 87 ? "W": e.keyCode == 88 ? "X": e.keyCode == 89 ? "Y": e.keyCode == 90 ? "Z": e.keyCode == 91 ? "[": e.keyCode == 92 ? "\\": e.keyCode == 93 ? "]": e.keyCode == 94 ? "^": e.keyCode == 95 ? "_": e.keyCode == 96 ? "`": e.keyCode == 97 ? "a": e.keyCode == 98 ? "b": e.keyCode == 99 ? "c": e.keyCode == 100 ? "d": e.keyCode == 101 ? "e": e.keyCode == 102 ? "f": e.keyCode == 103 ? "g": e.keyCode == 104 ? "h": e.keyCode == 105 ? "i": e.keyCode == 106 ? "j": e.keyCode == 107 ? "k": e.keyCode == 108 ? "l": e.keyCode == 109 ? "m": e.keyCode == 110 ? "n": e.keyCode == 111 ? "o": e.keyCode == 112 ? "p": e.keyCode == 113 ? "q": e.keyCode == 114 ? "r": e.keyCode == 115 ? "s": e.keyCode == 116 ? "t": e.keyCode == 117 ? "u": e.keyCode == 118 ? "v": e.keyCode == 119 ? "w": e.keyCode == 120 ? "x": e.keyCode == 121 ? "y": e.keyCode == 122 ? "z": e.keyCode == 123 ? "{": e.keyCode == 124 ? "|": e.keyCode == 125 ? "}": e.keyCode == 126 ? "~": e.keyCode == 1040 ? "А": e.keyCode == 1041 ? "Б": e.keyCode == 1042 ? "В": e.keyCode == 1043 ? "Г": e.keyCode == 1044 ? "Д": e.keyCode == 1045 ? "Е": e.keyCode == 1046 ? "Ж": e.keyCode == 1047 ? "З": e.keyCode == 1048 ? "И": e.keyCode == 1049 ? "Й": e.keyCode == 1050 ? "К": e.keyCode == 1051 ? "Л": e.keyCode == 1052 ? "М": e.keyCode == 1053 ? "Н": e.keyCode == 1054 ? "О": e.keyCode == 1055 ? "П": e.keyCode == 1056 ? "Р": e.keyCode == 1057 ? "С": e.keyCode == 1058 ? "Т": e.keyCode == 1059 ? "У": e.keyCode == 1060 ? "Ф": e.keyCode == 1061 ? "Х": e.keyCode == 1062 ? "Ц": e.keyCode == 1063 ? "Ч": e.keyCode == 1064 ? "Ш": e.keyCode == 1065 ? "Щ": e.keyCode == 1066 ? "Ъ": e.keyCode == 1067 ? "Ы": e.keyCode == 1068 ? "Ь": e.keyCode == 1069 ? "Э": e.keyCode == 1070 ? "Ю": e.keyCode == 1071 ? "Я": e.keyCode == 1072 ? "а": e.keyCode == 1073 ? "б": e.keyCode == 1074 ? "в": e.keyCode == 1075 ? "г": e.keyCode == 1076 ? "д": e.keyCode == 1077 ? "е": e.keyCode == 1078 ? "ж": e.keyCode == 1079 ? "з": e.keyCode == 1080 ? "и": e.keyCode == 1081 ? "й": e.keyCode == 1082 ? "к": e.keyCode == 1083 ? "л": e.keyCode == 1084 ? "м": e.keyCode == 1085 ? "н": e.keyCode == 1086 ? "о": e.keyCode == 1087 ? "п": e.keyCode == 1088 ? "р": e.keyCode == 1089 ? "с": e.keyCode == 1090 ? "т": e.keyCode == 1091 ? "у": e.keyCode == 1092 ? "ф": e.keyCode == 1093 ? "х": e.keyCode == 1094 ? "ц": e.keyCode == 1095 ? "ч": e.keyCode == 1096 ? "ш": e.keyCode == 1097 ? "щ": e.keyCode == 1098 ? "ъ": e.keyCode == 1099 ? "ы": e.keyCode == 1100 ? "ь": e.keyCode == 1101 ? "э": e.keyCode == 1102 ? "ю": e.keyCode == 1103 ? "я": ""

    Нанотехнологии, хуле.

    eval, 14 Июля 2010

    Комментарии (7)
  3. PHP / Говнокод #3102

    +172

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    $pattern = "/\w{0,5}[хx]([хx\s\!@#\$%\^&*+-\|\/]{0,6})[уy]([уy\s\!@#\$%\^&*+-\|\/]{0,6})[ёiлeеюийя]\w{0,7}|\w{0,6}[пp]([пp\s\!@#\$%\^&*+-\|\/]{0,6})[iие]([iие\s\!@#\$%\^&*+-\|\/]{0,6})[3зс]([3зс\s\!@#\$%\^&*+-\|\/]{0,6})[дd]\w{0,10}|[сcs][уy]([уy\!@#\$%\^&*+-\|\/]{0,6})[4чkк]\w{1,3}|\w{0,4}[bб]([bб\s\!@#\$%\^&*+-\|\/]{0,6})[lл]([lл\s\!@#\$%\^&*+-\|\/]{0,6})[yя]\w{0,10}|\w{0,8}[её][bб][лске@eыиаa][наи@йвл]\w{0,8}|\w{0,4}[еe]([еe\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[uу]([uу\s\!@#\$%\^&*+-\|\/]{0,6})[н4ч]\w{0,4}|\w{0,4}[еeё]([еeё\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[нn]([нn\s\!@#\$%\^&*+-\|\/]{0,6})[уy]\w{0,4}|\w{0,4}[еe]([еe\s\!@#\$%\^&*+-\|\/]{0,6})[бb]([бb\s\!@#\$%\^&*+-\|\/]{0,6})[оoаa@]([оoаa@\s\!@#\$%\^&*+-\|\/]{0,6})[тnнt]\w{0,4}|\w{0,10}[ё]([ё\!@#\$%\^&*+-\|\/]{0,6})[б]\w{0,6}|\w{0,4}[pп]([pп\s\!@#\$%\^&*+-\|\/]{0,6})[иeеi]([иeеi\s\!@#\$%\^&*+-\|\/]{0,6})[дd]([дd\s\!@#\$%\^&*+-\|\/]{0,6})[oоаa@еeиi]([oоаa@еeиi\s\!@#\$%\^&*+-\|\/]{0,6})[рr]\w{0,12}/i";
    
                if(preg_match($pattern, $text)) {
                    $reason = 'мат';
                    unset ($text);
                    $text = '<b>пользователь был забанен, причина: ';
                    $text .= $reason;
                    $text .= '</b>';
                    $user_ban = true;
                }

    Вот такая защита от мата стоит в чате одной браузерной игрушки.

    WinnerWolf, 23 Апреля 2010

    Комментарии (28)
  4. PHP / Говнокод #539

    +171.9

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    <?
    $___="___";
    $_=($__)?$__:$___;
    ?>
    <?=$_?>

    Прием обфускации.
    Если записать в одну строчку то будет вообще нечитабельно, но главное что работает =)

    guest, 11 Февраля 2009

    Комментарии (7)
  5. JavaScript / Говнокод #2824

    +171.8

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    <div id="watch-player-div" class="flash-player">
    <div id="watch-noplayer-div">
    <noscript>У вас отключен JavaScript либо установлена устаревшая версия проигрывателя Adobe Flash. <a href="http://www.adobe.com/go/getflashplayer/" onmousedown="yt.analytics.urchinTracker('/Events/VideoWatch/GetFlash');">Загрузите новый проигрыватель Flash</a>.</noscript>
    <script type="text/javascript">
    document.write('У вас отключен JavaScript либо установлена устаревшая версия проигрывателя Adobe Flash. <a href=\"http:\/\/www.adobe.com\/go\/getflashplayer\/\" onmousedown=\"yt.analytics.urchinTracker(\'\/Events\/VideoWatch\/GetFlash\');\">Загрузите новый проигрыватель Flash<\/a>.');
    </script>
    </div>

    Найдено на youtube.com , в хтмл коде страницы любого видео (http://www.youtube.com/watch?v=НаборБуквИЦифр)

    usver, 19 Марта 2010

    Комментарии (12)
  6. PHP / Говнокод #1929

    +171.8

    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
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    <? $page = $_REQUEST['page']; 
    switch ($page) {
    	case news:
    		include "./pages/news.php";
    		break;
    	case about:
    		include "./pages/about.php";
    		break;
    	case about_1:
    		include "./pages/about_1.php";
    		break;
    	case about_2:
    		include "./pages/about_2.php";
    		break;
    	case about_3:
    		include "./pages/about_3.php";
    		break;
    	case how:
    		include "./pages/how.php";
    		break;
    	case admission:
    		include "./pages/admission.php";
    		break;
    	case admission2009:
    		include "./pages/admission2009.php";
    		break;
    	case admission2009_1:
    		include "./pages/admission2009_1.php";
    		break;
    	case admission2009_2:
    		include "./pages/admission2009_2.php";
    		break;
    	case admission2009_3:
    		include "./pages/admission2009_3.php";
    		break;
    	case admission2009_4:
    		include "./pages/admission2009_4.php";
    		break;
    	case admission2009_5:
    		include "./pages/admission2009_5.php";
    		break;
    	case admission2009_6:
    		include "./pages/admission2009_6.php";
    		break;
    	case admission2009_7:
    		include "./pages/admission2009_7.php";
    		break;
    	case admission2009_8:
    		include "./pages/admission2009_8.php";
    		break;
    	case admission2009_10:
    		include "./pages/admission2009_10.php";
    		break;
    	case admission2009_11:
    		include "./pages/admission2009_11.php";
    		break;
    	case programme:
    		include "./pages/programme.php";
    		break; 
    	case programme_1:
    		include "./pages/programme_1.php";
    		break; 
    	case programme_2:
    		include "./pages/programme_2.php";
    		break; 
    	case programme_3:
    		include "./pages/programme_3.php";
    		break; 
    	case vacancy:
    		include "./pages/vacancy.php";
    		break;
    	case donation:
    		include "./pages/donation.php";
    		break;
    	case profile: 
    		include "./profile/index.php";
    		break;
    	case guestbook:
    		echo "<div class='GBlock'>";
    		echo "<h1>Гостевая книга</h1>";
    		include "./guestbook/index.php";
    		echo "</div>";
    		$pagename="Гостевая книга";
    		break;
    	case links:
    		include "./pages/links.php";
    		break;
    	case contacts:
    		include "./pages/contacts.php";
    		break;
    	case upload:
    		include "./profile/upload.php";
    		break;
    	default:
    		include "./pages/404.php";
    		break;
    } ?>

    iGorash, 02 Октября 2009

    Комментарии (9)
  7. PHP / Говнокод #2719

    +171.7

    1. 1
    2. 2
    3. 3
    4. 4
    while (true) {
    	load_config();
    	break;
    }

    starfall, 04 Марта 2010

    Комментарии (33)
  8. PHP / Говнокод #2333

    +171.6

    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
    if ( !empty( $page ) )
    {
        if ( $page == "login" )
        {
            $spage = "Login.inc";
        }
        else if ( $page == "rules" )
        {
            $spage = "rules.inc";
        }
        else if ( $page == "help" )
        {
            $spage = "help.inc";
        }
        else if ( $page == "wm" )
        {
            $spage = "wm.inc";
        }
        else if ( $page == "game" 
        {
            $spage = "game.inc";
        }
        else if ( $page == "webmoney" )
        {
            $spage = "webmoney.inc";
        }
        else if ( $page == "egold" )
        {
            $spage = "egold.inc";
        }
        else if ( $page == "cashin" )
        {
            $spage = "cashin.inc";
        }
        else if ( $page == "ballans" )
        {
            $spage = "ballans.inc";
        }
        else if ( $page == "remind" )
        {
            $spage = "remind.inc";
        }
        else if ( $page == "contact" )
        {
            $spage = "contact.inc";
        }
        else if ( $page == "reg" )
        {
            $spage = "reg.inc";
        }

    :(((

    azzz, 25 Декабря 2009

    Комментарии (16)
  9. PHP / Говнокод #1514

    +171.5

    1. 1
    $now = mktime(date("G"), date("i"), date("s"), date("m")  , date("d"), date("Y"));

    получение текущего времени :)
    читайте доки, юзернеймы.

    Mihard, 11 Августа 2009

    Комментарии (5)
  10. PHP / Говнокод #2434

    +171.4

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    class BaseDateTimeField extends SmartField{
    var $years = array("1999"=>"1999","2000"=>"2000","2001"=>"2001","2002"=>"2002","2003"=>"2003","2004"=>"2004","2005"=>"2005","2006"=>"2006","2007"=>"2007","2008"=>"2008","2009"=>"2009","2010"=>"2010");
    var $months = array('01'=>'Jan','02'=>'Feb', '03'=>'Mar', '04'=>'Apr', '05'=>'May', '06'=>'Jun', '07'=>'Jul', '08'=>'Aug','09'=>'Sep', '10'=>'Oct', '11'=>'Nov', '12'=>'Dec');
    var $days = array('01'=>'01','02'=>'02','03'=>'03','04'=>'04','05'=>'05','06'=>'06','07'=>'07','08'=>'08','09'=>'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');
    var $hours = array('00'=>'00','01'=>'01','02'=>'02','03'=>'03','04'=>'04','05'=>'05','06'=>'06','07'=>'07','08'=>'08','09'=>'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');
    var $minutes = array('00'=>'00','01'=>'01','02'=>'02','03'=>'03','04'=>'04','05'=>'05','06'=>'06','07'=>'07','08'=>'08','09'=>'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');
    var $secundes = array('00'=>'00','01'=>'01','02'=>'02','03'=>'03','04'=>'04','05'=>'05','06'=>'06','07'=>'07','08'=>'08','09'=>'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');
    
    }

    Самописная CMS для веб-сайта

    nikl, 18 Января 2010

    Комментарии (8)
  11. PHP / Говнокод #864

    +171.2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    if(isset($_POST['username']) and isset($_POST['password'])) {
               $user = $_POST['username'];
               $pass = $_POST['password'];
    
               if($user == $pass) {
                       $_SESSION['user'] = $user;
                       $_SESSION['logged_in'] = true;
               }
       }

    классная авторизация
    оригинал http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/docs/home-page/en/inc/header.php?revision=8397&view=markup

    guest, 14 Апреля 2009

    Комментарии (2)