This commit is contained in:
wangjinlei
2021-07-15 10:22:44 +08:00
parent 234745046d
commit 8ea54fdcc2
7 changed files with 12 additions and 176 deletions

View File

@@ -194,7 +194,7 @@ class Article extends Controller {
$editor_info = $this->user_obj->where('user_id',$journal_info['editor_id'])->find();
//更新文章状态
$this->article_obj->where('article_id',$data['article_id'])->update(['journal_id'=>$data['journal_id'],'editor_id'=>$journal_info['editor_id'],'state'=>1]);
$this->article_obj->where('article_id',$data['article_id'])->update(['journal_id'=>$data['journal_id'],'editor_id'=>$journal_info['editor_id'],'author_act'=>1,'state'=>1]);
//跟新转投表状态
$this->article_transfer_obj->where('transfer_id',$data['transfer_id'])->update(['state'=>1]);
@@ -225,52 +225,6 @@ class Article extends Controller {
//接受参数查询信息
$data = $this->request->post();
// return json($data);
// $data['abstrart'] = "dsadsadsadsa";
// $data['accept_sn'] = "20200811001";
// $data['articleId'] = 7;
// $data['authorList'] = [
// [
// 'address'=>"dsad",
// 'art_aut_id'=>5,
// 'company'=>"sads",
// 'country'=>"China",
// 'department'=>"adsa",
// 'email'=>"dsadsadsa",
// 'firstname'=>"dsadsa",
// 'isReport'=>'true',
// 'isSuper'=>"true",
// 'lastname'=>"dsadsa",
// 'title'=>"Ph.D."
// ],
// [
// 'address'=>"",
// 'art_aut_id'=>6,
// 'company'=>"dsadsa",
// 'country'=>"Angola",
// 'department'=>"dsa",
// 'email'=>"dsadsa",
// 'firstname'=>"dsad7",
// 'isReport'=>"false",
// 'isSuper'=>"true",
// 'lastname'=>"sada",
// 'title'=>"Associate Prof."
// ]
// ];
// $data['coverLetter']='';
// $data['ctime']="1597138197";
// $data['fund']="sadsadasd";
// $data['journal']="20";
// $data['journalname']="Infectious Diseases Research";
// $data['keyWords']="dsadsad";
// $data['manuscirpt']='';
// $data['picturesAndTables']='';
// $data['state']='4';
// $data['title']="dsadsadsa";
// $data['username']="wangjinlei";
$username = $data['username'];
$user_res = $this->user_obj->where(['account' => $username])->find();
$article_old_info = $this->article_obj->where('article_id',$data['articleId'])->find();
@@ -450,7 +404,7 @@ class Article extends Controller {
//查询转投期刊信息
$transfer_journal = $this->journal_obj->where('journal_id',$transfer_list[0]['journal_id'])->find();
//转投
$this->article_obj->where('article_id',$data['articleId'])->update(['state'=>1,'journal_id'=>$transfer_list[0]['journal_id'],'editor_id'=>$transfer_journal['editor_id']]);
$this->article_obj->where('article_id',$data['articleId'])->update(['state'=>1,'journal_id'=>$transfer_list[0]['journal_id'],'author_act'=>1,'editor_id'=>$transfer_journal['editor_id']]);
//转投信息表信息状态改变
$this->article_transfer_obj->where('transfer_id',$transfer_list[0]['transfer_id'])->update(['state'=>1]);
//查找转投journal信息
@@ -475,6 +429,7 @@ class Article extends Controller {
$tt .= 'Unfortunately the editors feel that '.$journal_info['title'].' is not the appropriate venue for your manuscript. I am writing just to follow up on the suggestion from the editor of Traditional Medicine Research that you might be interested in submitting your paper to '.$tran_journal['title'].' instead.<br><br>Yours sincerely,<br><br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$tran_journal['website'];
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
@@ -554,6 +509,7 @@ class Article extends Controller {
$tt .= 'Dear '.($user_info['realname']==''?'Authors':$user_info['realname']).',<br>Please check the new status of your manuscript online.<br><br>';
}
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$journal_info['website'];
if($data['state']!=5||$journal_info['journal_id']!=9){
@@ -694,6 +650,7 @@ class Article extends Controller {
$tt .= 'Your username:'.$reviewer_info['account'].'<br><br>';
$tt .= 'Your original password:123456qwe , if you have reset the password, please login with the new one or click the "<a href="https://submission.tmrjournals.com/retrieve">forgot password</a>".<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= $journal_info['title'].'<br>';
$tt .= 'Email:'.$journal_info['email'].'<br>';
$tt .= 'Website:'.$journal_info['website'];
@@ -708,7 +665,6 @@ class Article extends Controller {
//添加usermsg
add_usermsg($data['uid'], 'You have new manuscript to be approved', '/reviewerArticleDetail?id=' . $res);
return json(['code' => 0]);
}
@@ -766,32 +722,6 @@ class Article extends Controller {
public function addArticle() {
//接受参数,查询信息
$data = $this->request->post();
// return json($data);
// $data['abstrart'] = '大萨达撒多';
// $data['authorList'] = [
// [
// 'address'=>'dsadsa',
// 'company'=>'dasdsa',
// 'country'=>'china',
// 'department'=>'dsadsa',
// 'email'=>'6541654@qq.com',
// 'firstname'=>'dsadsa',
// 'isReport'=>'true',
// 'isSuper'=>'true',
// 'lastname'=>'dsadsa',
// 'title'=>'Ph.D.'
// ]
// ];
// $data['coverLetter'] = '';
// $data['fund'] = 'dsads';
// $data['journal'] = 1;
// $data['keyWords'] = 'dsads';
// $data['manuscirpt'] = "manuscirpt/20200727/cd67d8e8f944b5f1589cceb8e1aa967c.pdf";
// $data['picturesAndTables'] = [];
// $data['title'] = "大萨达撒多";
// $data['username'] = "wangjinlei";
$user_res = $this->user_obj->where('account', $data['username'])->find();
$journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
@@ -846,6 +776,7 @@ class Article extends Controller {
$transr = $transr?$this->article_transfer_obj->insert($trans_insert):false;
}
}
//增加articlefile表的信息
$res_file1 = self::save_article_file($res, $user_res['user_id'], $user_res['account'], $data['coverLetter'], 'coverLetter');
@@ -877,6 +808,7 @@ class Article extends Controller {
$tt1 .= 'You may check on the status of this manuscript in the Submission System. If you encounter any problems, please contact '.$journal_info['email'].'.<br><br>';
$tt1 .= 'Thank you for choosing to submit your manuscript to '.$journal_info['title'].'.<br><br><br>';
$tt1 .= 'Sincerely,<br>Editorial Office<br>';
$tt1 .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt1 .= $journal_info['title'].'<br>';
$tt1 .= 'Email: '.$journal_info['email'].'<br>';
$tt1 .= 'Website: '.$journal_info['website'];

View File

@@ -146,6 +146,7 @@ class Auto extends Controller {
$tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$journal_info['website'];
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
@@ -181,6 +182,7 @@ class Auto extends Controller {
$tt .= 'If you need more time to revise, you can send E-mial to tell us.<br>';
$tt .= 'Sincerely,<br>Editorial Office<br>';
$tt .= $journal_info['title'].'<br>';
$tt .= '<a href="https://www.tmrjournals.com/draw_up.html?issn='.$journal_info['issn'].'">Subscribe to this journal</a><br>';
$tt .= 'Email: '.$journal_info['email'].'<br>';
$tt .= 'Website: '.$journal_info['website'];
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);

View File

@@ -218,15 +218,6 @@ class Img extends Controller {
$re['url'] = 'public/zhengshu' . DS . 'zip' . DS . $data['course'] . '.zip';
return jsonSuccess($re);
//如果不要下载,下面这段删掉即可,如需返回压缩包下载链接,只需 return $zipName;
// header("Cache-Control: public");
// header("Content-Description: File Transfer");
// header('Content-disposition: attachment; filename='.basename($zipName)); //文件名
// header("Content-Type: application/zip"); //zip格式的
// header("Content-Transfer-Encoding: binary"); //告诉浏览器,这是二进制文件
// header('Content-Length: '. filesize($zipName)); //告诉浏览器,文件大小
// @readfile($zipName);
}
/**

View File

@@ -88,15 +88,6 @@ class Reviewer extends Controller {
public function articleReviewerUpSubmit($type) {
//接受参数,查询信息
$data = $this->request->post();
// $data['article'] = "dsadsaddsa";
// $data['articlefile'] = "articlefile/20200729/6e81db641bcf80bfcd2c9228cbb9ce71.docx";
// $data['articlezip'] = '';
// $data['artrevid'] = 1;
// $data['ctime'] = "1595993462";
// $data['editor'] = 'pipixia';
// $data['reviewer'] = 'nv';
// $data['state'] = 0;
$artrev_info = $this->article_reviewer_obj->where('art_rev_id', $data['artrevid'])->find();
$article_info = $this->article_obj->where('article_id',$artrev_info['article_id'])->find();
$editor_info = $this->user_obj->where('user_id',$article_info['editor_id'])->find();
@@ -273,18 +264,10 @@ class Reviewer extends Controller {
$tt1 .= 'Regards<br>Editorial Office<br>'.$journal_info['title'].'<br><br>';
$tt1 .= 'Contact us<br>TMR Publishing Group Address: 11 Cockle Bay Rd, Cockle Bay, Auckland 2014, New Zealand<br>Telephone: +64 02108293806<br>E-mail: publisher@tmrjournals.com';
sendEmail($reviewer_info['email'],'Your contribution is greatly appreciated', $journal_info['title'], $tt1,$journal_info['email'],$journal_info['epassword'],$reviewer_pdf);
//记录usermsg
add_usermsg($article_info['editor_id'], 'Feedback questionnaire be unloaded.', '/articleReviewerDetail?id='.$data['art_rev_id']);
// if ($res) {
return json(['code' => 0]);
// } else {
// return json(['code' => 1]);
// }
}
/**
@@ -334,16 +317,6 @@ class Reviewer extends Controller {
return $this->article_reviewer_file_obj->insert($insert_data);
}
// public function mytest(){
//
// $journal_info = $this->journal_obj->where('journal_id',1)->find();
// $ttt = self::pdftest('TMR');
// $tt1 = 'You have reviewed 1 submission in the journal '.$journal_info['title'].' during '.date('Y').'.Thank you for your support to our journal. This contribution is greatly appreciated.<br><br>';
// $tt1 .= 'Regards<br>Editorial Office<br>'.$journal_info['title'].'<br><br>';
// $tt1 .= 'Contact us<br>TMR Publishing Group Address: 11 Cockle Bay Rd, Cockle Bay, Auckland 2014, New Zealand<br>Telephone: +64 02108293806<br>E-mail: publisher@tmrjournals.com';
// sendEmail('751475802@qq.com','Your contribution is greatly appreciated', $journal_info['title'], $tt1,$journal_info['email'],$journal_info['epassword'],$ttt);
// }
//
/**
* 生成pdf感谢reviewer
*/

View File

@@ -167,9 +167,6 @@ class Staff extends Controller {
*/
public function getStaffArticles(){
$data = $this->request->post();
// $data['staff_id'] = 8;
// $data['date'] = '202104';
// $staff_info = $this->staff_obj->where('staff_id',$data['staff_id'])->find();
$journals = $this->journal_obj->where('staff_id',$data['staff_id'])->select();
if ($data['date'] != date('Ym')) {
$c_time = strtotime("-1 month", strtotime($data['date'] . '26 00:00:00'));
@@ -392,8 +389,6 @@ class Staff extends Controller {
//获取实时期刊提成情况
if (date('d') > 25) {
// $ch_time = strtotime(date('Y-m').'-26 00:00:00');
// $where['ctime'] = array('>',$ch_time);
//返回log数据
$log_res = $this->staff_log_obj->where('staff_id', $staff_info['staff_id'])->where('date', date('Ym'))->where('state', 0)->find();
if ($log_res) {

View File

@@ -75,10 +75,6 @@ class Super extends Controller{
*/
public function getCCArticles(){
$data = $this->request->post();
// $data['issn'] = '2522-6371';
// $data['type'] = "low";
// $data['start'] = '2021-01-01';
// $data['end'] = '2021-04-08';
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
$where['journal_id'] = $journal_info['journal_id'];
$where['ctime'] = [['>', strtotime($data['start'])],['<', strtotime($data['end'].' 23:59:59')]];
@@ -93,7 +89,6 @@ class Super extends Controller{
$where['repetition'] = ['>',50];
}
$list = $this->article_obj->where($where)->select();
// echo $this->article_obj->getLastSql();
$re['articles'] = $list;
return jsonSuccess($re);
}

View File

@@ -54,9 +54,6 @@ class User extends Controller {
return json(['code' => 0, 'userinfo' => $admin_info]);
}
} else {//用户登录
// $where['account'] = $data['username'];
// $where['password'] = md5($data['password']);
// $user_info = $this->user_obj->where($where)->find();
$user_info = $this->user_obj
->where('account|email', $data['username'])
->where('password', md5($data['password']))
@@ -131,25 +128,10 @@ class User extends Controller {
$tt .= "Username:$account<br>";
$tt .= "Password:" . $data['password'] . '<br><br>';
$tt .= "Many thanks<br>TMR Publishing Group";
// $content = $tt . '<p>Username:' . $account . '<br>Password:' . $data['password'] . '</p>';
sendEmail($email, 'Dear ' . $data['name'], 'TMR', $tt,);
return json($inser_data);
}
// public function tttt(){
// echo 'dsss';
// }
//
// public function mytestemail(){
// $journal_info = $this->journal_obj->where('journal_id',22)->find();
// //发送注册成功邮件
// $tt = 'Hello,<br><br>';
// $res = sendEmail('751475802@qq.com', 'Dear ' . $journal_info['title'], 'TMR', $tt,$journal_info['email'],$journal_info['epassword']);
// echo '<pre>';
// var_dump($res);
// echo '</pre>';
// die;
// }
/**
* 获取验证码图片(用户注册)
@@ -372,9 +354,10 @@ class User extends Controller {
$res = $this->reviewer_to_journal_obj->insert($insert_rtj);
//发送email
$content = "Thank you for registering as a " . $journal_info['title'] . " reviewer<br/>"
. "At present, you have passed our examination";
. "At present, you have passed our examination<br/>";
$content .= '<a href="https://submission.tmrjournals.com">SubmissionSystem</a><br>';
$content .= '<p>username:' . $apply_info['name'] . '</p>';
$content .= $has_res ? '' : '<p>password:123456qwe</p>';
$content .= '<p>Original Password: 123456qwe</p>';//$has_res ? '' : '<p>password:123456qwe</p>';
sendEmail($apply_info['email'], $journal_info['title'], $journal_info['title'], $content, $journal_info['email'], $journal_info['epassword']);
$update_res = $this->user_reviewer_obj->where($where)->update(['state' => 1]);
if ($res && $add_res && $addinfo_res && $update_res) {
@@ -545,44 +528,9 @@ class User extends Controller {
return jsonSuccess($re);
}
/**
* 获取用户为了绑定orcid
*/
// public function getUserForOrcid(){
// $data = $this->request->post();
// $url = 'https://orcid.org/oauth/token';
// $param['client_id'] = "APP-PKF0BGRP6DWM6FUB";
// $param['client_secret'] = "755a0e59-9282-44d0-afb4-ef9771942bab";
// $param['grant_type'] = "authorization_code";
// $param['code'] = $data['code'];
// $param['redirect_uri'] = "https://www.tmrjournals.com";
// $res = $this->myUrl($url, $param);
// $res1 = json_decode($res);
// $orcidID = $res1->orcid;
// $update['orcid'] = $orcidID;
// $update['orcid_code'] = $res;
// $this->user_obj->where('account',$data['account'])->update($update);
// return json(['code' => 0]);
// }
/**
* 授权码转化成令牌,并存贮
* object(stdClass)#31 (7) {
["access_token"]=>
string(36) "28924261-b2a9-4ed0-952c-e2647843d1ba"
["token_type"]=>
string(6) "bearer"
["refresh_token"]=>
string(36) "ef66ffc7-1004-4d10-abe4-bdede248af47"
["expires_in"]=>
int(631138518)
["scope"]=>
string(13) "/authenticate"
["name"]=>
string(8) "Nuoxi Pi"
["orcid"]=>
string(19) "0000-0003-3278-0964"
}
*/
public function sq_to_lp(){
$url = 'https://orcid.org/oauth/token';