:::

5-2-3 錄取狀態改變時的通知

您沒有觀看影片的權限

您沒有觀看影片的權限

請先登入,登入後,確認您的權限後,即可觀看影片。

  1. 錄取時,要通知的就不是目前登入者,而是報名者,所以,要根據報名時留下的uid,找出對應Email來寄出
    // 產生通知信
    public static function mail($id, $type, $signup = [])
    {
        global $xoopsUser;
        /*--略--*/
    
        if ($type == 'destroy') {
            /*--略--*/
            $foot = "欲重新報名,請連至 " . XOOPS_URL . "/modules/tad_signup/index.php?op=tad_signup_data_create&action_id={$action['id']}";
        } elseif ($type == 'store') {
            /*--略--*/
            $foot = "完整詳情,請連至 " . XOOPS_URL . "/modules/tad_signup/index.php?id={$signup['action_id']}";
        } elseif ($type == 'update') {
            /*--略--*/
            $foot = "完整詳情,請連至 " . XOOPS_URL . "/modules/tad_signup/index.php?id={$signup['action_id']}";
        } elseif ($type == 'accept') {
            $title = "「{$action['title']}」報名錄取狀況通知";
            if ($signup['accept'] == 1) {
                $head = "<p>您於 {$signup['signup_date']} 報名「{$action['title']}」活動經審核,<h2 style='color:blue'>恭喜錄取!</h2>您的報名資料如下:</p>";
            } else {
                $head = "<p>您於 {$signup['signup_date']} 報名「{$action['title']}」活動經審核,很遺憾的通知您,因名額有限,<span style='color:red;'>您並未錄取。</span>您的報名資料如下:</p>";
            }
            $foot = "完整詳情,請連至 " . XOOPS_URL . "/modules/tad_signup/index.php?id={$signup['action_id']}";
    
            $signupUser = $member_handler->getUser($signup['uid']);
            $email = $signupUser->email();
        }
    
        /*--略--*/
    }

     

link to https://github.com/tadlearn/tad_signup/commit/058358339e14fb9623278cf7b81195a6e0ef744a \


:::

搜尋

QR Code 區塊

https%3A%2F%2Fwww.tad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D48%26tbdsn%3D1699

書籍目錄

展開 | 闔起

線上使用者

56人線上 (10人在瀏覽線上書籍)

會員: 0

訪客: 56

更多…