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

    В номинации:
    За время:
  2. Куча / Говнокод #13086

    +118

    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
    <div class="is-element-border-top">
              <div class="is-element-border-right">
                <div class="is-element-border-bottom">
                  <div class="is-element-border-left">
                    <div class="is-element-corner-top-left">
                      <div class="is-element-corner-top-right">
                        <div class="is-element-corner-bottom-right">
                          <div class="is-element-corner-bottom-left">
                            <span class="curr_show ">
                              5 days                        </span>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>

    Каскадная таблица стилей, ёпта.

    bot-minurast, 01 Июня 2013

    Комментарии (3)
  3. Java / Говнокод #13041

    +69

    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
    public class Tree {
        
        ...
    
        public static int treeDepth;
    
        ...
    
        public static void runDepthTree(Node start, String method) {
    //        System.out.println("looking at " + start);
            ++treeDepth;
            Statement statement = buildStatement(start, method);
            try {
                statement.execute();
            }
            catch (Exception e) { 
                String msg = start + " ERROR at tree depth= " + treeDepth;
                
                System.out.println(); 
            }
            Node[] nodes = start.getChildren();
            if (nodes != null) {
                int count = start.getComponentCount();
                for (int i = 0; i<count; i++)  {
                    runDepthTree((Node)nodes[i], method); // recurse
                }
            }
            --treeDepth;
        }
    
        ...
    
    }

    Я бы не точно догадался

    myzone, 23 Мая 2013

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

    +151

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    <?php
    
    ...
    
    if( preg_match( "#\.#is", $current_rating ) )
    {
    	list( $n1, $n2 ) = explode( ".", $current_rating );
    	$current_rating = floatval( $n1.".".substr( $n2, 0, 2 ) );
    }

    round?

    faiwer, 22 Мая 2013

    Комментарии (3)
  5. Java / Говнокод #13017

    +173

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    private static String formatDateFull(Calendar date) {
    	if (date == null)
    		return "&nbsp;";
    	else
    		try {
    			return dateOutFormatFull.format(date.getTime());
    		} catch(Exception ex) {
    			return "&nbsp;";
    		}
    }
    private static final SimpleDateFormat dateOutFormatFull = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss.SSS");

    3.14159265, 18 Мая 2013

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

    +154

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    /**
     * Загружает файл изображения, обрабатывает и добавляет в БД
     */
    function uploadPhoto($_FILES = null, $album_id = null, $ugol = null, $logo = null, $user_id = null, $hash = null) {
        $filter = new Zend_Filter_Int();
        $album_id = $filter->filter($album_id);
    
        if (empty($_FILES) or empty($album_id)) {
            return false;
        }
        ...
    }

    123qweasdzxc, 18 Мая 2013

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

    +123

    1. 1
    2. 2
    3. 3
    4. 4
    [Obsolete("Непонятный хлам")]
    public static class CalendarHelper
    {
    }

    musuk, 16 Мая 2013

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

    +131

    1. 1
    2. 2
    3. 3
    4. 4
    <li>1</li><!--
                    --><li>2</li><!--
                    --><li>3</li><!--
                    --><li>4</li>

    http://forum.htmlbook.ru/index.php?showtopic=20109

    dos_, 08 Мая 2013

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

    +152

    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
    <?php
    session_start();
    
    if (empty($_SESSION['login']) or empty($_SESSION['session_id'])) {
    	$DATA = array('login' => $_POST['login'], 'password' => $_POST['password']);
    	include "classes/data_base_class.php";
    	$auth_result = DataBase::StartAuth($DATA['login'], $DATA['password']);
    	
    	if ($auth_result == 1) {
    		echo '<meta http-equiv="refresh" content="0;URL=../error.php?mod=auth">';
    		exit();
    	}
    	else
    	{
    		$_SESSION['login'] = $auth_result['user_login'];
    		$_SESSION['user_name'] = $auth_result['user_name'];
    		$_SESSION['session_id'] = $auth_result['reg_data'];
    		echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
    		exit();
    	}
    }
    else
    {
    	echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
    	exit();
    }
    ?>

    Вот вам авторизация, ага - ага!

    Govnisti_Diavol, 07 Мая 2013

    Комментарии (3)
  10. JavaScript / Говнокод #12926

    +155

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    <script type="text/javascript" language="javascript">
    function DeleteConfirmation()
    {
     if (confirm("Are you sure, 
         you want to delete selected records ?")==true)
     return true;
     else
     return false;
    }
    </script>

    http://csharpdotnetfreak.blogspot.com/2009/05/edit-multiple-records-gridview-checkbox.html

    Да так да, нет так нет

    denis90, 21 Апреля 2013

    Комментарии (3)
  11. JavaScript / Говнокод #12916

    +159

    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
    $("#menu44").click(function () {
      $("#menu111").hide();
      $("#menu222").hide();
      $("#menu333").hide();
      $("#menu444").show();
      $("#menu555").hide();
      $("#menu666").hide();
      $("#menu777").hide();
      $(".selMenu_group").removeClass("selMenu_group");
      $(this).children().addClass("selMenu_group");
    });
    $("#menu55").click(function () {
      $("#menu111").hide();
      $("#menu222").hide();
      $("#menu333").hide();
      $("#menu444").hide();
      $("#menu555").show();
      $("#menu666").hide();
      $("#menu777").hide();
      $(".selMenu_group").removeClass("selMenu_group");
      $(this).children().addClass("selMenu_group");
    });
    
    $("#menu66").click(function () {
      $("#menu111").hide();
      $("#menu222").hide();
      $("#menu333").hide();
      $("#menu444").hide();
      $("#menu555").hide();
      $("#menu666").show();
      $("#menu777").hide();
      $(".selMenu_group").removeClass("selMenu_group");
      $(this).children().addClass("selMenu_group");
    });
    
    $("#menu77").click(function () {
      $("#menu111").hide();
      $("#menu222").hide();
      $("#menu333").hide();
      $("#menu444").hide();
      $("#menu555").hide();
      $("#menu666").hide();
      $("#menu777").show();
      $(".selMenu_group").removeClass("selMenu_group");
      $(this).children().addClass("selMenu_group");
    });

    Творение самого коммерчески эффективного разработчика студии.

    validol, 19 Апреля 2013

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