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

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

    +176

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    <?php
    
    $login = 'XXXXX';
    $pass  = 'XXXXXXXX';
    
    if (@$_COOKIE['login'] != $login) {
        setcookie('login',$login,time()+60*60*24,'/');
    }
    if (@$_COOKIE['password'] != $pass) {
        setcookie('password',$pass,time()+60*60*24,'/');
    }

    Вот такая интересная проверка на авторизацию.

    airrussia, 06 Октября 2011

    Комментарии (8)
  3. C# / Говнокод #8093

    +126

    1. 1
    2. 2
    3. 3
    4. 4
    if ((properties.ListItem["LocationTaxID"].ToString() != string.Empty) || (properties.ListItem["LocationTaxID"] != null))
    {
    
    }

    Норвеги писаки-проверяки.

    jenik15, 05 Октября 2011

    Комментарии (8)
  4. Куча / Говнокод #8055

    +145

    1. 1
    2. 2
    Ошибка компиляции комментария:
    csrf verification error

    Первый раз на говнокоде выкладывают говнокод Страйкера.

    CPPGovno, 01 Октября 2011

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

    +169

    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
    /*
    =====================================================
     Данный код защищен авторскими правами
    =====================================================
     Файл: index.php
     -----------------------------------------------------
     Версия: 1
    -----------------------------------------------------
     Назначение: минимальные необходимые настройки
    =====================================================
    */
    
    if(!defined('SIGELENGINE')){die();}
    
    #[cache configuration flag]
    
    final class _config
    {
             private         $config         = array();
    
             function __construct()
             {
                     $this->set();
             }
    
             private function set()
             {
                     $this->config['db']['use_buffer']                       = 0;
                     $this->config['db']['show_errors']                      = 1;
                     $this->config['db']['host']                                     = "...";
                     $this->config['db']['port']                                     = "...";
                     $this->config['db']['name']                                     = "...";
                     $this->config['db']['user']                                     = "...";
                     $this->config['db']['pass']                                     = "...";
    
                     $this->config['mail']['mailbox']                        = array("...", "...", "...");
    
                     $this->config['defaults']['mod']                        = "controller";
                     $this->config['defaults']['skin']                       = "index";
                     $this->config['defaults']['debug']                      = 0;
    
                     #[dynamic configuration]
             }
    
             function get()
             {
                     return $this->config;
             }
    }

    com1, 27 Сентября 2011

    Комментарии (8)
  6. C# / Говнокод #7982

    +128

    1. 1
    2. 2
    3. 3
    4. 4
    XmlNodeList list = xdoc.GetElementsByTagName("Customer");
    for (int i = 0; i < list.Count; i++)
    {
    XmlElement cl = (XmlElement)xdoc.GetElementsByTagName("Customer")[i];

    Написано расовым индусом.
    http://www.c-sharpcorner.com/UploadFile/vimalkandasamy/Xml03032009055848AM/Xml.aspx - чисто индусский бложик. Там много подобного.

    koodeer, 26 Сентября 2011

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

    +164

    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
    <?php 
    include "dbconfig.php"; 
    $db = mysql_connect("$dbhost","$dbuser","$dbpass");
    mysql_select_db("$dbname",$db);
    
    
    $mysqlsite = mysql_query("SELECT * FROM site WHERE id='1'");
    $site = mysql_fetch_array($mysqlsite);
    
    $titlesite = $site['title'];
    $titlesite = iconv("CP1251", "UTF-8", "$titlesite");
    
    $descriptionsite = $site['description'];
    $descriptionsite = iconv("CP1251", "UTF-8", "$descriptionsite");
    
    $keywordssite = $site['keywords'];
    $keywordssite = iconv("CP1251", "UTF-8", "$keywordssite");
    
    
    $contsite = $site['cont'];
    $contsite = iconv("CP1251", "UTF-8", "$contsite");
    ?>

    "CMS" Хостинг провайдера ultrahost.com.ua D

    SaNcHeS, 24 Сентября 2011

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

    +103

    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
    ...
    var count: integer;
          summ: integer;
    begin
     try
      case count of
        1: summ:=StrToInt(EditBox1.Text);
        2: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text);
        3: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text);
        4: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text);
        5: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text);
        6: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text)+StrToInt(EditBox6.Text);
        7: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text)+StrToInt(EditBox6.Text)++StrToInt(EditBox7.Text);
        8: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text)+StrToInt(EditBox6.Text)++StrToInt(EditBox7.Text)++StrToInt(EditBox8.Text);
        9: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text)+StrToInt(EditBox6.Text)++StrToInt(EditBox7.Text)++StrToInt(EditBox8.Text)+StrToInt(EditBox9.Text);
        10: summ:=StrToInt(EditBox1.Text)+StrToInt(EditBox2.Text)+StrToInt(EditBox3.Text)+StrToInt(EditBox4.Text)+StrToInt(EditBox5.Text)+StrToInt(EditBox6.Text)++StrToInt(EditBox7.Text)++StrToInt(EditBox8.Text)+StrToInt(EditBox9.Text)+StrToInt(EditBox9.Text);
        0: summ:= 0;
      end;
     except
       ShowMessage('Error');
     end;
    end;

    Сегодня увидал у однокурсника в универе.
    Самый оптимальные метод подсчета суммы элементов EditBox, не правдали???

    alexprey, 20 Сентября 2011

    Комментарии (8)
  9. Куча / Говнокод #7909

    +128

    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
    <th style='border-left: 1px solid #97cbee;'>Premium<br />without<br />excess<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative; top: 0'>
    						<IMG class='str3' width='16' heigth='16' title='The excess can be removed from some plans in return for a higher premium.<br/>You can select this option when purchasing the plan from the insurer.' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Luggage/<br />Personal<br />effects<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str3' width='16' heigth='16' title='Coverage on luggage (typically important for people with a lot of good quality travel gear)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Medical<br />expenses<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str2' width='16' heigth='16' title='How much will be contributed to any doctor's bills, emergency surgery etc. (for obvious reasons this is generally important for all travelers)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>
    				<th style='border-left: 1px solid #97cbee'>Cancellation<br />costs<span><img src='Artog/Images/empty/empty.gif' /></span>
    					<div style='position: relative'>
    						<IMG class='str2' width='16' heigth='16' title='How much will be paid from inconvenience due to cancellation of flights etc. (typically important for people with a complex itinerary)' src="Artog/Images/Icons/InfoIcon28x28.png" />
    					</div>
    				</th>

    разбираю тут 1 проект
    <th style='border-left: 1px solid #97cbee'> <---------- индусы не знают ,что такое класс в css

    Rubaka, 20 Сентября 2011

    Комментарии (8)
  10. Ruby / Говнокод #7827

    −113

    1. 1
    2. 2
    3. 3
    4. 4
    def a
    print rand(1)
    end
    puts a

    Попытался нагадить… короче, puts puts 0

    nbvec222, 10 Сентября 2011

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

    +79

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    public void restore(HashMap<String, Object> dump) {
    		if(dump != null) {
    			if(isInitialized()) {
    				if(isInitialized()) {
    					clear();

    "Проинициализировано? Точно-точно?"

    lucidfox, 08 Сентября 2011

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