下面的是原文件中的代码,好友执行了邮件方式通知,但功能在那里设置?
真搞不明白官方下面代码写的什么
- if(friend_request_check($uid)) {
- if(submitcheck('add2submit')) {
- $_POST['gid'] = intval($_POST['gid']);
- friend_add($uid, $_POST['gid']);
- if(ckprivacy('friend', 'feed')) {
- require_once libfile('function/feed');
- feed_add('friend', 'feed_friend_title', array('touser'=>"[url=https://www.discuz.1314study.com/home.php?mod=space&uid=$tospace[uid]]$tospace[username][/url]"));
- }
- notification_add($uid, 'friend', 'friend_add');
- showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_G['gp_from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
- }
- $op = 'add2';
- $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
- $navtitle = lang('core', 'title_friend_add');
- include template('home/spacecp_friend');
- exit();
- } else {
- if(getcount('home_friend_request', array('uid'=>$uid, 'fuid'=>$_G['uid']))) {
- showmessage('waiting_for_the_other_test');
- }
- if(submitcheck('addsubmit')) {
- $_POST['gid'] = intval($_POST['gid']);
- $_POST['note'] = censor($_POST['note']);
- friend_add($uid, $_POST['gid'], $_POST['note']);
- $note = array(
- 'uid' => $_G['uid'],
- 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid='.$_G['uid'].'&from=notice',
- 'from_id' => $_G['uid'],
- 'from_idtype' => 'friendrequest',
- 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : ''
- );
- notification_add($uid, 'friend', 'friend_request', $note);
- require_once libfile('function/mail');
- $values = array(
- 'username' => $tospace['username'],
- 'url' => getsiteurl().'home.php?mod=spacecp&ac=friend&op=request'
- );
- sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
- showmessage('request_has_been_sent', dreferer(), array(), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
- } else {
- include_once template('home/spacecp_friend');
- exit();
- } }
复制代码 |