Viewing file: Podium.php (3.71 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//echo 'hola';die();
include('Carrusel/class.MySqliDB.php');
include('globals.php');
$Debug= 1;
$ConnectionArray= array('Server'=>'localhost',
'Usser'=>'matadin2017',
'Pass'=>'p0rt0rp32009',
'Db'=>'matadin2017');
$ConnMysql= new MysqliDB($ConnectionArray);
$Sql= ("SET NAMES UTF8");
$ConnMysql->EnviarQuery($Sql);
$Sql= '';
$Title= '';
//$_REQUEST['Tipo']= 'podium';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>Clasificación General 13 Km</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<!--div id="Logo" style="margin-left:20px;">
<img src="css/Escudo.png" width="45" height="79" /><span class="Logo"><?php echo VarTitle;?></span>
</div-->
<div id="Contenedor" class="Contenedor">
<?php
$AuxCategoria= array( 'CORTA'=>array('FEMENINA','MASCULINA'),
'LARGA'=>array( 'Femenina Senior','Femenina Veteranas A','Femenina Veteranas B',
'Masculina Senior','Masculina Veteranos A','Masculina Veteranos B')
);
$AuxClasificacion= array();
$AuxClasificacion['CORTA']= array();
$AuxClasificacion['LARGA']= array();
$Sql= "SELECT `Dorsal`,`Nombre`,`Apellidos`,`Categoria`,`Carrera`,`Crono`,`Puesto`,`General`
FROM `matadin2017`.`clasificacion_unificada` WHERE `Crono` IS NOT NULL ORDER BY `Crono`";
$ConnMysql->EnviarQuery($Sql);
$ConnMysql->ResultadoObjeto();
//echo "<pre>";print_r($ConnMysql->ArrayResultado);die();
$Title= 'Clasificacion General por Categorias';
if($ConnMysql->MySqliResult->num_rows != 0)
{
foreach($ConnMysql->ArrayResultado as $FDatos)
{
$AuxClasificacion[$FDatos->Carrera][$FDatos->Categoria][$FDatos->Puesto]= $FDatos;
}
unset($FDatos);
//echo "<pre>";print_r($AuxClasificacion);die();
?>
<br />
<span class="Titulo"><?php echo $Title;?></span>
<br /> <?php
foreach($AuxCategoria as $KCarrera=>$VCarrera)
{
foreach($VCarrera as $Categoria)
{
/*
[Dorsal] => 301
[Nombre] => BELEN
[Apellidos] => CASTRO CASTELLANOS
[Categoria] => FEMENINA
[Carrera] => CORTA
[Crono] => 00:01:19
[Puesto] => 1
[General] => 1
*/
?>
<p><span class="Texto15 Negrita left10"><?php echo 'CLASIFICACION CARRERA '.strtoupper($KCarrera).' CATEGORIA '.strtoupper($Categoria);?></span></p>
<table style="margin-left:10px;" width="95%">
<tr>
<th class="TEncabezado">Orden<br />Llegada</th>
<th class="TEncabezado">Dorsal</th>
<th class="TEncabezado">Nombre</th>
<th class="TEncabezado">Apellidos</th>
<th class="TEncabezado">Categoria</th>
<th class="TEncabezado">Crono</th>
<th class="TEncabezado">General</th>
</tr>
<?php
$i= 1;
foreach($AuxClasificacion[$KCarrera][$Categoria] as $FDatos)
{
if($i%2)echo '<tr class="TImpar">';else echo '<tr class="TPar">';
echo sprintf("<td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
$FDatos->Puesto,$FDatos->Dorsal,$FDatos->Nombre,$FDatos->Apellidos,$FDatos->Categoria,$FDatos->Crono,$FDatos->General);
$i++;
if(isset($_REQUEST['Tipo']) and $_REQUEST['Tipo'] == 'podium' and $i == 4)
{
break;
}
}
unset($FDatos);
?> </table> <?php
}
}
}
else{echo '<span>NO HAY CORREDORES FINALIZADOS</span>';}
?>
</div>
</body>
</html>
|