get($user_id); $agency_id = $user->agencyId; //} /* $nameDefault = "Обычные"; $sqlCastom = "SELECT * FROM funnel_default WHERE agency_id = {$agency_id}"; $qCastom = mysql_query($sqlCastom); if(mysql_num_rows($qCastom) > 0){ $rCastom = mysql_fetch_assoc($qCastom); if(!empty($rCastom['name'])) $nameDefault = $rCastom['name']; if($rCastom['is_show_funnels'] == 0) $isShowFunnels = false; $rCastom['id'] = 0; $arrayFunnel[] = $rCastom; } else { $arrayFunnel[] = array('id' => 0, 'name' => 'Обычные', 'is_client' => 1, 'is_req' => 1, 'is_stage' => 1, 'is_show_funnels' => 1, 'order_number' => 0); }*/ $funnelId = $post['funnel_id']; $section = $post['section']; $useCustomFunnel = boolval($post['use_custom']); if ($useCustomFunnel || $agency_id == 8353){ $nameDefault = "Обычные"; $sqlCastom = "SELECT * FROM funnel_default WHERE agency_id = {$agency_id}"; $qCastom = mysql_query($sqlCastom); if(mysql_num_rows($qCastom) > 0){ $rCastom = mysql_fetch_assoc($qCastom); if(!empty($rCastom['name'])) $nameDefault = $rCastom['name']; if($rCastom['is_show_funnels'] == 0) $isShowFunnels = false; $rCastom['id'] = 0; $arrayFunnel[] = $rCastom; } else { $arrayFunnel[] = array('id' => 0, 'name' => 'Обычные', 'is_client' => 1, 'is_req' => 1, 'is_stage' => 1, 'is_show_funnels' => 1, 'order_number' => 0); } } ?>