Created
January 23, 2019 16:52
-
-
Save dangvanduc90/9b430e28568956e013eca7e12995e75b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($id){ | |
$reference = getUser($id); | |
if($reference && isset($reference['email']) && $reference['email']){ | |
$ref_name = isset($reference['fullname']) && $reference['fullname'] ? $reference['fullname'] : $reference['username']; | |
$content = 'Dear ' . $ref_name . ', <br><br>' | |
. 'Bạn vừa được ' . '<b>' . $owner_name . '</b> gán làm người liên quan cho ticket <b>' . $ticket['title'] . '</b> vào lúc ' . date('d/m/Y H:i:s', strtotime($ticket['created_date'])) . '<br>' | |
. 'Click vào link bên dưới để theo dõi công việc.<br>' | |
. '<a href="http://' . getenv('EXTERNAL_URL') . '/instance/ticket/view/' . $ticket['id'] . '/' . $ticket['business_id'] . '">' | |
. 'http://' . getenv('EXTERNAL_URL') . '/instance/ticket/view/' . $ticket['id'] . '/' . $ticket['business_id'] . '</a><br><br>' | |
. 'Ticket Platform'; | |
sendEmail($reference, $ticket['title'], $content, $ticket['id']); | |
} else { | |
$log = array( | |
'reference_user_id' => $id, | |
'reference_user' => $reference, | |
'line' => __FILE__.' - Line: '.__LINE__, | |
'time' => date('Y-m-d H:i:s', time()), | |
'url' => getenv('EXTERNAL_URL'), | |
); | |
createLogs($log, EXCEPTION_ROUTER); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment