本文整理汇总了PHP中Ticket::getTicket方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::getTicket方法的具体用法?PHP Ticket::getTicket怎么用?PHP Ticket::getTicket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket::getTicket方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUniqueness
public function testUniqueness()
{
// Tests for uniqueness
$ticket = new Ticket(null, $this->db);
$text = explode("\n", shell_exec("python bingo.py"))[0];
$ticket->fromString($text);
$numbers = [];
foreach ($ticket->getTicket() as $row) {
foreach ($row as $number) {
if ($number != "") {
$numbers[] = $number;
}
}
}
$isUnique = count($numbers) === count(array_unique($numbers, SORT_NUMERIC));
$this->assertTrue($isUnique);
}
示例2: User
<?php
include 'admin_header.php';
$user = new User();
$view = new View();
$ticket = new Ticket();
$support_id = $ticket->getSupportId();
$uid = intval($_GET['uid']);
$ticket_id = intval($_GET['ticket_id']);
$selected_ticket = $ticket->getTicket($ticket_id);
$tickets = $ticket->getTickets($uid);
?>
<!-- content wrapper -->
<div class="container-full">
<!-- page row -->
<div class="row">
<!-- sidebar -->
<div class="col-sm-2 sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Admin
</a>
</li>
<!-- shows the categories as list elements -->
<?php
$view->showAdminMenu();
?>
示例3: archivaTicket
public static function archivaTicket($id)
{
$db = Tool::_conectaBD();
$archivado = false;
if (!$db) {
//error
//echo "Error conectando <br/>";
} else {
if (!Ticket::estaArchivado($id)) {
$aux = new Ticket();
$aux->getTicket($id);
$sql = "INSERT INTO HistoricoTickets (IdCompra,Codigo,IdTipo,Entregado) VALUES " . "('" . $aux->IdCompra . "','" . $aux->codigo . "','" . $aux->IdTipo . "',0)";
if ($aux->codigo != "") {
if (Tool::ejecutaConsulta($sql, $db)) {
$archivado = true;
} else {
//error
echo "Error insertando " . $aux->codigo . "<br/>SQL: " . $sql . "</br>";
}
} else {
//error
echo "Error obteniendo " . $id . "<br/>SQL: " . $sql . "</br>";
}
} else {
$archivado = true;
}
if ($archivado) {
Ticket::deleteTicket($id);
}
}
Tool::_desconectaBD($db);
return $archivado;
}
示例4: session_start
session_start();
include "../../bossflex/Helpers/Reject.php";
Reject::permission($_SESSION['bfUser']);
include "../../bossflex/DB/Models/BossFlexEmployee.php";
include "../../bossflex/DB/Models/Employee.php";
include "../../bossflex/DB/Models/User.php";
include "../../bossflex/DB/Models/Company.php";
include "../../bossflex/DB/Models/Ticket.php";
include "../../bossflex/Helpers/Material.php";
include "../../bossflex/Helpers/BFPage.php";
$bfEmp = BossFlexEmployee::getEmployeeByBFID($_SESSION['bfUser']['EID']);
$user = User::getUserByUID($_SESSION['bfUser']['UID']);
$error = false;
$success = false;
if (isset($_GET['t'])) {
$ticket = Ticket::getTicket($_GET['t']);
Ticket::assignTicket($bfEmp, $ticket);
$success = "Ticket " . $ticket->getTicketNum() . " Assigned to You";
}
$tickets = Ticket::unassignedTickets();
?>
<html>
<header>
<?php
Material::headers("Unassigned Tickets");
?>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css">
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js">
</script>
示例5: header
if (isset($ticketNum) && !(isset($accept) || isset($decline))) {
$ticket = Ticket::getTicket($ticketNum);
} else {
if (isset($decline) && isset($ticketNum)) {
$ticket = Ticket::getTicket($ticketNum);
if (!isset($comment) || !($comment > "")) {
$error = "Closing Comment Must Be Set If Declining";
} else {
$ticket->setClosingComment($comment);
Ticket::closeTicket($ticket, false);
//decline ticket
$getNextTicket = true;
}
} else {
if (isset($accept) && isset($ticketNum)) {
$ticket = Ticket::getTicket($ticketNum);
Ticket::closeTicket($ticket, true);
//accept ticket
$getNextTicket = true;
}
}
}
}
if ($getNextTicket) {
$tickets = Ticket::assignedTicketList($bfEmp);
if (!$tickets) {
header("Location: Home.php?s=" . urlencode("All tickets reviewed!"));
exit;
}
$ticket = reset($tickets);
$ticketNum = $ticket->getTicketNum();