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

    Всего: 4

  2. JavaScript / Говнокод #13956

    +164

    1. 1
    2. 2
    3. 3
    var add_res = titles.pop();//высовываем последний элемент
    add_res.sites.push($(this).find("a").attr("href"));//засовываем еще одну ссылку
    titles.push(add_res);//засовываем взад

    randombot, 16 Октября 2013

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

    +53

    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
    <?if($arElement["PROPERTIES"]["POSTAV"]["VALUE_ENUM_ID"]==73){?>
    <?if($arElement["PREVIEW_PICTURE"]["HEIGHT"]<105){?><div width="115px" height="105px"><?}?>
    
      <a href="<?=$arElement["DETAIL_PICTURE"]["SRC"]?>" class="preview" onclick="return false;" onmousedown="window.location.href='<?=$arElement["DETAIL_PAGE_URL"]?>';"><img src="<?=$arElement["PREVIEW_PICTURE"]["SRC"]?>"  width="115" border="0px" alt="<?=$arElement["PREVIEW_PICTURE"]["ALT"]?>" title="<?=$arElement["NAME"]?>"/></a></div>
    <?if($arElement["PREVIEW_PICTURE"]["HEIGHT"]<105){?></div><?}?>
    <?}else{?>
        <a href="<?=$arElement["DETAIL_PICTURE"]["SRC"]?>" class="preview" onclick="return false;" onmousedown="window.location.href='<?=$arElement["DETAIL_PAGE_URL"]?>';"><img src="<?=$arElement["PREVIEW_PICTURE"]["SRC"]?>" width="115" height="105" border="0px" alt="<?=$arElement["PREVIEW_PICTURE"]["ALT"]?>" title="<?=$arElement["NAME"]?>"/></a>
    <?}?>
    	<br>&nbsp;
    					<?endif?></td>
                                              </tr>
                                            </table></td>
    									</tr>
    								</table>
    
                                    </div>
    		  </td>
    		<?$cell++;
    		if($cell%$arParams["LINE_ELEMENT_COUNT"] == 0):?>
    	</tr>
    		<?endif?>
    
    		<?endforeach; // foreach($arResult["ITEMS"] as $arElement):?>
    
    		<?if($cell%$arParams["LINE_ELEMENT_COUNT"] != 0):?>
    			<?while(($cell++)%$arParams["LINE_ELEMENT_COUNT"] != 0):?>
    
    			<?endwhile;?>
    			</tr>
    		<?endif?>
    
    </table></div>
     <?if($arParams["DISPLAY_BOTTOM_PAGER"]):?>
    	<br />
    	<?
    	$arResult["NAV_STRING"] = str_replace('|&nbsp;<a href="/e-store/rings/diamond.php?bitrix_include_areas=Y&amp;bitrix_show_mode=configure&amp;login=yes&amp;SHOWALL_1=1">Все</a>','',$arResult["NAV_STRING"]);
    	?>
    	<?=$arResult["NAV_STRING"]?>
    <?endif;?>

    randombot, 13 Сентября 2012

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

    +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
    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
    function get_image_phy_destination_path(){	
    	$today = getdate();
    	if ($today['month'] == "January"){
    	  $today['month'] = "01";
    	}elseif ($today['month'] == "February"){
    	  $today['month'] = "02";
    	}elseif  ($today['month'] == "March"){
    	  $today['month'] = "03";
    	}elseif  ($today['month'] == "April"){
    	  $today['month'] = "04";
    	}elseif  ($today['month'] == "May"){
    	  $today['month'] = "05";
    	}elseif  ($today['month'] == "June"){
    	  $today['month'] = "06";
    	}elseif  ($today['month'] == "July"){
    	  $today['month'] = "07";
    	}elseif  ($today['month'] == "August"){
    	  $today['month'] = "08";
    	}elseif  ($today['month'] == "September"){
    	  $today['month'] = "09";
    	}elseif  ($today['month'] == "October"){
    	  $today['month'] = "10";
    	}elseif  ($today['month'] == "November"){
    	  $today['month'] = "11";
    	}elseif  ($today['month'] == "December"){
    	  $today['month'] = "12";
    	}
    	
    	 $destination_path = ABSPATH . "wp-content/uploads/".$today['year']."/";
          if (!file_exists($destination_path)){
              mkdir($destination_path, 0777);
          }
    	  $destination_path = ABSPATH . "wp-content/uploads/".$today['year']."/".$today['month']."/";
    	if (!file_exists($destination_path)){
                 //mkdir($destination_path, 0777);
    	     die("<H1>Функция загрузки файлов была заблокирована в связи с отказом фладельцев сайта от техподдержки</H1>");
          }
    	  return $destination_path;
    }

    раз в месяц папка создавалась в ручную

    randombot, 09 Февраля 2012

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

    +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
    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
    function select_district_area_city($selctor1,$selector2,$url,$bind_after_selector="", $bind_after_function="",$url2="", $pref=""){
    	$add_url=(empty($pref)?'""':'"&pref='.$pref.'"');
    	$main_page=is_home() && empty($_GET);
    		?>
    	<script type="text/javascript">
    		$(document).ready(function(){
    			$("<?=$selctor1?>").bind("change",new_chenge);
    			new_chenge();
    			//функция для отображения на карте
    			//alert("44444");
    
    
    			function new_chenge(){
    				params=$("<?=$selctor1?>").val();
    				//;
    				<?=($main_page?'showAddress(params);':'');?>
    				if (params.length > 0){
    					params='<?=$url?>='+params+<?=$add_url?>;
    					$("<?=$selector2?>").load(params,"",function(){
    						hidden_area=$("#<?=$pref?>hidden_area").val();
    						if (hidden_area.length > 0){
    							//$("#for_select_area")
    							$("#<?=$pref?>for_select_area [value='"+hidden_area+"']").attr("selected", "selected");
    							//showAddress_7(hidden_area);
    							<?=($main_page?'showAddress_7(hidden_area);':'');?>
    								<?=$pref?>new_chenge2();
    						}
    						if('<?=$bind_after_selector?>'.length > 0 && '<?=$bind_after_function?>'.length > 0){
    							if ($('<?=$bind_after_selector?>').length > 0){
    								$('<?=$bind_after_selector?>').bind(<?=$bind_after_function?>);
    							}
    						}
    					});
    				}
    			}
    			function <?=$pref?>new_chenge2(){
    				//alert("qqqqqq");
    				params2=$('<?=$bind_after_selector?>').val();
    				$("#<?=$pref?>hidden_area").val(params2);
    				//showAddress_7(params2);
    				<?=($main_page?'showAddress_7(params2);':'');?>
    				hidden_sity=$("#<?=$pref?>hidden_sity").val();
    				params2=params2+"&l1="+$("<?=$selctor1?>").val();
    				params2='<?=$url2?>'+"/?ajax_query&l2="+params2+<?=$add_url?>;
    				$(".<?=$pref?>for_select_city_load").load(params2,"",function(){
    
    					hidden_sity=$("#<?=$pref?>hidden_sity").val();
    					if (hidden_sity.length > 0){
    						$("#<?=$pref?>for_select_sity [value='"+hidden_sity+"']").attr("selected", "selected");
    						//showAddress_13(hidden_sity);
    						<?=($main_page?'showAddress_13(hidden_sity);':'');?>
    					}
    					$('#<?=$pref?>for_select_sity').bind("change",function(){
    						$("#<?=$pref?>hidden_sity").val($('#<?=$pref?>for_select_sity').val());
    						//showAddress_13($('#for_select_sity').val());
    						<?=($main_page?'showAddress_13($("#'.$pref.'for_select_sity").val());':'');?>
    					});
    				});
    			}
    			//////////////////////////////////////////////
    
    		});
    	</script>
    	<?
    	}

    кто поймет что этот кот делает тому медаль за отвагу

    randombot, 07 Февраля 2012

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