X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-support.php;h=8e864c3193d1f26d5e3862302b08820daf3ed99e;hp=03c455ccf9b8bc88f169f4c141ca30948e1b1be6;hb=e9da1508b2a3ccbf63adc999981674740a47e074;hpb=414570c5081d337bb6c28dcf521bd8bca02f69e7 diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 03c455ccf9..8e864c3193 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -1,7 +1,7 @@ = "0.4.1") { - $a_tpl = "admin_support-".REQUEST_POST('qsummary'); + if (isExtensionInstalledAndNewer('admins', '0.4.1')) { + $a_tpl = 'admin_support_' . postRequestElement('qsummary'); } else { - $msg_a = LOAD_EMAIL_TEMPLATE("admin_support-".REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), $GLOBALS['userid']); + $message_a = loadEmailTemplate('admin_support_' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); } - $msg_m = LOAD_EMAIL_TEMPLATE("member_support-".REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), $GLOBALS['userid']); + $message_m = loadEmailTemplate('member_support_' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); // Select right subject - switch (REQUEST_POST('qsummary')) { - case "ordr": - $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER'); - $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER'); + switch (postRequestElement('qsummary')) { + case 'ordr': + $subj_a = '{--ADMIN_SUPPORT_ORDER_SUBJECT--}'; + $subj_m = '{--MEMBER_SUPPORT_ORDER_SUBJECT--}'; break; - case "reflink": - $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_REFLINK'); - $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_REFLINK'); + case 'reflink': + $subj_a = '{--ADMIN_SUPPORT_REFERRAL_LINK_SUBJECT--}'; + $subj_m = '{--MEMBER_SUPPORT_REFERRAL_LINK_SUBJECT--}'; break; - case "unconfirmed": - $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_UNCONFIRMED'); - $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_UNCONFIRMED'); + case 'unconfirmed': + $subj_a = '{--ADMIN_SUPPORT_UNCONFIRMED_SUBJECT--}'; + $subj_m = '{--MEMBER_SUPPORT_UNCONFIRMED_SUBJECT--}'; break; } // END - switch // Send mail to admin - SEND_ADMIN_NOTIFICATION($subj_a, $a_tpl, array('text' => REQUEST_POST('qdetails')), $GLOBALS['userid']); + sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getMemberId()); // Send mail to user - SEND_EMAIL($GLOBALS['userid'], $subj_m, $msg_m); + sendEmail(getMemberId(), $subj_m, $message_m); - // Drop a message in the admin's area - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())", - array($GLOBALS['userid'], $subj_a, REQUEST_POST('qsummary').":".array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__); + // Drop a message in the admin's area (we ignore the task id here) + createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'MEMBER_SUPPORT', getMemberId()); // Form sent - LOAD_TEMPLATE("member_support_contcted"); + loadTemplate('member_support_contcted'); } -// + +// [EOF] ?>