예제 #1
0
 public function onMarkSolved(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message)
 {
     if (false === $ticket->saveVars(array('hdt_status' => 'solved'))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->module->message('msg_solve_solved');
 }
예제 #2
0
 public function onAssign(GWF_HelpdeskTicket $ticket, GWF_User $user)
 {
     if (false === $ticket->saveVars(array('hdt_worker' => $user->getID(), 'hdt_status' => 'working'))) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->module->message('msg_assigned', array($ticket->getID(), $user->displayUsername()));
 }
예제 #3
0
 private function onMailTicketB(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message, GWF_User $user)
 {
     if ('' === ($rec = $user->getValidMail())) {
         return;
     }
     $mail = new GWF_Mail();
     $mail->setSender(GWF_BOT_EMAIL);
     $mail->setReceiver($rec);
     $mail->setSubject($this->module->langUser($user, 'subj_nt', array($ticket->getID())));
     $href_work = Common::getAbsoluteURL($this->module->getMethodURL('AssignWork', '&ticket=' . $ticket->getID() . '&worker=' . $user->getID() . '&token=' . $ticket->getHashcode()), false);
     $mail->setBody($this->module->langUser($user, 'body_nt', array($user->displayUsername(), $ticket->getCreator()->displayUsername(), $ticket->displayTitle($user), $message->displayMessage(), $href_work)));
     return $mail->sendToUser($user);
 }
예제 #4
0
파일: MarkRead.php 프로젝트: sinfocol/gwf3
 public function onMarkRead(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message)
 {
     if (false === $message->saveOption(GWF_HelpdeskMsg::READ, true)) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     $bit = 0;
     if (GWF_Session::getUserID() === $ticket->getWorkerID()) {
         $bit |= GWF_HelpdeskTicket::STAFF_READ;
     }
     if (GWF_Session::getUserID() === $ticket->getCreatorID()) {
         $bit |= GWF_HelpdeskTicket::USER_READ;
     }
     if (false === $ticket->saveOption($bit, true)) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return $this->module->message('msg_read');
 }
예제 #5
0
파일: Ticket.php 프로젝트: sinfocol/gwf3
 private function sendReplyMailStaff(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message, GWF_User $user)
 {
     $mail = new GWF_Mail();
     $mail->setSender(GWF_BOT_EMAIL);
     $mail->setReceiver($user->getValidMail());
     $mail->setSubject($this->module->langUser($user, 'subj_nms', array($ticket->getID())));
     $link_read = Common::getAbsoluteURL($this->module->getMethodURL('MarkRead', sprintf('&ticket=%s&message=%s&token=%s', $ticket->getID(), $message->getID(), $message->getHashcode())));
     $mail->setBody($this->module->langUser($user, 'body_nms', array($user->displayUsername(), $ticket->getCreator()->displayUsername(), $message->displayMessage(), $link_read)));
     $mail->sendToUser($user);
 }