Пример #1
0
include_once "../../model/class.tickets.php";
include_once "../../controller/class.tickets.php";
include_once "../../model/class.ticketslan.php";
include_once "../../controller/class.ticketslan.php";
include_once "../../model/class.jogador.php";
include_once "../../controller/class.jogador.php";
include_once "../../model/class.jogos.php";
include_once "../../controller/class.jogos.php";
include_once "../../model/class.local.php";
include_once "../../controller/class.local.php";
include_once "../../model/class.ficha.php";
include_once "../../controller/class.ficha.php";
$ticket_id = isset($_GET["id"]) ? $_GET["id"] : 0;
$jogo_id = isset($_GET["jogo"]) ? $_GET["jogo"] : 0;
$ticket = new Ticket();
$lan = new Ticketlan();
$jogador = new Jogador();
$jogo = new Jogo();
$local = new Local();
$ficha = new Ficha();
if ($jogo_id == 0 || !$jogo->buscar($jogo_id)) {
    echo "<script>\n                alert('Registro não encontrado!');\n                window.location = 'listagem.php';\n              </script>";
    exit;
}
if ($ticket_id == 0 || !$ticket->buscar($ticket_id)) {
    echo "<script>\n                alert('Registro não encontrado!');\n                window.location = 'cadastro.php?id={$jogo_id}';\n              </script>";
    exit;
}
if ($ticket->getJogoId() != $jogo_id) {
    echo "<script>\n                alert('Registro não encontrado!');\n                window.location = 'listagem.php';\n              </script>";
    exit;
Пример #2
0
<?php

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Controle de jogadores e fichas de poker, na modalidade cash game. */
/*              Desenvolvido por: Reinaldo Silveira                  */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
require "../verifica.php";
include_once "../../model/class.ticketslan.php";
include_once "../../controller/class.ticketslan.php";
$ticketlan_id = isset($_GET["id"]) ? $_GET["id"] : 0;
$ticket_id = isset($_GET["ticket"]) ? $_GET["ticket"] : 0;
$jogo_id = isset($_GET["ticket"]) ? $_GET["jogo"] : 0;
$acao = isset($_GET["acao"]) ? $_GET["acao"] : '';
$lan = new Ticketlan();
if ($acao == 'excluir' && $ticketlan_id > 0 && $ticket_id > 0) {
    if ($lan->excluir($ticketlan_id)) {
        echo "<script>window.location = 'lancamentos.php?id={$ticket_id}&jogo={$jogo_id}';</script>";
    } else {
        echo "<script>\n                window.location = 'lancamentos.php?id={$ticket_id}';\n                alert('Erro ao excluir. Por favor, tente novamente.');\n              </script>";
    }
}