manageExportActions($_GET); exit(); } //Click on Ads [Load the url provided in admin section] if(isset($_GET['adsc'])) { $qStr = "UPDATE ju_ads SET ads_clicks = ads_clicks + 1 WHERE ads_code = ".$cnf->mt($_GET['adsc'], 3)." AND journal_code = ".$cnf->journalCode; $cnf->db_conn->exec($qStr); $qStr = "SELECT ads_code,ads_link FROM ju_ads WHERE ads_code = ".$cnf->mt($_GET['adsc'], 3)." AND journal_code = ".$cnf->journalCode; $ads = $cnf->db_conn->query($qStr); if ($cnf->mdb2->isError($ads)) { __redirect("/"); exit(); } $thisAds = $ads->fetchRow(); if(!$thisAds) { __redirect("/"); exit(); } $ads_link = $thisAds->ads_link; if(!preg_match("/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $ads_link)) { __redirect("/"); exit(); } header("Location: ".$ads_link); exit(); } if (!isset($_REQUEST['_action'])){ $_REQUEST['_action'] = ""; } //Show PDF file if ($_REQUEST['_action'] == "showPDF") { $setting = $cnf->getJuSetting("'login_for_fulltext','ft_label'", "", 4, 0); if(!isset($_SESSION[SESSION_NAME_ID]) && $setting["login_for_fulltext"] == "1") { $_SESSION['pLoc'] = "./"; __redirect("contacts?_action=login"); exit(); } ob_clean(); $_SERVER['QUERY_STRING'] = base64_encode('showPDF='.$_REQUEST['article']."&rb=1&".$_SERVER['QUERY_STRING']); require_once "jufile.php"; exit(); } //Show XML file elseif($_REQUEST['_action'] == 'xml') { $cnf->showXML($_GET); exit(); } //Anotations elseif($_REQUEST['_action'] == 'get_annot') { $cnf->getAnnotationOptions($_GET); exit(); } elseif($_REQUEST['_action'] == 'trnsf') { $ar_code = $cnf->getTransferredArticle($_REQUEST); __redirect("/article_".$ar_code.".html"); exit(); } elseif(isset($_GET["sid"])) { $_REQUEST['_action'] = "linkout"; } //Page Tytles $thisPage = "home"; $pgTitle = ""; switch ($_REQUEST['_action']) { case 'advSearch': $pgTitle = ___('IND_ADVANCED_SEARCH'); break; case 'article': $pgTitle = ___('IND_ARTICLES_LIST'); break; case 'press': $pgTitle = ___('IND_IN_PRESS'); break; case 'articleInfo': $pgTitle = ___('IND_ARTICLE_DETAILS'); break; case 'current': $pgTitle = ___('IND_CURRENT_ISSUE'); break; case 'xml': $pgTitle = "XML"; break; } $pageTitle = $pgTitle; //*********************** Article info */ if($_REQUEST['_action'] == "articleInfo" && ctype_digit($_GET['article'])) { $_PARAMS = $_GET; $_PARAMS['article_code'] = $_GET['article']; $qStr = "SELECT print_issn,online_issn FROM ju_journals WHERE journal_code = ".$cnf->journalCode; $res = $cnf->db_conn->query($qStr); if ($cnf->mdb2->isError($res)) { die($res->getMessage()); } $thisJu = $res->fetchRow(); $thisArticle = $cnf->getArticleInfo($_PARAMS); if(!is_null($thisArticle)) { $_PARAMS['list'] = 1; $authors = $cnf->getArticleAuthors($_PARAMS); $keywords = $cnf->getArticleKeywords($_PARAMS); $kw = []; while($thisKw = $keywords->fetchRow()) { $kw[] = $thisKw->kw_name; } $_REQUEST["vol"] = $thisArticle->vi_code; $pageTitle = strip_tags($cnf->removeExtraChars(preg_replace("/[\r\n]+/", " ", $thisArticle->article_title))); $ar_abstract = $cnf->removeExtraChars(strip_tags($thisArticle->article_abstract), 2); $tcnf->addMeta("keywords", strip_tags($cnf->removeExtraChars(implode(",", $kw)))); $tcnf->addMeta("description", $ar_abstract); $tcnf->addMeta("title", $pageTitle); $tcnf->addMeta("googlebot", "NOODP"); $tcnf->addMeta("citation_title", $pageTitle); while($thisAuthor = $authors->fetchRow()) { $tcnf->addMeta("citation_author", $cnf->removeExtraChars(ucwords($thisAuthor->author_lname.", ".$thisAuthor->author_fname." ".$thisAuthor->author_middle))); $thisAuthor->author_address = explode("|", $thisAuthor->author_address); foreach ($thisAuthor->author_address as $author_address) { $tcnf->addMeta("citation_author_institution", $cnf->removeExtraChars($author_address)); } } $tcnf->addMeta("citation_abstract", $ar_abstract); $tcnf->addMeta("citation_id", $thisArticle->article_code); $tcnf->addMeta("citation_publication_date", date("Y/m/d", strtotime($thisArticle->publish_date))); $tcnf->addMeta("citation_date", date("Y-m-d", strtotime($thisArticle->publish_date))); $tcnf->addMeta("citation_journal_title", $cnf->juName); $tcnf->addMeta("citation_issn", $thisJu->print_issn != "" ? $thisJu->print_issn : $thisJu->online_issn); $tcnf->addMeta("citation_volume", $cnf->mt($thisArticle->article_volume), 3); $tcnf->addMeta("citation_issue", $thisArticle->article_issue); $tcnf->addMeta("citation_firstpage", $thisArticle->page_from); $tcnf->addMeta("citation_lastpage", $thisArticle->page_to); $tcnf->addMeta("citation_publisher", $cnf->getJuSetting("'ow_note'", ___('JU_LOCALE'), 1)); if($thisArticle->doi){ $tcnf->addMeta("citation_doi", $thisArticle->doi); $tcnf->addMeta("DC.Identifier", $thisArticle->doi); } $tcnf->addMeta("citation_abstract_html_url", $cnf->juBaseURL.'article_'.$thisArticle->article_code.'.html'); if ($thisArticle->full_text_file != "" && file_exists($cnf->Full_Text_Path.$thisArticle->full_text_file)) { $tcnf->addMeta("citation_pdf_url", $cnf->juBaseURL."article_".$thisArticle->article_code."_".md5($thisArticle->full_text_file).".pdf"); } $tcnf->addMeta("DC.Title", $pageTitle); $tcnf->addMeta("DC.Source", $cnf->juName); $tcnf->addMeta("DC.Date", date("d/m/Y", strtotime($thisArticle->publish_date))); $tcnf->addMeta("DC.Date.issued", date("Y-m-d", strtotime($thisArticle->publish_date))); $tcnf->addMeta("DC.Format", "application/pdf"); $authors->seek(0); while($thisAuthor = $authors->fetchRow()) { $tcnf->addMeta("DC.Contributor", $cnf->removeExtraChars(ucwords(trim($thisAuthor->author_lname.", ".$thisAuthor->author_fname." ".$thisAuthor->author_middle)))); } $tcnf->addMeta("og:title", $pageTitle); $tcnf->addMeta("og:description", $ar_abstract); $tcnf->addMeta("og:url", $cnf->juBaseURL.'article_'.$thisArticle->article_code.'.html'); } } // else { if($_REQUEST['_action'] == "") { $_PARAM = array("fld" => "show_current_issue,show_top_articles,show_editor_choice,show_keyword_cloud,has_tex,hide_vol_year,indx_limit,only_edb,top_article_setting"); } else { $_PARAM = array("fld" => "show_current_issue,has_tex,hide_vol_year"); } $setting = $cnf->getHomeSettings($_PARAM); $tcnf->addScript('inc/js/article.js?v=0.31',false,true); if($setting['has_tex'] == "1") { //$tcnf->addScript("MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\\\(','\\\\)']]}});", true,true,'text/x-mathjax-config'); //$tcnf->addScript('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML',false,true,"text/javascript","async"); $tcnf->addScript("MathJax = {tex: {inlineMath: [['$', '$'], ['\\\\(','\\\\)']]}};", true,true); $tcnf->addScript('https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js',false,true,"text/javascript","async"); } //////////////////////////////////////////////////////////////////////////////////////// if($_REQUEST['_action'] != "" || $setting["show_current_issue"] == "1") { $__pageAction=$cnf->pageActions(true); $tcnf->addVariable('pageAction',$__pageAction); } $__hFactFigure = []; $tcnf->addVariable('h_factFigure',$__hFactFigure); $_PARAMS = $_REQUEST; if($setting["show_current_issue"] == "1") { $_PARAMS['currentt'] = 1; } $juCover = $cnf->getJournalCoversheet($_PARAMS); if(!file_exists($juCover)) { $juCover = null; } $tcnf->addVariable('journalCover',$cnf->mt($juCover)); $_PARAM = array("iss" => (($setting["show_current_issue"] == "1" && $_REQUEST['_action'] == "") || $_REQUEST['_action'] == "current") ? 1 : 0); if ($setting["hide_vol_year"] == "1") { $_PARAM["hide_vol_year"] = $setting["hide_vol_year"]; } $__browseVolumeIssue=$cnf->browseVolumeIssue($_PARAM,true); $tcnf->addVariable('browseVolumeIssue',$__browseVolumeIssue); if ($_REQUEST["_action"] == "") { //Facts and Figures $h_setting = $cnf->getJuSetting("'facts_figures','facts_figurs','ow_note','ow_link','home_page_notes'", ___('JU_LOCALE'), 4); $__factsFigures = $cnf->getFactsFigures($h_setting["facts_figures"], true); $tcnf->addVariable('factsFigures', $__factsFigures); $__factsFigurs = $cnf->getFactsFigures($h_setting["facts_figurs"], true); $tcnf->addVariable('factsFigurs', $__factsFigurs); //publication info $__showJournalHome = $cnf->showJournalHome(["ow_note" => $h_setting["ow_note"], "ow_link" => $h_setting["ow_link"], "only_edb" => $setting["only_edb"]], true); $tcnf->addVariable('publicationInfo', $__showJournalHome); $__ads=$cnf->getAds([],true); $tcnf->addVariable('ads',$__ads); $__relj=$cnf->getRelatedJournals([],true); $tcnf->addVariable('relatedJournals',$__relj); $__indexing=$cnf->getIndexing($setting, true); $tcnf->addVariable('indexing',$__indexing); $__journalNews=$cnf->getJournalNews("", true); $tcnf->addVariable('journalNews',$__journalNews); } switch ($_REQUEST['_action']) { case 'advSearch': $__searchForm = $cnf->articleSearchForm("", true); $tcnf->addVariable('searchForm',$__searchForm); $tcnf->loadPageTemplate('adv_search',$pageTitle); break; case 'article': case 'press': $_PARAMS = $_REQUEST; if(isset($_GET['vol']) && !isset($_GET['issue'])) { $issue = $cnf->getLastVolumeIssue(3, $_GET['vol'], $setting["hide_vol_year"]); __redirect("issue_".$cnf->mt($_GET['vol'], 3)."_".$issue.".html"); return ; } $__articleList=$cnf->articleList($_PARAMS,true); $tcnf->addVariable('articleList',(object)$__articleList); $tcnf->loadPageTemplate('article_list',$pageTitle); break; case "linkout": $__articleInfo = $cnf->getLinkoutArticle($_GET); $tcnf->addVariable('articleInfo',$__articleInfo); $tcnf->loadPageTemplate('article_info',$pageTitle); break; case 'articleInfo': if(isset($_POST['save_comment'])) { $_PARAMS = $_POST; } else { $_PARAMS = array('article_code' => $_REQUEST['article']); } $__articleInfo = $cnf->articleInfo($_PARAMS,true); if (is_null($__articleInfo)) { __redirect("./error_page"); return; } $tcnf->addVariable('articleInfo',$__articleInfo); if($__articleInfo->setting->showFulltextJats && $__articleInfo->article->jatsFulltext){ $tcnf->addScript('inc/js/jats.js'); $tcnf->addStyle('inc/css/jats.min.css'); } $tcnf->loadPageTemplate('article_info',$pageTitle); break; case 'current': list($volume, $issue) = $cnf->getLastVolumeIssue(4, 0, $setting["hide_vol_year"]); __redirect("issue_".$cnf->mt($volume, 3)."_".$cnf->mt($issue, 3).".html"); break; case "cite": require_once "class/article.citation.class.php"; $ar_cite = new ArticleCitation(); $ar_cite->manageActions($_PARAMS); break; case "": //Index Page $tcnf->addVariable('aboutJournal', $h_setting["home_page_notes"]); $__topArticles = []; if(isset($setting["show_top_articles"]) && ($setting["show_top_articles"] == "1" || $setting["show_top_articles"] == 2)) { $_PARAM = array("top" => $setting["show_top_articles"], "top_article_setting" => $setting["top_article_setting"]); $__topArticles= $cnf->getTopArticles(2, $_PARAM,true); $__topArticles = $__topArticles ? (object)$__topArticles : []; } $tcnf->addVariable('topArticles',$__topArticles); $__currentArticleList = []; if($setting["show_current_issue"] == "1") { $issue = $cnf->getLastVolumeIssue(3, 0, $setting["hide_vol_year"]); if ($issue != 0) { $_PARAMS = array('issue'=> $issue, '_is'=> "", 'shSP'=>1, "lastIssue" => 1); $__currentArticleList= $cnf->articleList($_PARAMS,true); $__currentArticleList = $__currentArticleList ? (object)$__currentArticleList : []; } $tcnf->addVariable('currentIssueArticles',$__currentArticleList); if (!in_array($tcnf->frontTheme, ["old", "base"])) { $__articleInPress = []; $_SERVER['QUERY_STRING'] = "_action=press&issue=-1&_is=".___('IND_IN_PRESS'); $_PARAMS = array('_action' => "press", 'issue'=> -1); $__articleInPress=$cnf->articleList($_PARAMS,true); $__articleInPress = $__articleInPress ? (object)$__articleInPress : []; $tcnf->addVariable('inPressArticles',$__articleInPress); } } $__articleEditorChoice = []; if(isset($setting["show_editor_choice"]) && $setting["show_editor_choice"] == "1") { $__articleEditorChoice = $cnf->getEditorChoiceArticles(); $__articleEditorChoice = $__articleEditorChoice ? (object)$__articleEditorChoice : []; } $tcnf->addVariable('editorChoiceArticles',$__articleEditorChoice); $__keywordsCload = []; if(isset($setting["show_keyword_cloud"]) && $setting["show_keyword_cloud"] == "1") { $cache_cnf = new CacheManager(); $__keywordsCload = $cache_cnf->get('keyword_cloud'); if($__keywordsCload === null){ $__keywordsCload = $cnf->getTopKeywords(200); $cache_cnf->set('keyword_cloud',$__keywordsCload); } } $tcnf->addVariable('keywordsCload',$__keywordsCload); $tcnf->loadPageTemplate('index',''); break; } ob_flush(); ?>