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

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

    +123

    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
    <? include ("header.php");
    include ("../setup.php");
    $resultg=mysql_query("select * from seting ");
    $rog=mysql_fetch_array($resultg);
    ?>
    
    <center><h4><font color=7C87C2>Настройка Казино</font></h4><br></center>
    
    
    <table border="0" align="center" cellpadding="0" cellspacing="10">
    <FORM action=config.php method=post>
    <TR><td>Логин админа : </td><TD><INPUT size=40 name=alog value=<? echo $rog[0] ?>></TD></TR>
    <TR><td>Пароль админа </td><TD><INPUT size=40 name=apas value=<? echo $rog[1] ?>></TD></TR>
    <TR><td>Email казино</td><TD><INPUT size=40 name=adm_email value=<? echo $rog[2] ?>></TD></TR>
    <TR><td>ICQ казино (если нет то пусто)</td><TD><INPUT size=40 name=icq value=<? echo $rog['icq'] ?>></TD></TR>
    <TR><td>url казино (начиная с http:// и без "/" конце)</td><TD><INPUT size=40 name=cas_url value=<? echo $rog[3] ?>></TD></TR>
    <TR><td>Название казино</td><TD><INPUT size=40 name=cas_name value=<? echo $rog[4] ?>></TD></TR>
    <TR><td>Партнерские</td><TD><INPUT size=20 name=pcash value=<? echo $rog['pcash'] ?>> %</TD></TR>
    
    <TR><td><b>Высылать Email админу:</b></td><TD></TD></TR>
    <TR><td>При пополнение счета</td><TD><input type=checkbox name="paymail" value="yes"<? if($rog["paymail"] == 'yes') { echo ' checked'; } ?>></TD></TR>
    <TR><td>Зарегился новый игрок</td><TD><input type=checkbox name="regmail" value="yes"<? if($rog["regmail"] == 'yes') { echo ' checked'; } ?>></TD></TR>
    <TR><td>Вывод средств</td><TD><input type=checkbox name="zakmail" value="yes"<? if($rog["zakmail"] == 'yes') { echo ' checked'; } ?>></TD></TR>
    
    <TR>
    
    <td bgcolor="#FFFFFF"><font face="Verdana" size="2">
    
    <span style="background-color: #FFFFFF">Сумма ежедневных бонусов WMR(разделитель .)</span></font></td>
    
    <TD bgcolor="#FFFFFF"><font face="Verdana">
    
    <INPUT size=10 name=us_bonus value="<? echo $rog['bonus'] ?>"></font></TD>
    
    </TR>
    
    
    <TR><td><b>Настройка Roboxchange.com</b></td><TD></TD></TR>
    <TR><td>LOGIN в Robox</td><TD><INPUT size=40 name=mrh_login value=<? echo $rog[5] ?>></TD></TR>
    <TR><td>PASS1 в Robox</td><TD><INPUT size=40 name=mrh_pass1 value=<? echo $rog[6] ?>></TD></TR>
    <TR><td>PASS2 в Robox</td><TD><INPUT size=40 name=mrh_pass2 value=<? echo $rog[7] ?>></TD></TR>
    
    <TR><TD><INPUT type=hidden value=1 name=send><INPUT type=hidden value=<? echo $rog[cas_bon] ?> name=cas_bon><INPUT type=submit value="Сохранить"></TD></TR>
    </FORM>
    </table>
    
    
    <?
    
    if ($send=="1"){
    mysql_query("UPDATE seting SET alog='$alog',apas='$apas',adm_email='$adm_email',cas_url='$cas_url',cas_name='$cas_name',mrh_login='$mrh_login',mrh_pass1='$mrh_pass1',mrh_pass2='$mrh_pass2',pcash='$pcash',cas_bon='$cas_bon',bonus='$us_bonus',paymail='$paymail',regmail='$regmail',zakmail='$zakmail',icq='$icq'");
    echo "<script> alert('Настройки сохранены!'); document.location.href='config.php';</script>";
    }
    
    include ("footer.php"); ?>

    Кусок Скрипта готового Казино

    Vasiliy, 17 Сентября 2010

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

    +123

    1. 1
    2. 2
    3. 3
    4. 4
    string mailTo = ((Config.GetSetting("AdminNotifications_EmailAddress") == null) ||
                                 (Config.GetSetting("AdminNotifications_EmailAddress").Length <= 0))
                                    ? Globals.GetHostPortalSettings().HostSettings["SMTPPassword"].ToString()
                                    : Config.GetSetting("AdminNotifications_EmailAddress");

    из модуль для DotNetNuke

    Coffeeholic, 28 Августа 2010

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

    +123

    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
    class TFileToList : List<char>
        {
            public TFileToList(string FileName)
            {
                StreamReader charFile = new StreamReader(FileName);
                for(;;)
                {
                    char[] nextChar = new char[1];
                    if (charFile.EndOfStream)
                        break;
                    charFile.Read(nextChar, 0, 1);
                    this.Add(nextChar[0]);
                };            
            }
        };

    Говногость, 19 Марта 2010

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

    +123

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    typedef struct pl
    {
    int speed;
    double time;
    }player;
    
    int cni;//countries number
    static double disti;//distance of road
    
    class stack
    {
    public:
    	stack(int i)
    	{
    	ael=new int[i];
    	sp=0;
    	};
    	int pop(void);
    	void push(int el);
    	int sp;
    private:
    	int *ael;
    };
    
    class country : public stack
    {
    public:
        country();
        void setinfo();
        char name[25];
        int pn;
        int sp;
        player *cpl;
        player *bpl;
        void getname(char *name);
        player* findbestplayer();
        void sortplayers();
        ~country();
    };
    country::country():stack(cni)
    {
    };
    
    void country::setinfo()
    {
        static char nm[255];
        printf("Enter country name\n");
        gets(nm);
        strcpy(name,nm);
        printf("Country name: %s\n",name);
        static char pnc[25];
        printf("Enter number of players: ");
        gets(pnc);
        pn=atoi(pnc);
        cpl=new player[pn];
        for(int i2=0;i2<pn;i2++)
    	{
    	int spd;
    	static char spdc[10];
    	printf("Enter speed of player %d:",i2+1);
    	gets(spdc);
    	spd=atoi(spdc);
    	cpl[i2].speed=spd;
    	cpl[i2].time=disti/spd;
    	printf("Player time %f\n",cpl[i2].time);
    	};
    return;
    };
    country::~country()
    {
        delete []cpl;
        delete []bpl;
    };
    
    player* country::findbestplayer()
    {
    int bpl2=0;
    for(int i3=1;i3<pn;i3++)
    {
        if(cpl[i3].time<cpl[bpl2].time){
        bpl2=i3;
    };
    *bpl=cpl[bpl2];
    return &cpl[bpl2];
    };
    
    };
    
    int getspeed(struct pl pll);
    void sort(country *cnt);
    
    int main(int argc,char *argv[])
    {
       static char cn[10];
       static char dist[10];
       printf("Enter distance\n");

    guest, 07 Августа 2009

    Комментарии (7)
  6. Assembler / Говнокод #1214

    +123

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    cmp	  eax,0
       je	  exitp
      mov	 eax,1
       ret
    exitp:
       xor	  eax,eax
       ret

    guest, 17 Июня 2009

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

    +122.9

    1. 1
    Голосование за бан во все интернеты для Nemerle.

    Altravert, 08 Февраля 2010

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

    +122.6

    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
    string[] mas_param = a.Split('_');
                this.s_sw_neraspred = mas_param[15];
                s_neraspred.Text = this.s_sw_neraspred;
                int i = a.IndexOf("_", 0, a.Length);
                sw_id = a.Substring(0, i);
                int j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                mf_id = a.Substring(j, i - j);
                //mf1=a.Substring(j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                ta_ed = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                this.s_op = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_rm = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_tm = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_sw = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                ta_sd = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                sw_sd = a.Substring(j, i - j);
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                sw_ed = a.Substring(j, i - j);
                //mf_topsw
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                mf_topsw = a.Substring(j, i - j);
                //s_op_topsw
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_op_topsw = a.Substring(j, i - j);
                //s_rm_topsw
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_rm_topsw = a.Substring(j, i - j);
                //s_tm_topsw
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_tm_topsw = a.Substring(j, i - j);
                //s_sw_topsw
                j = i + 1;
                i = a.IndexOf("_", j, a.Length - j);
                s_sw_topsw = a.Substring(j, i - j);            
            
    
                //ta
    
                ta_id = a.Split('_')[mas_param.Length-1];

    a - строка вида
    {0}_{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_ {10}_{11}_{12}_{13}_{14}_{15}_{16}

    alex_donetsk, 01 Апреля 2010

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

    +122.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    <html>
        <head>
        </head>
        <body>
            <table class="fon_verstala_mudak" width="939" cellspacing="0" cellpadding="0" border="0" align="center">
            </table>
            <table class="fon2_verstala_mudak" width="939" cellspacing="0" cellpadding="0" border="0" align="center">
            </table>
        </body>
    </html>

    Как потерять клиента из-за верстальщика-мудака?
    Хотел купить телефон, но сначала заглянул как свёрстан сайт... Про то что кроссбраузерность даже на костылях мимо не проходила я промолчу, но код начисто отбил желание отовариваться у них.

    VanSanblch, 17 Декабря 2009

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

    +122.4

    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
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    
           <!--
    
    POSTER PHOTO
    
    -->
        <div id="poster-photo-container">
            <img src="images/photo-poster.jpg" alt="" class="poster-photo-image" />
              <div id="feature-area-home">
              
                  <div id="login" class="boxed">
    			<h2 class="title">Аккаунт пользователя</h2>
    			<div class="content">
    					<fieldset>
    					<legend>Войти</legend>
    					<label for="inputtext1">Аккаунт :</label>
    					<input id="inputtext1" type="text" name="inputtext1" value="" />
    					<label for="inputtext2">Пароль :</label>
                            <input id="inputtext2" type="password" name="inputtext2" value="" />
                            <asp:Button ID="Button1" runat="server" Text="Войти" onclick="Button1_Click" />
    
                             <p><a href="#">Забыли пароль ?</p>
    					    </a>
    					</fieldset>
    				</div>
    				
    		</div>
            </div>
        </div>
        <!--
    
    CONTENT CONTAINER
    
    -->
        <div id="content-container-two-column">
            <!--
    
    CONTENT MAIN COLUMN
    
    -->
            <div id="content-main-two-column">
                <h1>
                    <span lang="ru">Контроль измерительных приборов.</span> </h1>
                <p>
                    Consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
                    dolore magna aliquam erat volutpat.</p>
                <div id="three-column-container">
                    <div id="three-column-side1">
                        <a href="Items.aspx">
                            <img src="images/home-photo-1.jpg" class="photo-border" alt="Enter Alt Text Here" /></a>
                        <h2>
                            <span lang="ru">Хромотографы ?</span></h2>
                        <p>
                            <span lang="ru">11111111</span></p>
                        <span lang="ru">
                        <a href="Items.aspx">Подробнее</a></span><img class="arrow" src="images/arrow.gif" alt="" /></div>
                </div>
            </div>
            <!--
    
    CONTENT SIDE COLUMN
    
    -->
            <div class="clear">
            </div>
        </div>
    </asp:Content>

    Найти DIV

    Nemerle, 28 Декабря 2009

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

    +122.4

    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
    /* sent by Stephan Hughson - 2003 */
    /* must be compiled with cc or g++*/
    
    #include <stdio.h>
    
    int main(int t,int _,char*a)
    {return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
    main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
    )&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
    t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
    ,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
    +k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
    l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
    n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
    ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
    #'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
    :t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
    +1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
    i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

    Вот результат работы программы(всё не вместилось):
    On the first day of Christmas my true love gave to me
    a partridge in a pear tree.

    On the second day of Christmas my true love gave to me
    two turtle doves
    and a partridge in a pear tree.

    ...

    On the eighth day of Christmas my true love gave to me
    eight maids a-milking, seven swans a-swimming,
    six geese a-laying, five gold rings;
    four calling birds, three french hens, two turtle doves
    and a partridge in a pear tree.

    On the ninth day of Christmas my true love gave to me
    nine ladies dancing, eight maids a-milking, seven swans a-swimming,
    six geese a-laying, five gold rings;
    four calling birds, three french hens, two turtle doves
    and a partridge in a pear tree.

    On the tenth day of Christmas my true love gave to me
    ten lords a-leaping,
    nine ladies dancing, eight maids a-milking, seven swans a-swimming,
    six geese a-laying, five gold rings;
    four calling birds, three french hens, two turtle doves
    and a partridge in a pear tree.

    On the eleventh day of Christmas my true love gave to me
    eleven pipers piping, ten lords a-leaping,
    nine ladies dancing, eight maids a-milking, seven swans a-swimming,
    six geese a-laying, five gold rings;
    four calling birds, three french hens, two turtle doves
    and a partridge in a pear tree.

    On the twelfth day of Christmas my true love gave to me
    twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
    nine ladies dancing, eight maids a-milking, seven swans a-swimming,
    six geese a-laying, five gold rings;
    four calling birds, three french hens, two turtle doves
    and a partridge in a pear tree.

    guest, 28 Июня 2009

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