<?php

/* 	

	AMXBans v6.0
	
	Copyright 2009, 2010 by Fedcomp и только Fedcomp!

	This file is part of AMXBans.

    AMXBans is free software, but it's licensed under the
	Creative Commons - Attribution-NonCommercial-ShareAlike 2.0

    AMXBans is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    You should have received a copy of the cc-nC-SA along with AMXBans.  
	If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.

*/

//@session_start();

require_once("include/config.inc.php");
require_once("include/access.inc.php");
require_once("include/menu.inc.php");
require_once("include/steam.inc.php");
require_once("include/sql.inc.php");
require_once("include/logfunc.inc.php");
require_once("include/functions.inc.php");

$smarty = new dynamicPage;

$admin_id = (INT)$_GET['id'];


$servers_query = "SELECT hostname FROM `".$config->db_prefix."_admins_servers`
LEFT JOIN `".$config->db_prefix."_serverinfo` ON `".$config->db_prefix."_admins_servers`.server_id=`".$config->db_prefix."_serverinfo`.id WHERE admin_id=${admin_id}";

$servers_query = mysql_query($servers_query);

$servers = '';
while($res = mysql_fetch_row($servers_query))
	$servers[] = $res[0];

$admin_data = "SELECT * FROM `".$config->db_prefix."_amxadmins` WHERE `id`={$admin_id} LIMIT 1";
$admin_data = mysql_query($admin_data);
$admin_data = mysql_fetch_assoc($admin_data);

$smarty->assign("servers",$servers);
$smarty->assign("admin",$admin_data);

$smarty->display('admin_ajax.tpl');

/*
// Template generieren
$title = "_TITLEADMINLIST";

$smarty->assign("admins",$admins);
$smarty->assign("meta","");
$smarty->assign("title",$title);
$smarty->assign("version_web",$config->v_web);
// amxbans.css available in design? if not, take default one.
if(file_exists("templates/".$config->design."/amxbans.css")) {
	$smarty->assign("design",$config->design);
}
$smarty->assign("dir",$config->document_root);
$smarty->assign("this",$_SERVER['PHP_SELF']);
$smarty->assign("menu",$menu);
$smarty->assign("banner",$config->banner);
$smarty->assign("banner_url",$config->banner_url);

$smarty->display('main_header.tpl');
$smarty->display('admin_list.tpl');
$smarty->display('main_footer.tpl');
*/
?>