1. Список говнокодов пользователя ast

    Всего: 3

  2. PHP / Говнокод #9471

    +156

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    if (strlen($arResult["AUTH"]["NEW_LOGIN"]) > 47)
    	$_POST["NEW_LOGIN"] = substr($arResult["AUTH"]["NEW_LOGIN"], 0, 47);
    
    if (strlen($arResult["AUTH"]["NEW_LOGIN"]) < 3)
    	$arResult["AUTH"]["NEW_LOGIN"] .= "_";
    
    if (strlen($arResult["AUTH"]["NEW_LOGIN"]) < 3)
    	$arResult["AUTH"]["NEW_LOGIN"] .= "_";

    битрикс, компонент sale.order.ajax

    ast, 17 Февраля 2012

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

    +162

    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
    $orders = $DB->Query("INSERT INTO `zcrm_orders` SET 
        `ORDER_NUMBER` = '09/".str_pad($arEventFields['ORDER_ID'], 6, '0', STR_PAD_LEFT)."', 
        `DATETIME` = '".$dateOrder."', 
        `FIO` = '".$arEventFields['ORDER_PROP_7']."', 
        `NAME_ORGANIZATION` = '".$arEventFields['ORDER_PROP_1']."', 
        `TELEFON` = '".$arEventFields['ORDER_PROP_4']."', 
        `TELEFON_MOD` = '".preg_replace('/[^\d]+/','', $arEventFields['ORDER_PROP_4'])."',
        `EMAIL` = '".$arEventFields['ORDER_PROP_6']."', 
        `OPLATA` = '8', 
        `DOSTAVKA` = '".$_POST["id_dostavka"]."', 
        `CITY` ='".$arEventFields['NASPUNKT_DOSTAVKA']."',
        `PUNKT_DOSTAVKA` = '".$arEventFields['ADRESS_DOSTAVKA']." ".$arEventFields['SKLAD_DOSTAVKA']."',
        `DATE_DOSTAVKA` = '".$arEventFields['DATE_DOSTAVKA']."', 
        `TIME_DOSTAVKA` = '".$arEventFields['TIME_DOSTAVKA']."', 
        `PRICE_DOSTAVKA` = '".$arEventFields['PRICE_DELIVERY2']."', 
        `COMMENTS` = '".$arOrder['USER_DESCRIPTION']."' ");

    Внимательно смотрим на 10 строчку.

    ast, 15 Февраля 2012

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

    +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
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    switch ($_SERVER['REQUEST_URI']) {
    
    	case "/technics/items.php?SECTION_ID=2395":
    			 LocalRedirect('/tele_video/televizory_led/televizor_led', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2395&brend=94279":
    			 LocalRedirect('/tele_video/televizory_led/televizor_led-lg', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2396&brend=94292":
    			 LocalRedirect('/tele_video/televizory_zhk/televizor_zhk-philips', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2397":
    			 LocalRedirect('/tele_video/televizory_plazmennye/televizor_plazmennyy', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2407&brend=94413":
    			 LocalRedirect('/tekhnika_dlya_doma/stiralnye_mashiny/stiralnaya_mashina-lg', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2407&brend=99348":
    			 LocalRedirect('/tekhnika_dlya_doma/stiralnye_mashiny/stiralnaya_mashina-bosch', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2407&brend=99402":
    			 LocalRedirect('/tekhnika_dlya_doma/stiralnye_mashiny/stiralnaya_mashina-indesit', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2407&brend=99413":
    			 LocalRedirect('/tekhnika_dlya_doma/stiralnye_mashiny/stiralnaya_mashina-samsung', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2407&brend=99518":
    			 LocalRedirect('/tekhnika_dlya_doma/stiralnye_mashiny/stiralnaya_mashina-hotpoint_ariston', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=94434":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-lg', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=94440":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-atlant', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=99353":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-bosch', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=99407":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-indesit', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=99448":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-samsung', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2408&brend=99513":
    			 LocalRedirect('/tekhnika_dlya_doma/kholodilniki/kholodilnik-hotpoint_ariston', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?group=94355&SECTION_ID=2401":
    			 LocalRedirect('/kukhnya/vstraivaemaya_tekhnika/kholodilnik', false, '301 Moved Permanently'); die(); 
    			break;
    	case "/technics/items.php?SECTION_ID=2396":
    			 LocalRedirect('/tele_video/televizory_zhk/televizor_zhk-philips', false, '301 Moved Permanently'); die(); 
    			break;
    		
    	}

    Вот такое чудо сегодня выкатил разработчик со стороны заказчика ))
    и это еще не все адреса...

    ast, 07 Февраля 2012

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