preg_match_all($pattern, $str_subids, $subids); foreach ($subids[0] as $key => $subid) { import_sale_info($leadsType, $amount, $currency_id, $subid); } break; case 'arch_link': $ids = rq('id', -2); $arch = rq('arch', 2); delete_offer($ids, $arch ? 2 : 0); cache_outs_update($ids); break; case 'fave_link': $ids = rq('id', 2); $fave = rq('fave', 2); delete_offer($ids, $fave ? 3 : 0); $out = array('have_favorits' => offers_have_status(3)); echo json_encode($out); exit; break; case 'delete_link': $ids = rq('id', -2); $cat_type = rq('cat_type'); $cat_id = rq('cat_id', 2); delete_offer($ids); cache_outs_update($ids); $offers_arr = offers_total($cat_type, $cat_id); $out = array('total' => $offers_arr['total'], 'total_html' => tpx('links_table_total', $offers_arr), 'more' => $offers_arr['more']); echo json_encode($out); exit; break; // ну а вдруг кто-то уберёт exit ;)
if(show) { window.location.href = $('#submenu_all_offers').children().first().find('a').attr('href'); } return false; }); }); </script> <?php // Проверка на наличие избранного $have_favorits = offers_have_status(3); if ($cat_type == 'favorits' and !$have_favorits) { redirect(_HTML_ROOT_PATH . '/?page=links'); } /* Проверка на наличие архива (второй раз потому, что первый редирект будет * срабатывать довольно часто, и чтобы не считать впустую offers_have_status) */ $have_archive = offers_have_status(2); if ($cat_type == 'archive' and !$have_archive) { redirect(_HTML_ROOT_PATH . '/?page=links'); } ?> <!-- BEGIN SIDEBAR LEFT --> <div class="sidebar-left<?php echo $menu_toggle_class; ?> "> <!-- Button sidebar left toggle --> <div class="btn-collapse-sidebar-left icon-dynamic<?php echo $menu_icon_class; ?> " data-toggle="tooltip" data-placement="bottom" title="Свернуть левое меню"></div>