<?php
define('_IN_JOHNCMS', 1);
$headmod = 'manager';
$textl='O`yin'; 
require_once("../incfiles/core.php");
require_once("../incfiles/head.php");
require_once("manfunc.php"); 

$qm=mysql_query("select * from fman_matches where id=$id;");
$data=mysql_fetch_array($qm);

$t=turn($data[turn],$data[tur],$data[land]);

$q = mysql_query("select * from `fman_lands` where `code` = '$data[land]' limit 1;");
$a = mysql_fetch_array($q);
$l1 = mysql_query("select * from `fman_clubs` where `id` = '$data[id1]' limit 1;");
$le1 = mysql_fetch_array($l1);
$l2 = mysql_query("select * from `fman_clubs` where `id` = '$data[id2]' limit 1;");
$le2 = mysql_fetch_array($l2);
echo"<div class='phdr' style='text-align:center;'><img src='$home/man/flags_icon/$le1[land].png' style='vertical-align: middle;' alt='$le1[land]'>&#160;<a href='club.php?id=$le1[id]' style='color:#fff;'>$le1[name]</a> vs <a href='club.php?id=$le2[id]' style='color:#fff;'>$le2[name]</a>&#160;<img src='$home/man/flags_icon/$le2[land].png' alt='$le2[land]' style='vertical-align: middle;'></div>
<div class='gmenu'>
<center>
".functions::display_date($data[time])."<br/>
$t<br/>
</center>
";

echo'<table width="100%"><tr>
<td width="43%" align="center"><img src="emblems/'.$data['id1'].'.jpg" height="64" weight="64" /><br/><a href="club.php?id='.$data['id1'].'">'.$data['kom1'].'</a></td>
<td width="14%" align="center"><font size="5"><b>'.$data['sc1'].'&#160;:&#160;'.$data['sc2'].'</b></font>';
if($data[end]!=1)echo"<br/>".(60-date("s"))." s."; echo'</td>
<td width="43%" align="center"><img src="emblems/'.$data['id2'].'.jpg" height="64" weight="64" /><br/><a href="club.php?id='.$data['id2'].'">'.$data['kom2'].'</a></td>
</tr></table>';

echo"</div>";
if ($rights >=7 && $data[end] =='0') 
echo"<div class='menu'><a href='stop_game.php?id=$id'>O'yinni tugatish</a></div>";
$n=0;

for($j=1;$j<21;$j++)
{
	$si="s".$j;
	$ag=explode('|',$data[$si]);
	if($ag[2]==2)
	{
		$n=$n+1;
		if($n==1)echo"<div class='phdr' style='text-align:center;'>Gol mualliflari</div><div class='menu'>";
		echo"<div align='";
		if($ag[5]==$data[id1])echo"left";
		if($ag[5]==$data[id2])echo"right";
		echo"'>$ag[3] $ag[0]&#039;</div>";
	}
}

if($n)echo"</div>";
echo"<div class='phdr' style='text-align:center;'><img src='img/tv.png'> <b>Matnli translatsiya</b>";
if($data[end]!=1) { echo" <a href='match.php?id=$id&amp;time=$realtime'><img src='img/ref.png'></a>"; } echo"</div>";
for($i=1;$i<17;$i++)
{
	$si="s".$i;
	$a=explode('|',$data[$si]);
	if($a[1])
	{
		if($i==2)echo"<div class='phdr' style='text-align:center;'>Birinchi taym</div>";
		if($i==7)echo"<div class='phdr' style='text-align:center;'>Ikkinchi taym</div>";
		if($i==13)echo"<div class='phdr' style='text-align:center;'>Qo`shimcha vaqt</div>";
		echo"<div class='menu'><b>$a[0]&#039;</b> $a[1]</div>";
	}
}
if($data['rait'])echo $data['rait'];
echo"<div class='gmenu'><a href='index.php'>Futbol menejer</a></div>";
require_once("../incfiles/end.php"); 
?>