1
This commit is contained in:
@@ -261,6 +261,28 @@ function my_doiToFrag($data){
|
||||
$ts_refer_obj->close();
|
||||
}
|
||||
|
||||
function my_doiToFrag1($data){
|
||||
$p_refer_obj = Db::name('production_article_refer');
|
||||
if($data['refer_doi']==''){
|
||||
return 0;
|
||||
}
|
||||
$doi = str_replace('/','%2F',$data['refer_doi']);
|
||||
$url = "https://citation.crosscite.org/format?doi=$doi&style=american-veterinary-medical-association&lang=en-US";
|
||||
$res = myGet($url);
|
||||
$frag = trim(substr($res,strpos($res,'.')+1));
|
||||
$f = '';
|
||||
$cs = 0;
|
||||
if($frag==""){
|
||||
$f = $data['refer_content'];
|
||||
}else{
|
||||
$c_frag = rtrim($frag,'.');
|
||||
$f = substr_replace($c_frag,PHP_EOL,strripos($c_frag,"http"),0);
|
||||
$cs = 1;
|
||||
}
|
||||
$p_refer_obj->where('p_refer_id',$data['p_refer_id'])->update(['refer_frag'=>$f,"cs"=>$cs]);
|
||||
$p_refer_obj->close();
|
||||
}
|
||||
|
||||
|
||||
function my_tg_pushmail($data){
|
||||
$res = sendEmail($data['email'],$data['title'],$data['title'],$data['content'],$data['tmail'],$data['tpassword'],$data['attachmentFile']);
|
||||
|
||||
Reference in New Issue
Block a user