$arrAction = array('news' => false, 'articles' => false, 'vacancy' => false, 'resume' => false); // определяем контент для отображения isset($_GET['action']) && isset($arrAction[$_GET['action']]) ? $arrAction[$_GET['action']] = true : null; /** * Показываем НОВОСТИ */ if ($arrAction['news']) { $rss = new rss(); header("Content-type: application/rss+xml"); echo $rss->rssNews(); exit; } elseif ($arrAction['articles']) { $rss = new rss(); header("Content-type: application/rss+xml"); if (isset($_GET['subaction']) && 'section' === $_GET['subaction'] && !empty($_GET['id']) && ($id = chpu::getId_out_tId($_GET['id']))) { echo $rss->rssArticles($id); } else { echo $rss->rssArticles(); } exit; } elseif ($arrAction['vacancy']) { // инициируем объект $rss = new rss(); header("Content-type: application/rss+xml"); if (isset($_GET['subaction']) && ('section' === $_GET['subaction'] || 'region' === $_GET['subaction']) && isset($_GET['id']) && (int) abs($_GET['id'])) { echo $rss->rssVacancy($_GET['subaction'], $_GET['id']); } else { echo $rss->rssVacancy(); } exit; } elseif ($arrAction['resume']) {