本文整理汇总了PHP中Ticket::setStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::setStatus方法的具体用法?PHP Ticket::setStatus怎么用?PHP Ticket::setStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket::setStatus方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listar
public function listar($ordem = "ASC", $campo = self::ID)
{
$info = parent::listar($ordem, $campo);
if (!empty($info)) {
$temp = new Ticket($info[self::ID]);
parent::resgatarObjetos($info);
$lP = new ListaPessoas();
$lP->condicoes('', $info[self::CLIENTE], ListaPessoas::ID);
if ($lP->getTotal() > 0) {
$temp->setCliente($lP->listar());
}
$temp->setNivel($info[self::NIVEL]);
$temp->setStatus($info[self::STATUS]);
$temp->setSatisfacao($info[self::SATISFACAO]);
$temp->titulo = $info[self::TITULO];
$temp->setDataAlteracao(new DataHora($info[self::DATAHORA_ALTERACAO]));
return $temp;
}
}
示例2: elseif
} 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) {
//Closed on response???
$page = $ticket = null;
示例3: updateTicketStatusAndPriority
/**
* updates the ticket's status & priority.
* A log entry about this will be created only if the newStatus is different from the current status and also when the newPriority is different from the current priority.
* @todo break this function up into a updateStatus (already exists) and updatePriority function and perhaps write a wrapper function for the combo.
* @param $ticket_id the id of the ticket of which we want to change the status & priority
* @param $newStatus the new status value (integer)
* @param $newPriority the new priority value (integer)
* @param $author the user (id) that performed the update
*/
public static function updateTicketStatusAndPriority($ticket_id, $newStatus, $newPriority, $author)
{
$ticket = new Ticket();
$ticket->load_With_TId($ticket_id);
if ($ticket->getStatus() != $newStatus) {
$ticket->setStatus($newStatus);
Ticket_Log::createLogEntry($ticket_id, $author, 5, $newStatus);
}
if ($ticket->getPriority() != $newPriority) {
$ticket->setPriority($newPriority);
Ticket_Log::createLogEntry($ticket_id, $author, 6, $newPriority);
}
$ticket->update();
}
示例4: elseif
//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.
if (isset($_POST['ticket_status']) && $_POST['ticket_status']) {
$ticket->setStatus($_POST['ticket_status']);
}
//Finally upload attachment if any
if ($_FILES['attachment'] && $_FILES['attachment']['size']) {
$ticket->uploadAttachment($_FILES['attachment'], $respId, 'R');
}
} else {
$errors['err'] = $errors['err'] ? $errors['err'] : 'Unable to post the response.';
}
break;
case 'transfer':
$fields = array();
$fields['dept_id'] = array('type' => 'int', 'required' => 1, 'error' => 'Select Department');
$fields['message'] = array('type' => 'text', 'required' => 1, 'error' => 'Note/Message required');
$params = new Validator($fields);
if (!$params->validate($_POST)) {
示例5: Person
$person = new Person($row['username']);
$ticket->setEnteredByPerson($person);
if (isset($row['referralId']) && $row['referralId']) {
$person = new Person($row['referredId']);
$ticket->setReferredPerson($person);
} else {
$ticket->setAssignedPerson($person);
}
} catch (Exception $e) {
}
}
// status
switch ($row['status']) {
case 'Requested':
case 'Referred':
$ticket->setStatus('open');
break;
default:
$ticket->setStatus('closed');
$ticket->setResolution('Resolved');
}
// if the request has resolution record ==> it is closed
if (isset($row['resolutionId']) && $row['resolutionId']) {
$ticket->setStatus('closed');
$ticket->setResolution('Resolved');
}
// No address or location info
// Create the issue on this ticket
$issue = new Issue();
$issue->setDate($ticket->getEnteredDate());
if ($ticket->getEnteredByPerson()) {
示例6: IFAdmin
<?php
importar("Utilidades.Tickets.Lista.ListaTickets");
$tituloPagina = 'Utilidades > Tickets > Cadastrar';
$iCT = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaUtilidades/ticket.html"));
if (!empty($_POST)) {
$erro = '';
if (empty($_POST['titulo'])) {
$erro = "<b>Titulo</b> não preenchido!<br><br>";
}
if (empty($erro)) {
$ti = new Ticket();
$ti->titulo = $_POST['titulo'];
$ti->setNivel($_POST['nivel']);
$ti->setStatus($_POST['status']);
$lP = new ListaPessoas();
$lP->condicoes('', $_POST['cliente'], ListaPessoas::ID);
if ($lP->getTotal() > 0) {
$ti->setCliente($lP->listar());
}
$lT = new ListaTickets();
$lT->inserir($ti);
if (!empty($_POST['texto'])) {
$tP = new TicketPost();
$tP->texto = $_POST['texto'];
$tP->nome = Sistema::$nomeEmpresa;
$tP->setDataHora(new DataHora());
if (!empty($_FILES['arquivo']['name'])) {
$tP->setArquivo(Arquivos::__OpenArquivoByTEMP($_FILES['arquivo']));
}
$ti->addPostagem($tP);