예제 #1
0
            $note_msg = cplang('event_join_verify', array("space.php?do=event&id={$event['eventid']}", $event['title'], "cp.php?ac=event&id={$event['eventid']}&op=members&status=0&key={$arr['username']}"));
            $query = $_SGLOBAL['db']->query("SELECT ue.*, sf.* FROM " . tname("userevent") . " ue LEFT JOIN " . tname("spacefield") . " sf ON ue.uid=sf.uid WHERE ue.eventid='{$eventid}' AND ue.status >= 3");
            while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                $value['privacy'] = empty($value['privacy']) ? array() : unserialize($value['privacy']);
                $filter = empty($value['privacy']['filter_note']) ? array() : array_keys($value['privacy']['filter_note']);
                if (cknote_uid(array("type" => "eventmember", "authorid" => $_SGLOBAL['supe_uid']), $filter)) {
                    $note_ids[] = $value['uid'];
                    $note_inserts[] = "('{$value['uid']}', 'eventmember', '1', '{$_SGLOBAL['supe_uid']}', '{$_SGLOBAL['supe_username']}', '" . addslashes($note_msg) . "', '{$_SGLOBAL['timestamp']}')";
                }
            }
            if ($note_inserts) {
                $_SGLOBAL['db']->query("INSERT INTO " . tname('notification') . " (`uid`, `type`, `new`, `authorid`, `author`, `note`, `dateline`) VALUES " . implode(',', $note_inserts));
                $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET notenum=notenum+1 WHERE uid IN (" . simplode($note_ids) . ")");
            }
            //E-mail notice
            smail($event['uid'], '', $note_msg, 'event');
        }
        // Bonus Points
        getreward('joinevent', 1, 0, $eventid);
        //Statistics
        updatestat('eventjoin');
        //Process Event Invites
        if ($eventinvite) {
            $_SGLOBAL['db']->query("DELETE FROM " . tname("eventinvite") . " WHERE eventid='{$eventid}' AND touid='{$_SGLOBAL['supe_uid']}'");
            $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET eventinvitenum=eventinvitenum-1 WHERE uid = '{$_SGLOBAL['supe_uid']}' AND eventinvitenum>0");
        }
        showmessage("do_success", "space.php?do=event&id={$eventid}", 0);
        // Join the event successfully
    }
} elseif ($op == "quit") {
    // Quit Event
예제 #2
0
파일: cp_pm.php 프로젝트: NaturalWill/UCQA
             if ($value) {
                 $newusers[] = $value;
             }
         }
         if ($newusers) {
             $return = uc_pm_send($_SGLOBAL['supe_uid'], implode(',', $newusers), $subject, $message, 1, $pmid, 1);
         }
         //发送邮件通知
         $touid = 0;
         if ($return > 0) {
             $query = $_SGLOBAL['db']->query('SELECT uid FROM ' . tname('space') . ' WHERE username IN (' . simplode($users) . ')');
             while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                 if (empty($touid)) {
                     $touid = $value['uid'];
                 }
                 smail($value['uid'], '', cplang('friend_pm', array($_SN[$space['uid']], getsiteurl() . 'space.php?do=pm')), '', 'friend_pm');
             }
         }
     }
     if ($return > 0) {
         //更新最后发布时间
         $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET lastpost='{$_SGLOBAL['timestamp']}' WHERE uid='{$_SGLOBAL['supe_uid']}'");
         showmessage('do_success', "space.php?do=pm&filter=privatepm");
     } else {
         if (in_array($return, array(-1, -2, -3, -4))) {
             showmessage('message_can_not_send' . abs($return));
         } else {
             showmessage('message_can_not_send');
         }
     }
 }
