foreach ($categories as $v) {
if ($v->parent == 0) {
// выводим
}
}
var
sizex = 10,
sizey = 10,
cur_pos = 35,
dist = 2,
list = [];
var
pos_x = (cur_pos - 1) % sizex,
pos_y = Math.floor((cur_pos - 1)/sizex);
var
start_x = (pos_x - dist >= 0) ? pos_x - dist : 0,
start_y = (pos_y - dist >= 0) ? pos_y - dist : 0,
end_x = (pos_x + dist < sizex) ? pos_x + dist : sizex - 1,
end_y = (pos_y + dist < sizey) ? pos_y + dist : sizey - 1;
for (var y = start_y; y <= end_y; y++) {
for (var x = start_x; x <= end_x; x++) {
list.push(y * sizex + x + 1);
}
}
console.log(list);
The bucket name must be the same as the CNAME. So images.johnsmith.net/filename would be the same as images.johnsmith.net.s3.amazonaws.com/filename if a CNAME were created to map images.johnsmith.net to images.johnsmith.net.s3.amazonaws.com
echo '<h6><a id="link'.$i.'" href="http://shikimori.org'.$get[$i]->url.'" data-toggle="popover">'.$i.'.'.$get[$i]->russian.'</a></br></h6>';
if (isset($a) + isset($b) + isset($c) == 1) { ... }
if (empty($a) + empty($b) + empty($c) == 2) { ... }
$.post("/", {
do: 'shop',
action: 'basket_add',
id: id,
count: count,
opt1: opt1,
opt2: opt2,
opt3: opt3
}, function (data) {
loading_hide();
if ( data == 'error' ) return false;
//shop_basket_show();
if ( a.length ) a.html(btn_1 + btn_2);
$( ".sb-cont.element-sidebar-body.cart-body ul" ).replaceWith( data );
});