diff --git a/application/api/controller/Article.php b/application/api/controller/Article.php
index 99b0d3c..60e3507 100644
--- a/application/api/controller/Article.php
+++ b/application/api/controller/Article.php
@@ -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.
Yours sincerely,
';
$tt .= 'Sincerely,
Editorial Office
';
$tt .= $journal_info['title'].'
';
+ $tt .= 'Subscribe to this journal
';
$tt .= 'Email: '.$journal_info['email'].'
';
$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']).',
Please check the new status of your manuscript online.
';
}
$tt .= $journal_info['title'].'
';
+ $tt .= 'Subscribe to this journal
';
$tt .= 'Email: '.$journal_info['email'].'
';
$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'].'
';
$tt .= 'Your original password:123456qwe , if you have reset the password, please login with the new one or click the "forgot password".
';
$tt .= 'Sincerely,
Editorial Office
';
+ $tt .= 'Subscribe to this journal
';
$tt .= $journal_info['title'].'
';
$tt .= 'Email:'.$journal_info['email'].'
';
$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'].'.
';
$tt1 .= 'Thank you for choosing to submit your manuscript to '.$journal_info['title'].'.
';
$tt1 .= 'Sincerely,
Editorial Office
';
+ $tt1 .= 'Subscribe to this journal
';
$tt1 .= $journal_info['title'].'
';
$tt1 .= 'Email: '.$journal_info['email'].'
';
$tt1 .= 'Website: '.$journal_info['website'];
diff --git a/application/api/controller/Auto.php b/application/api/controller/Auto.php
index 7e1124f..73e167a 100644
--- a/application/api/controller/Auto.php
+++ b/application/api/controller/Auto.php
@@ -146,6 +146,7 @@ class Auto extends Controller {
$tt .= 'If you need more time to revise, you can send E-mial to tell us.
';
$tt .= 'Sincerely,
Editorial Office
';
$tt .= $journal_info['title'].'
';
+ $tt .= 'Subscribe to this journal
';
$tt .= 'Email: '.$journal_info['email'].'
';
$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.
';
$tt .= 'Sincerely,
Editorial Office
';
$tt .= $journal_info['title'].'
';
+ $tt .= 'Subscribe to this journal
';
$tt .= 'Email: '.$journal_info['email'].'
';
$tt .= 'Website: '.$journal_info['website'];
sendEmail($user_info['email'], $journal_info['title'], $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
diff --git a/application/api/controller/Img.php b/application/api/controller/Img.php
index 39c9b4d..302a26f 100644
--- a/application/api/controller/Img.php
+++ b/application/api/controller/Img.php
@@ -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);
}
/**
diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php
index 2352bd8..bbc559d 100644
--- a/application/api/controller/Reviewer.php
+++ b/application/api/controller/Reviewer.php
@@ -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
Editorial Office
'.$journal_info['title'].'
';
$tt1 .= 'Contact us
TMR Publishing Group Address: 11 Cockle Bay Rd, Cockle Bay, Auckland 2014, New Zealand
Telephone: +64 02108293806
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.
';
-// $tt1 .= 'Regards
Editorial Office
'.$journal_info['title'].'
';
-// $tt1 .= 'Contact us
TMR Publishing Group Address: 11 Cockle Bay Rd, Cockle Bay, Auckland 2014, New Zealand
Telephone: +64 02108293806
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
*/
diff --git a/application/api/controller/Staff.php b/application/api/controller/Staff.php
index 173789e..e596242 100644
--- a/application/api/controller/Staff.php
+++ b/application/api/controller/Staff.php
@@ -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) {
diff --git a/application/api/controller/Super.php b/application/api/controller/Super.php
index 2ae2cd0..86a8e76 100644
--- a/application/api/controller/Super.php
+++ b/application/api/controller/Super.php
@@ -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);
}
diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index 033d822..a8a5592 100644
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -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
";
$tt .= "Password:" . $data['password'] . '
';
$tt .= "Many thanks
TMR Publishing Group";
-// $content = $tt . '
Username:' . $account . '
Password:' . $data['password'] . '
'; -// var_dump($res); -// echo ''; -// 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
username:' . $apply_info['name'] . '
'; - $content .= $has_res ? '' : 'password:123456qwe
'; + $content .= 'Original Password: 123456qwe
';//$has_res ? '' : 'password:123456qwe
'; 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';