Ejemplo n.º 1
0
<?php

require_once '../model/ticketModel.php';
$ticket = new ticket();
$ticketModel = new ticketModel();
$name = $email = $id_user = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $id_user = $_POST['user_id'];
}
$ticket->setid_user($id_user);
$ticket->setname($name);
$ticket->setemail($email);
$text = '<b>' . $_POST['sujet'] . '</b><br> ' . $_POST['text'];
$ticket->settext($text);
$ticketModel->ajouterTicket($ticket);
$url = $_SERVER['HTTP_REFERER'];
header('location:' . $url);
Ejemplo n.º 2
0
<?php

require_once "../model/ticketModel.php";
$id_ticket = htmlspecialchars($_GET["IdTicket"]);
$ticket = new ticket();
$ticketModel = new ticketModel();
$ticket = $ticketModel->afficherTicket($id_ticket);
?>
<html>
<head>
	<title>Consulter Ticket</title>
</head>
<body>
	<div class="row">
		<div class="col s6">
			<table class="hoverable">
				<tr>
					<td>ID :</td>
					<td><?php 
echo $ticket->getid_ticket();
?>
</td>
				</tr>
				<tr>
					<td>Name :</td>
					<td><?php 
echo $ticket->getname();
?>
</td>
				</tr>
				<tr>
Ejemplo n.º 3
0
<?php

require_once '../model/ticketModel.php';
//include_once '../view/header.php';
$ticketModel = new ticketModel();
$listeT = $ticketModel->displayTicket(1);
if (isset($_POST['action'])) {
    if (count($listeT) != 0) {
        echo "<span class='new badge'>" . count($listeT) . "</span>";
    }
} else {
    $i = 0;
    ?>
<table>
	<thead>
		<tr>
			<th>id</th>
			<th>Name</th>
			<th>Email</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
<?php 
    foreach ($listeT as $Tick) {
        $i++;
        ?>
    <tr>
        <td><?php 
        echo $Tick->getid_ticket();
        ?>