File: //opt/Newsmag/italiagurdam.php
<?php
/*
Template Name: Italiagurdam
*/
$suffix = "";
if (isset($_GET['suffix'])) {
$suffix = $_GET['suffix'];
}
$uri = $_SERVER['REQUEST_URI'];
//$totalPosts = str_replace("/","",str_replace("/ultime-news-","",$uri));
$totalPosts = $_GET['num'];
$current_user = wp_get_current_user();
$bannerLaterale = $wpdb->get_var( "SELECT immagine FROM wp_plugin_atalantini_banner where tipo = 'QUADRATO'" );
?>
<?php get_header(); ?>
<div class="td-main-content-wrap">
<div class="td-container">
<div class="td-container-border">
<div class="td-pb-row">
<div class="td-pb-span12 td-main-content">
<img src="/wp-content/themes/atalantini/images/adagurdam.jpg" width="100%">
<?php
$team1 = "";
$team2 = "";
$img1 = "";
$img2 = "";
$game = "";
$ids = "";
$rs1 = "";
$rs2 = "";
$ruoli = array();
$ruoli[] = "PORTIERE";
$ruoli[] = "DIFENSORE";
$ruoli[] = "CENTROCAMPISTA";
$ruoli[] = "ATTACCANTE";
$ruoli[] = "ALLENATORE";
$sql = "select id, sq1, sq2, immagine1, immagine2,resultsq1, resultsq2,players from wp_plugin_atalantini_team" . $suffix . " where tipo = '2';";
$teams = $wpdb->get_results($sql);
foreach ( $teams as $team ) {
$game = $team->id;
$team1 = $team->sq1;
$img1 = $team->immagine1;
$rs1 = $team->resultsq1;
$team2 = $team->sq2;
$img2 = $team->immagine2;
$ids = $team->players;
$rs2 = $team->resultsq2;
if ($img2 == "palermo.jpg") {
$img2 = "palermo.png";
}
?>
<br>
<div class="td-pb-row">
<div class="td-pb-span6 td-main-content">
<center>
<h1><?= $team1 ?></h1>
<img width="201" src="/wp-content/themes/atalantini/squadre/<?= $img1 ?>">
<div class="iis-caption-game">
<center>
<h2><?= $rs1 ?></h2>
</center>
</div>
</center>
</div>
<div class="td-pb-span6 td-main-content">
<center>
<h1><?= $team2 ?></h1>
<img width="201" src="/wp-content/themes/atalantini/squadre/<?= $img2 ?>">
<div class="iis-caption-game">
<center>
<h2><?= $rs2 ?></h2>
</center>
</div>
</center>
</div>
</div>
<div class="td-pb-row">
<div class="td-pb-span12 td-main-content">
<a href="/risultati-partite/?id=<?= $game ?>" class="btn btn-primary" style="float:right">Visualizza le pagelle</a>
</div>
</div>
<br>
<?php
?>
<?php
}
?>
</div><!-- /grid11 -->
</div>
</div><!-- /grid12 -->
</div><!-- /row -->
</div><!-- /end page content -->
<?php get_footer(); ?>
<script>
function seePlayer(id) {
<?= $javascript ?>
jQuery('#player_' + id).css('display','block');
location.href = "#player_" + id;
}
</script>