- 1
- 2
- 3
var add_res = titles.pop();//высовываем последний элемент
add_res.sites.push($(this).find("a").attr("href"));//засовываем еще одну ссылку
titles.push(add_res);//засовываем взад
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 4
+164
var add_res = titles.pop();//высовываем последний элемент
add_res.sites.push($(this).find("a").attr("href"));//засовываем еще одну ссылку
titles.push(add_res);//засовываем взад
+53
<?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>
<?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('| <a href="/e-store/rings/diamond.php?bitrix_include_areas=Y&bitrix_show_mode=configure&login=yes&SHOWALL_1=1">Все</a>','',$arResult["NAV_STRING"]);
?>
<?=$arResult["NAV_STRING"]?>
<?endif;?>
+160
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;
}
раз в месяц папка создавалась в ручную
+150
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>
<?
}
кто поймет что этот кот делает тому медаль за отвагу