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


PHP Ticket::isOpen方法代码示例

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


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

示例1: elseif

     } elseif (!$cfg->canUploadFileType($_FILES['attachment']['name'][$i])) {
         $errors['attachment'] = _('Invalid file type') . ' [ ' . Format::htmlchars($_FILES['attachment']['name'][$i]) . ' ]';
     } elseif ($_FILES['attachment']['size'][$i] > $cfg->getMaxFileSize()) {
         $errors['attachment'] = _('File is too big') . ': ' . $_FILES['attachment']['size'][$i] . ' bytes';
     }
     $i++;
 }
 //Make sure the email is not banned
 if (!$errors && BanList::isbanned($ticket->getEmail())) {
     $errors['err'] = _('Email is in banlist. Must be removed to reply');
 }
 //If no error...do the do.
 if (!$errors && ($respId = $ticket->postResponse($_POST['response'], $_POST['signature'], $_FILES['attachment']))) {
     $msg = _('Response Posted Successfully');
     //Set status if any.
     $wasOpen = $ticket->isOpen();
     if (isset($_POST['ticket_status']) && $_POST['ticket_status']) {
         if ($ticket->setStatus($_POST['ticket_status']) && $ticket->reload()) {
             $note = sprintf(_('%s %s the ticket on reply'), $thisuser->getName(), $ticket->isOpen() ? _('reopened') : _('closed'));
             $ticket->logActivity(sprintf(_('Ticket status changed to %s'), $ticket->isOpen() ? _('Open') : _('Closed')), $note);
         }
     }
     //Finally upload attachment if any
     if ($_FILES['attachment'] && $_FILES['attachment']['size']) {
         $ticket->uploadAttachment($_FILES['attachment'], $respId, 'R');
     }
     $ticket->reload();
     //Mark the ticket answered if OPEN.
     if ($ticket->isopen()) {
         $ticket->markAnswered();
     } elseif ($wasOpen) {
开发者ID:jahanzaibbahadur,项目名称:Katak-support,代码行数:31,代码来源:tickets.php

示例2: elseif

     } elseif (!$cfg->canUploadFiles()) {
         //TODO: saved vs emailed attachments...admin config??
         $errors['attachment'] = 'upload dir invalid. Contact admin.';
     } elseif (!$cfg->canUploadFileType($_FILES['attachment']['name'])) {
         $errors['attachment'] = 'Invalid file type';
     }
 }
 //Make sure the email is not banned
 if (!$errors && BanList::isbanned($ticket->getEmail())) {
     $errors['err'] = 'Email is in banlist. Must be removed to reply';
 }
 //If no error...do the do.
 if (!$errors && ($respId = $ticket->postResponse($_POST['msg_id'], $_POST['response'], $_POST['signature'], $_FILES['attachment']))) {
     $msg = 'Response Posted Successfully';
     //Set status if any.
     $wasOpen = $ticket->isOpen();
     if (isset($_POST['ticket_status']) && $_POST['ticket_status']) {
         if ($ticket->setStatus($_POST['ticket_status']) && $ticket->reload()) {
             $note = sprintf('%s %s the ticket on reply', $thisuser->getName(), $ticket->isOpen() ? 'reopened' : 'closed');
             $ticket->logActivity('Ticket status changed to ' . ($ticket->isOpen() ? 'Open' : 'Closed'), $note);
         }
     }
     //Finally upload attachment if any
     if ($_FILES['attachment'] && $_FILES['attachment']['size']) {
         $ticket->uploadAttachment($_FILES['attachment'], $respId, 'R');
     }
     $ticket->reload();
     //Mark the ticket answered if OPEN.
     if ($ticket->isopen()) {
         $ticket->markAnswered();
     } elseif ($wasOpen) {
开发者ID:supaket,项目名称:helpdesk,代码行数:31,代码来源:tickets.php

示例3: elseif

         if ($ticket->markOverdue()) {
             $msg = 'Ticket flagged as overdue';
             if ($_POST['ticket_priority']) {
                 $ticket->setPriority($_POST['ticket_priority']);
             }
         } else {
             $errors['err'] = 'Problems marking the the ticket overdue. Try again';
         }
     }
     break;
 case 'banemail':
     if (!$thisuser->isadmin() && !$thisuser->canManageBanList()) {
         $errors['err'] = 'Perm. Denied. You are not allowed to ban emails';
     } elseif (Banlist::add($ticket->getEmail(), $thisuser->getName())) {
         $msg = 'Email added to banlist';
         if ($ticket->isOpen() && $ticket->close()) {
             $msg .= ' & ticket status set to closed';
         }
     } else {
         $errors['err'] = 'Unable to add the email to banlist';
     }
     break;
 case 'unbanemail':
     if (!$thisuser->isadmin() && !$thisuser->canManageBanList()) {
         $errors['err'] = 'Perm. Denied. You are not allowed to remove emails from banlist.';
     } elseif (Banlist::remove($ticket->getEmail())) {
         $msg = 'Email removed from banlist';
     } else {
         $errors['err'] = 'Unable to remove the email from banlist. Try again.';
     }
     break;
开发者ID:googlecode-mirror,项目名称:barbos,代码行数:31,代码来源:tickets.php

示例4: previewTicket

 function previewTicket($tid)
 {
     global $thisstaff;
     $ticket = new Ticket($tid);
     $resp = sprintf('<div style="width:500px;">
              <strong>Ticket #%d Preview</strong><br>INFO HERE!!', $ticket->getExtId());
     $options[] = array('action' => 'Thread (' . $ticket->getThreadCount() . ')', 'url' => "tickets.php?id={$tid}");
     if ($ticket->getNumNotes()) {
         $options[] = array('action' => 'Notes (' . $ticket->getNumNotes() . ')', 'url' => "tickets.php?id={$tid}#notes");
     }
     if ($ticket->isOpen()) {
         $options[] = array('action' => 'Reply', 'url' => "tickets.php?id={$tid}#reply");
     }
     if ($thisstaff->canAssignTickets()) {
         $options[] = array('action' => $ticket->isAssigned() ? 'Reassign' : 'Assign', 'url' => "tickets.php?id={$tid}#assign");
     }
     if ($thisstaff->canTransferTickets()) {
         $options[] = array('action' => 'Transfer', 'url' => "tickets.php?id={$tid}#transfer");
     }
     $options[] = array('action' => 'Post Note', 'url' => "tickets.php?id={$tid}#note");
     if ($options) {
         $resp .= '<ul class="tip_menu">';
         foreach ($options as $option) {
             $resp .= sprintf('<li><a href="%s">%s</a></li>', $option['url'], $option['action']);
         }
         $resp .= '</ul>';
     }
     $resp .= '</div>';
     return $resp;
 }
开发者ID:ryan1432,项目名称:osTicket-1.7fork,代码行数:30,代码来源:ajax.tickets.php


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