添加审稿人邮件内容格式修改

This commit is contained in:
chengxl
2025-06-24 11:35:02 +08:00
parent 37827f902c
commit fa485e13ea

View File

@@ -1891,7 +1891,90 @@ class Article extends Base
/**
* 添加文章审稿实例(编辑)
*/
public function addArticleReviewer()
// public function addArticleReviewer()
// {
// //接收参数,查询数据
// $data = $this->request->post();
// $article_info = $this->article_obj->where('article_id', $data['articleId'])->find();
// $journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
// $editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
// $reviewer_info = $this->user_obj->where('user_id', $data['uid'])->find();
// $reviewer_move = $this->user_reviewer_info_obj->where("reviewer_info_id", $reviewer_info['user_id'])->find();
// //排除自己审自己
// $check_self = $this->article_author_obj->where("email",$reviewer_info['email'])->where("article_id",$article_info['article_id'])->where("state",0)->find();
// if($check_self){
// return jsonError("NoticeSelected reviewers may be the authors for this paper");
// }
// // $journal_info = $this->journal_obj->where('journal_id',$article_info['journal_id'])->find();
// $check = $this->article_reviewer_obj->where('reviewer_id', $data['uid'])->where('article_id', $data['articleId'])->find();
// if ($check) {
// return jsonError("Invitation record already exists!");
// }
// if($article_info['state']==0){
// return jsonError("The article can only be added in state with editor at least");
// }
// //增加信息到文章审稿表
// $insert_data['reviewer_id'] = $data['uid'];
// $insert_data['article_id'] = $data['articleId'];
// $insert_data['editor_act'] = 1;
// $insert_data['ctime'] = time();
// $insert_data['state'] = 5;
// $res = $this->article_reviewer_obj->insertGetId($insert_data);
// //修改文章状态->审稿中
// $this->article_obj->where('article_id', $data['articleId'])->update(['state' => 2]);
// //添加article_msg信息
// if ($article_info['state'] != 2) {
// $insmsg_data['article_id'] = $data['articleId'];
// $insmsg_data['content'] = '';
// $insmsg_data['state_from'] = $article_info['state'];
// $insmsg_data['state_to'] = 2;
// $insmsg_data['ctime'] = time();
// $this->article_msg_obj->insert($insmsg_data);
// }
// //发送email提醒审稿员
// $tt = $article_info['accept_sn'] . '<br>';
// $tt .= 'Dear Dr. ' . ($reviewer_info['realname'] == "" ? $reviewer_info['account'] : $reviewer_info['realname']) . '<br><br>';
// $tt .= 'The manuscript entitled “' . $article_info['title'] . '” has'
// . ' been submitted to the journal ' . $journal_info['title'] . '. The Editor-in-Chief would'
// . ' be most grateful if you could offer an opinion regarding its suitability for publication'
// . ' in the journal ' . $journal_info['title'] . '. <br>';
// $tt .= 'Please bring into our knowledge if there is any potential Conflict of Interest. If you agree to review this manuscript, we ask you to complete your review and submit it by submission system within 14 days of receipt of the manuscript.<br><br>';
// $tt .= 'Thank you for your consideration.<br> Look forward for your reply.<br>';
// $tt .= '<a href="' . $this->creatLoginUrlForreviewer($reviewer_info, $res) . '">Click here to accept the invitation to review</a><br>';
// // $tt .= '<a href="https://submission.tmrjournals.com/">Click here to review the article</a><br>';
// $tt .= '<a href="' . $this->creatRejectUrlForReviewer($reviewer_info, $res) . '">Click here to decline the invitation to review</a><br>';
// $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'];
// $email_title = "Invitation to review manuscript for ".$journal_info['title']."-[".$article_info['accept_sn']."]";
// sendEmail($reviewer_info['email'], $email_title, $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
// //记录userlog
// $log_data['user_id'] = $article_info['editor_id'];
// $log_data['type'] = 2;
// $log_data['content'] = $editor_info['account'] . "(" . $editor_info['realname'] . "),添加了一个文章审稿实例:(" . $article_info['title'] . "-----" . $reviewer_info['account'] . "),添加时间是:" . date('Y-m-d H:i:s', time());
// $log_data['ctime'] = time();
// $this->user_log_obj->insert($log_data);
// //添加usermsg
// add_usermsg($data['uid'], 'You have new manuscript to be approved', '/reviewerArticleDetail?id=' . $res);
// return json(['code' => 0]);
// }
public function addArticleReviewer()
{
//接收参数,查询数据
$data = $this->request->post();
@@ -1940,27 +2023,32 @@ class Article extends Base
}
//发送email提醒审稿员
$tt = $article_info['accept_sn'] . '<br>';
$tt .= 'Dear Dr. ' . ($reviewer_info['realname'] == "" ? $reviewer_info['account'] : $reviewer_info['realname']) . '<br><br>';
$tt .= 'The manuscript entitled “' . $article_info['title'] . '” has'
$tt = 'Dear Dr. ' . ($reviewer_info['realname'] == "" ? $reviewer_info['account'] : $reviewer_info['realname']) . '<br><br>';
$tt .= 'The manuscript entitled "' . $article_info['title'] . '" has'
. ' been submitted to the journal ' . $journal_info['title'] . '. The Editor-in-Chief would'
. ' be most grateful if you could offer an opinion regarding its suitability for publication'
. ' in the journal ' . $journal_info['title'] . '. <br>';
$tt .= 'Please bring into our knowledge if there is any potential Conflict of Interest. If you agree to review this manuscript, we ask you to complete your review and submit it by submission system within 14 days of receipt of the manuscript.<br><br>';
$tt .= 'Thank you for your consideration.<br> Look forward for your reply.<br>';
. ' in the journal ' . $journal_info['title'] . '. <br><br>';
$tt .= '<b style="font-size: 14px;">Abstract of the Manuscript:</b><br>';
$tt .= '<b style="font-size: 12px;">'. $article_info['abstrart'] .'</b><br><br>';
$tt .= 'Please let us know if there are any potential conflicts of interest. If you agree to review this manuscript, we kindly request that you complete and submit your review through the submission system within 14 days of receiving the manuscript.<br>';
$tt .= '<a href="' . $this->creatLoginUrlForreviewer($reviewer_info, $res) . '">Click here to accept the invitation to review</a><br>';
// $tt .= '<a href="https://submission.tmrjournals.com/">Click here to review the article</a><br>';
$tt .= '<a href="' . $this->creatRejectUrlForReviewer($reviewer_info, $res) . '">Click here to decline the invitation to review</a><br>';
$tt .= 'Your username:' . $reviewer_info['account'] . '<br><br>';
$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 .= 'Thank you for your continued support of our journal.<br><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'];
//内容加头尾
$pre = \think\Env::get('emailtemplete.pre');
$net = \think\Env::get('emailtemplete.net');
$net1 = str_replace("{{email}}",trim($reviewer_info['email']),$net);
$tt=$pre.$tt.$net1;
$email_title = "Invitation to review manuscript for ".$journal_info['title']."-[".$article_info['accept_sn']."]";
$email_title = "Invitation to review a manuscript for ".$journal_info['title']."-[".$article_info['accept_sn']."]";
sendEmail($reviewer_info['email'], $email_title, $journal_info['title'], $tt, $journal_info['email'], $journal_info['epassword']);
//记录userlog
@@ -1977,7 +2065,6 @@ class Article extends Base
// public function markArticleTable(){
// $data = $this->request->post();
// $rule = new Validate([