当前位置: 首页>>代码示例>>PHP>>正文


PHP Dept::autoRespONNewTicket方法代码示例

本文整理汇总了PHP中Dept::autoRespONNewTicket方法的典型用法代码示例。如果您正苦于以下问题:PHP Dept::autoRespONNewTicket方法的具体用法?PHP Dept::autoRespONNewTicket怎么用?PHP Dept::autoRespONNewTicket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dept的用法示例。


在下文中一共展示了Dept::autoRespONNewTicket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: close

 function close()
 {
     $sql = 'UPDATE ' . TICKET_TABLE . ' SET status=' . db_input('closed') . ',staff_id=0,isoverdue=0,duedate=NULL,updated=NOW(),closed=NOW() ' . ' WHERE ticket_id=' . db_input($this->getId());
     // NEW MOD CODE STARTS HERE
     // get dept object
     $dept = new Dept($this->getDeptId());
     // get email object for current
     $email = new Email($this->getEmail());
     // see if the department ticket is configured for is setup for auto response on
     // new tickets.  I have some departments I don't want notification on close
     // A new attribute could be used, but I piggy backed on an existing as it
     // suited my needs fine for now.
     if ($dept->autoRespONNewTicket()) {
         // small debug message that prints at the top of ticket screen so I know
         // an email was sent
         print '<div id="system_notice"><b>Email enviado</b></div>';
         // subject for email -- totally configurable.  code in previous post was
         // showing the internal ID, not the external ID a user would need
         $subj = "Solicitud de soporte #" . $this->getExtId() . " cerrada";
         // I added a link in the body to the ticket for the user if they wanted
         // to view it just after I closed it.
         $body = "El ticket #" . $this->getExtId() . " fue cerrado.\n\nPuede consultar la información sobre la consulta en:\nhttp://soporte.chilesinpapeleo.cl/view.php?e=" . $this->getEmail() . "&t=" . $this->getExtId() . "\n\nSaludos,\nMesa de soporte\nUnidad de Modernización y Gobierno Digital";
         // this sends out the email ensuring the "From" address is whatever
         // is configured for the department
         $dept->getEmail()->send($this->getEmail(), $subj, $body);
     }
     // NEW MOD CODE ENDS HERE
     return db_query($sql) && db_affected_rows() ? true : false;
 }
开发者ID:e-gob,项目名称:chilesinpapeleo-soporte,代码行数:29,代码来源:class.ticket.php


注:本文中的Dept::autoRespONNewTicket方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。