請先登入,登入後,確認您的權限後,即可觀看影片。
// 產生通知信 public static function mail($id, $type, $signup = []) { global $xoopsUser; $id = (int) $id; if (empty($id)) { redirect_header($_SERVER['PHP_SELF'], 3, "無編號,無法寄送通知信"); } $signup = $signup ? $signup : self::get($id); $now = date("Y-m-d H:i:s"); $name = $xoopsUser->name(); $name = $name ? $name : $xoopsUser->uname(); $action = Tad_signup_actions::get($signup['action_id']); $member_handler = xoops_getHandler('member'); $admUser = $member_handler->getUser($action['uid']); $adm_email = $admUser->email(); if ($type == 'destroy') { $title = "「{$action['title']}」取消報名通知"; $content = "<p>您於 {$signup['signup_date']} 報名了「{$action['title']}」活動已於 {$now} 由 {$name} 取消報名。</p>"; $content .= "欲重新報名,請連至 " . XOOPS_URL . "/modules/tad_signup/index.php?op=tad_signup_data_create&action_id={$action['id']}"; } if (!self::send($title, $content, $email)) { redirect_header($_SERVER['PHP_SELF'], 3, "通知信寄發失敗!"); } self::send($title, $content, $adm_email); }
link to https://github.com/tadlearn/tad_signup/commit/e8f1d07723e281a987a9bc07db3b21e6fc4779d7 \
進階搜尋
42人線上 (8人在瀏覽線上書籍)
會員: 0
訪客: 42