예제 #1
0
<?php

require_once "connect.php";
$date = "";
isset($_POST["date"]) ? $date = $_POST["date"] : ($date = NIL);
$date_tmp = strtotime($date);
$date = date('Y-m-d', $date_tmp);
echo json_encode(getTickets($link, $date));
function getTickets($link, $date)
{
    $answer = "";
    if ($date) {
        $status = array("0" => "Не подтвержден", "1" => "Подтвержден", "2" => "Отменен");
        $status_style = array("0" => "style = ''", "1" => "style = 'color: darkgreen; font-size: larger;'", "2" => "style = 'color: darkred; font-size: larger;'");
        $query_sitplaces = "SELECT * FROM sit_place;";
        if (!($result_sitplaces = mysqli_query($link, $query_sitplaces))) {
            die('Error: ' . mysqli_error($link));
        }
        $local_sitplaces = array();
        while ($row_sitplaces = mysqli_fetch_assoc($result_sitplaces)) {
            $local_sitplaces[$row_sitplaces["id_sitplace"]] = $row_sitplaces["name"];
        }
        $query_tickets = "SELECT * from tickets, trip WHERE trip.date = '{$date}' AND tickets.id_trip = trip.id_trip;";
        if (!($result_tickets = mysqli_query($link, $query_tickets))) {
            return "query error";
            //die ('Error: ' . mysqli_error($link));
        }
        while ($row_tickets = mysqli_fetch_assoc($result_tickets)) {
            $id_pass = $row_tickets["id_pass"];
            $id_trip = $row_tickets["id_trip"];
            $query_pass = "******";
예제 #2
0
        $closed = date("Y-m-d", strtotime($xmlTicket->pubDate));
        // skip tickets before contest start...
        if ($closed < $startDate) {
            continue;
        }
        $author = "";
        $pull = "";
        if (preg_match($rpull, $xmlTicket->description, $matches)) {
            $pull = "https://github.com/jquery/jquery-ui/pull/" . $matches[1];
            $author = $matches[2];
        }
        $tickets[$id] = array("ticket_id" => $id, "closed_on" => $closed, "pull_request" => $pull, "author_github" => $author, "description" => $xmlTicket->description);
    }
    return $tickets;
}
$tickets = getTickets();
$stmt = $mysqli->prepare("SELECT ticket_id, closed_on, author_github, pull_request FROM rewards_leaderboard WHERE ticket_id = ?");
$stmt->bind_result($ticket_id, $closed_on, $pull_request, $author_github);
echo "Check the box / Fill in the github/pull request for elligable tickets and submit form.";
echo "<form method='post'><table>";
echo "<tr><th>Ticket</th><th>Date</th><th>fixer's github</th><th>pull request</th></tr>";
foreach ($tickets as $ticket) {
    $stmt->bind_param("i", $ticket['ticket_id']);
    $stmt->execute() or die('Error executing query');
    if ($result = $stmt->fetch()) {
        echo "<tr class='in_database'><td><a href='http://bugs.jqueryui.com/ticket/" . $ticket_id . "'>{$ticket_id}</a></td>";
        echo "<td>{$closed_on}</td><td><a href='{$pull_request}'>{$pull_request}</a></td><td><a href='https://github.com/{$author_github}'>{$author_github}</a></td></tr>";
        continue;
    } else {
        extract($ticket);
        echo "<tr><td>";
echo '+ Use command line parameter -v to set verbose mode: ' . $verbose . "\n";
$limitation = isset($options['l']) ? $options['l'] : 0;
echo '+ Use command line parameter -l number to set request limit: ' . $limitation . "\n";
if (isset($options['h'])) {
    $host = $options['h'];
}
echo '+ Use command line parameter -h "hostname" to set Web Services host: ' . $host . "\n";
/*
* ACTIONS
*/
// Init sessions
if (!($session = login())) {
    die("Connexion refused !\n");
}
// Tickets (100 record from first)
if (getTickets($session)) {
}
// Hosts counters
if (getOverallState($session, "Hosts")) {
}
// Services catalogs counters
if (getOverallState($session, "Businessrules")) {
}
// Components catalogs counters
if (getOverallState($session, "Componentscatalog")) {
}
// Services counters
if (getOverallState($session, "Ressources")) {
}
// Hosts states (no filter, 100 record from first)
if (getHostsStates($session, '', 0, 1)) {
예제 #4
0
if ($_SESSION['ID'] == 0) {
    $query = "SELECT * FROM Ticket;";
} else {
    $query = "SELECT * FROM Ticket WHERE CustID=" . $_SESSION['ID'] . ";";
}
?>
<div class="post">
	<h2 class="title"><a href="#">Update Ticket Status </a></h2>
	<div style="clear: both;">&nbsp;</div>
	<script type='text/javascript' src='./js/jquery.min.js'></script>
	<div class="entry">
		<form method="POST" action="dbentry.php">
		<table class="item-table" >
				<tr>
					<td>CustID</td>
					<td>TicketNo</td>
					<td>Grievance</td>
					<td>Date</td>
					<td>Status</td>
					<td>New Status</td>
				</tr>
			<?php 
echo getTickets($query);
?>
		</table>
		<input type="Submit" value="Apply">
		</form>
	</div>
</div>
<?php 
include_once 'footer.php';
예제 #5
0
         //Получение названия специализации
         $arResult['SPECIALIZATION'] = getNameSpecialization($idSpecialization, $this->GetRelativePath());
         $arResult['ID_SPECIALIZATION'] = $idSpecialization;
         $arResult['DATE_TICKET'] = $dateTicket;
         $arFilterTicket = array('UF_SPECIALIZATION' => $idSpecialization, 'UF_DOCTOR' => $idDoctor, '>=UF_DATETIME' => new \Bitrix\Main\Type\DateTime($dateTicket . ' 00:00:00'), '<=UF_DATETIME' => new \Bitrix\Main\Type\DateTime($dateTicket . ' 23:59:59'));
         //Получение списка всех талонов по выбранной специализации у выбранного врача на выбранную дату
         $arResult['FREE_TICKETS'] = getTickets($arFilterTicket, 'free');
         //Получение списка свободных талонов по выбранной специализации у выбранного врача на выбранную дату
         $arResult['ALL_TICKETS'] = getTickets($arFilterTicket, 'all');
     }
     break;
 case 'get_ticket':
     if (!empty($idTicket) && !empty($policy) && !empty($birthday) && !empty($idCabinet) && !empty($fio)) {
         $arFilterTicket = array('ID' => $idTicket);
         //Получение информации по талону
         $tickets = getTickets($arFilterTicket, 'free');
         foreach ($tickets as $doctor => $ticket) {
             foreach ($ticket as $dateTicket => $timeTicket) {
                 foreach ($timeTicket as $idTicket => $ticketInfo) {
                     //Получение ФИО врача
                     $arResult['DOCTOR'] = getFIODoctor($doctor, $this->GetRelativePath());
                     //Получение номера кабинета
                     $arResult['CABINET'] = getNumberCabinet($idCabinet, $this->GetRelativePath());
                     //Получение названия специализации
                     $arResult['SPECIALIZATION'] = getNameSpecialization($ticketInfo['UF_SPECIALIZATION'], $this->GetRelativePath());
                     $arResult['DATETIME_TICKET'] = $dateTicket . ' ' . $ticketInfo['TIME_TICKET'];
                     break;
                 }
                 break;
             }
             break;