1
This commit is contained in:
@@ -232,6 +232,60 @@ function getArticleTracks($doi)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getAuthor($article) {
|
||||
$article_author_obj = Db::name("article_author");
|
||||
$where['article_id'] = $article['article_id'];
|
||||
$where['state'] = 0;
|
||||
$list = $article_author_obj->where($where)->select();
|
||||
$frag = '';
|
||||
foreach ($list as $k => $v) {
|
||||
$ca = '';
|
||||
if($v['orcid']!=''){
|
||||
$ca = '<a href="https://orcid.org/'.$v['orcid'].'" target="_blank"><img src="img/or_id.png" alt="" style="width: 13px;margin-left: 3px;"></a>';
|
||||
}
|
||||
$frag = $frag == '' ? '' . $v['author_name'].$ca : $frag . ', ' . $v['author_name'].$ca;
|
||||
}
|
||||
return $frag;
|
||||
}
|
||||
|
||||
function strongArticleList($list){
|
||||
$journal_stage_obj = Db::name("journal_stage");
|
||||
$journal_obj = Db::name("journal");
|
||||
$journals_ltai_obj = Db::name("article_ltai");
|
||||
foreach ($list as $k => $v) {
|
||||
$stage_info = $journal_stage_obj->where('journal_stage_id', $v['journal_stage_id'])->find();
|
||||
$journal_info = $journal_obj->where('journal_id', $v['journal_id'])->find();
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . choiseJabbr($v['article_id'],$journal_info['jabbr']) . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = getAuthor($v);
|
||||
$list[$k]["mains"] = null;
|
||||
$list[$k]['has_html'] = hasHtml($v['article_id']);
|
||||
}
|
||||
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $journals_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
//连续出版判断,决定是否显示出版时间
|
||||
foreach ($list as $k => $v){
|
||||
$ca_stage = $journal_stage_obj->where('journal_stage_id',$v['journal_stage_id'])->find();
|
||||
if(($v['journal_id']==2&&$ca_stage['stage_year']>=2022)||($v['journal_id']==18&&$ca_stage['stage_year']>=2022)||($v['journal_id']==17&&$ca_stage['stage_year']>=2019)){
|
||||
$list[$k]['isShowOtime'] = 1;
|
||||
}else{
|
||||
$list[$k]['isShowOtime'] = 0;
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
function choiseJtitle($list)
|
||||
{
|
||||
foreach ($list as $k => $v) {
|
||||
|
||||
Reference in New Issue
Block a user