Esempio n. 1
0
<?php

// Vista asignada
$obj_xtpl->assign_file('contenido', $obj_config->GetVar('ruta_vista') . 'sorteo' . $obj_config->GetVar('ext_vista'));
// Modelo asignado
require $obj_config->GetVar('ruta_modelo') . 'Sorteo.php';
$obj_modelo = new Sorteo($obj_conexion);
switch (ACCION) {
    case 'add':
        // Ruta actual
        $_SESSION['Ruta_Form'] = $obj_generico->RutaRegreso();
        // Ruta regreso
        $obj_xtpl->assign('ruta_regreso', $_SESSION['Ruta_Lista']);
        // Accion a realizar
        $obj_xtpl->assign('tipo_accion', 'save');
        $obj_xtpl->assign('tag_boton', 'Guardar');
        // Listado de Horas
        if ($result = $obj_modelo->GetHoras()) {
            foreach ($result as $hora) {
                $obj_xtpl->assign('id_hora', $hora);
                $obj_xtpl->parse('main.contenido.formulario.lista_horas');
            }
        }
        // Listado de Minutos
        if ($result = $obj_modelo->GetMinutos()) {
            foreach ($result as $minutos) {
                $obj_xtpl->assign('id_minutos', $minutos);
                $obj_xtpl->parse('main.contenido.formulario.lista_minutos');
            }
        }
        // Listado de Loterias
Esempio n. 2
0
<?php

include dirname(__DIR__) . "/sorteo/Sorteo.php";
$sorteo_object = new Sorteo();
$sorteo_create = $sorteo_object->createSorteo();
$status = $sorteo_create['success'];
$message = $sorteo_create['message'];
header("Location: ./create_view.php?status={$status}&message={$message}");
Esempio n. 3
0
<?php

include "../header_main.php";
include_once "./Sorteo.php";
?>


<div class="col-md-8 col-md-offset-2">
  <h3 class="text-center" style="color: white">Sorteos realizados&nbsp;<span class="glyphicon glyphicon-th-list"></span></h3>

<?php 
$sorteos = Sorteo::listarSorteos();
if (!empty($sorteos)) {
    ?>
  <table class="table" id="table_sorteos">
    <thead>
      <tr>
        <th style="color:white">Id</th>
        <th style="color:white">Fecha del Sorteo</th>
        <th style="color:white">Codigo Ganador</th>
        <th style="color:white">Nombre del Ganador</th>
      </tr>
    </thead>
    <tbody>
      <?php 
    foreach ($sorteos as $sorteo) {
        ?>
        <tr>
          <td><?php 
        echo $sorteo->id;
        ?>