예제 #3
0
    $spaceinfo = $_SGLOBAL['db']->fetch_array($query);
    if (empty($spaceinfo)) {
        showmessage('该邮箱账号没有在本站注册!');
    }
    //创始人、管理员不允许找回密码
    $founderarr = explode(',', $_SC['founder']);
    if ($spaceinfo['flag'] || in_array($spaceinfo['uid'], $founderarr) || checkperm('admin')) {
        showmessage('getpasswd_account_invalid');
    }
    $idstring = random(6);
    $reseturl = getsiteurl() . 'do.php?ac=lostpasswd&op=reset&uid=' . $spaceinfo['uid'] . '&id=' . $idstring;
    updatetable('spacefield', array('authstr' => $_SGLOBAL['timestamp'] . "\t1\t" . $idstring), array('uid' => $spaceinfo['uid']));
    $mail_subject = cplang('get_passwd_subject');
    $mail_message = cplang('get_passwd_message', array($reseturl));
    include_once S_ROOT . './source/function_cp.php';
    smail(0, $spaceinfo['email'], $mail_subject, $mail_message);
    showmessage('getpasswd_send_succeed', 'do.php?ac=' . $_SCONFIG['login_action'], 3);
    //showmessage($reseturl, 'do.php?ac='.$_SCONFIG['login_action'], 3);
} elseif (submitcheck('resetsubmit')) {
    $uid = empty($_POST['uid']) ? 0 : intval($_POST['uid']);
    $id = empty($_POST['id']) ? 0 : trim($_POST['id']);
    if ($_POST['newpasswd1'] != $_POST['newpasswd2']) {
        showmessage('password_inconsistency');
    }
    if ($_POST['newpasswd1'] != addslashes($_POST['newpasswd1'])) {
        showmessage('profile_passwd_illegal');
    }
    $query = $_SGLOBAL['db']->query('SELECT s.uid, s.username, s.groupid, s.flag, sf.email, sf.authstr FROM ' . tname('space') . ' s, ' . tname('spacefield') . " sf WHERE s.uid='{$uid}' AND sf.uid=s.uid");
    $space = $_SGLOBAL['db']->fetch_array($query);
    checkuser($id, $space);
    //验证是否受保护、创始人、有站点设置权限的人禁止找回密码方式修改密码
예제 #4
0
             $n_url = "space.php?uid={$tospace['uid']}&do=poll&pid={$id}&cid={$cid}";
             $note_type = 'pollcomment';
             $q_note = cplang('note_poll_comment_reply', array($n_url));
             $q_msgtype = 'poll_comment_reply';
             break;
         case 'eventid':
             // 活动
             $n_url = "space.php?do=event&id={$id}&view=comment&cid={$cid}";
             $note_type = 'eventcomment';
             $q_note = cplang('note_event_comment_reply', array($n_url));
             $q_msgtype = 'event_comment_reply';
             break;
     }
     if ($comment['authorid'] != $_SGLOBAL['supe_uid']) {
         //发送邮件通知
         smail($comment['authorid'], '', cplang($q_msgtype, array($_SN[$userid], shtmlspecialchars(getsiteurl() . $n_url))), '', $q_msgtype);
         notification_add($comment['authorid'], $note_type, $q_note);
     }
     //通知被@的用户
     if ($UserIds) {
         $note = cplang('note_comment_at', array($n_url));
         foreach ($UserIds as $UserId) {
             notification_add($UserId, 'atyou', $note);
         }
     }
 }
 //统计
 if ($stattype) {
     updatestat($stattype);
 }
 if ($cid) {
예제 #5
0
<?php

echo "<strong>COMP344 Assignment 1, 2012 by Ali Alavi - #40876144</strong><br><br>";
//'smail' is a function for sending email using information gathered from a html form
function smail()
{
    //assign form values to variables
    $email = $_POST["email"];
    $name = $_POST["fname"];
    $subject = "Online bookstore registration";
    $message = "Hello {$name}! Please fallow these steps to complete registration.";
    $from = "*****@*****.**";
    $headers = "From:" . $from;
    //if statement to check mail function works, else returns error message.
    if (mail($email, $subject, $message, $headers)) {
        print "Thank you for registering for the bookstore, <i>{$name}</i>. Please check your email address(<i>{$email}</i>) for instruction to complete registration.";
    } else {
        echo "Unable to send email.";
    }
}
//execute function
smail();
?>

예제 #6
0
 $title .= $t;
 if (isset($_GET['pid']) && intval($_GET['pid']) > 0 && $menua[$mid][0] != 5) {
     if ($c_log && $pa > 0) {
         $s_dbu = sprintf('select id, name, email from %s where id=%s and status=1 limit 1', $dbprefix . 'member', SQLString($_GET['pid'], 'int'));
         $q_dbu = mysql_query($s_dbu) or die('');
         $r_dbu = mysql_fetch_assoc($q_dbu);
         if (mysql_num_rows($q_dbu) > 0) {
             $u_db = sprintf('update %s set status=0 where id=%s', $dbprefix . 'member', $r_dbu['id']);
             $result = mysql_query($u_db) or die('');
             setsinfo($r_dbu['name'] . ' 通过审核', $r_dbu['id']);
             if ($config['email'] != 1 && $r_dbu['email'] != '') {
                 $mail_c = '亲爱的' . $r_dbu['name'] . ":\r\n您在 " . $config['title'] . " 的注册信息已通过审核,请点击下面的地址访问:\r\n\r\n" . $config['site_url'] . "\r\n\r\n感谢您的注册,祝您使用愉快!\r\n\r\n此致,\r\n" . $config['title'] . "\r\n";
                 if ($config['email'] == 2) {
                     require_once 'lib/smtp.php';
                 }
                 smail($r_dbu['email'], '[' . $config['title'] . ']您的注册已通过审核', $mail_c);
             }
         }
         mysql_free_result($q_dbu);
     }
     header('Location:./?m=user' . (isset($_GET['p']) && $_GET['p'] == 1 ? '&id=' . intval($_GET['pid']) : ''));
     exit;
 }
 if (isset($_GET['cid']) && intval($_GET['cid']) > 0 && $menua[$mid][0] != 5) {
     if ($c_log && $pa == 9) {
         $s_dbu = sprintf('select id, name from %s where id=%s and status=0 limit 1', $dbprefix . 'member', SQLString($_GET['cid'], 'int'));
         $q_dbu = mysql_query($s_dbu) or die('');
         $r_dbu = mysql_fetch_assoc($q_dbu);
         if (mysql_num_rows($q_dbu) > 0) {
             $c = $r_dbu['name'] . ' 被设置为';
             if (isset($_GET['p']) && $_GET['p'] == 1) {
예제 #7
0
function createmail($mail, $mailvar)
{
    global $_SGLOBAL, $_SCONFIG, $space, $_SN, $appinfo;
    $mailvar[3] = empty($_POST['saymsg']) ? '' : getstr($_POST['saymsg'], 500);
    smail(0, $mail, cplang($appinfo ? 'app_invite_subject' : 'invite_subject', array($_SN[$space['uid']], $_SCONFIG['sitename'], $appinfo['appname'])), cplang($appinfo ? 'app_invite_massage' : 'invite_massage', $mailvar));
}
예제 #8
0
} elseif (submitcheck('sendemailsubmit')) {
    if (!$managespacenote) {
        cpmessage('no_authority_management_operation');
    }
    $touids = empty($_POST['uids']) ? array() : explode(',', $_POST['uids']);
    $subject = trim($_POST['subject']);
    $message = trim($_POST['message']);
    if (empty($subject) && empty($message)) {
        $touids = array();
    }
    if ($touids) {
        include_once S_ROOT . './source/function_cp.php';
        $query = $_SGLOBAL['db']->query("SELECT email, emailcheck FROM " . tname('spacefield') . " WHERE uid IN (" . simplode($touids) . ")");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            if ($value['email']) {
                smail(0, $value['email'], $subject, $message);
            }
        }
    }
    cpmessage('do_success', "admincp.php?ac={$ac}&perpage={$_GET['perpage']}&page={$_GET['page']}");
} elseif (submitcheck('pokesubmit')) {
    if (!$managespacenote) {
        cpmessage('no_authority_management_operation');
    }
    //打招呼
    $touids = empty($_POST['uids']) ? array() : explode(',', $_POST['uids']);
    $note = getstr($_POST['note'], 50, 1, 1);
    $uids = array();
    if ($touids) {
        $replaces = array();
        foreach ($touids as $touid) {
예제 #9
0
    //打招呼
    if (submitcheck('pokesubmit')) {
        if (empty($tospace)) {
            showmessage('space_does_not_exist');
        }
        $oldpoke = getcount('poke', array('uid' => $uid, 'fromuid' => $_SGLOBAL['supe_uid']));
        $setarr = array('uid' => $uid, 'fromuid' => $_SGLOBAL['supe_uid'], 'fromusername' => $_SGLOBAL['supe_username'], 'note' => getstr($_POST['note'], 50, 1, 1), 'dateline' => $_SGLOBAL['timestamp'], 'iconid' => intval($_POST['iconid']));
        inserttable('poke', $setarr, 0, true);
        //更新统计
        if (!$oldpoke) {
            $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET pokenum=pokenum+1 WHERE uid='{$uid}'");
        }
        //更新我的好友关系热度
        addfriendnum($tospace['uid'], $tospace['username']);
        //发送邮件通知
        smail($uid, '', cplang('poke_subject', array($_SN[$space['uid']], getsiteurl() . 'cp.php?ac=poke')), '', 'poke');
        if ($op == 'reply') {
            //删除招呼
            $_SGLOBAL['db']->query("DELETE FROM " . tname('poke') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND fromuid='{$uid}'");
            $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET pokenum=pokenum-1 WHERE uid='{$_SGLOBAL['supe_uid']}' AND pokenum>0");
        }
        //奖励
        getreward('poke', 1, 0, $uid);
        //统计
        updatestat('poke');
        showmessage('poke_success', $_POST['refer'], 1, array($_SN[$tospace['uid']]));
    }
} elseif ($op == 'ignore') {
    $where = empty($uid) ? '' : "AND fromuid='{$uid}'";
    $_SGLOBAL['db']->query("DELETE FROM " . tname('poke') . " WHERE uid='{$_SGLOBAL['supe_uid']}' {$where}");
    //统计更新
예제 #10
0
파일: checkout.php 프로젝트: Emadbox/eStore
            array_push($order, $res['PRODUCTNAME']);
            //$order .= $res['PRODUCTNAME'];
            echo "";
        }
    }
    //Send email regarding order
    function smail($order)
    {
        //assign form values to variables
        $email = $_SESSION['email'];
        //ordered items
        $subject = "Order confirmation";
        $message = "Hello! Your order has been recieved for {$order}. We will notify you after dispatch. Thank you for your purchase. \nFrom: Ali Alavi - #40876144";
        $from = "*****@*****.**";
        $headers = "From:" . $from;
        //if statement to check mail function works, else returns error message.
        if (mail($email, $subject, $message, $headers)) {
            print "You ordered: {$order}.\nYour order is being processed. An email confirmation has been sent to, {$email}.";
            echo '<br><a href="main.php">Return to shop.</a><br>';
            //clear cart
            unset($_SESSION['cart']);
        } else {
            echo "Unable to send email.<br>";
        }
    }
    $order = implode(", ", $order);
    //call send email function
    smail($order);
} else {
    echo 'Not logged in.<br><a href="login.html">Login to view page</a></br>';
}
예제 #11
0
function createmail($mail, $mailvar)
{
    global $_SGLOBAL, $_SCONFIG, $space, $_SN, $appinfo;
    smail(0, $mail, cplang($appinfo ? 'app_invite_subject' : 'invite_subject', array($_SN[$space['uid']], $_SCONFIG['sitename'], $appinfo['appname'])), cplang($appinfo ? 'app_invite_massage' : 'invite_massage', $mailvar));
}
예제 #12
0
    }
    //验证密码
    if ($_POST['email'] != $space['email']) {
        if (!($passport = getpassport($_SGLOBAL['supe_username'], $_POST['password']))) {
            showmessage('password_is_not_passed');
        }
        //更新资料
        $space['email'] = $_POST['email'];
        updatetable('spacefield', array('email' => $_POST['email'], 'emailcheck' => 0), array('uid' => $space['uid']));
    }
    $mailhash = md5($space['email'] . '|' . md5($_SCONFIG['sitekey']) . '|' . $space['uid']);
    $siteurl = getsiteurl();
    $checkurl = $siteurl . 'cp.php?ac=sendmail&amp;op=check&amp;hash=' . $mailhash;
    $mailsubject = cplang('active_email_subject');
    $mailmessage = cplang('active_email_msg', array($checkurl));
    smail(0, $space['email'], $mailsubject, $mailmessage);
    showmessage('email_check_send');
} elseif (submitcheck('pwdsubmit')) {
    if ($_POST['newpasswd1'] != $_POST['newpasswd2']) {
        showmessage('password_inconsistency');
    }
    if ($_POST['newpasswd1'] != addslashes($_POST['newpasswd1'])) {
        showmessage('profile_passwd_illegal');
    }
    @(include_once S_ROOT . './uc_client/client.php');
    $ucresult = uc_user_edit($_SGLOBAL['supe_username'], $_POST['password'], $_POST['newpasswd1'], $space['email']);
    if ($ucresult == -1) {
        showmessage('old_password_invalid');
    } elseif ($ucresult == -4) {
        showmessage('email_format_is_wrong');
    } elseif ($ucresult == -5) {
예제 #13
0
         $msgtype = 'blog_comment';
         break;
     case 'sid':
         //分享
         $n_url = "space.php?uid={$tospace['uid']}&do=share&id={$id}&cid={$cid}";
         $note_type = 'sharecomment';
         $note = cplang('note_share_comment', array($n_url));
         $q_note = cplang('note_share_comment_reply', array($n_url));
         $msg = 'do_success';
         $magvalues = array();
         $msgtype = 'share_comment';
         break;
 }
 //发送邮件通知
 $touid = empty($comment['authorid']) ? $tospace['uid'] : $comment['authorid'];
 smail($touid, '', cplang($msgtype, array($_SN[$space['uid']], shtmlspecialchars(getsiteurl() . $n_url))));
 if (empty($comment)) {
     //非引用评论
     if ($tospace['uid'] != $_SGLOBAL['supe_uid']) {
         //事件发布
         if (ckprivacy('comment', 1)) {
             feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general'], $fs['images'], $fs['image_links'], $fs['target_ids'], $fs['friend']);
         }
         //发送通知
         notification_add($tospace['uid'], $note_type, $note);
         //留言发送短消息
         if ($_POST['idtype'] == 'uid' && $tospace['updatetime'] == $tospace['dateline']) {
             include_once S_ROOT . './uc_client/client.php';
             uc_pm_send($_SGLOBAL['supe_uid'], $tospace['uid'], cplang('wall_pm_subject'), cplang('wall_pm_message', array(addslashes(getsiteurl() . $n_url))), 1, 0, 0);
         }
     }
예제 #14
0
 //检测相互是否请求过好友,0为单向,1为互为好友,-1为不存在;当前用户对目标用户的好友关系;
 $rfstatus = getfriendstatus($touserid, $userid);
 //检测相互是否请求过好友,0为单向,1为互为好友,-1为不存在;目标用户对当前用户的好友关系;
 $type = $_POST['type'];
 //$type="ignore";
 if ($type == 'add') {
     if ($fstatus == 1) {
         $result = array('flag' => 'isfriends');
     } else {
         if ($rfstatus == -1) {
             //对方没有加好友,我加别人
             if ($fstatus == -1) {
                 $setarr = array('uid' => $userid, 'fuid' => $touserid, 'fusername' => $tousername, 'gid' => 0, 'dateline' => time());
                 inserttable('friend', $setarr);
                 //发送邮件通知
                 smail($touserid, '', cplang('friend_subject', array($space['name'], getsiteurl() . 'cp.php?ac=friend&amp;op=request')), '', 'friend_add');
                 //增加对方好友申请数
                 $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET addfriendnum=addfriendnum+1 WHERE uid='{$touserid}'");
                 $result = array('flag' => 'issending');
             } else {
                 $result = array('flag' => 'hassended');
             }
         } else {
             //对方加了我为好友,我审核通过
             friend_update($userid, $space['username'], $touserid, $tousername, 'add', 0);
             //事件发布
             //加好友不发布事件
             if (ckprivacy('friend', 1)) {
                 $fs = array();
                 $fs['icon'] = 'friend';
                 $fs['title_template'] = cplang('feed_friend_title');
예제 #15
0
 }
 //对方是否把自己加为了好友
 $fstatus = getfriendstatus($uid, $_SGLOBAL['supe_uid']);
 if ($fstatus == -1) {
     //对方没有加好友,我加别人
     if ($status == -1) {
         //视频认证
         if ($tospace['videostatus']) {
             ckvideophoto('friend', $tospace);
         }
         //添加单向好友
         if (submitcheck('addsubmit')) {
             $setarr = array('uid' => $_SGLOBAL['supe_uid'], 'fuid' => $uid, 'fusername' => addslashes($tospace['username']), 'gid' => intval($_POST['gid']), 'note' => getstr($_POST['note'], 50, 1, 1), 'dateline' => $_SGLOBAL['timestamp']);
             inserttable('friend', $setarr);
             //发送邮件通知
             smail($uid, '', cplang('friend_subject', array($_SN[$space['uid']], getsiteurl() . 'cp.php?ac=friend&amp;op=request')), '', 'friend_add');
             //增加对方好友申请数
             $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET addfriendnum=addfriendnum+1 WHERE uid='{$uid}'");
             showmessage('request_has_been_sent');
         } else {
             include_once template('cp_friend');
             exit;
         }
     } else {
         showmessage('waiting_for_the_other_test');
     }
 } else {
     //对方加了我为好友,我审核通过
     if (submitcheck('add2submit')) {
         //成为好友
         $gid = intval($_POST['gid']);
예제 #16
0
     }
     //实名
     realname_set($post['uid'], $post['username']);
     realname_get();
     $post['message'] = preg_replace("/\\<div class=\"quote\"\\>\\<span class=\"q\"\\>.*?\\<\\/span\\>\\<\\/div\\>/is", '', $post['message']);
     //移除编辑记录
     $post['message'] = preg_replace("/<ins class=\"modify\".+?<\\/ins>/is", '', $post['message']);
     $post['message'] = html2bbcode($post['message']);
     //显示用
     $message = addslashes("<div class=\"quote\"><span class=\"q\"><b>" . $_SN[$post['uid']] . "</b>: " . getstr($post['message'], 150, 0, 0, 0, 2, 1) . '</span></div>') . $message;
 }
 $anonymous = empty($_POST['anonymous']) ? 0 : intval($_POST['anonymous']);
 $setarr = array('tagid' => intval($thread['tagid']), 'anonymous' => $anonymous, 'tid' => $tid, 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'ip' => getonlineip(), 'dateline' => $_SGLOBAL['timestamp'], 'message' => $message);
 $pid = inserttable('post', $setarr, 1);
 //邮件通知
 smail($thread['uid'], '', cplang('mtag_reply', array($_SN[$space['uid']], shtmlspecialchars(getsiteurl() . "space.php?uid={$thread['uid']}&do=thread&id={$thread['tid']}"))), '', 'mtag_reply');
 //更新统计数据
 $last_author_name = $anonymous ? 'null' : $_SGLOBAL[supe_username];
 $_SGLOBAL['db']->query("UPDATE " . tname('thread') . "\r\n\t\tSET replynum=replynum+1, lastpost='{$_SGLOBAL['timestamp']}', lastauthor='{$last_author_name}', lastauthorid='{$_SGLOBAL['supe_uid']}'\r\n\t\tWHERE tid='{$tid}'");
 //更新群组统计
 $_SGLOBAL['db']->query("UPDATE " . tname("mtag") . " SET postnum=postnum+1 WHERE tagid='{$thread['tagid']}'");
 //普通回复
 if (empty($post) && $thread['uid'] != $_SGLOBAL['supe_uid']) {
     //积分
     getreward('replythread', 1, 0, $thread['tid']);
     realname_set($thread['uid'], $thread['username']);
     realname_get();
     if (empty($mtag['viewperm'])) {
         $fs = array();
         $fs['icon'] = 'post';
         $fs['body_template'] = '';
예제 #17
0
function emailcheck_send($uid, $email) {
	global $_SGLOBAL, $_SCONFIG;
	
	if($uid && $email) {
		$hash = authcode("$uid\t$email", 'ENCODE');
		$url = getsiteurl().'do.php?ac=emailcheck&amp;hash='.urlencode($hash);
		
		$mailsubject = cplang('active_email_subject');
		$mailmessage = cplang('active_email_msg', array($url));
		smail(0, $email, $mailsubject, $mailmessage);
	}
}
예제 #18
0
    $_POST["birthday"] = $birthday;
    if (!empty($bp) and ($bp['startyear'] == '' or $bp['startyear'] == null)) {
        $_POST["startyear"] = $_POST["startyear"];
        $_SGLOBAL['db']->query("UPDATE " . tname('baseprofile') . " SET startyear='" . $_POST["startyear"] . "' WHERE realname='" . $realname . "' and birthday='" . $birthday . "' limit 1");
    } elseif (!empty($bp)) {
        $_POST["startyear"] = $bp['startyear'];
    }
    if (!empty($bp) and ($bp['academy'] == '' or $bp['academy'] == null)) {
        $_POST["academy"] = $_POST["subtitle"];
        $_SGLOBAL['db']->query("UPDATE " . tname('baseprofile') . " SET academy='" . $_POST["academy"] . "' WHERE realname='" . $realname . "' and birthday='" . $birthday . "' limit 1");
    } elseif (!empty($bp)) {
        $_POST["academy"] = $bp['academy'];
    }
    $_POST['email'] = $email;
    $_SGLOBAL["inviteactive_showemail"] = true;
    $_SGLOBAL["no_inviteactive"] = true;
    $inviteactive_showmsg = true;
    $leave_message = array("username" => $username, "realname" => $realname, "password" => $password, "birthday" => $password, "birth_year" => $birth_year, "birth_month" => $birth_month, "birth_day" => $birth_day, "startyear" => $_POST['startyear'], "academy" => $_POST["subtitle"], "ver" => $ver, "email" => $email, "country" => $country, "school" => $school);
    inserttable("forgienCreate", $leave_message);
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('forgienCreate') . "\tWHERE ver='" . $ver . "' and username='******'");
    $id = 0;
    if ($res = $_SGLOBAL['db']->fetch_array($query)) {
        $id = $res['id'];
    }
    $message = "亲爱的北航校友您好,请点击以下链接完成注册http://i.buaa.edu.cn/do.php?ac={$_SCONFIG['overseasregister_email']}&op=create&id={$id}&ver={$ver}";
    include_once S_ROOT . './source/function_cp.php';
    smail(0, $email, $message, '');
    showmessage("邮件已经发送,请注意查收", "index.php", 3);
} else {
    include template('do_overseasregajax');
}