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

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

    +147

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    function nyak_nyak(el) {
        if (confirm("Вы уверены в своих действиях?")) {
            document.location = el.href;
    	}
        return false;
    }

    yasosiska, 27 Июня 2011

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

    +147

    1. 1
    var yagooduser = sustr('Мой',1);

    Чел прислал в асю и удивляется, почему не работает

    yasosiska, 27 Июня 2011

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

    +78

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    if (searchFB.getOrderNo()!=null && searchFB.getOrderNo().length()==6){
        int drawingStatus = searchFB.getDrawingStatus();
        int criticalStatus = searchFB.getCriticalStatus();
        int blockingStatus = searchFB.getBlockingStatus();
        int suspensionStatus = searchFB.getSuspensionStatus();
    
        searchFB.setDrawingStatus(drawingStatus);
        searchFB.setCriticalStatus(criticalStatus);
        searchFB.setBlockingStatus(blockingStatus);
        searchFB.setSuspensionStatus(suspensionStatus);
    }

    И это мне поддерживать...

    TC1, 16 Июня 2011

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

    +163

    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
    // Checks if the passed input's value is nothing. 
    function isEmptyText(theField) 
    {     
    // Copy the value so changes can be made..     
    var theValue = theField.value;       
    // Strip whitespace off the left side.     
    while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t'))
            theValue = theValue.substring(1, theValue.length);
         // Strip whitespace off the right side.
         while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t'))
            theValue = theValue.substring(0, theValue.length - 1);
           if (theValue == '')
            return true;
         else
            return false;
      }
    ...
    function in_array(variable, theArray) 
    {
         for (var i in theArray)
            if (theArray == variable)
               return true;
           return false;
    }

    zomg, 16 Июня 2011

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

    +160

    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
    function message($mess,$font,$border,$backgr){
    $bsize = '2';
    if ($font == "" || $border == "" || $backgr == "" ){
    $font   = '#ffffff';
    $border = 'none';
    $backgr = 'none';
    $backgr = 'none';
    $bsize = '0';
    }
    //exit();
    echo $top_pan.'<br>
    <div align="center">
    <div align="center"
    style="width: 60%; border-width: '.$bsize.'; border-style: solid;color: '.$font.'; border-color: '.$border.'; background-color: '.$backgr.';">'
    .$mess.'</div></div>'.$bottom_pan;
    
    }

    Оттуда же.
    А вообще там все можно выкладывать.

    7ion, 07 Июня 2011

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

    +127

    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
    <table>
    			<tr valign="bottom">
    				<td<? if($page=='home') {?> id="tec"<? }?>>
    					<dl>
    						<dt>01.</dt>
    						<dd><? if($page!='home') {?><a href="index.php">О компании</a><? } else{?>О компании<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='products') {?> id="tec"<? }?>>
    					<dl>
    						<dt>02.</dt>
    						<dd><? if($page!='products') {?><a href="index.php?page=products">Продукция</a><? } else{?>Продукция<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='contacts') {?> id="tec"<? }?>>
    					<dl>
    						<dt>03.</dt>
    						<dd><? if($page!='contacts') {?><a href="index.php?page=contacts">Контакты</a><? } else{?>Контакты<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='news') {?> id="tec"<? }?>>
    					<dl>
    						<dt>04.</dt>
    						<dd><? if($page!='news') {?><a href="index.php?page=news">Новости</a><? } else{?>Новости<? }?></dd>
    					</dl>
    				</td>
    			</tr>
    		</table>

    Меню

    De-Luxis, 06 Июня 2011

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

    +167

    1. 1
    <a title="Главная" href="http://<?php echo $_SERVER['HTTP_HOST'].str_replace('\\', '', dirname($_SERVER['PHP_SELF'])); ?>">Главная</a>

    нашел в одном проекте, я бы и не смог до такого додуматься

    alextg, 04 Июня 2011

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

    +158

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    {|if $message=="ok"|}
        <div style="text-align: center; padding:10px; margin:10px; color: white; font-weight: bold; background-color: green;">Your message has successfully been added.</div>
    {|/if|}
    {|if $message=="error"|}
        <div style="text-align: center; padding:10px; margin:10px; color: white; font-weight: bold; background-color: red;">Mistake. You filled out the wrong form.</div>
    {|/if|}

    Красивое использование CSS.

    max_wp, 03 Июня 2011

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

    +147

    1. 1
    2. 2
    GOVNOREGER© для govnokod.ru
    http://slil.ru/31180342

    15d980da30374a8f, 02 Июня 2011

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

    +165

    1. 1
    2. 2
    return $result_rows;
    mysql_close($external_db);

    Ring, 30 Мая 2011

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