((GetLanguage() == 1) ? 'Журнал' : 'Journal') .' "'.GetMagTitle($_GET['mag']).'"', "url" => '/'.$_GET['mag'].'/')); $addSql = ''; $ptitle = ''; if ((isset($_GET['year'])) && (isset($_GET['month']))) { if ((!is_numeric($_GET['year'])) || (!is_numeric($_GET['month']))) { die(); } header("location: https://nbpublish.com/e_".$_GET['mag']."/contents_".$_GET['year']."_".$_GET['month'].".html"); $isIssue = true; $title .= ' - номер '.$_GET['month'].' за '.$_GET['year'].' год'; $addSql = 'a.month = '.$_GET['month'].' AND a.year = '.$_GET['year']; $month = $_GET['month']; if ($month < 10) { $month = '0'.$month; } $ptitle = 'Содержание № '.$month.', '.$_GET['year']; if (GetLanguage() == 2) { $ptitle = 'Contents of Issue № '.$month.'/'.$_GET['year']; } $breadcrumbs[] = array('title' => $ptitle, 'url' => '/'.$_GET['mag'].'/contents_'.$_GET['year'].'_'.$_GET['month'].'.html'); } else if (isset($_GET['rubric'])) { if (!is_numeric($_GET['rubric'])) { die(); } header("location: https://nbpublish.com/e_".$_GET['mag']."/rubrics_".$_GET['rubric'].".html"); $isRubric = true; DBConnect(); $rubric = GetSQLValue('emag_rubrics', 'title'.((GetLanguage() == 1) ? "" : "_eng"), 'id_rubric = '.$_GET['rubric']); DBDisconnect(); $rubricT = (GetLanguage() == 1) ? 'рубрика' : 'rubric'; $rubricT2 = (GetLanguage() == 1) ? 'Рубрика' : 'Rubric'; $title .= ' - '.$rubricT.' '.$rubric; $addSql = 'a.id_rubric = '.$_GET['rubric']; $breadcrumbs[] = array('title' => $rubricT2.' "'.$rubric.'"', 'url' => '/'.$_GET['mag'].'/rubric_'.$_GET['rubric'].'.html'); } else { die(); } $orderStr = ' ORDER BY r.order_value ASC, a.id_rubric ASC, a.order_value ASC, a.page_start ASC '; $mag_id = GetMagID($_GET['mag']); DBConnect(); $id_mag = GetSQLValue('emag_mags', 'id_mag', 'str_id = "'.$_GET['mag'].'"'); $partial = GetSQLValue('emag_issues', 'partial', 'id_mag='.$id_mag.' AND month = '.$_GET['month']." AND year = ".$_GET['year']); $creation_phaze = GetSQLValue('emag_issues', 'creation_phaze', 'id_mag='.$id_mag.' AND month = '.$_GET['month']." AND year = ".$_GET['year']); $not_public_articles = GetRecordSet('emag_articles a LEFT JOIN emag_rubrics r ON a.id_rubric = r.id_rubric ', array("*"), 'a.status = 10 AND a.id_mag = '.$mag_id.' AND '.$addSql.$orderStr); $tFilter = new CTransliterationFilter(); for($i=0; $i < count($not_public_articles); $i++) if (strlen($not_public_articles[$i]['authors_eng']) < 2) { $not_public_articles[$i]['authors_eng'] = $tFilter->rus2translit($not_public_articles[$i]['authors']); } $output_info = GetOutputMagInfo($id_mag,$_GET['year'],$_GET['month']); $editor = $output_info['editor']; $issn = $output_info['issn']; $issue_date = $output_info['issue_date']; DBDisconnect(); $printed = IsPrintedMag($id_mag, $_GET['year'], $_GET['month']); if ($printed == 0) { $orderStr = ' ORDER BY a.page_start ASC '; } ShowTopPart($title); ShowMagColumn($_GET['mag']); $artCondition = ($printed == 1) ? "((a.status = 7) OR (a.status = 10))" : "(a.status = 7)"; $global_lang = GetLanguage(); $publisher = "ООО <НБ-Медиа>"; if ($global_lang == 2) { $publisher = "NB-Media ltd"; } $articles = new CList('emag_articles a LEFT JOIN emag_rubrics r ON a.id_rubric = r.id_rubric ', $artCondition.' AND a.id_mag = '.$mag_id.' AND '.$addSql.$orderStr, array("a.id_article","a.year","a.month","a.doi", "a.id_rubric", "a.title", "a.authors", "a.annotation", "a.title_eng", "a.annotation_eng", "a.page_start", "a.lang_text", "a.page_end", "a.printed", "a.free", "a.uploaded", "a.id_mag", "a.authors_eng","a.edn"), 'mag_contents/'); $articles->AddConst('articles_title', $ptitle); $articles->AddConst('mag_title', GetMagTitle($_GET['mag'])); $articles->AddConst('editor', $editor); $articles->AddConst('issn', $issn); $articles->AddConst('partial', $partial); $articles->AddConst('creation_phaze', $creation_phaze); $articles->AddConst('mag_year', $_GET['year']); $articles->AddConst('issue_date', $issue_date); $articles->AddHelperQuery('SELECT title as rubric_title FROM emag_rubrics WHERE id_rubric = {id_rubric}'); $articles->AddHelperQuery('SELECT eprinted FROM emag_mags WHERE id_mag = {id_mag}'); $articles->AddHelperQuery("SELECT title as title_editor_column FROM emag_rubrics WHERE title LIKE '%колонка главного редактора%' AND id_rubric = {id_rubric}"); $articles->AddHelperQuery('SELECT title_eng as rubric_title_eng FROM emag_rubrics WHERE id_rubric = {id_rubric}'); if ($printed == 1) { $articles->AddGenerateMultiQuery('keywords', 'SELECT keyword FROM emag_keywords_eng WHERE id_article = {id_article}'); } $articles->AddHelperQuery('SELECT id_order as id_order_payed_subscribe FROM emag_orders WHERE id_article={id_article} AND order_type=22 AND id_user='.$_SESSION['id_user'].' AND is_payed=1'); $articles->AddConst('mag', $_GET['mag']); $articles->AddConst("breadcrumbs", $breadcrumbs); $articles->AddConst("view_rubric", $isRubric ? 1 : 0); $articles->AddConst('isDirector', $isDirector); $articles->AddConst('publisher', $publisher); $articles->AddConst('not_public_articles', $not_public_articles); $articles->AddConst('not_public_articles_cnt', count($not_public_articles)); $articles->AddFieldFilter('annotation', new CAnnotationFilter()); $articles->AddFieldFilter('annotation_eng', new CAnnotationFilter()); if (GetLanguage() == 2) { $articles->AddFieldFilter("authors", new CTransliterationIfNeededFilter()); } $articles->AddFieldFilter("authors_eng", new CTransliterationIfNeededFilter()); $articles->AddFieldFilter('doi', new CDoiFilter()); $articles->SetRecordCountInPage(240); $articles->Show(); ShowBottomPart(); ?>