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

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

    +141

    1. 1
    2. 2
    3. 3
    4. 4
    if((5<a).toString() == "true")
    {
    ля-ля
    }

    guest, 26 Июня 2009

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

    +141

    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
    if ($_POST['form_submit'] == 'update_plugins') {
                $this->con->db_nofetch('DELETE FROM `blog_plugins_status` WHERE `blog_id`=\''.$this->getState('blog_id').'\' AND ( `state`=\'none\');');
    
    
                $q2 = 'UPDATE `blog_plugins_status` SET `status`=\'cancelled\' WHERE `blog_id`=\''.intval($this->blog_id).'\' AND `status`=\'semicancelled\';';
                $this->con->db_nofetch($q2);
    
                $q2 = 'UPDATE `blog_plugins_status` SET `status`=\'completed\' WHERE `blog_id`=\''.intval($this->blog_id).'\' AND `status`=\'semicompleted\';';
                $this->con->db_nofetch($q2);
    
                // updating saved versions to latest
                $update_plug_ids = implode('\', \'', $this->plugins_list_update);
                $q2 = 'UPDATE `blog_plugins_status` AS `bps` JOIN `blog_plugins` AS `bp` ON `bp`.`id` = `bps`.`plugin_id` SET `bps`.`plugin_version` = `bp`.`plugin_version` WHERE `bps`.`blog_id`=\''.intval($this->blog_id).'\' AND `bp`.`id` IN (\''.$update_plug_ids.'\');';
                $this->con->db_nofetch($q2);
            }

    sdf gsdf gsdfg

    guest, 27 Мая 2009

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

    +141

    1. 1
    2. 2
    chdir("D:/Inetpub/ozresort/admin");
     chdir("../");

    Модно, да?

    guest, 22 Апреля 2009

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

    +141

    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
    function arr2xml($data, $rootNodeName = 'response', $xml = null) {
    
                        if ($xml == null) {
                                  $xml = simplexml_load_string("<$rootNodeName />");
                        }
    
                        // loop through the data passed in.
                        foreach($data as $key => $value) {
                // no numeric keys in our xml please!
                if (is_numeric($key)) {
                    // make string key...
                    $key = "unknownNode_". (string) $key;
                }
    
                // replace anything not alpha numeric
                $key = preg_replace('/[^a-z_0-9]/i', '', $key);
    
                // if there is another array found recrusively call this function
                if (is_array($value)) {
                    $node = $xml->addChild($key);
                    // recrusive call.
                    arr2xml($value, $rootNodeName, $node);
                } else {
                    // add single node.
                    $value = $value;
                    $xml->addChild($key,$value);
                }
            }
    
                        // pass back as string. or simple xml object if you want!
            $res = substr($xml->asXML(), 22);
            return $res;
    
        }

    ХУЙПИЗДА ЗУМЛЬ

    guest, 15 Апреля 2009

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

    +141

    1. 1
    2. 2
    3. 3
    <?php
    echo 'I love antichat (:';
    ?>

    :)

    guest, 22 Февраля 2009

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

    +141

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    <?
    class 
    /*...*/
    public function TestForwardCatKeys($keys){
           $db=Loader::ClassLoad("DataBase");
           $Config=Loader::ClassLoad("Configer");
           $dodle=Loader::ClassLoad("Dodles_MainDodle");
    /*...*/
    ?>

    Чел не знаком в global...

    guest, 11 Февраля 2009

    Комментарии (2)
  8. Pascal / Говнокод #529

    +141

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    { Units of time }
    
      HoursPerDay   = 24;
      MinsPerDay    = HoursPerDay * 60;
      SecsPerDay    = MinsPerDay * 60;
      MSecsPerDay   = SecsPerDay * 1000;

    SysUtils.pas из delphi 6

    guest, 10 Февраля 2009

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

    +141

    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
    <?php
    
    set_time_limit(0);
    
    while (1) { 
    
    $proxyData = file_get_contents('http://www.freeproxy.ru/download/lists/goodproxy.txt');
    
    
    $matechs = array();
    
    preg_match_all('~\d+\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+)~s', $proxyData, $matechs);
    
    
    foreach ($matechs[1] as $proxy) {
    
    $curl = curl_init();
    
    $str = array(
    
    "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",
    
    "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    
    "Accept-Language: ru,en-us;q=0.7,en;q=0.3",
    
    "Accept-Encoding: gzip,deflate",
    
    "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",
    
    "Keep-Alive: 300",
    
    "Connection: keep-alive",
    
    "Cache-Control: max-age=0"
    
    );
    
    curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 
    
    curl_setopt($curl, CURLOPT_REFERER, 'http://bege.php.com.ua/2009/02/05/den-vsex-vlyublyonnyx/');
    
    curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/5934547976');
    
    curl_setopt($curl, CURLOPT_PROXY, $proxy);
    
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    
    $res = curl_exec($curl);
    
    
    var_dump($res);
    
    
    $curl = curl_init();
    
    $str = array(
    
    "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",
    
    "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    
    "Accept-Language: ru,en-us;q=0.7,en;q=0.3",
    
    "Accept-Encoding: gzip,deflate",
    
    "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",
    
    "Keep-Alive: 300",
    
    "Connection: keep-alive",
    
    "Cache-Control: max-age=0"
    
    );
    
    curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 
    
    curl_setopt($curl, CURLOPT_REFERER, 'http://valentine.magiclands.ru/lovetree/5934547976');
    
    curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/st/images/5934547976.png?371');
    
    curl_setopt($curl, CURLOPT_PROXY, $proxy);
    
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    
    curl_exec($curl);
    
    }
    
    }
    
    ?>

    guest, 06 Февраля 2009

    Комментарии (2)
  10. Куча / Говнокод #1321

    +140.9

    1. 1
    2. 2
    3. 3
    4. 4
    Товарищ,верь,взойдёт она
    Звезда пленительного счвстья...
    И на обломках говнокода
    Напишут наши имена...

    guest, 04 Июля 2009

    Комментарии (7)
  11. C# / Говнокод #1303

    +140.9

    1. 1
    XElement rootNode = XDocument.Load("hospital.xml").Descendants().Descendants("mainform").Single(x => x.Attribute("value").Value.Split("\\".ToCharArray()).Contains(splitted[1]));

    Весь проект в подобном говне, дебажить невозможно

    guest, 01 Июля 2009

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