コード例 #1
0
ファイル: MarkSolved.php プロジェクト: sinfocol/gwf3
 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
ファイル: AssignWork.php プロジェクト: sinfocol/gwf3
 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
ファイル: CreateTicket.php プロジェクト: sinfocol/gwf3
 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);
 }