Ejemplo n.º 1
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once './classes/concertClass.php';
$id = $_GET['id'];
// instace of the items
$concertData = new drawConcertTable();
// get all items on the database from concierto and entrada
$concertItems = $concertData->eventInfo($id);
include 'views/header.php';
include 'views/body.php';
include 'views/form.php';
include 'views/event-info.php';
include 'views/footer.php';
Ejemplo n.º 2
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once "buy.php";
require_once "classes/concertClass.php";
include "views/header.php";
$name = $_POST['name'];
$userId = $_POST['userId'];
$email = $_POST['email'];
$ticket = $_POST['entradas'];
$concert = new drawConcertTable();
//Get the quantity of tickets in the table ENTRADA
$itemsQuant = $concert->countTicketsItems($_GET['id'])->count;
for ($i = 0; $i < $ticket; $i++) {
    $insertTicket = $concert->insertEntrada($itemsQuant + $i, $_GET['id']);
}
$expectator = $concert->insertEspectador($userId, $name, $email, $ticket, $_GET['id']);
include "views/footer.php";
Ejemplo n.º 3
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);
/**
 * @name table.php
 * @description prints all the inventary items inside a table
 */
require_once './classes/concertClass.php';
// instace of the items
$concert = new drawConcertTable();
// get all items on the database from concierto and entrada
$concertItems = $concert->all();
// print the table
echo '
<div class="col-md-8 table-container-list">
	<table class="table">
		<thead class="table-row-header">
			<tr>
				<th>id</th>
				<th>Concierto</th>
				<th>Fecha</th>
				<th>Hora</th>
				<th>Precio</th>
				<th>Entradas Disponibles</th>
			</tr>
		</thead>
		<tbody>
';
foreach ($concertItems as $key => $item) {
    echo '