1. PHP / Говнокод #1350

    +145

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    <body>
    <br>
    <?include'1.txt';?> 
    <br\>
    </body>
    </html>

    guest, 09 Июля 2009

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

    +149

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    $query = 'SELECT mapid3 FROM #__mapsfo WHERE objurl LIKE "%'.$id.'%"'; 
    $db->setQuery($query);
    $m_id = $db->loadResult();
    
    $query = 'SELECT id FROM #__mapsfo WHERE mapid3='.$m_id; 
    $db->setQuery($query);
    $o_id = $db->loadObjectList();

    guest, 09 Июля 2009

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

    +148

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    function br($count=1) {
    $c=0;
    do {
    echo '<br>';
    $c++;
    } while($c!=$count);
    }

    in <- <?php br(10); ?>
    out -> <br><br><br><br><br><br><br><br><br><b r>
    :DDDDD

    guest, 09 Июля 2009

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

    +152

    1. 1
    $str.= "<div class=\"matchtour2\"><table class='maintable' align=right width=590 cellspacing=0><tr  bgcolor=#56B945 style='color:white; margin:0;' class='header'><td align=center width=50><b>время</b></td><td align=center><b>событие</b></td><td width=50 align=center><b>победа<br>1</b></td><td width=50 align=center><b>ничья<br>X</b></td><td width=50 align=center><b>пoбеда<br>2</b></td><td width=50>&nbsp;</td></tr></table></div><br><br>";

    Мечта верстальщика

    guest, 09 Июля 2009

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

    +150

    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
    <?php
    require_once "class/db.php";
    require_once "secrets.php";
    
    ini_set("error_reporting","E_ALL");
    
    $db_obj= new db($mysql_host,$mysql_user,$mysql_pass,$mysql_db);
    
    while ($row=$object->sql_fetch_assoc("SELECT id, name FROM categories ORDER BY sort ASC"))
    	{
    	$cats[] = $row;
    	}
    
    $cats_list = "";
    
    while ($cats){
    	{
    	$cats_list .= "<options value=\"" . $cats['id'] . "\">" . $cats['name'] . "</options>";
    	}
    
    $form = <<<FORM
    	<form action='" . $PHP_SELF . "' method='post' enctype='multipart/form-data'>
    	<b>Поиск</b><br>
    	<tr>
    	<td>
    	<b>Cтрока поиска:</b><input type=\"text\" size=\"40\" name=\"string\">
    	</td>
    	<td>
    	<b>Выберете категорию</b>
    	<select name=\"cats\">
    	$cats_list
    	</select>
    	</td>
    	</tr>
    	</form>
    FORM;
    
    print ($form);
    ?>

    guest, 09 Июля 2009

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

    +151

    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
    $result['msg'] .= '<form action="" method="POST">';
    	$result['msg'] .= 'I RECEIVED ';
    		$result['msg'] .= '<select name="order_grade" width="10">';
    			$result['msg'] .= '<option></option>';
    			$result['msg'] .= '<option value="4"> A </option>';
    			$result['msg'] .= '<option value="3"> B </option>';
    			$result['msg'] .= '<option value="2"> C </option>';
    			$result['msg'] .= '<option value="1"> D </option>';
    			$result['msg'] .= '<option value="0"> F </option>';
    		$result['msg'] .= '</select>';
    	$result['msg'] .= ' FOR THIS PAPER ';
    	$result['msg'] .= '<input type="submit" name="set_grade" value="Submit my grade">';
    $result['msg'] .= '</form>';

    Зачем так поступать?

    guest, 09 Июля 2009

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

    +185

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    define('KEY', md5('Obama'));
    
    if($_GET['key'] != KEY) { 
    ...
    }

    таки обамосекьюрность))
    встретилось в одном большом проекте, который успешно работает и процветает по сей день

    guest, 08 Июля 2009

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

    +157.3

    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
    // Строки 8-12. Строковые константы - для мудаков, аффтар гарантирует это! 
    
    $simb_r=chr("92").chr("114"); 
    $simb_n=chr("92").chr("110"); 
    $simb_http="http:".chr("47").chr("47"); 
    $simb_ss=chr("47").chr("47"); 
    $r6=chr("35").chr("35").chr("35").chr("35").chr("35").chr("35");
    
    // Строки 20-24. for - для мудаков, копипасту в массы!
    
    $ses[0]=trim($ses[0]); 
    $ses[1]=trim($ses[1]); 
    $ses[2]=trim($ses[2]); 
    $ses[3]=trim($ses[3]); 
    $ses[4]=trim($ses[4]); 
    
    // 50-58. Да здравствует пафос и на хуй не нужное использование тормозных
    // POSIX-регэкспов.
    
    for ($i=0; $i < count($_bazadied['browser']); $i++) { 
    if (eregi($_bazadied['browser'][$i],$_SERVER['HTTP_USER_AGENT'])) exit("Only for peoples!"); 
    } 
    for ($i=0; $i < count($_bazadied['ip']); $i++) { 
    if (eregi($_bazadied['ip'][$i],$_SERVER['REMOTE_ADDR'])) exit("IP ban!!!"); 
    } 
    for ($i=0; $i < count($_bazadied['host']); $i++) { 
    if($_SERVER['HTTP_REFERER']==true){if (eregi($_bazadied['host'][$i],$_SERVER['HTTP_REFERER'])) exit("HOST ban!!!");} 
    } 
    
    // 135-142. Тернарные? Да идите вы со своими тернарными, и со switch тоже...
    
    if($kak=="first") 
    { 
    $text[0]=strtr($text[0],$rubot,$rutop); 
    } 
    if($kak=="bot") 
    { 
    $text[0]=strtr($text[0],$rutop,$rubot); 
    } 
    
    // 169-170. file_get_contents() - для мудаков.
    
    $fpp=fopen("data.html", "r"); 
    $fulldata=fread($fpp,filesize("data.html")); fclose($fpp);
    
    // 358. Опять же, шли бы вы со своими тернарными...
    
    $temp=false; if(file_exists($dlb.".txt")==true){$temp=true;} if($dlb==$mylicense){$temp=true;}
    
    // 429-437. Брутально.
    
    if($_FILES['addfile']['tmp_name']==true && 
    (strrchr($_FILES['addfile']['tmp_name'],'.jpg')==true 
    || strrchr($_FILES['addfile']['tmp_name'],'.jpeg')==true 
    || strrchr($_FILES['addfile']['tmp_name'],'.gif')==true 
    || strrchr($_FILES['addfile']['tmp_name'],'.png')==true 
    || strrchr($_FILES['addfile']['name'],'.jpg')==true 
    || strrchr($_FILES['addfile']['name'],'.jpeg')==true 
    || strrchr($_FILES['addfile']['name'],'.gif')==true 
    || strrchr($_FILES['addfile']['name'],'.png')==true)) 
    
    // 479-500. Аффтар так любит копипасту и ненавидит циклы и file_put_contents()...
    
    if($_POST['event']=="registry" 
    && $_POST['sendname']!=$adminlogin 
    && $_POST['sendfio']!=$adminname) 
    { 
    if($_POST['sendkod']==$_POST['sendtrue'] 
    && $_POST['sendname']==true 
    && $_POST['sendpass']==true 
    && $_POST['sendfio']==true 
    && eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$", $_POST['sendemail']) 
    && $newuser=="yes" 
    && file_exists("data/users/".$_POST['sendname'].".txt")==false) 
    { 
    $fop=fopen("data/users/".$_POST['sendname'].".txt", "a+");fputs($fop, "user\r\n"); fclose($fop); 
    $fop=fopen("data/users/".$_POST['sendname'].".txt", "a+");fputs($fop, $_POST['sendname']."\r\n"); fclose($fop); 
    $fop=fopen("data/users/".$_POST['sendname'].".txt", "a+");fputs($fop, $_POST['sendpass']."\r\n"); fclose($fop); 
    $fop=fopen("data/users/".$_POST['sendname'].".txt", "a+");fputs($fop, $_POST['sendfio']."\r\n"); fclose($fop); 
    $fop=fopen("data/users/".$_POST['sendname'].".txt", "a+");fputs($fop, $_POST['sendemail']."\r\n"); fclose($fop); 
    $_GET['event']='ok';$_GET['zapros']=$startpage; 
    } 
    else{$_GET['event']='error';$_GET['zapros']=$r6;} 
    $kod=0; $koduri=0; 
    } 
    
    // 735-744. Даёшь копипасту в массы!
    
    $telo=str_replace(" ".$tempik[1]." "," <a href=".$tempik[0].">".$tempik[1]."</a> ",$telo); 
    $telo=str_replace(" ".$tempik[1].","," <a href=".$tempik[0].">".$tempik[1]."</a>,",$telo); 
    $telo=str_replace(" ".$tempik[1]."."," <a href=".$tempik[0].">".$tempik[1]."</a>.",$telo); 
    $telo=str_replace(" ".$tempik[1]."!"," <a href=".$tempik[0].">".$tempik[1]."</a>!",$telo); 
    $telo=str_replace(" ".$tempik[1]."?"," <a href=".$tempik[0].">".$tempik[1]."</a>?",$telo); 
    $telo=str_replace(" ".bukvaru($tempik[1],"bot")." "," <a href=".$tempik[0].">".bukvaru($tempik[1],"bot")."</a> ",$telo); 
    $telo=str_replace(" ".bukvaru($tempik[1],"bot").","," <a href=".$tempik[0].">".bukvaru($tempik[1],"bot")."</a>,",$telo); 
    $telo=str_replace(" ".bukvaru($tempik[1],"bot")."."," <a href=".$tempik[0].">".bukvaru($tempik[1],"bot")."</a>.",$telo); 
    $telo=str_replace(" ".bukvaru($tempik[1],"bot")."!"," <a href=".$tempik[0].">".bukvaru($tempik[1],"bot")."</a>!",$telo); 
    $telo=str_replace(" ".bukvaru($tempik[1],"bot")."?"," <a href=".$tempik[0].">".bukvaru($tempik[1],"bot")."</a>?",$telo); 
    
    // 805-808 не влезло, там подряд четыре if'а с одинаковыми условиями...

    То, за что глаз уцепился при беглом чтении файла index.php CMS RumbaEasy версии 2.4 (http://rumba.net.ru/easy/skachat.html). Советую скачать оригинал и почитать - оно того стоит. А уж как пафосно она разрекламирована авторами (http://rumba.net.ru/easy/)...

    З.Ы. Аффтары, если вы это читаете - извините, не имею ничего против вас лично, но, по-моему, самое место вашей разработке здесь.

    guest, 08 Июля 2009

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

    +143

    1. 1
    2. 2
    3. 3
    4. 4
    define ('bg_color', 'FFFFFF');
    define ('border_color', 'AAAAAA');
    define ('over_color', 'f4f4f4');
    define ('th_color', 'e4e4e4');

    CSS 4.0

    guest, 08 Июля 2009

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

    +146

    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
    <?php
    $link="http://cert.vatsim.net/cert/vatsimnet/idstatus.php?cid=111111";
    $contents = file_get_contents($link);
    
    if ($contents!=FALSE) {
    
        $xml = simplexml_load_string($contents);
    
        $output = "<code>".$contents."</code><br>LAST NAME: ".$xml->user->name_last;
        $output.="<br>EMAIL: ".$xml->user->email;
        
        return $output;
    }
    else {
        return "FAILED";
    }
    ?>

    Парсерчег XML статов из сети ВАТСИМ

    guest, 08 Июля 2009

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