Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

加为好友代码里是不是有邮件通知呀?

[复制链接]
RenQin 发表于 2011-10-8 14:38:02 | 显示全部楼层 |阅读模式
下面的是原文件中的代码,好友执行了邮件方式通知,但功能在那里设置?
真搞不明白官方下面代码写的什么
  1.         if(friend_request_check($uid)) {

  2.                 if(submitcheck('add2submit')) {

  3.                         $_POST['gid'] = intval($_POST['gid']);
  4.                         friend_add($uid, $_POST['gid']);

  5.                         if(ckprivacy('friend', 'feed')) {
  6.                                 require_once libfile('function/feed');
  7.                                 feed_add('friend', 'feed_friend_title', array('touser'=>"<a href="home.php?mod=space&uid=$tospace[uid]">$tospace[username]</a>"));
  8.                         }

  9.                         notification_add($uid, 'friend', 'friend_add');
  10.                         showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_G['gp_from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
  11.                 }

  12.                 $op = 'add2';
  13.                 $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
  14.                 $navtitle = lang('core', 'title_friend_add');
  15.                 include template('home/spacecp_friend');
  16.                 exit();

  17.         } else {

  18.                 if(getcount('home_friend_request', array('uid'=>$uid, 'fuid'=>$_G['uid']))) {
  19.                         showmessage('waiting_for_the_other_test');
  20.                 }

  21.                 if(submitcheck('addsubmit')) {

  22.                         $_POST['gid'] = intval($_POST['gid']);
  23.                         $_POST['note'] = censor($_POST['note']);
  24.                         friend_add($uid, $_POST['gid'], $_POST['note']);

  25.                         $note = array(
  26.                                 'uid' => $_G['uid'],
  27.                                 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid='.$_G['uid'].'&from=notice',
  28.                                 'from_id' => $_G['uid'],
  29.                                 'from_idtype' => 'friendrequest',
  30.                                 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : ''
  31.                         );

  32.                         notification_add($uid, 'friend', 'friend_request', $note);

  33.                         require_once libfile('function/mail');
  34.                         $values = array(
  35.                                 'username' => $tospace['username'],
  36.                                 'url' => getsiteurl().'home.php?mod=spacecp&ac=friend&amp;op=request'
  37.                         );
  38.                         sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
  39.                         showmessage('request_has_been_sent', dreferer(), array(), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));

  40.                 } else {
  41.                         include_once template('home/spacecp_friend');
  42.                         exit();
  43.                 }
  44.         }
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-8-26 18:32 , Processed in 0.113366 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表