<?php

/**
 * Football Manager for JohnCMS
 * Просмотр информации о игроке
 * @author Screamer
 */

$textl = 'Информация о игроке';

require '../incfiles/head.php';

 $data = mysql_fetch_assoc(mysql_query("SELECT * FROM `man_players` WHERE `id` = '" . $id . "'"));
 if ($data) {
 	$data['name'] = htmlentities($data['name'], ENT_QUOTES, 'UTF-8');
 	$club = mysql_fetch_assoc(mysql_query("SELECT `name` FROM `man_clubs` WHERE `id` = '" . $data['refid'] . "'"));
	$club = ($club)
	 	? '<a href="?act=club&amp;id=' . $data['refid'] . '">' . htmlentities($club['name'], ENT_QUOTES, 'UTF-8') . '</a>'
		: 'Неизвестно';
 	echo '<div class="phdr">Футбольный менеджер | ' . $data['name'] . '</div>'
 		. '<div class="menu">'
		. '<b>Клуб:</b> ' . $club . '<br />'
		. '<b>Страна:</b> ' . htmlentities($data['country'], ENT_QUOTES, 'UTF-8') . '<br />'
		. '<b>Позиция:</b> ' . htmlspecialchars($data['amplua'])
		. '</div>'
 		. '<div class="phdr"><a href="' . $referer . '">Назад</a></div>';
 } else {
 	echo Functions::display_error('Игрок не найден', '<a href="' . $referer . '">Назад</a>');
 }

 require '../incfiles/end.php';